Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vssue

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vssue - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

48

package.json
{
"name": "vssue",
"version": "1.3.0",
"version": "1.4.0",
"description": "A vue-powered issue-based comment plugin",

@@ -36,3 +36,3 @@ "keywords": [

"dependencies": {
"@vssue/utils": "^1.1.1",
"@vssue/utils": "^1.4.0",
"github-markdown-css": "^3.0.1",

@@ -44,15 +44,20 @@ "vue": "^2.6.10",

"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@vssue/api-bitbucket-v2": "^1.2.1",
"@vssue/api-gitea-v1": "^1.3.0",
"@vssue/api-gitee-v5": "^1.2.1",
"@vssue/api-github-v3": "^1.1.2",
"@vssue/api-github-v4": "^1.2.1",
"@vssue/api-gitlab-v4": "^1.2.1",
"@babel/core": "^7.7.7",
"@babel/preset-env": "^7.7.7",
"@rollup/plugin-commonjs": "^11.0.0",
"@rollup/plugin-json": "^4.0.1",
"@rollup/plugin-node-resolve": "^6.0.0",
"@rollup/plugin-replace": "^2.3.0",
"@rollup/plugin-typescript": "^2.0.1",
"@vssue/api-bitbucket-v2": "^1.4.0",
"@vssue/api-gitea-v1": "^1.4.0",
"@vssue/api-gitee-v5": "^1.4.0",
"@vssue/api-github-v3": "^1.4.0",
"@vssue/api-github-v4": "^1.4.0",
"@vssue/api-gitlab-v4": "^1.4.0",
"@vue/babel-preset-app": "^3.8.0",
"@vue/cli-plugin-babel": "^3.8.0",
"@vue/cli-plugin-eslint": "^3.8.0",
"@vue/cli-plugin-typescript": "^3.8.1",
"@vue/cli-service": "^3.8.0",
"@vue/cli-plugin-babel": "^4.1.2",
"@vue/cli-plugin-eslint": "^4.1.2",
"@vue/cli-plugin-typescript": "^4.1.2",
"@vue/cli-service": "^4.1.2",
"autoprefixer": "^9.6.0",

@@ -67,11 +72,6 @@ "cross-env": "^5.2.0",

"postcss": "^7.0.16",
"rollup": "^1.13.1",
"rollup-plugin-babel": "^4.3.2",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.0.1",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-terser": "^5.0.0",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-vue": "^5.0.0",
"rollup": "^1.27.14",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-terser": "^5.1.3",
"rollup-plugin-vue": "^5.1.4",
"stylus": "^0.54.5",

@@ -86,3 +86,3 @@ "through2": "^3.0.1",

},
"gitHead": "1a6ea07e13e46bcd39341862191344e8793be390"
"gitHead": "c31210f04dcb4f114488e45d5835c89196492026"
}
export namespace VssueAPI {
export type Options = {
owner: string
repo: string
clientId: string
clientSecret?: string
baseURL?: string
state: string
labels: Array<string>
proxy?: string | ((url: string) => string)
}
owner: string;
repo: string;
clientId: string;
clientSecret?: string;
baseURL?: string;
state: string;
labels: Array<string>;
proxy?: string | ((url: string) => string);
};
export type Platform = {
name: string
link: string
version: string
name: string;
link: string;
version: string;
meta: {
reactable: boolean
sortable: boolean
}
}
reactable: boolean;
sortable: boolean;
};
};
export type AccessToken = string | null
export type AccessToken = string | null;
export type User = {
username: string
avatar?: string
homepage?: string
}
username: string;
avatar?: string;
homepage?: string;
};
export type Issue = {
id: string
title: string
content: string
link: string
}
id: string | number;
title: string;
content: string;
link: string;
};
export type Comment = {
id: string
content: string
contentRaw: string
author: VssueAPI.User
createdAt: string
updatedAt: string
reactions?: VssueAPI.Reactions | null
}
id: string | number;
content: string;
contentRaw: string;
author: VssueAPI.User;
createdAt: string;
updatedAt: string;
reactions?: VssueAPI.Reactions | null;
};
export type Comments = {
count: number
page: number
perPage: number
data: Array<VssueAPI.Comment>
}
count: number;
page: number;
perPage: number;
data: Array<VssueAPI.Comment>;
};
export type Reactions = {
like?: number
unlike?: number
heart?: number
}
like?: number;
unlike?: number;
heart?: number;
};
export type Query = {
page: number
perPage: number
sort: string
}
page: number;
perPage: number;
sort: string;
};

