From 48a83a4fd822b80c9c7222c44093bba5433d973d Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Thu, 4 Aug 2022 20:57:35 +0200 Subject: [PATCH] feat: add zod schemas --- package.json | 3 +- src/modelSchema/attachment-zod.ts | 11 + src/modelSchema/avatar-zod.ts | 13 ++ src/modelSchema/backgroundImage-zod.ts | 12 ++ src/modelSchema/bucket-zod.ts | 17 ++ src/modelSchema/caldavToken-zod.ts | 7 + src/modelSchema/emailUpdate-zod.ts | 6 + src/modelSchema/file-zod.ts | 9 + src/modelSchema/label-zod.ts | 15 ++ src/modelSchema/labelTask-zod.ts | 7 + src/modelSchema/linkShare-zod.ts | 16 ++ src/modelSchema/list-zod.ts | 22 ++ src/modelSchema/listDuplication-zod.ts | 8 + src/modelSchema/namespace-zod.ts | 18 ++ src/modelSchema/passwordReset-zod.ts | 8 + src/modelSchema/passwordUpdate-zod.ts | 7 + src/modelSchema/savedFilter-zod.ts | 13 ++ src/modelSchema/subscription-zod.ts | 11 + src/modelSchema/task-zod.ts | 43 ++++ src/modelSchema/teamList-zod.ts | 2 + src/modelSchema/totp-zod.ts | 7 + src/modelSchema/user-zod.ts | 12 ++ src/modelSchema/userSettings-zod.ts | 20 ++ src/modelSchema/userShare-zod.ts | 9 + yarn.lock | 287 +++++++++++++++++++++++-- 25 files changed, 567 insertions(+), 16 deletions(-) create mode 100644 src/modelSchema/attachment-zod.ts create mode 100644 src/modelSchema/avatar-zod.ts create mode 100644 src/modelSchema/backgroundImage-zod.ts create mode 100644 src/modelSchema/bucket-zod.ts create mode 100644 src/modelSchema/caldavToken-zod.ts create mode 100644 src/modelSchema/emailUpdate-zod.ts create mode 100644 src/modelSchema/file-zod.ts create mode 100644 src/modelSchema/label-zod.ts create mode 100644 src/modelSchema/labelTask-zod.ts create mode 100644 src/modelSchema/linkShare-zod.ts create mode 100644 src/modelSchema/list-zod.ts create mode 100644 src/modelSchema/listDuplication-zod.ts create mode 100644 src/modelSchema/namespace-zod.ts create mode 100644 src/modelSchema/passwordReset-zod.ts create mode 100644 src/modelSchema/passwordUpdate-zod.ts create mode 100644 src/modelSchema/savedFilter-zod.ts create mode 100644 src/modelSchema/subscription-zod.ts create mode 100644 src/modelSchema/task-zod.ts create mode 100644 src/modelSchema/teamList-zod.ts create mode 100644 src/modelSchema/totp-zod.ts create mode 100644 src/modelSchema/user-zod.ts create mode 100644 src/modelSchema/userSettings-zod.ts create mode 100644 src/modelSchema/userShare-zod.ts diff --git a/package.json b/package.json index 37a63c7da..6a69ee662 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,8 @@ "postcss-preset-env": "7.7.2", "rollup": "2.77.2", "rollup-plugin-visualizer": "5.7.1", - "sass": "1.54.2", + "sass": "1.53.0", + "ts-to-zod": "^1.12.0", "typescript": "4.7.4", "vite": "3.0.4", "vite-plugin-pwa": "0.12.3", diff --git a/src/modelSchema/attachment-zod.ts b/src/modelSchema/attachment-zod.ts new file mode 100644 index 000000000..4403ad154 --- /dev/null +++ b/src/modelSchema/attachment-zod.ts @@ -0,0 +1,11 @@ +import { object, date, number } from 'zod' +import { iFileSchema } from './file-zod' +import { iUserSchema } from './user-zod' + +export const iAttachmentSchema = object({ + id: number(), + taskId: number(), + createdBy: iUserSchema, + file: iFileSchema, + created: date(), +}) diff --git a/src/modelSchema/avatar-zod.ts b/src/modelSchema/avatar-zod.ts new file mode 100644 index 000000000..df9362303 --- /dev/null +++ b/src/modelSchema/avatar-zod.ts @@ -0,0 +1,13 @@ +import { union, object, literal } from 'zod' + +export const avatarProviderSchema = union([ + literal('default'), + literal('initials'), + literal('gravatar'), + literal('marble'), + literal('upload'), +]) + +export const iAvatarSchema = object({ + avatarProvider: avatarProviderSchema, +}) diff --git a/src/modelSchema/backgroundImage-zod.ts b/src/modelSchema/backgroundImage-zod.ts new file mode 100644 index 000000000..8f02f4de3 --- /dev/null +++ b/src/modelSchema/backgroundImage-zod.ts @@ -0,0 +1,12 @@ +import { object, number, string } from 'zod' + +export const iBackgroundImageSchema = object({ + id: number(), + url: string(), + thumb: string(), + info: object({ + author: string(), + authorName: string(), + }), + blurHash: string(), +}) diff --git a/src/modelSchema/bucket-zod.ts b/src/modelSchema/bucket-zod.ts new file mode 100644 index 000000000..802b17572 --- /dev/null +++ b/src/modelSchema/bucket-zod.ts @@ -0,0 +1,17 @@ +import { object, date, number, string, array, boolean } from 'zod' +import { iUserSchema } from './user-zod' +import { iTaskSchema } from './task-zod' + +export const iAvatarSchema = object({ + id: number(), + title: string(), + listId: number(), + limit: number(), + tasks: array(iTaskSchema), + isDoneBucket: boolean(), + position: number(), + + createdBy: iUserSchema, + created: date(), + updated: date(), +}) diff --git a/src/modelSchema/caldavToken-zod.ts b/src/modelSchema/caldavToken-zod.ts new file mode 100644 index 000000000..4535cecff --- /dev/null +++ b/src/modelSchema/caldavToken-zod.ts @@ -0,0 +1,7 @@ + +import { object, number, date } from 'zod' + +export const iCaldavTokenSchema = object({ + id: number(), + created: date(), +}) diff --git a/src/modelSchema/emailUpdate-zod.ts b/src/modelSchema/emailUpdate-zod.ts new file mode 100644 index 000000000..72e3becd2 --- /dev/null +++ b/src/modelSchema/emailUpdate-zod.ts @@ -0,0 +1,6 @@ +import { object, string } from 'zod' + +export const iEmailUpdateSchema = object({ + newEmail: string(), + password: string(), +}) diff --git a/src/modelSchema/file-zod.ts b/src/modelSchema/file-zod.ts new file mode 100644 index 000000000..f99390287 --- /dev/null +++ b/src/modelSchema/file-zod.ts @@ -0,0 +1,9 @@ +import { object, number, string, date } from 'zod' + +export const iFileSchema = object({ + id: number(), + mime: string(), + name: string(), + size: number(), + created: date(), +}) diff --git a/src/modelSchema/label-zod.ts b/src/modelSchema/label-zod.ts new file mode 100644 index 000000000..f774877d4 --- /dev/null +++ b/src/modelSchema/label-zod.ts @@ -0,0 +1,15 @@ +import { object, date, number, string } from 'zod' +import { iUserSchema } from './user-zod' + +export const iLabelSchema = object({ + id: number(), + title: string(), + hexColor: string(), + description: string(), + createdBy: iUserSchema, + listId: number(), + textColor: string(), + + created: date(), + updated: date(), +}) diff --git a/src/modelSchema/labelTask-zod.ts b/src/modelSchema/labelTask-zod.ts new file mode 100644 index 000000000..a799b3527 --- /dev/null +++ b/src/modelSchema/labelTask-zod.ts @@ -0,0 +1,7 @@ +import { object, number } from 'zod' + +export const iLabelTaskSchema = object({ + id: number(), + taskId: number(), + labelId: number(), +}) diff --git a/src/modelSchema/linkShare-zod.ts b/src/modelSchema/linkShare-zod.ts new file mode 100644 index 000000000..1f50e27b9 --- /dev/null +++ b/src/modelSchema/linkShare-zod.ts @@ -0,0 +1,16 @@ +import { object, date, number, string } from 'zod' +import { iUserSchema } from './user-zod' + +export const iLinkShareSchema = object({ + id: number(), + hash: string(), + right: Right, + sharedBy: iUserSchema, + sharingType: number(), // FIXME: use correct numbers + listId: number(), + name: string(), + password: string(), + + created: date(), + updated: date(), +}) diff --git a/src/modelSchema/list-zod.ts b/src/modelSchema/list-zod.ts new file mode 100644 index 000000000..796efca82 --- /dev/null +++ b/src/modelSchema/list-zod.ts @@ -0,0 +1,22 @@ +import { object, date, number, string } from 'zod' +import { iUserSchema } from './user-zod' + +export const iListSchema = object({ + id: number(), + hash: string(), + description: string(), + owner: iUserSchema, + tasks: ITask[], + namespaceId: INamespace['id'], + isArchived: boolean(), + hexColor: string(), + identifier: string(), + backgroundInformation: any, + isFavorite: boolean(), + subscription: iSubscriptionSchema, + position: number(), + backgroundBlurHash: string(), + + created: date(), + updated: date(), +}) diff --git a/src/modelSchema/listDuplication-zod.ts b/src/modelSchema/listDuplication-zod.ts new file mode 100644 index 000000000..e9c8dc5d1 --- /dev/null +++ b/src/modelSchema/listDuplication-zod.ts @@ -0,0 +1,8 @@ +import { object, number } from 'zod' +import { iListSchema } from './list-zod' + +export const iListDuplicationSchema = object({ + listId: number(), + namespaceId: INamespace['id'], + list: iListSchema, +}) diff --git a/src/modelSchema/namespace-zod.ts b/src/modelSchema/namespace-zod.ts new file mode 100644 index 000000000..892e4a127 --- /dev/null +++ b/src/modelSchema/namespace-zod.ts @@ -0,0 +1,18 @@ +import { object, date, boolean, number, string, array } from 'zod' +import { iListSchema } from './list-zod' +import { iUserSchema } from './user-zod' +import { iSubscriptionSchema } from './subscription-zod' + +export const iNamespaceSchema = object({ + id: number(), + hash: string(), + description: string(), + owner: iUserSchema, + lists: array(iListSchema), + isArchived: boolean(), + hexColor: string(), + subscription: iSubscriptionSchema, + + created: date(), + updated: date(), +}) diff --git a/src/modelSchema/passwordReset-zod.ts b/src/modelSchema/passwordReset-zod.ts new file mode 100644 index 000000000..c48b3f968 --- /dev/null +++ b/src/modelSchema/passwordReset-zod.ts @@ -0,0 +1,8 @@ +// Generated by ts-to-zod +import { z } from "zod"; + +export const iPasswordResetSchema = z.object({ + token: z.string(), + newPassword: z.string(), + email: z.string(), +}); diff --git a/src/modelSchema/passwordUpdate-zod.ts b/src/modelSchema/passwordUpdate-zod.ts new file mode 100644 index 000000000..73acaea60 --- /dev/null +++ b/src/modelSchema/passwordUpdate-zod.ts @@ -0,0 +1,7 @@ +// Generated by ts-to-zod +import { z } from "zod"; + +export const iPasswordUpdateSchema = z.object({ + newPassword: z.string(), + oldPassword: z.string(), +}); diff --git a/src/modelSchema/savedFilter-zod.ts b/src/modelSchema/savedFilter-zod.ts new file mode 100644 index 000000000..2ac313748 --- /dev/null +++ b/src/modelSchema/savedFilter-zod.ts @@ -0,0 +1,13 @@ +import { object, date, number, string } from 'zod' +import { iUserSchema } from './user-zod' + +export const iSavedFilterSchema = object({ + id: number(0), + title: string(), + description: string(), + filters: iFilterSchema, + + owner: iUserSchema, + created: date(), + updated: date(), +}) diff --git a/src/modelSchema/subscription-zod.ts b/src/modelSchema/subscription-zod.ts new file mode 100644 index 000000000..33fbe3107 --- /dev/null +++ b/src/modelSchema/subscription-zod.ts @@ -0,0 +1,11 @@ +import { object, date, number, string } from 'zod' +import { iUserSchema } from './user-zod' + +export const iSubscriptionSchema = object({ + id: number(), + entity: string(), // FIXME: correct type? + entityId: number(), // FIXME: correct type? + user: iUserSchema, + + created: date(), +}) diff --git a/src/modelSchema/task-zod.ts b/src/modelSchema/task-zod.ts new file mode 100644 index 000000000..6e4b3f007 --- /dev/null +++ b/src/modelSchema/task-zod.ts @@ -0,0 +1,43 @@ +import { object, boolean, date, number, string, array } from 'zod' +import { iAttachmentSchema } from './attachment-zod' +import { iLabelSchema } from './label-zod' +import { iUserSchema } from './user-zod' +import { iSubscriptionSchema } from './subscription-zod' + +export const iTaskSchema = object({ + id: number(), + title: string(), + description: string(), + done: boolean(), + doneAt: date() | null, + priority: Priority, + labels: array(iLabelSchema), + assignees: array(iUserSchema), + + dueDate: date() | null, + startDate: date() | null, + endDate: date() | null, + repeatAfter: number() | IRepeats, + repeatFromCurrentDate: boolean(), + repeatMode: TaskRepeatMode, + reminderDates: array(date()), + parentTaskId: ITask['id'], + hexColor: string(), + percentDone: number(), + relatedTasks: { [relationKind: string()]: ITask }, // FIXME: use relationKinds + attachments: array(iAttachmentSchema), + identifier: string(), + index: number(), + isFavorite: boolean(), + subscription: iSubscriptionSchema, + + position: number(), + kanbanPosition: number(), + + createdBy: iUserSchema, + created: date(), + updated: date(), + + listId: IList['id'], // Meta, only used when creating a new task + bucketId: IBucket['id'], +}) diff --git a/src/modelSchema/teamList-zod.ts b/src/modelSchema/teamList-zod.ts new file mode 100644 index 000000000..ab019cbb3 --- /dev/null +++ b/src/modelSchema/teamList-zod.ts @@ -0,0 +1,2 @@ +// Generated by ts-to-zod +import { z } from "zod"; diff --git a/src/modelSchema/totp-zod.ts b/src/modelSchema/totp-zod.ts new file mode 100644 index 000000000..58c8308f0 --- /dev/null +++ b/src/modelSchema/totp-zod.ts @@ -0,0 +1,7 @@ +import { object, string, boolean } from 'zod' + +export const iTotpSchema = object({ + secret: string(), + enabled: boolean(), + url: string(), +}) diff --git a/src/modelSchema/user-zod.ts b/src/modelSchema/user-zod.ts new file mode 100644 index 000000000..4006db854 --- /dev/null +++ b/src/modelSchema/user-zod.ts @@ -0,0 +1,12 @@ +import { object, date, number, string } from 'zod' + +export const iUserSchema = object({ + id: number(), + email: string(), + username: string(), + name: string(), + + created: date(), + updated: date(), + settings: iUserSettingsSchema, +}) diff --git a/src/modelSchema/userSettings-zod.ts b/src/modelSchema/userSettings-zod.ts new file mode 100644 index 000000000..aec7af9cb --- /dev/null +++ b/src/modelSchema/userSettings-zod.ts @@ -0,0 +1,20 @@ +import { object, union, literal, boolean, string } from 'zod' + +export const iUserSettingsSchema = object({ + name: string(), + emailRemindersEnabled: boolean(), + discoverableByName: boolean(), + discoverableByEmail: boolean(), + overdueTasksRemindersEnabled: boolean(), + defaultListId: undefined | iListSchema['id'], + weekStart: union([ + literal(0), + literal(1), + literal(2), + literal(3), + literal(4), + literal(5), + literal(6), + ]), + timezone: string(), +}) diff --git a/src/modelSchema/userShare-zod.ts b/src/modelSchema/userShare-zod.ts new file mode 100644 index 000000000..0467902bd --- /dev/null +++ b/src/modelSchema/userShare-zod.ts @@ -0,0 +1,9 @@ +import { object, date } from 'zod' + +export const iUserShareSchema = object({ + userId: IUser['id'], + right: Right, + + created: date(), + updated: date(), +}) diff --git a/yarn.lock b/yarn.lock index 3da146b90..3d9078247 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1768,6 +1768,100 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@oclif/command@^1.8.15", "@oclif/command@^1.8.6": + version "1.8.16" + resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.16.tgz#bea46f81b2061b47e1cda318a0b923e62ca4cc0c" + integrity sha512-rmVKYEsKzurfRU0xJz+iHelbi1LGlihIWZ7Qvmb/CBz1EkhL7nOkW4SVXmG2dA5Ce0si2gr88i6q4eBOMRNJ1w== + dependencies: + "@oclif/config" "^1.18.2" + "@oclif/errors" "^1.3.5" + "@oclif/help" "^1.0.1" + "@oclif/parser" "^3.8.6" + debug "^4.1.1" + semver "^7.3.2" + +"@oclif/config@1.18.2": + version "1.18.2" + resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.18.2.tgz#5bfe74a9ba6a8ca3dceb314a81bd9ce2e15ebbfe" + integrity sha512-cE3qfHWv8hGRCP31j7fIS7BfCflm/BNZ2HNqHexH+fDrdF2f1D5S8VmXWLC77ffv3oDvWyvE9AZeR0RfmHCCaA== + dependencies: + "@oclif/errors" "^1.3.3" + "@oclif/parser" "^3.8.0" + debug "^4.1.1" + globby "^11.0.1" + is-wsl "^2.1.1" + tslib "^2.0.0" + +"@oclif/config@^1.17.1", "@oclif/config@^1.18.2": + version "1.18.3" + resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.18.3.tgz#ddfc144fdab66b1658c2f1b3478fa7fbfd317e79" + integrity sha512-sBpko86IrTscc39EvHUhL+c++81BVTsIZ3ETu/vG+cCdi0N6vb2DoahR67A9FI2CGnxRRHjnTfa3m6LulwNATA== + dependencies: + "@oclif/errors" "^1.3.5" + "@oclif/parser" "^3.8.0" + debug "^4.1.1" + globby "^11.0.1" + is-wsl "^2.1.1" + tslib "^2.3.1" + +"@oclif/errors@1.3.5", "@oclif/errors@^1.3.3", "@oclif/errors@^1.3.5": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@oclif/errors/-/errors-1.3.5.tgz#a1e9694dbeccab10fe2fe15acb7113991bed636c" + integrity sha512-OivucXPH/eLLlOT7FkCMoZXiaVYf8I/w1eTAM1+gKzfhALwWTusxEx7wBmW0uzvkSg/9ovWLycPaBgJbM3LOCQ== + dependencies: + clean-stack "^3.0.0" + fs-extra "^8.1" + indent-string "^4.0.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +"@oclif/help@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@oclif/help/-/help-1.0.1.tgz#fd96a3dd9fb2314479e6c8584c91b63754a7dff5" + integrity sha512-8rsl4RHL5+vBUAKBL6PFI3mj58hjPCp2VYyXD4TAa7IMStikFfOH2gtWmqLzIlxAED2EpD0dfYwo9JJxYsH7Aw== + dependencies: + "@oclif/config" "1.18.2" + "@oclif/errors" "1.3.5" + chalk "^4.1.2" + indent-string "^4.0.0" + lodash "^4.17.21" + string-width "^4.2.0" + strip-ansi "^6.0.0" + widest-line "^3.1.0" + wrap-ansi "^6.2.0" + +"@oclif/linewrap@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@oclif/linewrap/-/linewrap-1.0.0.tgz#aedcb64b479d4db7be24196384897b5000901d91" + integrity sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw== + +"@oclif/parser@^3.8.0", "@oclif/parser@^3.8.6": + version "3.8.7" + resolved "https://registry.yarnpkg.com/@oclif/parser/-/parser-3.8.7.tgz#236d48db05d0b00157d3b42d31f9dac7550d2a7c" + integrity sha512-b11xBmIUK+LuuwVGJpFs4LwQN2xj2cBWj2c4z1FtiXGrJ85h9xV6q+k136Hw0tGg1jQoRXuvuBnqQ7es7vO9/Q== + dependencies: + "@oclif/errors" "^1.3.5" + "@oclif/linewrap" "^1.0.0" + chalk "^4.1.0" + tslib "^2.3.1" + +"@oclif/plugin-help@^3.2.7": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.3.1.tgz#36adb4e0173f741df409bb4b69036d24a53bfb24" + integrity sha512-QuSiseNRJygaqAdABYFWn/H1CwIZCp9zp/PLid6yXvy6VcQV7OenEFF5XuYaCvSARe2Tg9r8Jqls5+fw1A9CbQ== + dependencies: + "@oclif/command" "^1.8.15" + "@oclif/config" "1.18.2" + "@oclif/errors" "1.3.5" + "@oclif/help" "^1.0.1" + chalk "^4.1.2" + indent-string "^4.0.0" + lodash "^4.17.21" + string-width "^4.2.0" + strip-ansi "^6.0.0" + widest-line "^3.1.0" + wrap-ansi "^6.2.0" + "@octokit/auth-token@^2.4.4": version "2.5.0" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" @@ -2567,6 +2661,13 @@ "@typescript-eslint/types" "5.8.0" eslint-visitor-keys "^3.0.0" +"@typescript/vfs@^1.3.5": + version "1.3.5" + resolved "https://registry.yarnpkg.com/@typescript/vfs/-/vfs-1.3.5.tgz#801e3c97b5beca4ff5b8763299ca5fd605b862b8" + integrity sha512-pI8Saqjupf9MfLw7w2+og+fmb0fZS0J6vsKXXrp4/PDXEFvntgzXmChCXC/KefZZS0YGS6AT8e0hGAJcTsdJlg== + dependencies: + debug "^4.1.1" + "@vercel/nft@^0.20.0": version "0.20.1" resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.20.1.tgz#41e559af189405c526ac1f6709773bc99995b95b" @@ -3790,7 +3891,7 @@ callsite@^1.0.0: resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20" integrity sha1-KAOY5dZkvXQDi28JBRU+borxvCA= -callsites@^3.0.0: +callsites@^3.0.0, callsites@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== @@ -3847,6 +3948,11 @@ caniuse-lite@^1.0.30001358: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001358.tgz#473d35dabf5e448b463095cab7924e96ccfb8c00" integrity sha512-hvp8PSRymk85R20bsDra7ZTCpSVGN/PAz9pSAjPSjKC+rNmnUk5vCRgJwiTT/O4feQ/yu/drvZYpKxxhbFuChw== +case@^1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/case/-/case-1.6.3.tgz#0a4386e3e9825351ca2e6216c60467ff5f1ea1c9" + integrity sha512-mzDSXIPaFwVDvZAHqZ9VlbyF4yyXRuX6IvB06WvPYkqJVO24kX1PPhv9bfpKNFZyxYFmmgo03HUiD8iklmJYRQ== + caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -3912,7 +4018,7 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^4.0.2, chalk@^4.1.2: +chalk@^4.0.2, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3955,6 +4061,21 @@ check-more-types@^2.24.0: optionalDependencies: fsevents "~2.3.2" +chokidar@^3.5.1: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + chownr@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" @@ -4004,6 +4125,13 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +clean-stack@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-3.0.1.tgz#155bf0b2221bf5f4fba89528d24c5953f17fe3a8" + integrity sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg== + dependencies: + escape-string-regexp "4.0.0" + clean-stack@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-4.1.0.tgz#5ce5a2fd19a12aecdce8570daefddb7ac94b6b4e" @@ -4675,7 +4803,7 @@ debug@^3.1.0: dependencies: ms "^2.1.1" -debug@^4.3.4: +debug@^4.2.0, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -5696,6 +5824,11 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escape-string-regexp@5.0.0, escape-string-regexp@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz#4683126b500b61762f2dbebace1806e8be31b1c8" @@ -5711,11 +5844,6 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - escodegen@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" @@ -5824,6 +5952,11 @@ eslint@8.21.0: text-table "^0.2.0" v8-compile-cache "^2.0.3" +esm@^3.2.25: + version "3.2.25" + resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" + integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== + espree@^9.3.1, espree@^9.3.2: version "9.3.2" resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.2.tgz#f58f77bd334731182801ced3380a8cc859091596" @@ -6566,6 +6699,15 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== +fs-extra@^8.1: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^9.0.1, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -7442,6 +7584,27 @@ inquirer@^7.3.3: strip-ansi "^6.0.0" through "^2.3.6" +inquirer@^8.2.0: + version "8.2.4" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.4.tgz#ddbfe86ca2f67649a67daa6f1051c128f684f0b4" + integrity sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.1" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.21" + mute-stream "0.0.8" + ora "^5.4.1" + run-async "^2.4.0" + rxjs "^7.5.5" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + wrap-ansi "^7.0.0" + internal-slot@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" @@ -7753,6 +7916,11 @@ is-observable@^1.1.0: dependencies: symbol-observable "^1.1.0" +is-observable@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-2.1.0.tgz#5c8d733a0b201c80dff7bb7c0df58c6a255c7c69" + integrity sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw== + is-path-cwd@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" @@ -7899,7 +8067,7 @@ is-wsl@^1.1.0: resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= -is-wsl@^2.2.0: +is-wsl@^2.1.1, is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== @@ -8094,6 +8262,13 @@ json5@^2.1.2, json5@^2.2.0: dependencies: minimist "^1.2.5" +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -8570,6 +8745,11 @@ luxon@^1.26.0, luxon@^1.28.0: resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.28.0.tgz#e7f96daad3938c06a62de0fb027115d251251fbf" integrity sha512-TfTiyvZhwBYM/7QdAVDh+7dBTBA29v4ik0Ce9zda3Mnf8on1S5KJI8P2jKFZ8+5C0jhmr0KwJEO/Wdpm0VeWJQ== +lz-string@^1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" + integrity sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ== + macos-release@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-3.0.1.tgz#7d2a1329a616297db4a57f3d3ba8fa07a7caadd6" @@ -9466,6 +9646,11 @@ object.pick@^1.3.0: dependencies: isobject "^3.0.1" +observable-fns@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/observable-fns/-/observable-fns-0.6.1.tgz#636eae4fdd1132e88c0faf38d33658cc79d87e37" + integrity sha512-9gRK4+sRWzeN6AOewNBTLXir7Zl/i3GB6Yl26gK4flxz8BXVpD3kt8amREmWNb0mxYOGDotvE5a4N+PtGGKdkg== + omit.js@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/omit.js/-/omit.js-2.0.2.tgz#dd9b8436fab947a5f3ff214cb2538631e313ec2f" @@ -9565,7 +9750,7 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" -ora@^5.0.0: +ora@^5.0.0, ora@^5.4.0, ora@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== @@ -10320,6 +10505,11 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= +prettier@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5" + integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q== + pretty-bytes@^5.3.0, pretty-bytes@^5.6.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" @@ -10973,6 +11163,13 @@ rxjs@^6.3.3, rxjs@^6.4.0, rxjs@^6.6.0, rxjs@^6.6.2: dependencies: tslib "^1.9.0" +rxjs@^7.4.0, rxjs@^7.5.5: + version "7.5.6" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.6.tgz#0446577557862afd6903517ce7cae79ecb9662bc" + integrity sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== + dependencies: + tslib "^2.1.0" + rxjs@^7.5.1: version "7.5.5" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.5.tgz#2ebad89af0f560f460ad5cc4213219e1f7dd4e9f" @@ -11019,10 +11216,10 @@ safe-stable-stringify@^1.1.0: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -sass@1.54.2: - version "1.54.2" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.54.2.tgz#574cad83814c930ef2475921b9cb5d8203ae8867" - integrity sha512-wbVV26sejsCIbBScZZtNkvnrB/bVCQ8hSlZ01D9nzsVh9zLqCkWrlpvTb3YEb6xsuNi9cx75hncqwikHFSz7tw== +sass@1.53.0: + version "1.53.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.53.0.tgz#eab73a7baac045cc57ddc1d1ff501ad2659952eb" + integrity sha512-zb/oMirbKhUgRQ0/GFz8TSAwRq2IlR29vOUJZOx0l8sV+CkHUfHa4u5nqrG+1VceZp7Jfj59SVW9ogdhTvJDcQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -11930,6 +12127,18 @@ then-request@^6.0.0: promise "^8.0.0" qs "^6.4.0" +threads@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/threads/-/threads-1.7.0.tgz#d9e9627bfc1ef22ada3b733c2e7558bbe78e589c" + integrity sha512-Mx5NBSHX3sQYR6iI9VYbgHKBLisyB+xROCBGjjWm1O9wb9vfLxdaGtmT/KCjUqMsSNW6nERzCW3T6H43LqjDZQ== + dependencies: + callsites "^3.1.0" + debug "^4.2.0" + is-observable "^2.1.0" + observable-fns "^0.6.1" + optionalDependencies: + tiny-worker ">= 2" + throttleit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" @@ -11974,6 +12183,13 @@ timed-out@^4.0.1: resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= +"tiny-worker@>= 2": + version "2.3.0" + resolved "https://registry.yarnpkg.com/tiny-worker/-/tiny-worker-2.3.0.tgz#715ae34304c757a9af573ae9a8e3967177e6011e" + integrity sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g== + dependencies: + esm "^3.2.25" + tinypool@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/tinypool/-/tinypool-0.2.4.tgz#4d2598c4689d1a2ce267ddf3360a9c6b3925a20c" @@ -12133,11 +12349,42 @@ ts-node@^10.6.0: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +ts-to-zod@^1.12.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/ts-to-zod/-/ts-to-zod-1.12.0.tgz#d358f92c4482b4407914aee742936826571be0a9" + integrity sha512-SpKAGujUAp/Ydl1Ce7aNDSB290LH1z4oDIkTguZe/pgcizWm1AOlQQARQM5kHcQWaQY5ukwFF/rT8IS3pIRBbA== + dependencies: + "@oclif/command" "^1.8.6" + "@oclif/config" "^1.17.1" + "@oclif/plugin-help" "^3.2.7" + "@typescript/vfs" "^1.3.5" + async "^3.2.0" + case "^1.6.3" + chokidar "^3.5.1" + fs-extra "^9.1.0" + inquirer "^8.2.0" + lodash "^4.17.21" + lz-string "^1.4.4" + ora "^5.4.0" + prettier "2.2.1" + rxjs "^7.4.0" + slash "^3.0.0" + threads "^1.7.0" + tslib "^2.3.1" + tsutils "^3.21.0" + typescript "^4.5.2" + zod "^3.11.6" + tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== +tslib@^2.0.0, tslib@^2.3.1: + version "2.4.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3" + integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ== + tslib@^2.0.3: version "2.3.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" @@ -12251,7 +12498,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.7.4, typescript@^4.5.5: +typescript@4.7.4, typescript@^4.5.2, typescript@^4.5.5: version "4.7.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== @@ -12341,6 +12588,11 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -13316,3 +13568,8 @@ zip-stream@^4.1.0: archiver-utils "^2.1.0" compress-commons "^4.1.0" readable-stream "^3.6.0" + +zod@^3.11.6: + version "3.17.10" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.17.10.tgz#8716a05e6869df6faaa878a44ffe3c79e615defb" + integrity sha512-IHXnQYQuOOOL/XgHhgl8YjNxBHi3xX0mVcHmqsvJgcxKkEczPshoWdxqyFwsARpf41E0v9U95WUROqsHHxt0UQ==