@zenflux/core
Advanced tools
Comparing version 0.0.0-alpha.8 to 0.0.0-alpha.9
@@ -5,2 +5,3 @@ import { IAPIConfig } from "./interfaces/config"; | ||
var ZenCore: any; | ||
var __ZEN_CORE__IS_INITIALIZED__: boolean; | ||
} | ||
@@ -7,0 +8,0 @@ export declare let config: IAPIConfig; |
{ | ||
"name": "@zenflux/core", | ||
"version": "0.0.0-alpha.8", | ||
"version": "0.0.0-alpha.9", | ||
"description": "ZenFlux core", | ||
@@ -44,3 +44,3 @@ "keywords": [ | ||
"@typescript-eslint/parser": "^5.48.0", | ||
"@zenflux/rollup-toolkit": "^0.0.0-alpha.13", | ||
"@zenflux/rollup-toolkit": "^0.0.0-alpha.14", | ||
"babel-jest": "^29.3.1", | ||
@@ -47,0 +47,0 @@ "ts-jest": "^29.0.3", |
// @ts-ignore | ||
import * as pkg from "../package.json" assert {type: "json"}; | ||
import * as pkg from "../package.json" assert { type: "json" }; | ||
@@ -12,8 +12,7 @@ import { IAPIConfig } from "./interfaces/config"; | ||
var ZenCore: any; | ||
var __ZEN_CORE__IS_INITIALIZED__: boolean; | ||
} | ||
let isInitialized = false; | ||
function errorInitTwice() { | ||
if ( isInitialized ) { | ||
if ( 'undefined' !== typeof __ZEN_CORE__IS_INITIALIZED__ && __ZEN_CORE__IS_INITIALIZED__) { | ||
throw new Error( 'ZenCore is already initialized.' ); | ||
@@ -27,5 +26,4 @@ } | ||
version: pkg.version, | ||
} | ||
}; | ||
export const CoreAPI = { | ||
@@ -37,5 +35,5 @@ initialize: ( configuration?: IAPIConfig ) => { | ||
initialize( config ) | ||
initialize( config ); | ||
isInitialized = true; | ||
globalThis.__ZEN_CORE__IS_INITIALIZED__ = true; | ||
@@ -47,3 +45,3 @@ }, | ||
isInitialized = false; | ||
globalThis.__ZEN_CORE__IS_INITIALIZED__ = false; | ||
}, | ||
@@ -58,3 +56,3 @@ | ||
...exported, | ||
} | ||
}; | ||
@@ -61,0 +59,0 @@ // TODO: Make it available only for development. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
1
151990
104
3785