@dopplerhq/universal-import-core
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -5,3 +5,3 @@ export interface KeyInfo { | ||
} | ||
export declare function fetchKeyInfo(): Promise<KeyInfo>; | ||
export declare function fetchKeyInfo(keyURL: string): Promise<KeyInfo>; | ||
export declare function encrypt(plainText: string, keyInfo: KeyInfo): Promise<string>; |
@@ -5,7 +5,8 @@ import tweetnacl from "tweetnacl-util"; | ||
const { seal } = tweetnaclSealedbox; | ||
const DOPPLER_UNIVERSAL_KEY_URL = "https://keys.doppler.com/universal-import/latest.json"; | ||
let keyInfoPromise; | ||
export async function fetchKeyInfo() { | ||
export async function fetchKeyInfo(keyURL) { | ||
const url = new URL(keyURL); | ||
url.searchParams.append("cpv", "0.0.12"); | ||
if (!keyInfoPromise) { | ||
keyInfoPromise = fetch(DOPPLER_UNIVERSAL_KEY_URL) | ||
keyInfoPromise = fetch(url.toString()) | ||
.then((res) => res.json()) | ||
@@ -12,0 +13,0 @@ .then((json) => ({ |
import * as encryption from "./encryption.js"; | ||
import * as utils from "./utils.js"; | ||
import * as modal from "./modal.js"; | ||
const DOPPLER_UNIVERSAL_KEY_URL = "https://keys.doppler.com/universal-import/latest.json"; | ||
export async function fetchKeyInfo() { | ||
return await encryption.fetchKeyInfo(); | ||
return await encryption.fetchKeyInfo(DOPPLER_UNIVERSAL_KEY_URL); | ||
} | ||
@@ -7,0 +8,0 @@ export async function trigger(props) { |
@@ -6,2 +6,3 @@ const DOPPLER_DASHBOARD_URL = "https://dashboard.doppler.com"; | ||
url.searchParams.set("keyId", keyId); | ||
url.searchParams.set("cpv", "0.0.12"); | ||
openWindow(url.toString(), 800, 800); | ||
@@ -8,0 +9,0 @@ } |
{ | ||
"name": "@dopplerhq/universal-import-core", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16495
95