@spektre/veil 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devUI.d.ts +1 -1
- package/dist/index.esm.js +19 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/devUI.d.ts
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { createContext, useState, useEffect, useContext } from 'react';
|
|
2
2
|
|
|
3
3
|
const DEV_UI_STORAGE_KEY = 'spektre_dev_enabled';
|
|
4
|
+
let DEV_UI_VERSION = '1.0.0';
|
|
4
5
|
// Inject styles directly into the document
|
|
5
6
|
function injectDevUIStyles() {
|
|
6
7
|
if (document.getElementById('spektre-dev-ui-styles')) {
|
|
@@ -406,7 +407,11 @@ function runSecurityScan() {
|
|
|
406
407
|
issues,
|
|
407
408
|
};
|
|
408
409
|
}
|
|
409
|
-
function initializeDevUI() {
|
|
410
|
+
function initializeDevUI(version) {
|
|
411
|
+
// Set version if provided
|
|
412
|
+
{
|
|
413
|
+
DEV_UI_VERSION = version;
|
|
414
|
+
}
|
|
410
415
|
// Inject styles first
|
|
411
416
|
injectDevUIStyles();
|
|
412
417
|
// Check if Spektre is enabled in localStorage (default to true)
|
|
@@ -535,6 +540,16 @@ function openDevModal(scanResult) {
|
|
|
535
540
|
}
|
|
536
541
|
body.appendChild(scanContainer);
|
|
537
542
|
}
|
|
543
|
+
// Add version label at bottom
|
|
544
|
+
const versionLabel = document.createElement('div');
|
|
545
|
+
versionLabel.style.marginTop = '16px';
|
|
546
|
+
versionLabel.style.paddingTop = '12px';
|
|
547
|
+
versionLabel.style.borderTop = '1px solid rgba(71, 85, 105, 0.3)';
|
|
548
|
+
versionLabel.style.fontSize = '12px';
|
|
549
|
+
versionLabel.style.color = '#64748b';
|
|
550
|
+
versionLabel.style.textAlign = 'center';
|
|
551
|
+
versionLabel.textContent = `Spektre v${DEV_UI_VERSION}`;
|
|
552
|
+
body.appendChild(versionLabel);
|
|
538
553
|
modalContent.appendChild(header);
|
|
539
554
|
modalContent.appendChild(body);
|
|
540
555
|
modal.appendChild(modalContent);
|
|
@@ -993,9 +1008,11 @@ const useProtectedFetch = () => {
|
|
|
993
1008
|
return protectedFetch;
|
|
994
1009
|
};
|
|
995
1010
|
|
|
1011
|
+
// Manually set version - update this with each release
|
|
1012
|
+
const packageVersion = '0.1.10';
|
|
996
1013
|
// Check if we're in an iframe (development environment) and initialize dev UI
|
|
997
1014
|
if (typeof window !== 'undefined' && window.self !== window.top) {
|
|
998
|
-
initializeDevUI();
|
|
1015
|
+
initializeDevUI(packageVersion);
|
|
999
1016
|
}
|
|
1000
1017
|
|
|
1001
1018
|
export { SecurityGate, SpektreContext, SpektreProvider, useProtectedFetch, useSpektre };
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
|
|
5
5
|
const DEV_UI_STORAGE_KEY = 'spektre_dev_enabled';
|
|
6
|
+
let DEV_UI_VERSION = '1.0.0';
|
|
6
7
|
// Inject styles directly into the document
|
|
7
8
|
function injectDevUIStyles() {
|
|
8
9
|
if (document.getElementById('spektre-dev-ui-styles')) {
|
|
@@ -408,7 +409,11 @@ function runSecurityScan() {
|
|
|
408
409
|
issues,
|
|
409
410
|
};
|
|
410
411
|
}
|
|
411
|
-
function initializeDevUI() {
|
|
412
|
+
function initializeDevUI(version) {
|
|
413
|
+
// Set version if provided
|
|
414
|
+
{
|
|
415
|
+
DEV_UI_VERSION = version;
|
|
416
|
+
}
|
|
412
417
|
// Inject styles first
|
|
413
418
|
injectDevUIStyles();
|
|
414
419
|
// Check if Spektre is enabled in localStorage (default to true)
|
|
@@ -537,6 +542,16 @@ function openDevModal(scanResult) {
|
|
|
537
542
|
}
|
|
538
543
|
body.appendChild(scanContainer);
|
|
539
544
|
}
|
|
545
|
+
// Add version label at bottom
|
|
546
|
+
const versionLabel = document.createElement('div');
|
|
547
|
+
versionLabel.style.marginTop = '16px';
|
|
548
|
+
versionLabel.style.paddingTop = '12px';
|
|
549
|
+
versionLabel.style.borderTop = '1px solid rgba(71, 85, 105, 0.3)';
|
|
550
|
+
versionLabel.style.fontSize = '12px';
|
|
551
|
+
versionLabel.style.color = '#64748b';
|
|
552
|
+
versionLabel.style.textAlign = 'center';
|
|
553
|
+
versionLabel.textContent = `Spektre v${DEV_UI_VERSION}`;
|
|
554
|
+
body.appendChild(versionLabel);
|
|
540
555
|
modalContent.appendChild(header);
|
|
541
556
|
modalContent.appendChild(body);
|
|
542
557
|
modal.appendChild(modalContent);
|
|
@@ -995,9 +1010,11 @@ const useProtectedFetch = () => {
|
|
|
995
1010
|
return protectedFetch;
|
|
996
1011
|
};
|
|
997
1012
|
|
|
1013
|
+
// Manually set version - update this with each release
|
|
1014
|
+
const packageVersion = '0.1.10';
|
|
998
1015
|
// Check if we're in an iframe (development environment) and initialize dev UI
|
|
999
1016
|
if (typeof window !== 'undefined' && window.self !== window.top) {
|
|
1000
|
-
initializeDevUI();
|
|
1017
|
+
initializeDevUI(packageVersion);
|
|
1001
1018
|
}
|
|
1002
1019
|
|
|
1003
1020
|
exports.SecurityGate = SecurityGate;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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