@shumai-one/shumai-transcode 0.4.5 → 0.4.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shumai-one/shumai-transcode",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "Media transcoding worker for the shumai media workspace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,12 +27,12 @@
27
27
  "zod": "4.5.4"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@shumai-one/shumai-transcode-darwin-arm64": "0.4.5",
31
- "@shumai-one/shumai-transcode-darwin-x64": "0.4.5",
32
- "@shumai-one/shumai-transcode-linux-arm64": "0.4.5",
33
- "@shumai-one/shumai-transcode-linux-x64": "0.4.5",
34
- "@shumai-one/shumai-transcode-win32-arm64": "0.4.5",
35
- "@shumai-one/shumai-transcode-win32-x64": "0.4.5"
30
+ "@shumai-one/shumai-transcode-darwin-arm64": "0.4.6",
31
+ "@shumai-one/shumai-transcode-darwin-x64": "0.4.6",
32
+ "@shumai-one/shumai-transcode-linux-arm64": "0.4.6",
33
+ "@shumai-one/shumai-transcode-linux-x64": "0.4.6",
34
+ "@shumai-one/shumai-transcode-win32-arm64": "0.4.6",
35
+ "@shumai-one/shumai-transcode-win32-x64": "0.4.6"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
@@ -0,0 +1,22 @@
1
+ -- CreateTable
2
+ CREATE TABLE "asset_comment_reactions" (
3
+ "id" TEXT NOT NULL,
4
+ "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
5
+ "comment_id" TEXT NOT NULL,
6
+ "user_id" TEXT NOT NULL,
7
+ "code" TEXT NOT NULL,
8
+
9
+ CONSTRAINT "asset_comment_reactions_pkey" PRIMARY KEY ("id")
10
+ );
11
+
12
+ -- CreateIndex
13
+ CREATE INDEX "asset_comment_reactions_comment_id_idx" ON "asset_comment_reactions"("comment_id");
14
+
15
+ -- CreateIndex
16
+ CREATE UNIQUE INDEX "asset_comment_reactions_comment_id_user_id_code_key" ON "asset_comment_reactions"("comment_id", "user_id", "code");
17
+
18
+ -- AddForeignKey
19
+ ALTER TABLE "asset_comment_reactions" ADD CONSTRAINT "asset_comment_reactions_comment_id_fkey" FOREIGN KEY ("comment_id") REFERENCES "asset_comments"("id") ON DELETE CASCADE ON UPDATE CASCADE;
20
+
21
+ -- AddForeignKey
22
+ ALTER TABLE "asset_comment_reactions" ADD CONSTRAINT "asset_comment_reactions_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -0,0 +1,8 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to alter the column `code` on the `asset_comment_reactions` table. The data in that column could be lost. The data in that column will be cast from `Text` to `VarChar(32)`.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "asset_comment_reactions" ALTER COLUMN "code" SET DATA TYPE VARCHAR(32);
@@ -0,0 +1,5 @@
1
+ -- AlterTable
2
+ ALTER TABLE "assets" ADD COLUMN "has_jpeg_preview" BOOLEAN NOT NULL DEFAULT false;
3
+
4
+ -- AlterTable
5
+ ALTER TABLE "projects" ADD COLUMN "has_jpeg_cover" BOOLEAN NOT NULL DEFAULT false;
@@ -218,6 +218,7 @@ model User {
218
218
  teamMembers TeamMember[] @relation("UserToTeamMember")
219
219
  comments AssetComment[] @relation("UserToAssetComment")
220
220
  completionChangedComments AssetComment[] @relation("UserToAssetCommentCompletionChanged")
221
+ commentReactions AssetCommentReaction[] @relation("UserToAssetCommentReaction")
221
222
  createdInvites Invite[] @relation("UserToInvite")
222
223
  createdNotifications Notification[] @relation("UserToCreatedNotification")
223
224
  notifications Notification[] @relation("UserToNotification")
@@ -391,6 +392,7 @@ model Project {
391
392
  id String @id @default(ulid())
392
393
  name String
393
394
  coverImageKey String? @map("cover_image_key")
395
+ hasJpegCover Boolean @default(false) @map("has_jpeg_cover")
394
396
  /// [MetadataOverrides]
395
397
  metadataOverrides Json? @map("metadata_overrides")
396
398
  enableNotification Boolean @default(true) @map("enable_notification")
@@ -525,6 +527,7 @@ model Asset {
525
527
  uploadId String? @map("upload_id")
526
528
  /// [MediaInfo]
527
529
  media Json?
530
+ hasJpegPreview Boolean @default(false) @map("has_jpeg_preview")
528
531
  isDeleted Boolean @default(false) @map("is_deleted")
529
532
  deletedAt DateTime? @map("deleted_at")
530
533
  sortIndex String? @map("sort_index")
@@ -656,6 +659,7 @@ model AssetComment {
656
659
  replies AssetComment[] @relation("CommentReplies")
657
660
 
658
661
  attachments AssetCommentAttachment[] @relation("CommentToAttachment")
662
+ reactions AssetCommentReaction[] @relation("CommentToReaction")
659
663
 
660
664
  @@index([assetId])
661
665
  @@map("asset_comments")
@@ -675,6 +679,23 @@ model AssetCommentAttachment {
675
679
  @@map("asset_comment_attachments")
676
680
  }
677
681
 
682
+ model AssetCommentReaction {
683
+ id String @id @default(ulid())
684
+ createdAt DateTime @default(now()) @map("created_at")
685
+
686
+ commentId String @map("comment_id")
687
+ comment AssetComment @relation("CommentToReaction", fields: [commentId], references: [id], onDelete: Cascade)
688
+
689
+ userId String @map("user_id")
690
+ user User @relation("UserToAssetCommentReaction", fields: [userId], references: [id], onDelete: Cascade)
691
+
692
+ code String @db.VarChar(32)
693
+
694
+ @@unique([commentId, userId, code])
695
+ @@index([commentId])
696
+ @@map("asset_comment_reactions")
697
+ }
698
+
678
699
  model AssetEmbedding {
679
700
  id String @id @default(ulid())
680
701
  embedding Unsupported("vector(1536)")?
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{I,u,C}from"./shumai-transcode-app.js";export{I as ENV_KEY,u as ENV_SECRET,C as fromEnv};
@@ -1,7 +0,0 @@
1
- // @bun
2
- import{A,e,a,n,t,B}from"./shumai-transcode-app.js";var O=A(t()),h=A(e()),y=A(B());import P from"fs/promises";var f=A(e());var k="169.254.170.2",H="169.254.170.23",K="[fd00:ec2::23]",I=(r,i)=>{if(r.protocol==="https:")return;if(r.hostname===k||r.hostname===H||r.hostname===K)return;if(r.hostname.includes("[")){if(r.hostname==="[::1]"||r.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(r.hostname==="localhost")return;let c=r.hostname.split("."),s=(o)=>{let d=parseInt(o,10);return 0<=d&&d<=255};if(c[0]==="127"&&s(c[1])&&s(c[2])&&s(c[3])&&c.length===4)return}throw new f.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
3
- - loopback CIDR 127.0.0.0/8 or [::1/128]
4
- - ECS container host 169.254.170.2
5
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:i})};var T=A(e()),u=A(n()),E=A(a()),N=A(a());function w(r){return new u.HttpRequest({protocol:r.protocol,hostname:r.hostname,port:Number(r.port),path:r.pathname,query:Array.from(r.searchParams.entries()).reduce((i,[c,s])=>(i[c]=s,i),{}),fragment:r.hash})}async function R(r,i){let s=await N.sdkStreamMixin(r.body).transformToString();if(r.statusCode===200){let o=JSON.parse(s);if(typeof o.AccessKeyId!=="string"||typeof o.SecretAccessKey!=="string"||typeof o.Token!=="string"||typeof o.Expiration!=="string")throw new T.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:i});return{accessKeyId:o.AccessKeyId,secretAccessKey:o.SecretAccessKey,sessionToken:o.Token,expiration:E.parseRfc3339DateTime(o.Expiration)}}if(r.statusCode>=400&&r.statusCode<500){let o={};try{o=JSON.parse(s)}catch(d){}throw Object.assign(new T.CredentialsProviderError(`Server responded with status: ${r.statusCode}`,{logger:i}),{Code:o.Code,Message:o.Message})}throw new T.CredentialsProviderError(`Server responded with status: ${r.statusCode}`,{logger:i})}var g=(r,i,c)=>async()=>{for(let s=0;s<i;++s)try{return await r()}catch(o){await new Promise((d)=>setTimeout(d,c))}return await r()};var F="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",x="http://169.254.170.2",D="AWS_CONTAINER_CREDENTIALS_FULL_URI",W="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",b="AWS_CONTAINER_AUTHORIZATION_TOKEN",q=(r={})=>{r.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let i,c=r.awsContainerCredentialsRelativeUri??process.env[F],s=r.awsContainerCredentialsFullUri??process.env[D],o=r.awsContainerAuthorizationToken??process.env[b],d=r.awsContainerAuthorizationTokenFile??process.env[W],m=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?.warn?console.warn:r.logger.warn.bind(r.logger);if(c&&s)m("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),m("awsContainerCredentialsRelativeUri will take precedence.");if(o&&d)m("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),m("awsContainerAuthorizationTokenFile will take precedence.");if(c)i=`${x}${c}`;else if(s)i=s;else throw new h.CredentialsProviderError(`No HTTP credential provider host provided.
6
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:r.logger});let p=new URL(i);I(p,r.logger);let _=y.NodeHttpHandler.create({connectionTimeout:r.timeout??1000}),v=r.timeout??1000,L=g(async()=>{let l=w(p);if(d)l.headers.Authorization=S((await P.readFile(d)).toString());else if(o)l.headers.Authorization=S(o);try{let C=await _.handle(l,{requestTimeout:v});return R(C.response).then((U)=>O.setCredentialFeature(U,"CREDENTIALS_HTTP","z"))}catch(C){throw new h.CredentialsProviderError(String(C),{logger:r.logger})}},r.maxRetries??3,r.timeout??1000);return async()=>{try{return await L()}finally{_.destroy?.()}}},S=(r)=>{if(r.includes(`\r
7
- `))throw new h.CredentialsProviderError("Authorization token contains invalid \\r\\n sequence.");return r};export{q as fromHttp};
File without changes
File without changes