@burdenoff/microfe-organization 2026.1026.1 → 2026.1101.2
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/generated/global-operations.js +57 -58
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js +1 -2
- package/dist/generated/global-types.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +2 -3
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/errors.js +44 -0
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.js +7 -0
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +652 -0
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/api.js +429 -0
- package/dist/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.js +143 -0
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/zod/v4/core/core.js +84 -0
- package/dist/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.js +29 -0
- package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.js +90 -0
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +285 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/memoizer.js +188 -0
- package/dist/node_modules/zod/v4/core/memoizer.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +159 -0
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.js +34 -0
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.js +41 -0
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.js +979 -0
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +330 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
- package/dist/node_modules/zod/v4/core/util.js +417 -0
- package/dist/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/en.js +96 -0
- package/dist/node_modules/zod/v4/locales/en.js.map +1 -0
- package/dist/organization-management/AdminOrganizationRoot.js +13 -10
- package/dist/organization-management/AdminOrganizationRoot.js.map +1 -1
- package/dist/organization-management/AdminOrganizationRoutes.js +8 -9
- package/dist/organization-management/AdminOrganizationRoutes.js.map +1 -1
- package/dist/organization-management/UserOrganizationRoot.js +13 -10
- package/dist/organization-management/UserOrganizationRoot.js.map +1 -1
- package/dist/organization-management/UserOrganizationRoutes.js +1 -2
- package/dist/organization-management/UserOrganizationRoutes.js.map +1 -1
- package/dist/organization-management/constants/permissions.js +1 -2
- package/dist/organization-management/constants/permissions.js.map +1 -1
- package/dist/organization-management/hooks/useOrganizationEventEmitter.js +1 -2
- package/dist/organization-management/hooks/useOrganizationEventEmitter.js.map +1 -1
- package/dist/organization-management/hooks/useOrganizationPageView.js +1 -2
- package/dist/organization-management/hooks/useOrganizationPageView.js.map +1 -1
- package/dist/organization-management/modules/members/components/BulkInviteForm.js +3 -3
- package/dist/organization-management/modules/members/components/BulkInviteForm.js.map +1 -1
- package/dist/organization-management/modules/members/components/InviteMemberForm.js +1 -2
- package/dist/organization-management/modules/members/components/InviteMemberForm.js.map +1 -1
- package/dist/organization-management/modules/members/components/InviteStatusBadge.js +1 -2
- package/dist/organization-management/modules/members/components/InviteStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/members/components/MemberRoleBadge.js +1 -2
- package/dist/organization-management/modules/members/components/MemberRoleBadge.js.map +1 -1
- package/dist/organization-management/modules/members/components/MyInviteCard.js +5 -6
- package/dist/organization-management/modules/members/components/MyInviteCard.js.map +1 -1
- package/dist/organization-management/modules/members/components/PendingInvitesList.js +8 -9
- package/dist/organization-management/modules/members/components/PendingInvitesList.js.map +1 -1
- package/dist/organization-management/modules/members/hooks/useInvites.js +2 -3
- package/dist/organization-management/modules/members/hooks/useInvites.js.map +1 -1
- package/dist/organization-management/modules/members/hooks/useMembers.js +1 -2
- package/dist/organization-management/modules/members/hooks/useMembers.js.map +1 -1
- package/dist/organization-management/modules/members/hooks/useWorkspaceInvites.js +1 -2
- package/dist/organization-management/modules/members/hooks/useWorkspaceInvites.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js +16 -17
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js +14 -15
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MemberDetailPage.js +18 -19
- package/dist/organization-management/modules/members/pages/MemberDetailPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MembersListPage.js +142 -143
- package/dist/organization-management/modules/members/pages/MembersListPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js +168 -169
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js +13 -14
- package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js.map +1 -1
- package/dist/organization-management/modules/members/utils/bulkInviteCsv.js +4 -10
- package/dist/organization-management/modules/members/utils/bulkInviteCsv.js.map +1 -1
- package/dist/organization-management/modules/members/utils/workspaceInvitationDisplay.js +1 -2
- package/dist/organization-management/modules/members/utils/workspaceInvitationDisplay.js.map +1 -1
- package/dist/organization-management/modules/organizations/components/OrganizationForm.js +14 -15
- package/dist/organization-management/modules/organizations/components/OrganizationForm.js.map +1 -1
- package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js +1 -2
- package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/organizations/hooks/useOrganizations.js +2 -3
- package/dist/organization-management/modules/organizations/hooks/useOrganizations.js.map +1 -1
- package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.js +22 -21
- package/dist/organization-management/modules/organizations/hooks/useOrgsWithPermission.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js +18 -19
- package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js +29 -30
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js +14 -15
- package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +33 -34
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/schemas/index.js +11 -12
- package/dist/organization-management/modules/organizations/schemas/index.js.map +1 -1
- package/dist/organization-management/modules/workspaces/components/AddWorkspaceMemberDialog.js +16 -24
- package/dist/organization-management/modules/workspaces/components/AddWorkspaceMemberDialog.js.map +1 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceCard.js +5 -6
- package/dist/organization-management/modules/workspaces/components/WorkspaceCard.js.map +1 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceForm.js +31 -32
- package/dist/organization-management/modules/workspaces/components/WorkspaceForm.js.map +1 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js +1 -2
- package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/workspaces/hooks/useWorkspaceMembers.js +1 -2
- package/dist/organization-management/modules/workspaces/hooks/useWorkspaceMembers.js.map +1 -1
- package/dist/organization-management/modules/workspaces/hooks/useWorkspaces.js +11 -12
- package/dist/organization-management/modules/workspaces/hooks/useWorkspaces.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js +18 -19
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js +43 -44
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js +19 -20
- package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js +240 -241
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/schemas/index.js +6 -7
- package/dist/organization-management/modules/workspaces/schemas/index.js.map +1 -1
- package/dist/organization-management/providers/OrgConsoleProvider.js +1 -2
- package/dist/organization-management/providers/OrgConsoleProvider.js.map +1 -1
- package/dist/organization-management/providers/OrgScopedPermissions.js +1 -2
- package/dist/organization-management/providers/OrgScopedPermissions.js.map +1 -1
- package/dist/organization-management/shared/components/dialog/ConfirmDialog.js +1 -2
- package/dist/organization-management/shared/components/dialog/ConfirmDialog.js.map +1 -1
- package/dist/organization-management/shared/components/dialog/ConfirmDialogView.js +1 -2
- package/dist/organization-management/shared/components/dialog/ConfirmDialogView.js.map +1 -1
- package/dist/organization-management/shared/components/feedback/ErrorState.js +1 -2
- package/dist/organization-management/shared/components/feedback/ErrorState.js.map +1 -1
- package/dist/organization-management/shared/components/feedback/LoadingState.js +1 -2
- package/dist/organization-management/shared/components/feedback/LoadingState.js.map +1 -1
- package/dist/organization-management/shared/components/input/SearchInput.js +1 -2
- package/dist/organization-management/shared/components/input/SearchInput.js.map +1 -1
- package/dist/organization-management/shared/components/input/SelectionCheckbox.js +1 -2
- package/dist/organization-management/shared/components/input/SelectionCheckbox.js.map +1 -1
- package/dist/organization-management/shared/hooks/useDebouncedValue.js +1 -2
- package/dist/organization-management/shared/hooks/useDebouncedValue.js.map +1 -1
- package/dist/organization-management/shared/hooks/useTr.js +1 -2
- package/dist/organization-management/shared/hooks/useTr.js.map +1 -1
- package/dist/organization-management/shared/logger.js +1 -2
- package/dist/organization-management/shared/logger.js.map +1 -1
- package/dist/organization-management/shared/recaptcha.js +1 -2
- package/dist/organization-management/shared/recaptcha.js.map +1 -1
- package/dist/organization-management/shared/types/graphql.js +1 -2
- package/dist/organization-management/shared/types/graphql.js.map +1 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +8 -6
- package/dist/node_modules/zod/v3/ZodError.js +0 -82
- package/dist/node_modules/zod/v3/ZodError.js.map +0 -1
- package/dist/node_modules/zod/v3/errors.js +0 -10
- package/dist/node_modules/zod/v3/errors.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -9
- package/dist/node_modules/zod/v3/helpers/errorUtil.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -93
- package/dist/node_modules/zod/v3/helpers/parseUtil.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/util.js +0 -76
- package/dist/node_modules/zod/v3/helpers/util.js.map +0 -1
- package/dist/node_modules/zod/v3/locales/en.js +0 -62
- package/dist/node_modules/zod/v3/locales/en.js.map +0 -1
- package/dist/node_modules/zod/v3/types.js +0 -2441
- package/dist/node_modules/zod/v3/types.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useCallback as e } from "react";
|
|
2
2
|
import { useI18n as t } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
3
|
-
|
|
3
|
+
// src/organization-management/shared/hooks/useTr.ts
|
|
4
4
|
function n() {
|
|
5
5
|
let { t: n } = t();
|
|
6
6
|
return e((e, t, r) => {
|
|
@@ -8,7 +8,6 @@ function n() {
|
|
|
8
8
|
return r ? Object.entries(r).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${t}\\}\\}`, "g"), String(n)), a) : a;
|
|
9
9
|
}, [n]);
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { n as useTr };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=useTr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTr.js","names":[],"sources":["../../../../src/organization-management/shared/hooks/useTr.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\nexport type TranslationFn = (\n key: string,\n fallback: string,\n params?: Record<string, string | number>\n) => string;\n\n/**\n * useTr — translation hook with fallback semantics.\n *\n * Wraps `useI18n().t()` so that when a key has no translation (i.e. the\n * provider returns the key itself), the caller's English fallback is used\n * instead. This keeps consumer call sites consistent and avoids leaking\n * untranslated keys into the UI.\n *\n * Supports optional interpolation params using `{{key}}` placeholders.\n *\n * @example\n * const tr = useTr();\n * return <h1>{tr('organizations.title', 'Organizations')}</h1>;\n * return <p>{tr('organizations.selectedCount', '{{count}} selected', { count: 5 })}</p>;\n */\nexport function useTr(): TranslationFn {\n const { t } = useI18n();\n return useCallback(\n (key: string, fallback: string, params?: Record<string, string | number>): string => {\n const translated = t(key);\n const raw = translated === key ? fallback : translated;\n if (!params) return raw;\n return Object.entries(params).reduce(\n (str, [k, v]) => str.replace(new RegExp(`\\\\{\\\\{${k}\\\\}\\\\}`, 'g'), String(v)),\n raw\n );\n },\n [t]\n );\n}\n"],"mappings":";;;AAwBA,
|
|
1
|
+
{"version":3,"file":"useTr.js","names":["useTr","useI18n","useCallback","translated","t","key","raw","fallback","params","k","v","str"],"sources":["../../../../src/organization-management/shared/hooks/useTr.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\n\nexport type TranslationFn = (\n key: string,\n fallback: string,\n params?: Record<string, string | number>\n) => string;\n\n/**\n * useTr — translation hook with fallback semantics.\n *\n * Wraps `useI18n().t()` so that when a key has no translation (i.e. the\n * provider returns the key itself), the caller's English fallback is used\n * instead. This keeps consumer call sites consistent and avoids leaking\n * untranslated keys into the UI.\n *\n * Supports optional interpolation params using `{{key}}` placeholders.\n *\n * @example\n * const tr = useTr();\n * return <h1>{tr('organizations.title', 'Organizations')}</h1>;\n * return <p>{tr('organizations.selectedCount', '{{count}} selected', { count: 5 })}</p>;\n */\nexport function useTr(): TranslationFn {\n const { t } = useI18n();\n return useCallback(\n (key: string, fallback: string, params?: Record<string, string | number>): string => {\n const translated = t(key);\n const raw = translated === key ? fallback : translated;\n if (!params) return raw;\n return Object.entries(params).reduce(\n (str, [k, v]) => str.replace(new RegExp(`\\\\{\\\\{${k}\\\\}\\\\}`, 'g'), String(v)),\n raw\n );\n },\n [t]\n );\n}\n"],"mappings":";;;AAwBA,SAAgBA,IAAuB;CACrC,IAAM,EAAE,SAAMC,EAAQ;CACtB,OAAOC,GACJ,GAAa,GAAkB,MAAqD;EACnF,IAAMC,IAAaC,EAAEC,CAAG,GAClBC,IAAMH,MAAeE,IAAME,IAAWJ;EAE5C,OADKK,IACE,OAAO,QAAQA,CAAM,CAAC,CAAC,QAC3B,GAAK,CAACC,GAAGC,OAAOC,EAAI,QAAY,OAAO,SAASF,EAAE,SAAS,GAAG,GAAG,OAAOC,CAAC,CAAC,GAC3EJ,CACF,IAJoBA;CAKtB,GACA,CAACF,CAAC,CACJ;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { logManager as e } from "@burdenoff/fe-libs/shared/logger/LogManager";
|
|
2
|
-
|
|
2
|
+
// src/organization-management/shared/logger.ts
|
|
3
3
|
var t = "organization", n = (() => {
|
|
4
4
|
let n = e.getLogger(`microfe.${t}`);
|
|
5
5
|
return n.setContext({
|
|
@@ -40,7 +40,6 @@ var a = {
|
|
|
40
40
|
} catch {}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
//#endregion
|
|
44
43
|
export { a as logger, r as redactId };
|
|
45
44
|
|
|
46
45
|
//# sourceMappingURL=logger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","names":[],"sources":["../../../src/organization-management/shared/logger.ts"],"sourcesContent":["/**\n * Module-scoped logger for `microfe-organization`.\n *\n * Wraps the fe-libs `LogManager` so every log entry is tagged with\n * `module: 'organization'` and IDs are redacted before they hit any sink.\n * Per the SRE guide (§7) we never log emails, display names or other PII.\n */\nimport { logManager } from '@burdenoff/fe-libs/shared/logger/LogManager';\nimport type { ILogger } from '@burdenoff/fe-libs/shared/logger/types';\n\nconst MODULE_NAME = 'organization';\n\nconst baseLogger: ILogger = (() => {\n const log = logManager.getLogger(`microfe.${MODULE_NAME}`);\n log.setContext({ component: 'microfe-organization', module: MODULE_NAME });\n return log;\n})();\n\n/** Redact a free-form ID by exposing only the first/last 4 characters. */\nexport function redactId(id: string | null | undefined): string | undefined {\n if (!id) return undefined;\n if (id.length <= 8) return '***';\n return `${id.slice(0, 4)}…${id.slice(-4)}`;\n}\n\ntype LogData = Record<string, unknown>;\n\ninterface OrganizationLogger {\n info: (event: string, data?: LogData) => void;\n warn: (event: string, data?: LogData) => void;\n error: (event: string, data?: LogData, error?: unknown) => void;\n}\n\nfunction toError(error: unknown): Error | undefined {\n if (!error) return undefined;\n if (error instanceof Error) return error;\n return new Error(typeof error === 'string' ? error : JSON.stringify(error));\n}\n\nexport const logger: OrganizationLogger = {\n info: (event, data) => {\n try {\n baseLogger.info(event, { ...data, module: MODULE_NAME });\n } catch {\n // Logger transport failures must not break the UI.\n }\n },\n warn: (event, data) => {\n try {\n baseLogger.warn(event, { ...data, module: MODULE_NAME });\n } catch {\n // Logger transport failures must not break the UI.\n }\n },\n error: (event, data, error) => {\n try {\n // The fe-libs Logger.error signature drops the `data` arg, so we attach\n // the structured payload to the Error object itself before forwarding.\n const errObj = toError(error) ?? new Error(event);\n const payload = { ...data, module: MODULE_NAME };\n type ErrorWithMeta = Error & { meta?: LogData };\n (errObj as ErrorWithMeta).meta = payload;\n baseLogger.error(event, errObj);\n } catch {\n // Logger transport failures must not break the UI.\n }\n },\n};\n"],"mappings":";;AAUA,
|
|
1
|
+
{"version":3,"file":"logger.js","names":["MODULE_NAME","baseLogger","log","logManager","redactId","id","toError","error","logger","event","data","errObj"],"sources":["../../../src/organization-management/shared/logger.ts"],"sourcesContent":["/**\n * Module-scoped logger for `microfe-organization`.\n *\n * Wraps the fe-libs `LogManager` so every log entry is tagged with\n * `module: 'organization'` and IDs are redacted before they hit any sink.\n * Per the SRE guide (§7) we never log emails, display names or other PII.\n */\nimport { logManager } from '@burdenoff/fe-libs/shared/logger/LogManager';\nimport type { ILogger } from '@burdenoff/fe-libs/shared/logger/types';\n\nconst MODULE_NAME = 'organization';\n\nconst baseLogger: ILogger = (() => {\n const log = logManager.getLogger(`microfe.${MODULE_NAME}`);\n log.setContext({ component: 'microfe-organization', module: MODULE_NAME });\n return log;\n})();\n\n/** Redact a free-form ID by exposing only the first/last 4 characters. */\nexport function redactId(id: string | null | undefined): string | undefined {\n if (!id) return undefined;\n if (id.length <= 8) return '***';\n return `${id.slice(0, 4)}…${id.slice(-4)}`;\n}\n\ntype LogData = Record<string, unknown>;\n\ninterface OrganizationLogger {\n info: (event: string, data?: LogData) => void;\n warn: (event: string, data?: LogData) => void;\n error: (event: string, data?: LogData, error?: unknown) => void;\n}\n\nfunction toError(error: unknown): Error | undefined {\n if (!error) return undefined;\n if (error instanceof Error) return error;\n return new Error(typeof error === 'string' ? error : JSON.stringify(error));\n}\n\nexport const logger: OrganizationLogger = {\n info: (event, data) => {\n try {\n baseLogger.info(event, { ...data, module: MODULE_NAME });\n } catch {\n // Logger transport failures must not break the UI.\n }\n },\n warn: (event, data) => {\n try {\n baseLogger.warn(event, { ...data, module: MODULE_NAME });\n } catch {\n // Logger transport failures must not break the UI.\n }\n },\n error: (event, data, error) => {\n try {\n // The fe-libs Logger.error signature drops the `data` arg, so we attach\n // the structured payload to the Error object itself before forwarding.\n const errObj = toError(error) ?? new Error(event);\n const payload = { ...data, module: MODULE_NAME };\n type ErrorWithMeta = Error & { meta?: LogData };\n (errObj as ErrorWithMeta).meta = payload;\n baseLogger.error(event, errObj);\n } catch {\n // Logger transport failures must not break the UI.\n }\n },\n};\n"],"mappings":";;AAUA,IAAMA,IAAc,gBAEdC,WAA6B;CACjC,IAAMC,IAAMC,EAAW,UAAU,WAAWH,GAAa;CAEzD,OADAE,EAAI,WAAW;EAAE,WAAW;EAAwB,QAAQF;CAAY,CAAC,GAClEE;AACT,EAAA,CAAG;AAGH,SAAgBE,EAAS,GAAmD;CAC1E,IAAKC,GAEL,OADIA,EAAG,UAAU,IAAU,QACpB,GAAGA,EAAG,MAAM,GAAG,CAAC,EAAE,GAAGA,EAAG,MAAM,EAAE;AACzC;AAUA,SAASC,EAAQ,GAAmC;CAClD,IAAKC,GAEL,OADIA,aAAiB,QAAcA,IACxB,MAAM,OAAOA,KAAU,WAAWA,IAAQ,KAAK,UAAUA,CAAK,CAAC;AAC5E;AAEA,IAAaC,IAA6B;CACxC,OAAO,GAAO,MAAS;EACrB,IAAI;GACF,EAAW,KAAKC,GAAO;IAAE,GAAGC;IAAM,QAAQV;GAAY,CAAC;EACzD,QAAQ,CAER;CACF;CACA,OAAO,GAAO,MAAS;EACrB,IAAI;GACF,EAAW,KAAKS,GAAO;IAAE,GAAGC;IAAM,QAAQV;GAAY,CAAC;EACzD,QAAQ,CAER;CACF;CACA,QAAQ,GAAO,GAAM,MAAU;EAC7B,IAAI;GAGF,IAAMW,IAASL,EAAQC,CAAK,KAAS,MAAME,CAAK;GAIhD,AADA,EAA0B,OAAO;IAFf,GAAGC;IAAM,QAAQV;GAEF,GACjCC,EAAW,MAAMQ,GAAOE,CAAM;EAChC,QAAQ,CAER;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recaptcha.js","names":[],"sources":["../../../src/organization-management/shared/recaptcha.ts"],"sourcesContent":["/// <reference types=\"vite/client\" />\n\nconst CAPTCHA_ENABLED = import.meta.env.VITE_CAPTCHA_ENABLED === 'true';\nconst SCRIPT_ID = 'burdenoff-recaptcha-v3';\n\ninterface Grecaptcha {\n ready(callback: () => void): void;\n execute(siteKey: string, options: { action: string }): Promise<string>;\n}\n\nfunction getGrecaptcha(): Grecaptcha | undefined {\n return (window as unknown as { grecaptcha?: Grecaptcha }).grecaptcha;\n}\n\nfunction getSiteKey(): string {\n const siteKey = import.meta.env.VITE_RECAPTCHA_SITE_KEY;\n if (typeof siteKey !== 'string' || siteKey.trim().length === 0) {\n throw new Error('reCAPTCHA site key is not configured');\n }\n return siteKey.trim();\n}\n\nfunction loadScript(siteKey: string): Promise<void> {\n if (getGrecaptcha()?.execute) {\n return Promise.resolve();\n }\n\n const existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n if (existing) {\n return new Promise((resolve, reject) => {\n existing.addEventListener('load', () => resolve(), { once: true });\n existing.addEventListener('error', () => reject(new Error('Failed to load reCAPTCHA')), {\n once: true,\n });\n });\n }\n\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.id = SCRIPT_ID;\n script.async = true;\n script.defer = true;\n script.src = `https://www.google.com/recaptcha/api.js?render=${encodeURIComponent(siteKey)}`;\n script.addEventListener('load', () => resolve(), { once: true });\n script.addEventListener('error', () => reject(new Error('Failed to load reCAPTCHA')), {\n once: true,\n });\n document.head.appendChild(script);\n });\n}\n\nexport async function executeRecaptcha(action: string): Promise<string | undefined> {\n if (!CAPTCHA_ENABLED) {\n return undefined;\n }\n\n const siteKey = getSiteKey();\n await loadScript(siteKey);\n const grecaptcha = getGrecaptcha();\n if (!grecaptcha?.execute) {\n throw new Error('reCAPTCHA is not available');\n }\n\n return new Promise((resolve, reject) => {\n grecaptcha.ready(() => {\n grecaptcha.execute(siteKey, { action }).then(resolve).catch(reject);\n });\n });\n}\n"],"mappings":";AAmDA,
|
|
1
|
+
{"version":3,"file":"recaptcha.js","names":["executeRecaptcha"],"sources":["../../../src/organization-management/shared/recaptcha.ts"],"sourcesContent":["/// <reference types=\"vite/client\" />\n\nconst CAPTCHA_ENABLED = import.meta.env.VITE_CAPTCHA_ENABLED === 'true';\nconst SCRIPT_ID = 'burdenoff-recaptcha-v3';\n\ninterface Grecaptcha {\n ready(callback: () => void): void;\n execute(siteKey: string, options: { action: string }): Promise<string>;\n}\n\nfunction getGrecaptcha(): Grecaptcha | undefined {\n return (window as unknown as { grecaptcha?: Grecaptcha }).grecaptcha;\n}\n\nfunction getSiteKey(): string {\n const siteKey = import.meta.env.VITE_RECAPTCHA_SITE_KEY;\n if (typeof siteKey !== 'string' || siteKey.trim().length === 0) {\n throw new Error('reCAPTCHA site key is not configured');\n }\n return siteKey.trim();\n}\n\nfunction loadScript(siteKey: string): Promise<void> {\n if (getGrecaptcha()?.execute) {\n return Promise.resolve();\n }\n\n const existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n if (existing) {\n return new Promise((resolve, reject) => {\n existing.addEventListener('load', () => resolve(), { once: true });\n existing.addEventListener('error', () => reject(new Error('Failed to load reCAPTCHA')), {\n once: true,\n });\n });\n }\n\n return new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.id = SCRIPT_ID;\n script.async = true;\n script.defer = true;\n script.src = `https://www.google.com/recaptcha/api.js?render=${encodeURIComponent(siteKey)}`;\n script.addEventListener('load', () => resolve(), { once: true });\n script.addEventListener('error', () => reject(new Error('Failed to load reCAPTCHA')), {\n once: true,\n });\n document.head.appendChild(script);\n });\n}\n\nexport async function executeRecaptcha(action: string): Promise<string | undefined> {\n if (!CAPTCHA_ENABLED) {\n return undefined;\n }\n\n const siteKey = getSiteKey();\n await loadScript(siteKey);\n const grecaptcha = getGrecaptcha();\n if (!grecaptcha?.execute) {\n throw new Error('reCAPTCHA is not available');\n }\n\n return new Promise((resolve, reject) => {\n grecaptcha.ready(() => {\n grecaptcha.execute(siteKey, { action }).then(resolve).catch(reject);\n });\n });\n}\n"],"mappings":";AAmDA,eAAsBA,EAAiB,GAA6C,CAiBpF"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
// src/organization-management/shared/types/graphql.ts
|
|
2
2
|
var e = /* @__PURE__ */ function(e) {
|
|
3
3
|
return e.ACTIVE = "ACTIVE", e.INACTIVE = "INACTIVE", e.ARCHIVED = "ARCHIVED", e;
|
|
4
4
|
}({}), t = /* @__PURE__ */ function(e) {
|
|
5
5
|
return e.ACTIVE = "ACTIVE", e.INACTIVE = "INACTIVE", e.ARCHIVED = "ARCHIVED", e;
|
|
6
6
|
}({});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { e as OrganizationStatus, t as WorkspaceStatus };
|
|
9
8
|
|
|
10
9
|
//# sourceMappingURL=graphql.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","names":[],"sources":["../../../../src/organization-management/shared/types/graphql.ts"],"sourcesContent":["/**\n * Shared GraphQL types\n * Generated types will be added via GraphQL Codegen\n */\n\n// Pagination\nexport interface PageInfo {\n totalCount: number;\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n startCursor?: string;\n endCursor?: string;\n}\n\nexport interface PaginationInput {\n first?: number;\n after?: string;\n last?: number;\n before?: string;\n}\n\n// Connection pattern\nexport interface Connection<T> {\n items: T[];\n pageInfo: PageInfo;\n}\n\n// Common enums\nenum TenantStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n SUSPENDED = 'SUSPENDED',\n}\n\nexport enum OrganizationStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n ARCHIVED = 'ARCHIVED',\n}\n\nexport enum WorkspaceStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n ARCHIVED = 'ARCHIVED',\n}\n\nenum ProductStatus {\n ACTIVE = 'ACTIVE',\n BETA = 'BETA',\n DEPRECATED = 'DEPRECATED',\n COMING_SOON = 'COMING_SOON',\n}\n\n// Base entity types (will be replaced by codegen)\nexport interface Tenant {\n id: string;\n name: string;\n slug: string;\n status: TenantStatus;\n subscriptionTier?: string;\n billingAccountId?: string;\n customDomain?: string;\n logoUrl?: string;\n metadata?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n organizations?: Organization[];\n products?: PlatformProduct[];\n}\n\nexport interface Organization {\n id: string;\n tenantId: string;\n name: string;\n slug: string;\n description?: string;\n logo?: string;\n website?: string;\n status: OrganizationStatus;\n metadata?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n memberCount?: number;\n workspaceCount?: number;\n workspaces?: Workspace[];\n}\n\nexport interface Workspace {\n id: string;\n organizationId: string;\n tenantId: string;\n name: string;\n slug: string;\n status: WorkspaceStatus;\n type: string; // PERSONAL, TEAM, etc.\n memberCount?: number;\n endpoint?: string;\n region?: string;\n metadata?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface Member {\n id: string;\n userId: string;\n organizationId: string;\n role: string;\n invitedBy?: string;\n joinedAt?: string;\n}\n\nexport interface PlatformProduct {\n id: string;\n name: string;\n slug: string;\n description?: string;\n category?: string;\n status: ProductStatus;\n iconUrl?: string;\n version?: string;\n metadata?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";AAkCA,
|
|
1
|
+
{"version":3,"file":"graphql.js","names":["OrganizationStatus","\"ACTIVE\"","\"INACTIVE\"","\"ARCHIVED\"","WorkspaceStatus"],"sources":["../../../../src/organization-management/shared/types/graphql.ts"],"sourcesContent":["/**\n * Shared GraphQL types\n * Generated types will be added via GraphQL Codegen\n */\n\n// Pagination\nexport interface PageInfo {\n totalCount: number;\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n startCursor?: string;\n endCursor?: string;\n}\n\nexport interface PaginationInput {\n first?: number;\n after?: string;\n last?: number;\n before?: string;\n}\n\n// Connection pattern\nexport interface Connection<T> {\n items: T[];\n pageInfo: PageInfo;\n}\n\n// Common enums\nenum TenantStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n SUSPENDED = 'SUSPENDED',\n}\n\nexport enum OrganizationStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n ARCHIVED = 'ARCHIVED',\n}\n\nexport enum WorkspaceStatus {\n ACTIVE = 'ACTIVE',\n INACTIVE = 'INACTIVE',\n ARCHIVED = 'ARCHIVED',\n}\n\nenum ProductStatus {\n ACTIVE = 'ACTIVE',\n BETA = 'BETA',\n DEPRECATED = 'DEPRECATED',\n COMING_SOON = 'COMING_SOON',\n}\n\n// Base entity types (will be replaced by codegen)\nexport interface Tenant {\n id: string;\n name: string;\n slug: string;\n status: TenantStatus;\n subscriptionTier?: string;\n billingAccountId?: string;\n customDomain?: string;\n logoUrl?: string;\n metadata?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n organizations?: Organization[];\n products?: PlatformProduct[];\n}\n\nexport interface Organization {\n id: string;\n tenantId: string;\n name: string;\n slug: string;\n description?: string;\n logo?: string;\n website?: string;\n status: OrganizationStatus;\n metadata?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n memberCount?: number;\n workspaceCount?: number;\n workspaces?: Workspace[];\n}\n\nexport interface Workspace {\n id: string;\n organizationId: string;\n tenantId: string;\n name: string;\n slug: string;\n status: WorkspaceStatus;\n type: string; // PERSONAL, TEAM, etc.\n memberCount?: number;\n endpoint?: string;\n region?: string;\n metadata?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface Member {\n id: string;\n userId: string;\n organizationId: string;\n role: string;\n invitedBy?: string;\n joinedAt?: string;\n}\n\nexport interface PlatformProduct {\n id: string;\n name: string;\n slug: string;\n description?: string;\n category?: string;\n status: ProductStatus;\n iconUrl?: string;\n version?: string;\n metadata?: Record<string, unknown>;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";AAkCA,IAAYA,IAAL,yBAAA,GAAA;C,OACL,EAAAC,SAAA,UACA,EAAAC,WAAA,YACA,EAAAC,WAAA,Y;AACF,EAAA,CAAA,CAAA,GAEYC,IAAL,yBAAA,GAAA;C,OACL,EAAAH,SAAA,UACA,EAAAC,WAAA,YACA,EAAAC,WAAA,Y;AACF,EAAA,CAAA,CAAA"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { e as isNative, t as nativeConfirm, n as nativeImpact, r as nativeNotify, i as nativeToast };
|
|
1
|
+
export { isNative, nativeConfirm, nativeImpact, nativeNotify, nativeToast } from "@burdenoff/fe-libs/shared/native";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-organization",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.1101.2",
|
|
4
4
|
"description": "Organization management microfrontend for Burdenoff products",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-router": "^8.3.0",
|
|
55
55
|
"sonner": "^2.0.7",
|
|
56
56
|
"tailwind-merge": "^3.4.0",
|
|
57
|
-
"zod": "^
|
|
57
|
+
"zod": "^4.6.7",
|
|
58
58
|
"zustand": "^5.0.3"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@types/react": "^19.0.2",
|
|
72
72
|
"@types/react-dom": "^19.0.2",
|
|
73
73
|
"@vitejs/plugin-react": "^4.3.4",
|
|
74
|
-
"@vitest/coverage-v8": "^
|
|
74
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
75
75
|
"autoprefixer": "^10.4.20",
|
|
76
76
|
"eslint": "^9.18.0",
|
|
77
77
|
"eslint-plugin-react": "^7.37.5",
|
|
@@ -84,9 +84,10 @@
|
|
|
84
84
|
"tailwindcss": "^4.0.0",
|
|
85
85
|
"typescript": "^5.9.0",
|
|
86
86
|
"typescript-eslint": "^8.46.0",
|
|
87
|
-
"vite": "8.
|
|
87
|
+
"vite": "8.3.5",
|
|
88
88
|
"vite-plugin-dts": "3.9.1",
|
|
89
|
-
"vitest": "^
|
|
89
|
+
"vitest": "^4.1.12",
|
|
90
|
+
"@graphql-tools/url-loader": "8.0.33"
|
|
90
91
|
},
|
|
91
92
|
"peerDependencies": {
|
|
92
93
|
"@apollo/client": "^3.12.0",
|
|
@@ -114,6 +115,7 @@
|
|
|
114
115
|
"immutable": ">=3.8.3",
|
|
115
116
|
"minimatch": ">=3.1.3",
|
|
116
117
|
"fast-uri": ">=3.1.2",
|
|
117
|
-
"ws": ">=8.20.1"
|
|
118
|
+
"ws": ">=8.20.1",
|
|
119
|
+
"@graphql-tools/utils": "12.1.0"
|
|
118
120
|
}
|
|
119
121
|
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { util as e } from "./helpers/util.js";
|
|
2
|
-
//#region node_modules/zod/v3/ZodError.js
|
|
3
|
-
var t = e.arrayToEnum([
|
|
4
|
-
"invalid_type",
|
|
5
|
-
"invalid_literal",
|
|
6
|
-
"custom",
|
|
7
|
-
"invalid_union",
|
|
8
|
-
"invalid_union_discriminator",
|
|
9
|
-
"invalid_enum_value",
|
|
10
|
-
"unrecognized_keys",
|
|
11
|
-
"invalid_arguments",
|
|
12
|
-
"invalid_return_type",
|
|
13
|
-
"invalid_date",
|
|
14
|
-
"invalid_string",
|
|
15
|
-
"too_small",
|
|
16
|
-
"too_big",
|
|
17
|
-
"invalid_intersection_types",
|
|
18
|
-
"not_multiple_of",
|
|
19
|
-
"not_finite"
|
|
20
|
-
]), n = class t extends Error {
|
|
21
|
-
get errors() {
|
|
22
|
-
return this.issues;
|
|
23
|
-
}
|
|
24
|
-
constructor(e) {
|
|
25
|
-
super(), this.issues = [], this.addIssue = (e) => {
|
|
26
|
-
this.issues = [...this.issues, e];
|
|
27
|
-
}, this.addIssues = (e = []) => {
|
|
28
|
-
this.issues = [...this.issues, ...e];
|
|
29
|
-
};
|
|
30
|
-
let t = new.target.prototype;
|
|
31
|
-
Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e;
|
|
32
|
-
}
|
|
33
|
-
format(e) {
|
|
34
|
-
let t = e || function(e) {
|
|
35
|
-
return e.message;
|
|
36
|
-
}, n = { _errors: [] }, r = (e) => {
|
|
37
|
-
for (let i of e.issues) if (i.code === "invalid_union") i.unionErrors.map(r);
|
|
38
|
-
else if (i.code === "invalid_return_type") r(i.returnTypeError);
|
|
39
|
-
else if (i.code === "invalid_arguments") r(i.argumentsError);
|
|
40
|
-
else if (i.path.length === 0) n._errors.push(t(i));
|
|
41
|
-
else {
|
|
42
|
-
let e = n, r = 0;
|
|
43
|
-
for (; r < i.path.length;) {
|
|
44
|
-
let n = i.path[r];
|
|
45
|
-
r === i.path.length - 1 ? (e[n] = e[n] || { _errors: [] }, e[n]._errors.push(t(i))) : e[n] = e[n] || { _errors: [] }, e = e[n], r++;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
return r(this), n;
|
|
50
|
-
}
|
|
51
|
-
static assert(e) {
|
|
52
|
-
if (!(e instanceof t)) throw Error(`Not a ZodError: ${e}`);
|
|
53
|
-
}
|
|
54
|
-
toString() {
|
|
55
|
-
return this.message;
|
|
56
|
-
}
|
|
57
|
-
get message() {
|
|
58
|
-
return JSON.stringify(this.issues, e.jsonStringifyReplacer, 2);
|
|
59
|
-
}
|
|
60
|
-
get isEmpty() {
|
|
61
|
-
return this.issues.length === 0;
|
|
62
|
-
}
|
|
63
|
-
flatten(e = (e) => e.message) {
|
|
64
|
-
let t = {}, n = [];
|
|
65
|
-
for (let r of this.issues) if (r.path.length > 0) {
|
|
66
|
-
let n = r.path[0];
|
|
67
|
-
t[n] = t[n] || [], t[n].push(e(r));
|
|
68
|
-
} else n.push(e(r));
|
|
69
|
-
return {
|
|
70
|
-
formErrors: n,
|
|
71
|
-
fieldErrors: t
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
get formErrors() {
|
|
75
|
-
return this.flatten();
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
n.create = (e) => new n(e);
|
|
79
|
-
//#endregion
|
|
80
|
-
export { n as ZodError, t as ZodIssueCode };
|
|
81
|
-
|
|
82
|
-
//# sourceMappingURL=ZodError.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ZodError.js","names":[],"sources":["../../../../node_modules/zod/v3/ZodError.js"],"sourcesContent":["import { util } from \"./helpers/util.js\";\nexport const ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nexport const quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nexport class ZodError extends Error {\n get errors() {\n return this.issues;\n }\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n static assert(value) {\n if (!(value instanceof ZodError)) {\n throw new Error(`Not a ZodError: ${value}`);\n }\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n const firstEl = sub.path[0];\n fieldErrors[firstEl] = fieldErrors[firstEl] || [];\n fieldErrors[firstEl].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n"],"x_google_ignoreList":[0],"mappings":";;AACA,IAAa,IAAe,EAAK,YAAY;CACzC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACH,CAAC,EAKW,IAAb,MAAa,UAAiB,MAAM;CAChC,IAAI,SAAS;AACT,SAAO,KAAK;;CAEhB,YAAY,GAAQ;AAMhB,EALA,OAAO,EACP,KAAK,SAAS,EAAE,EAChB,KAAK,YAAY,MAAQ;AACrB,QAAK,SAAS,CAAC,GAAG,KAAK,QAAQ,EAAI;KAE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AM,SAAS;EACvC,IAAM,IAAc,EAAE,EAChB,IAAa,EAAE;AACrB,OAAK,IAAM,KAAO,KAAK,OACnB,KAAI,EAAI,KAAK,SAAS,GAAG;GACrB,IAAM,IAAU,EAAI,KAAK;AAEzB,GADA,EAAY,KAAW,EAAY,MAAY,EAAE,EACjD,EAAY,GAAS,KAAK,EAAO,EAAI,CAAC;QAGtC,GAAW,KAAK,EAAO,EAAI,CAAC;AAGpC,SAAO;GAAE;GAAY;GAAa;;CAEtC,IAAI,aAAa;AACb,SAAO,KAAK,SAAS;;;AAG7B,EAAS,UAAU,MACD,IAAI,EAAS,EAAO"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","names":["defaultErrorMap"],"sources":["../../../../node_modules/zod/v3/errors.js"],"sourcesContent":["import defaultErrorMap from \"./locales/en.js\";\nlet overrideErrorMap = defaultErrorMap;\nexport { defaultErrorMap };\nexport function setErrorMap(map) {\n overrideErrorMap = map;\n}\nexport function getErrorMap() {\n return overrideErrorMap;\n}\n"],"x_google_ignoreList":[0],"mappings":";;AACA,IAAI,IAAmBA;AAKvB,SAAgB,IAAc;AAC1B,QAAO"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region node_modules/zod/v3/helpers/errorUtil.js
|
|
2
|
-
var e;
|
|
3
|
-
(function(e) {
|
|
4
|
-
e.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, e.toString = (e) => typeof e == "string" ? e : e?.message;
|
|
5
|
-
})(e ||= {});
|
|
6
|
-
//#endregion
|
|
7
|
-
export { e as errorUtil };
|
|
8
|
-
|
|
9
|
-
//# sourceMappingURL=errorUtil.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errorUtil.js","names":[],"sources":["../../../../../node_modules/zod/v3/helpers/errorUtil.js"],"sourcesContent":["export var errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n // biome-ignore lint:\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message?.message;\n})(errorUtil || (errorUtil = {}));\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAW;CACV,SAAU,GAAW;AAGlB,CAFA,EAAU,YAAY,MAAY,OAAO,KAAY,WAAW,EAAE,YAAS,GAAG,KAAW,EAAE,EAE3F,EAAU,YAAY,MAAY,OAAO,KAAY,WAAW,IAAU,GAAS;GACpF,AAAc,MAAY,EAAE,CAAE"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import e from "../locales/en.js";
|
|
2
|
-
import { getErrorMap as t } from "../errors.js";
|
|
3
|
-
//#region node_modules/zod/v3/helpers/parseUtil.js
|
|
4
|
-
var n = (e) => {
|
|
5
|
-
let { data: t, path: n, errorMaps: r, issueData: i } = e, a = [...n, ...i.path || []], o = {
|
|
6
|
-
...i,
|
|
7
|
-
path: a
|
|
8
|
-
};
|
|
9
|
-
if (i.message !== void 0) return {
|
|
10
|
-
...i,
|
|
11
|
-
path: a,
|
|
12
|
-
message: i.message
|
|
13
|
-
};
|
|
14
|
-
let s = "", c = r.filter((e) => !!e).slice().reverse();
|
|
15
|
-
for (let e of c) s = e(o, {
|
|
16
|
-
data: t,
|
|
17
|
-
defaultError: s
|
|
18
|
-
}).message;
|
|
19
|
-
return {
|
|
20
|
-
...i,
|
|
21
|
-
path: a,
|
|
22
|
-
message: s
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
function r(r, i) {
|
|
26
|
-
let a = t(), o = n({
|
|
27
|
-
issueData: i,
|
|
28
|
-
data: r.data,
|
|
29
|
-
path: r.path,
|
|
30
|
-
errorMaps: [
|
|
31
|
-
r.common.contextualErrorMap,
|
|
32
|
-
r.schemaErrorMap,
|
|
33
|
-
a,
|
|
34
|
-
a === e ? void 0 : e
|
|
35
|
-
].filter((e) => !!e)
|
|
36
|
-
});
|
|
37
|
-
r.common.issues.push(o);
|
|
38
|
-
}
|
|
39
|
-
var i = class e {
|
|
40
|
-
constructor() {
|
|
41
|
-
this.value = "valid";
|
|
42
|
-
}
|
|
43
|
-
dirty() {
|
|
44
|
-
this.value === "valid" && (this.value = "dirty");
|
|
45
|
-
}
|
|
46
|
-
abort() {
|
|
47
|
-
this.value !== "aborted" && (this.value = "aborted");
|
|
48
|
-
}
|
|
49
|
-
static mergeArray(e, t) {
|
|
50
|
-
let n = [];
|
|
51
|
-
for (let r of t) {
|
|
52
|
-
if (r.status === "aborted") return a;
|
|
53
|
-
r.status === "dirty" && e.dirty(), n.push(r.value);
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
status: e.value,
|
|
57
|
-
value: n
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
static async mergeObjectAsync(t, n) {
|
|
61
|
-
let r = [];
|
|
62
|
-
for (let e of n) {
|
|
63
|
-
let t = await e.key, n = await e.value;
|
|
64
|
-
r.push({
|
|
65
|
-
key: t,
|
|
66
|
-
value: n
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
return e.mergeObjectSync(t, r);
|
|
70
|
-
}
|
|
71
|
-
static mergeObjectSync(e, t) {
|
|
72
|
-
let n = {};
|
|
73
|
-
for (let r of t) {
|
|
74
|
-
let { key: t, value: i } = r;
|
|
75
|
-
if (t.status === "aborted" || i.status === "aborted") return a;
|
|
76
|
-
t.status === "dirty" && e.dirty(), i.status === "dirty" && e.dirty(), t.value !== "__proto__" && (i.value !== void 0 || r.alwaysSet) && (n[t.value] = i.value);
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
status: e.value,
|
|
80
|
-
value: n
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}, a = Object.freeze({ status: "aborted" }), o = (e) => ({
|
|
84
|
-
status: "dirty",
|
|
85
|
-
value: e
|
|
86
|
-
}), s = (e) => ({
|
|
87
|
-
status: "valid",
|
|
88
|
-
value: e
|
|
89
|
-
}), c = (e) => e.status === "aborted", l = (e) => e.status === "dirty", u = (e) => e.status === "valid", d = (e) => typeof Promise < "u" && e instanceof Promise;
|
|
90
|
-
//#endregion
|
|
91
|
-
export { o as DIRTY, a as INVALID, s as OK, i as ParseStatus, r as addIssueToContext, c as isAborted, d as isAsync, l as isDirty, u as isValid, n as makeIssue };
|
|
92
|
-
|
|
93
|
-
//# sourceMappingURL=parseUtil.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parseUtil.js","names":["defaultErrorMap"],"sources":["../../../../../node_modules/zod/v3/helpers/parseUtil.js"],"sourcesContent":["import { getErrorMap } from \"../errors.js\";\nimport defaultErrorMap from \"../locales/en.js\";\nexport const makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n if (issueData.message !== undefined) {\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message,\n };\n }\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: errorMessage,\n };\n};\nexport const EMPTY_PATH = [];\nexport function addIssueToContext(ctx, issueData) {\n const overrideMap = getErrorMap();\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap, // contextual error map is first priority\n ctx.schemaErrorMap, // then schema-bound map if available\n overrideMap, // then global override map\n overrideMap === defaultErrorMap ? undefined : defaultErrorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nexport class ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n syncPairs.push({\n key,\n value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nexport const INVALID = Object.freeze({\n status: \"aborted\",\n});\nexport const DIRTY = (value) => ({ status: \"dirty\", value });\nexport const OK = (value) => ({ status: \"valid\", value });\nexport const isAborted = (x) => x.status === \"aborted\";\nexport const isDirty = (x) => x.status === \"dirty\";\nexport const isValid = (x) => x.status === \"valid\";\nexport const isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n"],"x_google_ignoreList":[0],"mappings":";;;AAEA,IAAa,KAAa,MAAW;CACjC,IAAM,EAAE,SAAM,SAAM,cAAW,iBAAc,GACvC,IAAW,CAAC,GAAG,GAAM,GAAI,EAAU,QAAQ,EAAE,CAAE,EAC/C,IAAY;EACd,GAAG;EACH,MAAM;EACT;AACD,KAAI,EAAU,YAAY,KAAA,EACtB,QAAO;EACH,GAAG;EACH,MAAM;EACN,SAAS,EAAU;EACtB;CAEL,IAAI,IAAe,IACb,IAAO,EACR,QAAQ,MAAM,CAAC,CAAC,EAAE,CAClB,OAAO,CACP,SAAS;AACd,MAAK,IAAM,KAAO,EACd,KAAe,EAAI,GAAW;EAAE;EAAM,cAAc;EAAc,CAAC,CAAC;AAExE,QAAO;EACH,GAAG;EACH,MAAM;EACN,SAAS;EACZ;;AAGL,SAAgB,E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,EAAI,SAAS,EAAM;;AAGvC,SAAO;GAAE,QAAQ,EAAO;GAAO,OAAO;GAAa;;GAG9C,IAAU,OAAO,OAAO,EACjC,QAAQ,WACX,CAAC,EACW,KAAS,OAAW;CAAE,QAAQ;CAAS;CAAO,GAC9C,KAAM,OAAW;CAAE,QAAQ;CAAS;CAAO,GAC3C,KAAa,MAAM,EAAE,WAAW,WAChC,KAAW,MAAM,EAAE,WAAW,SAC9B,KAAW,MAAM,EAAE,WAAW,SAC9B,KAAW,MAAM,OAAO,UAAY,OAAe,aAAa"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
//#region node_modules/zod/v3/helpers/util.js
|
|
2
|
-
var e;
|
|
3
|
-
(function(e) {
|
|
4
|
-
e.assertEqual = (e) => {};
|
|
5
|
-
function t(e) {}
|
|
6
|
-
e.assertIs = t;
|
|
7
|
-
function n(e) {
|
|
8
|
-
throw Error();
|
|
9
|
-
}
|
|
10
|
-
e.assertNever = n, e.arrayToEnum = (e) => {
|
|
11
|
-
let t = {};
|
|
12
|
-
for (let n of e) t[n] = n;
|
|
13
|
-
return t;
|
|
14
|
-
}, e.getValidEnumValues = (t) => {
|
|
15
|
-
let n = e.objectKeys(t).filter((e) => typeof t[t[e]] != "number"), r = {};
|
|
16
|
-
for (let e of n) r[e] = t[e];
|
|
17
|
-
return e.objectValues(r);
|
|
18
|
-
}, e.objectValues = (t) => e.objectKeys(t).map(function(e) {
|
|
19
|
-
return t[e];
|
|
20
|
-
}), e.objectKeys = typeof Object.keys == "function" ? (e) => Object.keys(e) : (e) => {
|
|
21
|
-
let t = [];
|
|
22
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
|
|
23
|
-
return t;
|
|
24
|
-
}, e.find = (e, t) => {
|
|
25
|
-
for (let n of e) if (t(n)) return n;
|
|
26
|
-
}, e.isInteger = typeof Number.isInteger == "function" ? (e) => Number.isInteger(e) : (e) => typeof e == "number" && Number.isFinite(e) && Math.floor(e) === e;
|
|
27
|
-
function r(e, t = " | ") {
|
|
28
|
-
return e.map((e) => typeof e == "string" ? `'${e}'` : e).join(t);
|
|
29
|
-
}
|
|
30
|
-
e.joinValues = r, e.jsonStringifyReplacer = (e, t) => typeof t == "bigint" ? t.toString() : t;
|
|
31
|
-
})(e ||= {});
|
|
32
|
-
var t;
|
|
33
|
-
(function(e) {
|
|
34
|
-
e.mergeShapes = (e, t) => ({
|
|
35
|
-
...e,
|
|
36
|
-
...t
|
|
37
|
-
});
|
|
38
|
-
})(t ||= {});
|
|
39
|
-
var n = e.arrayToEnum([
|
|
40
|
-
"string",
|
|
41
|
-
"nan",
|
|
42
|
-
"number",
|
|
43
|
-
"integer",
|
|
44
|
-
"float",
|
|
45
|
-
"boolean",
|
|
46
|
-
"date",
|
|
47
|
-
"bigint",
|
|
48
|
-
"symbol",
|
|
49
|
-
"function",
|
|
50
|
-
"undefined",
|
|
51
|
-
"null",
|
|
52
|
-
"array",
|
|
53
|
-
"object",
|
|
54
|
-
"unknown",
|
|
55
|
-
"promise",
|
|
56
|
-
"void",
|
|
57
|
-
"never",
|
|
58
|
-
"map",
|
|
59
|
-
"set"
|
|
60
|
-
]), r = (e) => {
|
|
61
|
-
switch (typeof e) {
|
|
62
|
-
case "undefined": return n.undefined;
|
|
63
|
-
case "string": return n.string;
|
|
64
|
-
case "number": return Number.isNaN(e) ? n.nan : n.number;
|
|
65
|
-
case "boolean": return n.boolean;
|
|
66
|
-
case "function": return n.function;
|
|
67
|
-
case "bigint": return n.bigint;
|
|
68
|
-
case "symbol": return n.symbol;
|
|
69
|
-
case "object": return Array.isArray(e) ? n.array : e === null ? n.null : e.then && typeof e.then == "function" && e.catch && typeof e.catch == "function" ? n.promise : typeof Map < "u" && e instanceof Map ? n.map : typeof Set < "u" && e instanceof Set ? n.set : typeof Date < "u" && e instanceof Date ? n.date : n.object;
|
|
70
|
-
default: return n.unknown;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
//#endregion
|
|
74
|
-
export { n as ZodParsedType, r as getParsedType, e as util };
|
|
75
|
-
|
|
76
|
-
//# sourceMappingURL=util.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","names":[],"sources":["../../../../../node_modules/zod/v3/helpers/util.js"],"sourcesContent":["export var util;\n(function (util) {\n util.assertEqual = (_) => { };\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array.map((val) => (typeof val === \"string\" ? `'${val}'` : val)).join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nexport var objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nexport const ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAW;CACV,SAAU,GAAM;AACb,GAAK,eAAe,MAAM;CAC1B,SAAS,EAAS,GAAM;AACxB,GAAK,WAAW;CAChB,SAAS,EAAY,GAAI;AACrB,QAAU,OAAO;;AAyCrB,CAvCA,EAAK,cAAc,GACnB,EAAK,eAAe,MAAU;EAC1B,IAAM,IAAM,EAAE;AACd,OAAK,IAAM,KAAQ,EACf,GAAI,KAAQ;AAEhB,SAAO;IAEX,EAAK,sBAAsB,MAAQ;EAC/B,IAAM,IAAY,EAAK,WAAW,EAAI,CAAC,QAAQ,MAAM,OAAO,EAAI,EAAI,OAAQ,SAAS,EAC/E,I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AAO,EAAc;EACzB,KAAK,SACD,QAAO,OAAO,MAAM,EAAK,GAAG,EAAc,MAAM,EAAc;EAClE,KAAK,UACD,QAAO,EAAc;EACzB,KAAK,WACD,QAAO,EAAc;EACzB,KAAK,SACD,QAAO,EAAc;EACzB,KAAK,SACD,QAAO,EAAc;EACzB,KAAK,SAmBD,QAlBI,MAAM,QAAQ,EAAK,GACZ,EAAc,QAErB,MAAS,OACF,EAAc,OAErB,EAAK,QAAQ,OAAO,EAAK,QAAS,cAAc,EAAK,SAAS,OAAO,EAAK,SAAU,aAC7E,EAAc,UAErB,OAAO,MAAQ,OAAe,aAAgB,MACvC,EAAc,MAErB,OAAO,MAAQ,OAAe,aAAgB,MACvC,EAAc,MAErB,OAAO,OAAS,OAAe,aAAgB,OACxC,EAAc,OAElB,EAAc;EACzB,QACI,QAAO,EAAc"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ZodParsedType as e, util as t } from "../helpers/util.js";
|
|
2
|
-
import { ZodIssueCode as n } from "../ZodError.js";
|
|
3
|
-
//#region node_modules/zod/v3/locales/en.js
|
|
4
|
-
var r = (r, i) => {
|
|
5
|
-
let a;
|
|
6
|
-
switch (r.code) {
|
|
7
|
-
case n.invalid_type:
|
|
8
|
-
a = r.received === e.undefined ? "Required" : `Expected ${r.expected}, received ${r.received}`;
|
|
9
|
-
break;
|
|
10
|
-
case n.invalid_literal:
|
|
11
|
-
a = `Invalid literal value, expected ${JSON.stringify(r.expected, t.jsonStringifyReplacer)}`;
|
|
12
|
-
break;
|
|
13
|
-
case n.unrecognized_keys:
|
|
14
|
-
a = `Unrecognized key(s) in object: ${t.joinValues(r.keys, ", ")}`;
|
|
15
|
-
break;
|
|
16
|
-
case n.invalid_union:
|
|
17
|
-
a = "Invalid input";
|
|
18
|
-
break;
|
|
19
|
-
case n.invalid_union_discriminator:
|
|
20
|
-
a = `Invalid discriminator value. Expected ${t.joinValues(r.options)}`;
|
|
21
|
-
break;
|
|
22
|
-
case n.invalid_enum_value:
|
|
23
|
-
a = `Invalid enum value. Expected ${t.joinValues(r.options)}, received '${r.received}'`;
|
|
24
|
-
break;
|
|
25
|
-
case n.invalid_arguments:
|
|
26
|
-
a = "Invalid function arguments";
|
|
27
|
-
break;
|
|
28
|
-
case n.invalid_return_type:
|
|
29
|
-
a = "Invalid function return type";
|
|
30
|
-
break;
|
|
31
|
-
case n.invalid_date:
|
|
32
|
-
a = "Invalid date";
|
|
33
|
-
break;
|
|
34
|
-
case n.invalid_string:
|
|
35
|
-
typeof r.validation == "object" ? "includes" in r.validation ? (a = `Invalid input: must include "${r.validation.includes}"`, typeof r.validation.position == "number" && (a = `${a} at one or more positions greater than or equal to ${r.validation.position}`)) : "startsWith" in r.validation ? a = `Invalid input: must start with "${r.validation.startsWith}"` : "endsWith" in r.validation ? a = `Invalid input: must end with "${r.validation.endsWith}"` : t.assertNever(r.validation) : a = r.validation === "regex" ? "Invalid" : `Invalid ${r.validation}`;
|
|
36
|
-
break;
|
|
37
|
-
case n.too_small:
|
|
38
|
-
a = r.type === "array" ? `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "more than"} ${r.minimum} element(s)` : r.type === "string" ? `String must contain ${r.exact ? "exactly" : r.inclusive ? "at least" : "over"} ${r.minimum} character(s)` : r.type === "number" || r.type === "bigint" ? `Number must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${r.minimum}` : r.type === "date" ? `Date must be ${r.exact ? "exactly equal to " : r.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(r.minimum))}` : "Invalid input";
|
|
39
|
-
break;
|
|
40
|
-
case n.too_big:
|
|
41
|
-
a = r.type === "array" ? `Array must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "less than"} ${r.maximum} element(s)` : r.type === "string" ? `String must contain ${r.exact ? "exactly" : r.inclusive ? "at most" : "under"} ${r.maximum} character(s)` : r.type === "number" ? `Number must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "bigint" ? `BigInt must be ${r.exact ? "exactly" : r.inclusive ? "less than or equal to" : "less than"} ${r.maximum}` : r.type === "date" ? `Date must be ${r.exact ? "exactly" : r.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(r.maximum))}` : "Invalid input";
|
|
42
|
-
break;
|
|
43
|
-
case n.custom:
|
|
44
|
-
a = "Invalid input";
|
|
45
|
-
break;
|
|
46
|
-
case n.invalid_intersection_types:
|
|
47
|
-
a = "Intersection results could not be merged";
|
|
48
|
-
break;
|
|
49
|
-
case n.not_multiple_of:
|
|
50
|
-
a = `Number must be a multiple of ${r.multipleOf}`;
|
|
51
|
-
break;
|
|
52
|
-
case n.not_finite:
|
|
53
|
-
a = "Number must be finite";
|
|
54
|
-
break;
|
|
55
|
-
default: a = i.defaultError, t.assertNever(r);
|
|
56
|
-
}
|
|
57
|
-
return { message: a };
|
|
58
|
-
};
|
|
59
|
-
//#endregion
|
|
60
|
-
export { r as default };
|
|
61
|
-
|
|
62
|
-
//# sourceMappingURL=en.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","names":[],"sources":["../../../../../node_modules/zod/v3/locales/en.js"],"sourcesContent":["import { ZodIssueCode } from \"../ZodError.js\";\nimport { util, ZodParsedType } from \"../helpers/util.js\";\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"bigint\")\n message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\nexport default errorMap;\n"],"x_google_ignoreList":[0],"mappings":";;;AAEA,IAAM,KAAY,GAAO,MAAS;CAC9B,IAAI;AACJ,SAAQ,EAAM,MAAd;EACI,KAAK,EAAa;AACd,GAII,IAJA,EAAM,aAAa,EAAc,YACvB,aAGA,YAAY,EAAM,SAAS,aAAa,EAAM;AAE5D;EACJ,KAAK,EAAa;AACd,OAAU,mCAAmC,KAAK,UAAU,EAAM,UAAU,EAAK,sBAAsB;AACvG;EACJ,KAAK,EAAa;AACd,OAAU,kCAAkC,EAAK,WAAW,EAAM,MAAM,KAAK;AAC7E;EACJ,KAAK,EAAa;AACd,OAAU;AACV;EACJ,KAAK,EAAa;AACd,OAAU,yCAAyC,EAAK,WAAW,EAAM,QAAQ;AACjF;EACJ,KAAK,EAAa;AACd,OAAU,gCAAgC,EAAK,WAAW,EAAM,QAAQ,CAAC,cAAc,EAAM,S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