Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@tryghost/acme-http-01-sequelize

Package Overview
Dependencies
Maintainers
15
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryghost/acme-http-01-sequelize - npm Package Compare versions

Comparing version
0.1.0
to
0.2.0
+8
-8
index.js

@@ -15,2 +15,4 @@ const {Sequelize, Model, DataTypes} = require('sequelize');

this._Challenge = class Challenge extends Model {};
this._setupPromise = this.init();
}

@@ -51,2 +53,3 @@

async get(options) {
await this._setupPromise;
const subject = options.challenge.identifier.value;

@@ -72,16 +75,12 @@ const token = options.challenge.token;

async set(options) {
const [challenge, created] = await this._Challenge.findOrCreate({
await this._setupPromise;
const [challenge] = await this._Challenge.findOrCreate({
where: {
subject: options.challenge.identifier.value,
token: options.challenge.token
},
defaults: {
authorizationKey: options.challenge.keyAuthorization
}
});
if (!created) {
challenge.authorizationKey = options.challenge.keyAuthorization;
challenge.save();
}
challenge.authorizationKey = options.challenge.keyAuthorization;
challenge.save();

@@ -92,2 +91,3 @@ return null;

async remove(options) {
await this._setupPromise;
const deleted = await this._Challenge.destroy({

@@ -94,0 +94,0 @@ where: {

{
"name": "@tryghost/acme-http-01-sequelize",
"version": "0.1.0",
"version": "0.2.0",
"repository": "git@github.com:TryGhost/acme-http-01-sequelize.git",

@@ -5,0 +5,0 @@ "author": "Ghost Foundation",