@@ -71,3 +71,3 @@ export interface Instance {

*/
readonly platform: VssueAPI.Platform
readonly platform: VssueAPI.Platform;

@@ -77,3 +77,3 @@ /**

*/
redirectAuth (): void
redirectAuth(): void;

@@ -85,148 +85,92 @@ /**

* If the `code` and `state` exist in the query, and the `state` matches, remove them from query, and try to get the access token.
*
* @return A string for access token, `null` for no authorization code
*/
handleAuth (): Promise<VssueAPI.AccessToken>
handleAuth(): Promise<VssueAPI.AccessToken>;
/**
* Get the logined user with access token.
*
* @param options.accessToken - User access token
*
* @return The user
*/
getUser (options: {
accessToken: VssueAPI.AccessToken
}): Promise<VssueAPI.User>
getUser(options: {
accessToken: VssueAPI.AccessToken;
}): Promise<VssueAPI.User>;
/**
* Get issue according to id or title
*
* @param options.accessToken - User access token
* @param options.issueId - The id of issue
* @param options.issueTitle - The title of issue
*
* @return The comments
*/
getIssue (options: {
accessToken: VssueAPI.AccessToken
issueId?: string | number
issueTitle?: string
}): Promise<VssueAPI.Issue | null>
getIssue(options: {
accessToken: VssueAPI.AccessToken;
issueId?: string | number;
issueTitle?: string;
}): Promise<VssueAPI.Issue | null>;
/**
* Create a new issue
*
* @param options.accessToken - User access token
* @param options.title - The title of issue
* @param options.content - The content of issue
*
* @return The created issue
*/
postIssue (options: {
accessToken: VssueAPI.AccessToken
title: string
content: string
}): Promise<VssueAPI.Issue>
postIssue(options: {
accessToken: VssueAPI.AccessToken;
title: string;
content: string;
}): Promise<VssueAPI.Issue>;
/**
* Get comments of issue according to the issue id
*
* @param options.accessToken - User access token
* @param options.issueId - The id of issue
* @param options.query - The query parameters
*
* @return The comments
*/
getComments (options: {
accessToken: VssueAPI.AccessToken
issueId: string | number
query?: Partial<VssueAPI.Query>
}): Promise<VssueAPI.Comments>
getComments(options: {
accessToken: VssueAPI.AccessToken;
issueId: string | number;
query?: Partial<VssueAPI.Query>;
}): Promise<VssueAPI.Comments>;
/**
* Create a new comment
*
* @param options.accessToken - User access token
* @param options.issueId - The id of issue
* @param options.content - The content of comment
*
* @return The created comment
*/
postComment (options: {
accessToken: VssueAPI.AccessToken
issueId: string | number
content: string
}): Promise<VssueAPI.Comment>
postComment(options: {
accessToken: VssueAPI.AccessToken;
issueId: string | number;
content: string;
}): Promise<VssueAPI.Comment>;
/**
* Edit a comment
*
* @param options.accessToken - User access token
* @param options.issueId - The id of issue
* @param options.commentId - The id of comment
* @param options.content - The content of comment
*
* @return The edited comment
*/
putComment (options: {
accessToken: VssueAPI.AccessToken
issueId: string | number
commentId: string | number
content: string
}): Promise<VssueAPI.Comment>
putComment(options: {
accessToken: VssueAPI.AccessToken;
issueId: string | number;
commentId: string | number;
content: string;
}): Promise<VssueAPI.Comment>;
/**
* Delete a comment
*
* @param options.accessToken - User access token
* @param options.issueId - The id of issue
* @param options.commentId - The id of comment
*
* @return `true` if succeed, `false` if failed
*/
deleteComment (options: {
accessToken: VssueAPI.AccessToken
issueId: string | number
commentId: string | number
}): Promise<boolean>
deleteComment(options: {
accessToken: VssueAPI.AccessToken;
issueId: string | number;
commentId: string | number;
}): Promise<boolean>;
/**
* Get reaction of a comment
*
* @param options.accessToken - User access token
* @param options.issueId - The id of issue
* @param options.commentId - The id of comment
*
* @return `true` if succeed, `false` if failed
*/
getCommentReactions (options: {
accessToken: VssueAPI.AccessToken
issueId: string | number
commentId: string | number
}): Promise<VssueAPI.Reactions>
getCommentReactions(options: {
accessToken: VssueAPI.AccessToken;
issueId: string | number;
commentId: string | number;
}): Promise<VssueAPI.Reactions>;
/**
* Create a new reaction of a comment
*
* @param options.accessToken - User access token
* @param options.issueId - The id of issue
* @param options.commentId - The id of comment
* @param options.reaction - The reaction
*
* @return `true` if succeed, `false` if failed
*/
postCommentReaction (options: {
accessToken: VssueAPI.AccessToken
issueId: string | number
commentId: string | number
reaction: keyof VssueAPI.Reactions
}): Promise<boolean>
postCommentReaction(options: {
accessToken: VssueAPI.AccessToken;
issueId: string | number;
commentId: string | number;
reaction: keyof VssueAPI.Reactions;
}): Promise<boolean>;
}
export interface Constructor {
new (options: VssueAPI.Options): VssueAPI.Instance
new (options: VssueAPI.Options): VssueAPI.Instance;
}
}
export default VssueAPI
export default VssueAPI;

