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

resolve-account

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolve-account - npm Package Compare versions

Comparing version 1.0.17 to 1.0.18

32

dist/index.js

@@ -20,3 +20,3 @@ (function (root, factory) {

var SOURCE = 'library';
var VERSION = '1.0.17';
var VERSION = '1.0.18';

@@ -82,2 +82,4 @@ function ResolveAccount(options) {

// @@@DEVELOPER
// var date = '2024-04-23T00:07:29.183Z';
// var date = `2024-03-23T00:07:29.183Z`;
// account.plan.id = 'basic';

@@ -87,7 +89,11 @@ // account.plan.trial = {

// expires: {
// timestamp: new Date('2024-04-23T00:07:29.183Z').toISOString(),
// timestampUNIX: Math.round(new Date('2024-04-23T00:07:29.183Z').getTime() / 1000),
// }
// timestamp: new Date(date).toISOString(),
// timestampUNIX: Math.round(new Date(date).getTime() / 1000),
// },
// }
// account.plan.status = 'suspended';
// account.plan.expires = {
// timestamp: new Date(date).toISOString(),
// timestampUNIX: Math.round(new Date(date).getTime() / 1000),
// }
// account.plan.status = 'cancelled';

@@ -147,2 +153,3 @@ account.plan.limits = account.plan.limits || {};

var startDate = new Date(account.plan.payment.startDate.timestamp);
var unresolvedPlanId = account.plan.id;
var planIsActive = difference > -1 && account.plan.id !== defaultPlanId;

@@ -330,4 +337,5 @@ var planIsSuspended = account.plan.status === 'suspended';

// If basic, just show account creation date
if (isBasicPlan) {
if (unresolvedPlanId === defaultPlanId) {
visibleStartDate = accountCreationDate;
billingStatusEl.setAttribute('hidden', true);
}

@@ -337,3 +345,4 @@ var visibleFrequency = account.plan.payment.frequency === 'unknown' ? 'monthly' : account.plan.payment.frequency;

// Update billing UI
billingPlanId.setInnerHTML(splitDashesAndUppercase(account.plan.id));
// billingPlanId.setInnerHTML(splitDashesAndUppercase(account.plan.id));
billingPlanId.setInnerHTML(splitDashesAndUppercase(unresolvedPlanId)); // Show unresolved because we want to show what plan they have bought not what the expirattion status resolves to
billingFrequencyEl.setInnerHTML(visibleFrequency);

@@ -352,5 +361,7 @@ billingStatusEl.setInnerHTML(visibleStatus);

}));
billingExpirationDateEl.setInnerHTML(isBasicPlan && daysTillExpire < 366
? '<i class="fas fa-exclamation-triangle mr-1"></i> Expires in ' + daysTillExpire + ' days '
: '');
// billingExpirationDateEl.setInnerHTML(isBasicPlan && daysTillExpire < 366
billingExpirationDateEl.setInnerHTML('<i class="fas fa-exclamation-triangle mr-1"></i> Expires in ' + daysTillExpire + ' days ');
if (daysTillExpire > 0 && daysTillExpire < 366) {
billingExpirationDateEl.removeAttribute('hidden');
}

@@ -413,2 +424,3 @@ // Update payment method UI

// Register

@@ -415,0 +427,0 @@ if (environment === 'browser') {

{
"name": "resolve-account",
"version": "1.0.17",
"version": "1.0.18",
"description": "Standardize account JSON structure for projects built under ITW Creative Works",

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

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