@yimingliao/cms 0.0.61 → 0.0.63
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/chunk-JTWUGIHA.js +4849 -0
- package/dist/{chunk-FXWRZAIN.js → chunk-PFAORE3H.js} +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +1 -2
- package/dist/server/index.d.ts +132 -1
- package/dist/server/index.js +1 -4194
- package/dist/storage/r2/index.js +2 -2
- package/dist/storage/sftp/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-FUAJWL2N.js +0 -64
- package/dist/chunk-YAUBKQVA.js +0 -434
package/dist/index.d.ts
CHANGED
|
@@ -88,6 +88,14 @@ declare function createBuildTranslations(localArray: string[]): <F extends reado
|
|
|
88
88
|
locale: string;
|
|
89
89
|
} & KeyValueFields<F>>;
|
|
90
90
|
|
|
91
|
+
declare const datetimeToDb: (date?: Date | string | null) => string | null;
|
|
92
|
+
|
|
93
|
+
declare const datetimeToUi: (date?: Date | string | null) => string | null;
|
|
94
|
+
|
|
95
|
+
declare const jsonArrayToDb: (data?: unknown) => unknown[];
|
|
96
|
+
|
|
97
|
+
declare const jsonArrayToUi: (data?: unknown[]) => string;
|
|
98
|
+
|
|
91
99
|
declare const SIZE: {
|
|
92
100
|
readonly BYTE: 1;
|
|
93
101
|
readonly KB: 1024;
|
|
@@ -98,4 +106,4 @@ declare const SIZE: {
|
|
|
98
106
|
};
|
|
99
107
|
type SizeUnit = keyof typeof SIZE;
|
|
100
108
|
|
|
101
|
-
export { BaseTranslation, ErrorDetail, ErrorResult, type ErrorResultParams, FileCard, FileFull, Folder, FolderFull, OG_TYPE_ARRAY, type OgType, PostFull, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, SIZE, type SizeUnit, SuccessResult, type SuccessResultParams, TWITTER_CARD_ARRAY, type TwitterCard, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, findTranslation, formatFileSize, getMediaInfo, isFileLocked, isFolderLocked, mimeToExtension, result, serializeJsonLd };
|
|
109
|
+
export { BaseTranslation, ErrorDetail, ErrorResult, type ErrorResultParams, FileCard, FileFull, Folder, FolderFull, OG_TYPE_ARRAY, type OgType, PostFull, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, SIZE, type SizeUnit, SuccessResult, type SuccessResultParams, TWITTER_CARD_ARRAY, type TwitterCard, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, datetimeToDb, datetimeToUi, findTranslation, formatFileSize, getMediaInfo, isFileLocked, isFolderLocked, jsonArrayToDb, jsonArrayToUi, mimeToExtension, result, serializeJsonLd };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { ADMIN_ROLES, POST_TYPES, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, isFileLocked, isFolderLocked } from './chunk-
|
|
2
|
-
export { FILE_TYPES, OG_TYPE_ARRAY, SIZE, TWITTER_CARD_ARRAY, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, findTranslation, formatFileSize, getMediaInfo, mimeToExtension, result, serializeJsonLd } from './chunk-YAUBKQVA.js';
|
|
1
|
+
export { ADMIN_ROLES, FILE_TYPES, OG_TYPE_ARRAY, POST_TYPES, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, SIZE, TWITTER_CARD_ARRAY, classifyFileType, createBuildArticleMetadata, createBuildTranslations, createBuildWebsiteMetadata, datetimeToDb, datetimeToUi, findTranslation, formatFileSize, getMediaInfo, isFileLocked, isFolderLocked, jsonArrayToDb, jsonArrayToUi, mimeToExtension, result, serializeJsonLd } from './chunk-JTWUGIHA.js';
|
package/dist/server/index.d.ts
CHANGED
|
@@ -889,6 +889,7 @@ interface ActionContext {
|
|
|
889
889
|
fileCommandRepository: ReturnType<typeof createFileCommandRepository>;
|
|
890
890
|
postCommandRepository: ReturnType<typeof createPostCommandRepository>;
|
|
891
891
|
postQueryRepository: ReturnType<typeof createPostQueryRepository>;
|
|
892
|
+
seoMetadataCommandRepository: ReturnType<typeof createSeoMetadataCommandRepository>;
|
|
892
893
|
};
|
|
893
894
|
useCases: {
|
|
894
895
|
authUseCases: ReturnType<typeof createAuthUseCases>;
|
|
@@ -2311,6 +2312,136 @@ declare function createPostFindManyAction(ctx: ActionContext): (params: {
|
|
|
2311
2312
|
})[];
|
|
2312
2313
|
}>>;
|
|
2313
2314
|
|
|
2315
|
+
declare const seoMetadataUpsertValidator: (schemas: ReturnType<typeof createSchemas>) => zod.ZodObject<{
|
|
2316
|
+
postId: zod.ZodString;
|
|
2317
|
+
translations: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
|
|
2318
|
+
locale: zod.ZodString;
|
|
2319
|
+
title: zod.ZodNullable<zod.ZodString>;
|
|
2320
|
+
description: zod.ZodNullable<zod.ZodString>;
|
|
2321
|
+
author: zod.ZodNullable<zod.ZodString>;
|
|
2322
|
+
canonical: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<{} | null | undefined, unknown>, zod.ZodNullable<zod.ZodURL>>>;
|
|
2323
|
+
alternate: zod.ZodPipe<zod.ZodArray<zod.ZodObject<{
|
|
2324
|
+
hreflang: zod.ZodString;
|
|
2325
|
+
href: zod.ZodPipe<zod.ZodTransform<{} | null | undefined, unknown>, zod.ZodNullable<zod.ZodURL>>;
|
|
2326
|
+
}, zod_v4_core.$strip>>, zod.ZodTransform<{
|
|
2327
|
+
hreflang: string;
|
|
2328
|
+
href: string | null;
|
|
2329
|
+
}[], {
|
|
2330
|
+
hreflang: string;
|
|
2331
|
+
href: string | null;
|
|
2332
|
+
}[]>>;
|
|
2333
|
+
robots: zod.ZodNullable<zod.ZodString>;
|
|
2334
|
+
ogTitle: zod.ZodNullable<zod.ZodString>;
|
|
2335
|
+
ogDescription: zod.ZodNullable<zod.ZodString>;
|
|
2336
|
+
ogUrl: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<{} | null | undefined, unknown>, zod.ZodNullable<zod.ZodURL>>>;
|
|
2337
|
+
ogType: zod.ZodNullable<zod.ZodEnum<{
|
|
2338
|
+
article: "article";
|
|
2339
|
+
book: "book";
|
|
2340
|
+
"music.song": "music.song";
|
|
2341
|
+
"music.album": "music.album";
|
|
2342
|
+
"music.playlist": "music.playlist";
|
|
2343
|
+
"music.radio_station": "music.radio_station";
|
|
2344
|
+
profile: "profile";
|
|
2345
|
+
website: "website";
|
|
2346
|
+
"video.tv_show": "video.tv_show";
|
|
2347
|
+
"video.other": "video.other";
|
|
2348
|
+
"video.movie": "video.movie";
|
|
2349
|
+
"video.episode": "video.episode";
|
|
2350
|
+
}>>;
|
|
2351
|
+
ogSiteName: zod.ZodNullable<zod.ZodString>;
|
|
2352
|
+
ogImage: zod.ZodNullable<zod.ZodPipe<zod.ZodTransform<{} | null | undefined, unknown>, zod.ZodNullable<zod.ZodURL>>>;
|
|
2353
|
+
ogImageAlt: zod.ZodNullable<zod.ZodString>;
|
|
2354
|
+
ogImageType: zod.ZodNullable<zod.ZodString>;
|
|
2355
|
+
ogImageWidth: zod.ZodNullable<zod.ZodNumber>;
|
|
2356
|
+
ogImageHeight: zod.ZodNullable<zod.ZodNumber>;
|
|
2357
|
+
ogLocale: zod.ZodNullable<zod.ZodString>;
|
|
2358
|
+
ogLocaleAlternate: zod.ZodPipe<zod.ZodArray<zod.ZodString>, zod.ZodTransform<string[], string[]>>;
|
|
2359
|
+
ogArticlePublishedTime: zod.ZodNullable<zod.ZodString>;
|
|
2360
|
+
ogArticleModifiedTime: zod.ZodNullable<zod.ZodString>;
|
|
2361
|
+
ogArticleAuthor: zod.ZodNullable<zod.ZodString>;
|
|
2362
|
+
ogArticleSection: zod.ZodNullable<zod.ZodString>;
|
|
2363
|
+
ogArticleTag: zod.ZodPipe<zod.ZodArray<zod.ZodString>, zod.ZodTransform<string[], string[]>>;
|
|
2364
|
+
twitterCard: zod.ZodNullable<zod.ZodEnum<{
|
|
2365
|
+
summary: "summary";
|
|
2366
|
+
summary_large_image: "summary_large_image";
|
|
2367
|
+
player: "player";
|
|
2368
|
+
app: "app";
|
|
2369
|
+
}>>;
|
|
2370
|
+
twitterSite: zod.ZodNullable<zod.ZodString>;
|
|
2371
|
+
twitterCreator: zod.ZodNullable<zod.ZodString>;
|
|
2372
|
+
jsonLd: zod.ZodPipe<zod.ZodArray<zod.ZodAny>, zod.ZodTransform<any[], any[]>>;
|
|
2373
|
+
}, zod_v4_core.$strip>>, zod.ZodTransform<{
|
|
2374
|
+
locale: string;
|
|
2375
|
+
title: string | null;
|
|
2376
|
+
description: string | null;
|
|
2377
|
+
author: string | null;
|
|
2378
|
+
canonical: string | null;
|
|
2379
|
+
alternate: {
|
|
2380
|
+
hreflang: string;
|
|
2381
|
+
href: string | null;
|
|
2382
|
+
}[];
|
|
2383
|
+
robots: string | null;
|
|
2384
|
+
ogTitle: string | null;
|
|
2385
|
+
ogDescription: string | null;
|
|
2386
|
+
ogUrl: string | null;
|
|
2387
|
+
ogType: "article" | "book" | "music.song" | "music.album" | "music.playlist" | "music.radio_station" | "profile" | "website" | "video.tv_show" | "video.other" | "video.movie" | "video.episode" | null;
|
|
2388
|
+
ogSiteName: string | null;
|
|
2389
|
+
ogImage: string | null;
|
|
2390
|
+
ogImageAlt: string | null;
|
|
2391
|
+
ogImageType: string | null;
|
|
2392
|
+
ogImageWidth: number | null;
|
|
2393
|
+
ogImageHeight: number | null;
|
|
2394
|
+
ogLocale: string | null;
|
|
2395
|
+
ogLocaleAlternate: string[];
|
|
2396
|
+
ogArticlePublishedTime: string | null;
|
|
2397
|
+
ogArticleModifiedTime: string | null;
|
|
2398
|
+
ogArticleAuthor: string | null;
|
|
2399
|
+
ogArticleSection: string | null;
|
|
2400
|
+
ogArticleTag: string[];
|
|
2401
|
+
twitterCard: "summary" | "summary_large_image" | "player" | "app" | null;
|
|
2402
|
+
twitterSite: string | null;
|
|
2403
|
+
twitterCreator: string | null;
|
|
2404
|
+
jsonLd: any[];
|
|
2405
|
+
}[], {
|
|
2406
|
+
locale: string;
|
|
2407
|
+
title: string | null;
|
|
2408
|
+
description: string | null;
|
|
2409
|
+
author: string | null;
|
|
2410
|
+
canonical: string | null;
|
|
2411
|
+
alternate: {
|
|
2412
|
+
hreflang: string;
|
|
2413
|
+
href: string | null;
|
|
2414
|
+
}[];
|
|
2415
|
+
robots: string | null;
|
|
2416
|
+
ogTitle: string | null;
|
|
2417
|
+
ogDescription: string | null;
|
|
2418
|
+
ogUrl: string | null;
|
|
2419
|
+
ogType: "article" | "book" | "music.song" | "music.album" | "music.playlist" | "music.radio_station" | "profile" | "website" | "video.tv_show" | "video.other" | "video.movie" | "video.episode" | null;
|
|
2420
|
+
ogSiteName: string | null;
|
|
2421
|
+
ogImage: string | null;
|
|
2422
|
+
ogImageAlt: string | null;
|
|
2423
|
+
ogImageType: string | null;
|
|
2424
|
+
ogImageWidth: number | null;
|
|
2425
|
+
ogImageHeight: number | null;
|
|
2426
|
+
ogLocale: string | null;
|
|
2427
|
+
ogLocaleAlternate: string[];
|
|
2428
|
+
ogArticlePublishedTime: string | null;
|
|
2429
|
+
ogArticleModifiedTime: string | null;
|
|
2430
|
+
ogArticleAuthor: string | null;
|
|
2431
|
+
ogArticleSection: string | null;
|
|
2432
|
+
ogArticleTag: string[];
|
|
2433
|
+
twitterCard: "summary" | "summary_large_image" | "player" | "app" | null;
|
|
2434
|
+
twitterSite: string | null;
|
|
2435
|
+
twitterCreator: string | null;
|
|
2436
|
+
jsonLd: any[];
|
|
2437
|
+
}[]>>;
|
|
2438
|
+
}, zod_v4_core.$strip>;
|
|
2439
|
+
|
|
2440
|
+
type SeoMetadataUpsertFormData = zod__default.infer<ReturnType<typeof seoMetadataUpsertValidator>>;
|
|
2441
|
+
declare function createSeoMetadataCreateAction(ctx: ActionContext): ({ formData, }: {
|
|
2442
|
+
formData: SeoMetadataUpsertFormData;
|
|
2443
|
+
}) => Promise<Result<void>>;
|
|
2444
|
+
|
|
2314
2445
|
declare class ServerError extends Error {
|
|
2315
2446
|
readonly i18nKey?: string;
|
|
2316
2447
|
readonly statusCode?: number;
|
|
@@ -2329,4 +2460,4 @@ declare class ServerError extends Error {
|
|
|
2329
2460
|
static internalServerError(): ServerError;
|
|
2330
2461
|
}
|
|
2331
2462
|
|
|
2332
|
-
export { ADMIN_ORDER_BY, type ActionContext, type AdminCreateFormData, type AdminUpdateFormData, type ChangePasswordFormData, type EmailUnverifiedFormData, type FileCreateFormData, type FileCreateManyFormData, type FileUpdateFormData, type FolderCreateFormData, type FolderUpdateFormData, type ForgotPasswordFormData, ORDER_BY, POST_ORDER_BY, type PostCreateFormData, type PostUpdateFormData, type RawCacheKey, type ResetPasswordFormData, ServerError, type SignInFormData, type VerifyEmailFormData, createAdminCommandRepository, createAdminCreateAction, createAdminDeleteAction, createAdminFindFullAction, createAdminFindListCardsAction, createAdminQueryRepository, createAdminRefreshTokenCommandRepository, createAdminRefreshTokenDeleteAction, createAdminRefreshTokenFindManyAction, createAdminRefreshTokenQueryRepository, createAdminUpdateAction, createArgon2Service, createAuthMiddleware, createAuthUseCases, createCache, createCacheResult, createChangePasswordAction, createCookieService, createCryptoService, createEmailUnverifiedAction, createEmailVerificationEmail, createExecuteAction, createExecuteApi, createExist, createFileCommandRepository, createFileCreateAction, createFileCreateManyAction, createFileFindFullAction, createFileFindListCardsAction, createFilePurgeManyAction, createFileQueryRepository, createFileRestoreManyAction, createFileSchema, createFileSoftDeleteAction, createFileSoftDeleteManyAction, createFileUpdateAction, createFolderCommandRepository, createFolderCreateAction, createFolderDeleteAction, createFolderFindFullAction, createFolderFindListCardsAction, createFolderQueryRepository, createFolderUpdateAction, createForgotPasswordAction, createForgotPasswordEmail, createIpRateLimiter, createJwtService, createMultiFileSchema, createPostCommandRepository, createPostCreateAction, createPostDeleteAction, createPostFindAction, createPostFindFullAction, createPostFindListCardsAction, createPostFindManyAction, createPostQueryRepository, createPostUpdateAction, createRenderEmailTemplate, createResetPasswordAction, createSchemas, createSendEmail, createSeoMetadataCommandRepository, createSignInAction, createSignOutAction, createTocItemSchema, createTransporter, createUnique, createVerifyAccessToken, createVerifyAction, createVerifyEmailAction, createVerifyRefreshToken, createZod, normalizeCacheKey };
|
|
2463
|
+
export { ADMIN_ORDER_BY, type ActionContext, type AdminCreateFormData, type AdminUpdateFormData, type ChangePasswordFormData, type EmailUnverifiedFormData, type FileCreateFormData, type FileCreateManyFormData, type FileUpdateFormData, type FolderCreateFormData, type FolderUpdateFormData, type ForgotPasswordFormData, ORDER_BY, POST_ORDER_BY, type PostCreateFormData, type PostUpdateFormData, type RawCacheKey, type ResetPasswordFormData, type SeoMetadataUpsertFormData, ServerError, type SignInFormData, type VerifyEmailFormData, createAdminCommandRepository, createAdminCreateAction, createAdminDeleteAction, createAdminFindFullAction, createAdminFindListCardsAction, createAdminQueryRepository, createAdminRefreshTokenCommandRepository, createAdminRefreshTokenDeleteAction, createAdminRefreshTokenFindManyAction, createAdminRefreshTokenQueryRepository, createAdminUpdateAction, createArgon2Service, createAuthMiddleware, createAuthUseCases, createCache, createCacheResult, createChangePasswordAction, createCookieService, createCryptoService, createEmailUnverifiedAction, createEmailVerificationEmail, createExecuteAction, createExecuteApi, createExist, createFileCommandRepository, createFileCreateAction, createFileCreateManyAction, createFileFindFullAction, createFileFindListCardsAction, createFilePurgeManyAction, createFileQueryRepository, createFileRestoreManyAction, createFileSchema, createFileSoftDeleteAction, createFileSoftDeleteManyAction, createFileUpdateAction, createFolderCommandRepository, createFolderCreateAction, createFolderDeleteAction, createFolderFindFullAction, createFolderFindListCardsAction, createFolderQueryRepository, createFolderUpdateAction, createForgotPasswordAction, createForgotPasswordEmail, createIpRateLimiter, createJwtService, createMultiFileSchema, createPostCommandRepository, createPostCreateAction, createPostDeleteAction, createPostFindAction, createPostFindFullAction, createPostFindListCardsAction, createPostFindManyAction, createPostQueryRepository, createPostUpdateAction, createRenderEmailTemplate, createResetPasswordAction, createSchemas, createSendEmail, createSeoMetadataCommandRepository, createSeoMetadataCreateAction, createSignInAction, createSignOutAction, createTocItemSchema, createTransporter, createUnique, createVerifyAccessToken, createVerifyAction, createVerifyEmailAction, createVerifyRefreshToken, createZod, normalizeCacheKey };
|