@@ -1,11 +0,11 @@

import Vssue from './vssue'
import VssueAPI from './api'
import Vssue from './vssue';
import VssueAPI from './api';
declare const VssueComponent: Vssue.Component
declare const VssuePlugin: Vssue.Plugin
declare const VssueComponent: Vssue.Component;
declare const VssuePlugin: Vssue.Plugin;
export { Vssue }
export { VssueAPI }
export { Vssue };
export { VssueAPI };
export { VssueComponent }
export default VssuePlugin
export { VssueComponent };
export default VssuePlugin;

@@ -1,69 +0,82 @@

import Vue, { PluginObject } from 'vue'
import 'vue-i18n'
import { VssueAPI } from './api'
import Vue, { PluginObject } from 'vue';
import 'vue-i18n';
import { VssueAPI } from './api';
export namespace Vssue {
export type Options = {
api: VssueAPI.Constructor
owner: string
repo: string
clientId: string
clientSecret: string
baseURL: string
state: string
labels: Array<string>
prefix: string
admins: Array<string>
perPage: number
locale: string
proxy: string | ((url: string) => string)
issueContent: ((param: { options: Vssue.Options, url: string }) => string | Promise<string>)
autoCreateIssue: boolean
}
api: VssueAPI.Constructor;
owner: string;
repo: string;
clientId: string;
clientSecret: string;
baseURL: string;
state: string;
labels: Array<string>;
prefix: string;
admins: Array<string>;
perPage: number;
locale: string;
proxy: string | ((url: string) => string);
issueContent: (param: {
options: Vssue.Options;
url: string;
}) => string | Promise<string>;
autoCreateIssue: boolean;
};
export interface Plugin extends PluginObject<Partial<Vssue.Options>> {
readonly version: string
installed: boolean
VssueComponent: Vssue.Component
readonly version: string;
installed: boolean;
VssueComponent: Vssue.Component;
}
export type Component = typeof Vue
export type Component = typeof Vue;
export interface Store extends Vue {
version: string
title: string | ((options: Vssue.Options) => string)
issueTitle: string
issueId: number | string | null
options: Vssue.Options | null
API: VssueAPI.Instance | null
accessToken: string | null
user: VssueAPI.User | null
issue: VssueAPI.Issue | null
comments: VssueAPI.Comments | null
query: VssueAPI.Query
isInitializing: boolean
isIssueNotCreated: boolean
isLoginRequired: boolean
isFailed: boolean
isCreatingIssue: boolean
isLoadingComments: boolean
isCreatingComment: boolean
isUpdatingComment: boolean
isLogined: boolean
isAdmin: boolean
isPending: boolean
setOptions (options: Partial<Vssue.Options>): void
init (): Promise<void>
postIssue (): Promise<VssueAPI.Issue | void>
getComments (): Promise<VssueAPI.Comments | void>
postComment (options: { content: string }): Promise<VssueAPI.Comment | void>
deleteComment (options: { commentId: number | string }): Promise<boolean | void>
putComment (options: { commentId: number | string, content: string }): Promise<VssueAPI.Comment | void>
getCommentReactions (options: { commentId: number | string }): Promise<VssueAPI.Reactions | void>
postCommentReaction (options: { commentId: number | string, reaction: keyof VssueAPI.Reactions }): Promise<boolean | void>
login (): void
logout (): void
version: string;
title: string | ((options: Vssue.Options) => string);
issueTitle: string;
issueId: number | string | null;
options: Vssue.Options | null;
API: VssueAPI.Instance | null;
accessToken: string | null;
user: VssueAPI.User | null;
issue: VssueAPI.Issue | null;
comments: VssueAPI.Comments | null;
query: VssueAPI.Query;
isInitializing: boolean;
isIssueNotCreated: boolean;
isLoginRequired: boolean;
isFailed: boolean;
isCreatingIssue: boolean;
isLoadingComments: boolean;
isCreatingComment: boolean;
isUpdatingComment: boolean;
isLogined: boolean;
isAdmin: boolean;
isPending: boolean;
setOptions(options: Partial<Vssue.Options>): void;
init(): Promise<void>;
postIssue(): Promise<VssueAPI.Issue | void>;
getComments(): Promise<VssueAPI.Comments | void>;
postComment(options: { content: string }): Promise<VssueAPI.Comment | void>;
deleteComment(options: {
commentId: number | string;
}): Promise<boolean | void>;
putComment(options: {
commentId: number | string;
content: string;
}): Promise<VssueAPI.Comment | void>;
getCommentReactions(options: {
commentId: number | string;
}): Promise<VssueAPI.Reactions | void>;
postCommentReaction(options: {
commentId: number | string;
reaction: keyof VssueAPI.Reactions;
}): Promise<boolean | void>;
login(): void;
logout(): void;
}
}
export default Vssue
export default Vssue;

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc