@yimingliao/cms 0.0.34 → 0.0.35

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.
@@ -185,6 +185,28 @@ var result = {
185
185
  error
186
186
  };
187
187
 
188
+ // src/shared/seo-metadata/standards.ts
189
+ var OG_TYPE_ARRAY = [
190
+ "article",
191
+ "book",
192
+ "music.song",
193
+ "music.album",
194
+ "music.playlist",
195
+ "music.radio_station",
196
+ "profile",
197
+ "website",
198
+ "video.tv_show",
199
+ "video.other",
200
+ "video.movie",
201
+ "video.episode"
202
+ ];
203
+ var TWITTER_CARD_ARRAY = [
204
+ "summary",
205
+ "summary_large_image",
206
+ "player",
207
+ "app"
208
+ ];
209
+
188
210
  // src/shared/units.ts
189
211
  var SIZE = {
190
212
  BYTE: 1,
@@ -194,15 +216,5 @@ var SIZE = {
194
216
  TB: 1024 ** 4,
195
217
  PB: 1024 ** 5
196
218
  };
197
- var TIME = {
198
- MILLISECOND: 1,
199
- SECOND: 1e3,
200
- MINUTE: 60 * 1e3,
201
- HOUR: 60 * 60 * 1e3,
202
- DAY: 24 * 60 * 60 * 1e3,
203
- WEEK: 7 * 24 * 60 * 60 * 1e3,
204
- MONTH: 30 * 24 * 60 * 60 * 1e3,
205
- YEAR: 365 * 24 * 60 * 60 * 1e3
206
- };
207
219
 
208
- export { FILE_TYPES, SIZE, TIME, classifyFileType, formatFileSize, getMediaInfo, mimeToExtension, result };
220
+ export { FILE_TYPES, OG_TYPE_ARRAY, SIZE, TWITTER_CARD_ARRAY, classifyFileType, formatFileSize, getMediaInfo, mimeToExtension, result };
@@ -1,4 +1,4 @@
1
- import { mimeToExtension } from './chunk-I2DBI3WJ.js';
1
+ import { mimeToExtension } from './chunk-JADZTYRH.js';
2
2
  import path from 'path/posix';
3
3
  import { ulid } from 'ulid';
4
4
 
package/dist/index.d.ts CHANGED
@@ -44,6 +44,11 @@ declare const result: {
44
44
  error: typeof error;
45
45
  };
46
46
 
47
+ declare const OG_TYPE_ARRAY: ("article" | "book" | "music.song" | "music.album" | "music.playlist" | "music.radio_station" | "profile" | "website" | "video.tv_show" | "video.other" | "video.movie" | "video.episode")[];
48
+ type OgType = (typeof OG_TYPE_ARRAY)[number];
49
+ declare const TWITTER_CARD_ARRAY: readonly ["summary", "summary_large_image", "player", "app"];
50
+ type TwitterCard = (typeof TWITTER_CARD_ARRAY)[number];
51
+
47
52
  declare const SIZE: {
48
53
  readonly BYTE: 1;
49
54
  readonly KB: 1024;
@@ -53,16 +58,5 @@ declare const SIZE: {
53
58
  readonly PB: number;
54
59
  };
55
60
  type SizeUnit = keyof typeof SIZE;
56
- declare const TIME: {
57
- readonly MILLISECOND: 1;
58
- readonly SECOND: 1000;
59
- readonly MINUTE: number;
60
- readonly HOUR: number;
61
- readonly DAY: number;
62
- readonly WEEK: number;
63
- readonly MONTH: number;
64
- readonly YEAR: number;
65
- };
66
- type TimeUnit = keyof typeof TIME;
67
61
 
68
- export { ErrorDetail, ErrorResult, type ErrorResultParams, FolderFull, ROOT_FOLDER, ROOT_FOLDER_ID, ROOT_FOLDER_NAME, SIMPLE_UPLOAD_FOLDER_KEY, SIMPLE_UPLOAD_FOLDER_NAME, SIZE, type SizeUnit, SuccessResult, type SuccessResultParams, TIME, type TimeUnit, classifyFileType, formatFileSize, getMediaInfo, mimeToExtension, result };
62
+ export { ErrorDetail, ErrorResult, type ErrorResultParams, FolderFull, OG_TYPE_ARRAY, type OgType, 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, formatFileSize, getMediaInfo, mimeToExtension, result };
package/dist/index.js CHANGED
@@ -1,2 +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 } from './chunk-ZCOYQ5BG.js';
2
- export { FILE_TYPES, SIZE, TIME, classifyFileType, formatFileSize, getMediaInfo, mimeToExtension, result } from './chunk-I2DBI3WJ.js';
2
+ export { FILE_TYPES, OG_TYPE_ARRAY, SIZE, TWITTER_CARD_ARRAY, classifyFileType, formatFileSize, getMediaInfo, mimeToExtension, result } from './chunk-JADZTYRH.js';
@@ -1,5 +1,5 @@
1
1
  import { ADMIN_ROLES, ROOT_FOLDER_ID } from '../chunk-ZCOYQ5BG.js';
2
- import { SIZE, result, mimeToExtension, classifyFileType } from '../chunk-I2DBI3WJ.js';
2
+ import { SIZE, result, mimeToExtension, classifyFileType } from '../chunk-JADZTYRH.js';
3
3
  import jwt from 'jsonwebtoken';
4
4
  import argon2 from 'argon2';
5
5
  import crypto, { timingSafeEqual } from 'crypto';
@@ -1,5 +1,5 @@
1
- import { createObjectKey } from '../../chunk-DWFOB4P3.js';
2
- import '../../chunk-I2DBI3WJ.js';
1
+ import { createObjectKey } from '../../chunk-SUETTGXY.js';
2
+ import '../../chunk-JADZTYRH.js';
3
3
  import { PutObjectCommand, DeleteObjectCommand, CopyObjectCommand } from '@aws-sdk/client-s3';
4
4
 
5
5
  function createR2Service({
@@ -1,5 +1,5 @@
1
- import { createObjectKey } from '../../chunk-DWFOB4P3.js';
2
- import '../../chunk-I2DBI3WJ.js';
1
+ import { createObjectKey } from '../../chunk-SUETTGXY.js';
2
+ import '../../chunk-JADZTYRH.js';
3
3
  import path from 'path/posix';
4
4
  import { createPool } from 'generic-pool';
5
5
  import SFTPClient from 'ssh2-sftp-client';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yimingliao/cms",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "author": "Yiming Liao",
5
5
  "license": "MIT",
6
6
  "type": "module",