New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rassets

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rassets - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

4

lib/index.d.ts

@@ -1,2 +0,2 @@

import { IAssetUploadFile, IAssetUploadRequest } from "./interfaces/IAssetUploadRequest";
import { IAssetUploadRequest } from "./interfaces/IAssetUploadRequest";
import { IAudioRequest } from "./interfaces/IAudioRequest";

@@ -10,3 +10,3 @@ import { IAudioResponse } from "./interfaces/IAudioResponse";

function uploadAudio(cookie: string, data: IAudioRequest): Promise<IAudioResponse>;
function upload(cookie: string, file: IAssetUploadFile, data: IAssetUploadRequest): Promise<string>;
function upload(cookie: string, data: IAssetUploadRequest): Promise<string>;
function verifyAudio(cookie: string, data: IAudioVerifyRequest): Promise<IAudioVerifyResponse>;

@@ -13,0 +13,0 @@ }

@@ -102,3 +102,3 @@ "use strict";

// Upload an asset - using hidden api :flushed: (ACTUALLY WORKS)
function upload(cookie, file, data) {
function upload(cookie, data) {
return __awaiter(this, void 0, void 0, function* () {

@@ -117,3 +117,3 @@ // Get CSRF

},
body: file.content,
body: data.file,
searchParams: {

@@ -120,0 +120,0 @@ assetid: data.assetid || 0,

/// <reference types="node" />
export interface IAssetUploadFile {
content: Buffer;
name: string;
type: string;
}
export interface IAssetUploadRequest {
file: Buffer;
assetid?: number;

@@ -9,0 +5,0 @@ assetType: "Image" | "TeeShirt" | "Audio" | "Mesh" | "Lua" | "Hat" | "Place" | "Model" | "Shirt" | "Pants" | "Decal" | "Head" | "Face" | "Gear" | "Badge" | "Animation" | "Torso" | "RightArm" | "LeftArm" | "LeftLeg" | "RightLeg" | "Package" | "GamePass" | "Plugin" | "MeshPart" | "HairAccessory" | "FaceAccessory" | "NeckAccessory" | "ShoulderAccessory" | "FrontAccessory" | "BackAccessory" | "WaistAccessory" | "ClimbAnimation" | "DeathAnimation" | "FallAnimaiton" | "IdleAnimation" | "JumpAnimation" | "RunAnimation" | "SwimAnimation" | "WalkAnimation" | "PoseAnimation" | "EarAccessory" | "EyeAccessory" | "EmoteAnimation" | "Video";

{
"name": "rassets",
"version": "1.2.1",
"version": "1.2.2",
"description": "A simple Typescript wrapper to upload assets.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

// Dependencies
import got from "got"
import { IAssetUploadFile, IAssetUploadRequest } from "./interfaces/IAssetUploadRequest";
import { IAssetUploadRequest } from "./interfaces/IAssetUploadRequest";
import { IAudioRequest } from "./interfaces/IAudioRequest";

@@ -98,3 +98,3 @@ import { IAudioResponse } from "./interfaces/IAudioResponse";

// Upload an asset - using hidden api :flushed: (ACTUALLY WORKS)
export async function upload(cookie: string, file: IAssetUploadFile, data: IAssetUploadRequest){
export async function upload(cookie: string, data: IAssetUploadRequest){
// Get CSRF

@@ -113,3 +113,3 @@ const xcsrf = await RAssets.getCSRF(cookie)

},
body: file.content,
body: data.file,
searchParams: {

@@ -116,0 +116,0 @@ assetid: data.assetid || 0,

@@ -1,8 +0,3 @@

export interface IAssetUploadFile {
content: Buffer
name: string
type: string
}
export interface IAssetUploadRequest {
file: Buffer
assetid?: number

@@ -9,0 +4,0 @@ assetType: "Image" | "TeeShirt" | "Audio" | "Mesh" | "Lua" | "Hat" | "Place" | "Model" | "Shirt" | "Pants" | "Decal" | "Head" | "Face" | "Gear" | "Badge" | "Animation" | "Torso" | "RightArm" | "LeftArm" | "LeftLeg" | "RightLeg" | "Package" | "GamePass" | "Plugin" | "MeshPart" | "HairAccessory" | "FaceAccessory" | "NeckAccessory" | "ShoulderAccessory" | "FrontAccessory" | "BackAccessory" | "WaistAccessory" | "ClimbAnimation" | "DeathAnimation" | "FallAnimaiton" | "IdleAnimation" | "JumpAnimation" | "RunAnimation" | "SwimAnimation" | "WalkAnimation" | "PoseAnimation" | "EarAccessory" | "EyeAccessory" | "EmoteAnimation" | "Video"

@@ -23,3 +23,4 @@ // Dependencies

// Upload Asset
const uploadAsset = await RAssets.upload(cookie, {content: testModel, name: "test", type: "rbxm"}, {
const uploadAsset = await RAssets.upload(cookie, {
file: testModel,
assetType: "Model",

@@ -26,0 +27,0 @@ name: "test",

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