Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
electron-lisenser
Advanced tools
Readme
Electron/Javascript Client for the Lisenser Service
npm install electron-lisenser
import { Lisenser } from 'lisenser'
const lisenser = new Lisenser('<your-product-id>', 'My App')
async function checkLicense() {
const status = await lisenser.getLicenseStatus()
switch (status.status) {
case 'no-key':
console.log('No license key found')
break
case 'invalid':
console.log('Invalid license key')
break
case 'expired':
console.log(`License expired ${status.daysToExpiry} days ago`)
break
case 'active':
console.log(`License will expire in ${status.daysToExpiry} days`)
break
}
}
checkLicense()
An instance of the Lisenser
class is used to manage
the license status of an Electron app.
productId: string
The product ID of the app.
appName: string
The name of the app.
machineId: string
A unique identifier for the machine running the app.
constructor(productId: string, appName: string = '', machineId?: string)
Initializes a new instance of the Lisenser
class.
productId
The product ID of the app.appName
The name of the app.machineId
A unique identifier for the machine running the app. If not provided, a machine ID will be generated using the machine-digest
package.getLicenseStatus(): Promise<client.LicenseStatus>
Returns the status of the license key. If no license key is stored locally, returns no-key
.
The status of the license key.
activateLicenseKey(licenseKey: string): Promise<client.LicenseStatus>
Activates the given license key.
licenseKey
The license key to activateThe status of the license key
startTrial(): Promise<client.TrialActivationStatus>
Attempts to start a trial for the app.
The activation status of the trial
getTrialStatus(): Promise<client.TrialStatus>
Gets the current status of the trial for the app.
The current status of the trial
createLicenseKeyWindow(iconPath: string, urlToBuy: string, overrideAppName?: string): Promise<boolean>
Opens a window for entering a license key.
iconPath
The path to the app iconurlToBuy
The URL to purchase a license keyoverrideAppName
The name of the app to display in the window. If not provided, the appName
provided in the constructor will be used.A boolean that is true
if the License was successfully activated, and false
otherwise.
FAQs
An electronjs client for Lisenser service
The npm package electron-lisenser receives a total of 1 weekly downloads. As such, electron-lisenser popularity was classified as not popular.
We found that electron-lisenser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.