fix(core): update
This commit is contained in:
		
							
								
								
									
										5
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										5
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -10,6 +10,7 @@ | ||||
|       "license": "MIT", | ||||
|       "dependencies": { | ||||
|         "@happy-dom/global-registrator": "^4.1.0", | ||||
|         "@pushrocks/smartpromise": "^3.1.7", | ||||
|         "lit": "^2.2.5" | ||||
|       }, | ||||
|       "devDependencies": { | ||||
| @@ -665,7 +666,6 @@ | ||||
|       "version": "3.1.7", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.7.tgz", | ||||
|       "integrity": "sha512-2gLQCeviEJwZ+cHHtK2Ks98brZatGC6dPXKIs1tVgJsiNgRFjnp90fESuJ1Pmoe7RrS+7J3mO4NtsFHAJJ/y5w==", | ||||
|       "dev": true, | ||||
|       "license": "MIT" | ||||
|     }, | ||||
|     "node_modules/@pushrocks/smartpuppeteer": { | ||||
| @@ -6580,8 +6580,7 @@ | ||||
|     "@pushrocks/smartpromise": { | ||||
|       "version": "3.1.7", | ||||
|       "resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-3.1.7.tgz", | ||||
|       "integrity": "sha512-2gLQCeviEJwZ+cHHtK2Ks98brZatGC6dPXKIs1tVgJsiNgRFjnp90fESuJ1Pmoe7RrS+7J3mO4NtsFHAJJ/y5w==", | ||||
|       "dev": true | ||||
|       "integrity": "sha512-2gLQCeviEJwZ+cHHtK2Ks98brZatGC6dPXKIs1tVgJsiNgRFjnp90fESuJ1Pmoe7RrS+7J3mO4NtsFHAJJ/y5w==" | ||||
|     }, | ||||
|     "@pushrocks/smartpuppeteer": { | ||||
|       "version": "2.0.0", | ||||
|   | ||||
| @@ -21,6 +21,7 @@ | ||||
|   }, | ||||
|   "dependencies": { | ||||
|     "@happy-dom/global-registrator": "^4.1.0", | ||||
|     "@pushrocks/smartpromise": "^3.1.7", | ||||
|     "lit": "^2.2.5" | ||||
|   }, | ||||
|   "browserslist": [ | ||||
|   | ||||
| @@ -3,6 +3,6 @@ | ||||
|  */ | ||||
| export const commitinfo = { | ||||
|   name: '@pushrocks/smartntml', | ||||
|   version: '1.0.4', | ||||
|   version: '1.0.5', | ||||
|   description: 'lit-html for the backend' | ||||
| } | ||||
|   | ||||
							
								
								
									
										10
									
								
								ts/index.ts
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								ts/index.ts
									
									
									
									
									
								
							| @@ -10,6 +10,16 @@ export class Smartntml { | ||||
|     return smartntml; | ||||
|   } | ||||
|  | ||||
|   private static smartntmlSingletonDeferred: plugins.smartpromise.Deferred<Smartntml>; | ||||
|   public static async createAndInitSingleton() { | ||||
|     if (this.smartntmlSingletonDeferred) { | ||||
|       return this.smartntmlSingletonDeferred.promise; | ||||
|     } | ||||
|     const smartntmlInstance = await this.createAndInit(); | ||||
|     this.smartntmlSingletonDeferred.resolve(smartntmlInstance); | ||||
|     return this.smartntmlSingletonDeferred.promise; | ||||
|   } | ||||
|  | ||||
|   // INSTANCE | ||||
|   render: typeof litTypes.render; | ||||
|   html: typeof litTypes.html; | ||||
|   | ||||
| @@ -1,2 +1,10 @@ | ||||
| // happy-dom setup | ||||
| import { GlobalRegistrator } from '@happy-dom/global-registrator'; | ||||
| GlobalRegistrator.register(); | ||||
|  | ||||
| // @pushrocks scope | ||||
| import * as smartpromise from '@pushrocks/smartpromise'; | ||||
|  | ||||
| export { | ||||
|   smartpromise | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user