Skip to content

Commit

Permalink
Add dist to repo
Browse files Browse the repository at this point in the history
  • Loading branch information
0marSalah committed Feb 12, 2025
1 parent 9fa67c0 commit a3febbd
Show file tree
Hide file tree
Showing 11 changed files with 395 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ typings/

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
Expand Down
4 changes: 4 additions & 0 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import cjsModule from "../index.js";
export const exportActorProfile = cjsModule.exportActorProfile;
export const importActorProfile = cjsModule.importActorProfile;
export const validateExportStream = cjsModule.validateExportStream;
3 changes: 3 additions & 0 deletions dist/esm/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
31 changes: 31 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*!
* Copyright (c) 2024 Interop Alliance and Dmitri Zagidulin. All rights reserved.
*/
import * as tar from 'tar-stream';
import { type Readable } from 'stream';
export interface ActorProfileOptions {
actorProfile?: any;
outbox?: any;
followers?: any;
followingAccounts?: any;
lists?: any;
bookmarks?: any;
likes?: any;
blockedAccounts?: any;
blockedDomains?: any;
mutedAccounts?: any;
}
export declare function exportActorProfile({ actorProfile, outbox, followers, followingAccounts, lists, bookmarks, likes, blockedAccounts, blockedDomains, mutedAccounts }: ActorProfileOptions & {
media?: File[];
}): Promise<{
addMediaFile: (fileName: string, buffer: ArrayBuffer, contentType: string) => void;
finalize: () => tar.Pack;
}>;
/**
* Imports an ActivityPub profile from a .tar archive stream.
* @param tarStream - A ReadableStream containing the .tar archive.
* @returns A promise that resolves to the parsed profile data.
*/
export declare function importActorProfile(tarStream: Readable): Promise<Record<string, any>>;
export * from './verify';
//# sourceMappingURL=index.d.ts.map
1 change: 1 addition & 0 deletions dist/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

227 changes: 227 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions dist/verify.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { type Readable } from 'stream';
/**
* Validates the structure and content of an exported ActivityPub tarball.
* @param tarStream - A ReadableStream containing the .tar archive.
* @returns A promise that resolves to an object with `valid` (boolean) and `errors` (string[]).
*/
export declare function validateExportStream(tarStream: Readable): Promise<{
valid: boolean;
errors: string[];
}>;
//# sourceMappingURL=verify.d.ts.map
1 change: 1 addition & 0 deletions dist/verify.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a3febbd

Please sign in to comment.