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

masto

Package Overview
Dependencies
Maintainers
1
Versions
242
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

masto - npm Package Compare versions

Comparing version 6.0.2 to 6.0.3

53

dist/index.js

@@ -287,31 +287,32 @@ import { CustomError } from 'ts-custom-error';

dispatch(action) {
return __awaiter(this, void 0, void 0, function* () {
const actionType = this.toPrimitiveAction(action.type);
const path = this.isPrimitiveAction(action.type)
? action.path
: action.path + "/" + snakeCase(action.type);
const encoding = this.inferEncoding(actionType, path);
const meta = Object.assign(Object.assign({}, action.meta), { encoding });
switch (actionType) {
case "fetch": {
return this.http.get(path, action.data, meta);
}
case "create": {
if (path === "/api/v2/media") {
const media = yield this.http.post(path, action.data, meta);
const actionType = this.toPrimitiveAction(action.type);
const path = this.isPrimitiveAction(action.type)
? action.path
: action.path + "/" + snakeCase(action.type);
const encoding = this.inferEncoding(actionType, path);
const meta = Object.assign(Object.assign({}, action.meta), { encoding });
switch (actionType) {
case "fetch": {
return this.http.get(path, action.data, meta);
}
case "create": {
if (path === "/api/v2/media") {
return this.http
.post(path, action.data, meta)
.then((media) => {
return this.waitForMediaAttachment(media.id);
}
return this.http.post(path, action.data, meta);
});
}
case "update": {
return this.http.patch(path, action.data, meta);
}
case "remove": {
return this.http.delete(path, action.data, meta);
}
case "list": {
return new PaginatorHttp(this.http, path, action.data);
}
return this.http.post(path, action.data, meta);
}
});
case "update": {
return this.http.patch(path, action.data, meta);
}
case "remove": {
return this.http.delete(path, action.data, meta);
}
case "list": {
return new PaginatorHttp(this.http, path, action.data);
}
}
}

@@ -318,0 +319,0 @@ isPrimitiveAction(action) {

@@ -5,3 +5,3 @@ {

"private": false,
"version": "6.0.2",
"version": "6.0.3",
"author": "Ryo Igarashi <n33t5hin@gmail.com>",

@@ -8,0 +8,0 @@ "license": "MIT",

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