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

manifesto.js

Package Overview
Dependencies
Maintainers
1
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

manifesto.js - npm Package Compare versions

Comparing version

to
4.0.0-pre.13

19

dist-commonjs/Utils.js

@@ -42,2 +42,3 @@ "use strict";

var Serialisation_1 = require("./Serialisation");
var HTTPStatusCodeEnum = require("@edsilv/http-status-codes/dist-commonjs/").HTTPStatusCode;
var ServiceProfileEnum = require('@iiif/vocabulary/dist-commonjs/').ServiceProfile;

@@ -284,3 +285,3 @@ var http = require('http');

_a.sent();
if (!(resource.status === HTTPStatusCode.OK)) return [3 /*break*/, 3];
if (!(resource.status === HTTPStatusCodeEnum.OK)) return [3 /*break*/, 3];
return [2 /*return*/, resource];

@@ -295,3 +296,3 @@ case 3:

case 5:
if (resource.status === HTTPStatusCode.OK || resource.status === HTTPStatusCode.MOVED_TEMPORARILY) {
if (resource.status === HTTPStatusCodeEnum.OK || resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY) {
return [2 /*return*/, resource];

@@ -303,3 +304,3 @@ }

_a.sent();
if (!(resource.status === HTTPStatusCode.MOVED_TEMPORARILY || resource.status === HTTPStatusCode.UNAUTHORIZED)) return [3 /*break*/, 9];
if (!(resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY || resource.status === HTTPStatusCodeEnum.UNAUTHORIZED)) return [3 /*break*/, 9];
return [4 /*yield*/, Utils.doAuthChain(resource, openContentProviderInteraction, openTokenService, userInteractedWithContentProvider, getContentProviderInteraction, handleMovedTemporarily, showOutOfOptionsMessages)];

@@ -310,3 +311,3 @@ case 8:

case 9:
if (resource.status === HTTPStatusCode.OK || resource.status === HTTPStatusCode.MOVED_TEMPORARILY) {
if (resource.status === HTTPStatusCodeEnum.OK || resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY) {
return [2 /*return*/, resource];

@@ -346,3 +347,3 @@ }

}
if (!(!resource.isResponseHandled && resource.status === HTTPStatusCode.MOVED_TEMPORARILY)) return [3 /*break*/, 2];
if (!(!resource.isResponseHandled && resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY)) return [3 /*break*/, 2];
return [4 /*yield*/, handleMovedTemporarily(resource)];

@@ -517,3 +518,3 @@ case 1:

// if the info.json loaded using the stored access token
if (resource.status === HTTPStatusCode.OK) {
if (resource.status === HTTPStatusCodeEnum.OK) {
resolve(handleResourceResponse(resource));

@@ -574,3 +575,3 @@ }

resource.getData(storedAccessToken).then(function () {
if (resource.status === HTTPStatusCode.OK) {
if (resource.status === HTTPStatusCodeEnum.OK) {
resolve(resource); // happy path ended

@@ -593,3 +594,3 @@ }

resource.getData(accessToken).then(function () {
if (resource.status === HTTPStatusCode.OK) {
if (resource.status === HTTPStatusCodeEnum.OK) {
resolve(resource);

@@ -627,3 +628,3 @@ }

Utils.showAuthInteraction = function (resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, resolve, reject) {
if (resource.status === HTTPStatusCode.MOVED_TEMPORARILY && !resource.isResponseHandled) {
if (resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY && !resource.isResponseHandled) {
// if the resource was redirected to a degraded version

@@ -630,0 +631,0 @@ // and the response hasn't been handled yet.

@@ -40,2 +40,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import { Deserialiser } from "./Serialisation";
var HTTPStatusCodeEnum = require("@edsilv/http-status-codes/dist-commonjs/").HTTPStatusCode;
var ServiceProfileEnum = require('@iiif/vocabulary/dist-commonjs/').ServiceProfile;

@@ -282,3 +283,3 @@ var http = require('http');

_a.sent();
if (!(resource.status === HTTPStatusCode.OK)) return [3 /*break*/, 3];
if (!(resource.status === HTTPStatusCodeEnum.OK)) return [3 /*break*/, 3];
return [2 /*return*/, resource];

@@ -293,3 +294,3 @@ case 3:

case 5:
if (resource.status === HTTPStatusCode.OK || resource.status === HTTPStatusCode.MOVED_TEMPORARILY) {
if (resource.status === HTTPStatusCodeEnum.OK || resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY) {
return [2 /*return*/, resource];

@@ -301,3 +302,3 @@ }

_a.sent();
if (!(resource.status === HTTPStatusCode.MOVED_TEMPORARILY || resource.status === HTTPStatusCode.UNAUTHORIZED)) return [3 /*break*/, 9];
if (!(resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY || resource.status === HTTPStatusCodeEnum.UNAUTHORIZED)) return [3 /*break*/, 9];
return [4 /*yield*/, Utils.doAuthChain(resource, openContentProviderInteraction, openTokenService, userInteractedWithContentProvider, getContentProviderInteraction, handleMovedTemporarily, showOutOfOptionsMessages)];

@@ -308,3 +309,3 @@ case 8:

case 9:
if (resource.status === HTTPStatusCode.OK || resource.status === HTTPStatusCode.MOVED_TEMPORARILY) {
if (resource.status === HTTPStatusCodeEnum.OK || resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY) {
return [2 /*return*/, resource];

@@ -344,3 +345,3 @@ }

}
if (!(!resource.isResponseHandled && resource.status === HTTPStatusCode.MOVED_TEMPORARILY)) return [3 /*break*/, 2];
if (!(!resource.isResponseHandled && resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY)) return [3 /*break*/, 2];
return [4 /*yield*/, handleMovedTemporarily(resource)];

@@ -515,3 +516,3 @@ case 1:

// if the info.json loaded using the stored access token
if (resource.status === HTTPStatusCode.OK) {
if (resource.status === HTTPStatusCodeEnum.OK) {
resolve(handleResourceResponse(resource));

@@ -572,3 +573,3 @@ }

resource.getData(storedAccessToken).then(function () {
if (resource.status === HTTPStatusCode.OK) {
if (resource.status === HTTPStatusCodeEnum.OK) {
resolve(resource); // happy path ended

@@ -591,3 +592,3 @@ }

resource.getData(accessToken).then(function () {
if (resource.status === HTTPStatusCode.OK) {
if (resource.status === HTTPStatusCodeEnum.OK) {
resolve(resource);

@@ -625,3 +626,3 @@ }

Utils.showAuthInteraction = function (resource, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, resolve, reject) {
if (resource.status === HTTPStatusCode.MOVED_TEMPORARILY && !resource.isResponseHandled) {
if (resource.status === HTTPStatusCodeEnum.MOVED_TEMPORARILY && !resource.isResponseHandled) {
// if the resource was redirected to a degraded version

@@ -628,0 +629,0 @@ // and the response hasn't been handled yet.

{
"name": "manifesto.js",
"version": "4.0.0-pre.12",
"version": "4.0.0-pre.13",
"description": "IIIF Presentation API utility library for client and server",
"main": "./dist-esmodule/index.js",
"types": "./dist-esmodule/index.d.ts",
"main": "./dist-umd/manifesto.js",
"module": "./dist-esmodule/index.js",
"types": "./types/index.d.ts",
"scripts": {

@@ -41,6 +42,6 @@ "clean": "rimraf -rf dist-umd dist-commonjs dist-esmodule dist-var types",

"cross-env": "^5.2.1",
"dts-bundle-generator": "^2.0.0",
"dts-bundle-generator": "^2.1.0",
"finalhandler": "0.4.0",
"http": "0.0.0",
"mocha": "2.2.4",
"mocha": "^2.2.4",
"rimraf": "^3.0.0",

@@ -55,4 +56,4 @@ "serve-static": "1.10.0",

"dependencies": {
"@edsilv/http-status-codes": "0.0.12",
"@iiif/vocabulary": "^1.0.9",
"@edsilv/http-status-codes": "1.0.1",
"@iiif/vocabulary": "1.0.10",
"request": "^2.83.0"

@@ -59,0 +60,0 @@ },

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 too big to display

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