@series-inc/venus-sdk 3.1.2-beta.2 → 3.2.0
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/{AdsApi-BV_VKgMO.d.mts → AdsApi-DFutZ7_q.d.mts} +2 -4
- package/dist/{AdsApi-BV_VKgMO.d.ts → AdsApi-DFutZ7_q.d.ts} +2 -4
- package/dist/{chunk-G5AFYBIK.mjs → chunk-AGXMORDL.mjs} +9 -32
- package/dist/chunk-AGXMORDL.mjs.map +1 -0
- package/dist/{chunk-3ZNKYBXC.mjs → chunk-UXY5CKKG.mjs} +3 -3
- package/dist/chunk-UXY5CKKG.mjs.map +1 -0
- package/dist/index.cjs +8 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.mjs +2 -2
- package/dist/venus-api/index.cjs +7 -30
- package/dist/venus-api/index.cjs.map +1 -1
- package/dist/venus-api/index.d.mts +2 -2
- package/dist/venus-api/index.d.ts +2 -2
- package/dist/venus-api/index.mjs +1 -1
- package/dist/webview/index.cjs +1 -1
- package/dist/webview/index.cjs.map +1 -1
- package/dist/webview/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3ZNKYBXC.mjs.map +0 -1
- package/dist/chunk-G5AFYBIK.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// raw-loader
|
|
1
|
+
// raw-loader:/Users/pchan/Development/series/venus/venus-sdk/packages/api/src/webview/webviewLibraryShim.js
|
|
2
2
|
var webviewLibraryShim_default = "/**\r\n * Venus Embedded Libraries WebView Shim\r\n *\r\n * This code is injected into H5 game WebViews BEFORE the game's main script runs.\r\n * It bootstraps the embedded libraries system by:\r\n * 1. Reading window.__venusLibrariesConfig (set by the Vite plugin)\r\n * 2. Loading libraries via RPC (mobile) or CDN (web)\r\n * 3. Registering libraries in window.__venusLibraryExports\r\n * 4. Allowing the game's virtual modules to access them\r\n *\r\n * This shim is NOT imported by H5 games - it's injected by the Venus host via\r\n * injectedJavaScriptBeforeContentLoaded in H5AppPoolRenderer.\r\n */\r\n\r\n;(function () {\r\n if (typeof window === 'undefined') {\r\n return\r\n }\r\n\r\n if (window.__venusLibraryShim && window.__venusLibraryShim.__initialized) {\r\n return\r\n }\r\n\r\n var RESPONSE_TYPE = 'H5_RESPONSE'\r\n var REQUEST_TYPE = 'H5_LOAD_EMBEDDED_ASSET'\r\n var REQUEST_TIMEOUT_MS = 12000\r\n var pendingRequests = new Map()\r\n\r\n function ensureConfig() {\r\n if (!window.__venusLibrariesConfig) {\r\n window.__venusLibrariesConfig = {\r\n enabled: false,\r\n required: [],\r\n manifest: {},\r\n cdnBase: '',\r\n }\r\n }\r\n if (!window.__venusLibrariesConfig.manifest) {\r\n window.__venusLibrariesConfig.manifest = {}\r\n }\r\n if (!Array.isArray(window.__venusLibrariesConfig.required)) {\r\n window.__venusLibrariesConfig.required = []\r\n }\r\n return window.__venusLibrariesConfig\r\n }\r\n\r\n function ensureExportsRegistry() {\r\n if (!window.__venusLibraryExports) {\r\n window.__venusLibraryExports = {}\r\n }\r\n return window.__venusLibraryExports\r\n }\r\n\r\n function hasHostBridge() {\r\n return !!(\r\n window.ReactNativeWebView &&\r\n typeof window.ReactNativeWebView.postMessage === 'function'\r\n )\r\n }\r\n\r\n function registerResponseListeners() {\r\n if (\r\n window.__venusLibraryShim &&\r\n window.__venusLibraryShim.__listenerRegistered\r\n ) {\r\n return\r\n }\r\n\r\n function handleMessage(event) {\r\n var payload = parsePayload(event && event.data)\r\n if (!payload || payload.type !== RESPONSE_TYPE || !payload.data) {\r\n return\r\n }\r\n var requestId = payload.data.requestId\r\n if (!requestId || !pendingRequests.has(requestId)) {\r\n return\r\n }\r\n var pending = pendingRequests.get(requestId)\r\n pendingRequests.delete(requestId)\r\n clearTimeout(pending.timeout)\r\n\r\n if (payload.data.success === false) {\r\n pending.reject(\r\n new Error(payload.data.error || 'Embedded library load failed'),\r\n )\r\n return\r\n }\r\n\r\n var value = payload.data.value || payload.data\r\n if (!value || !value.base64Data) {\r\n pending.reject(\r\n new Error('Embedded library response was missing base64Data'),\r\n )\r\n return\r\n }\r\n\r\n pending.resolve(value.base64Data)\r\n }\r\n\r\n if (\r\n typeof document !== 'undefined' &&\r\n typeof document.addEventListener === 'function'\r\n ) {\r\n document.addEventListener('message', handleMessage, false)\r\n }\r\n if (\r\n typeof window !== 'undefined' &&\r\n typeof window.addEventListener === 'function'\r\n ) {\r\n window.addEventListener('message', handleMessage, false)\r\n }\r\n\r\n if (!window.__venusLibraryShim) {\r\n window.__venusLibraryShim = {}\r\n }\r\n window.__venusLibraryShim.__listenerRegistered = true\r\n }\r\n\r\n function parsePayload(raw) {\r\n if (!raw || typeof raw !== 'string') {\r\n return null\r\n }\r\n try {\r\n return JSON.parse(raw)\r\n } catch (error) {\r\n return null\r\n }\r\n }\r\n\r\n function createRequestId(libraryKey) {\r\n var sanitized = ''\r\n for (var i = 0; i < libraryKey.length; i++) {\r\n var c = libraryKey.charAt(i)\r\n if (\r\n (c >= 'a' && c <= 'z') ||\r\n (c >= 'A' && c <= 'Z') ||\r\n (c >= '0' && c <= '9') ||\r\n c === '-' ||\r\n c === '_'\r\n ) {\r\n sanitized += c\r\n } else {\r\n sanitized += '_'\r\n }\r\n }\r\n return (\r\n 'embedded-lib-' +\r\n sanitized +\r\n '-' +\r\n Date.now() +\r\n '-' +\r\n Math.random().toString(36).slice(2)\r\n )\r\n }\r\n\r\n function postHostRequest(assetKey, requestId) {\r\n if (!hasHostBridge()) {\r\n throw new Error('Host bridge is unavailable')\r\n }\r\n var bridge = window.ReactNativeWebView\r\n var message = {\r\n type: REQUEST_TYPE,\r\n direction: 'H5_TO_APP',\r\n data: {\r\n requestId: requestId,\r\n assetKey: assetKey,\r\n },\r\n instanceId:\r\n (window._venusInitState && window._venusInitState.poolId) || 'unknown',\r\n timestamp: Date.now(),\r\n }\r\n bridge.postMessage(JSON.stringify(message))\r\n }\r\n\r\n function loadLibraryViaHost(assetKey, libraryKey) {\r\n return new Promise(function (resolve, reject) {\r\n var requestId = createRequestId(libraryKey)\r\n var timeout = setTimeout(function () {\r\n pendingRequests.delete(requestId)\r\n reject(new Error('Timed out loading embedded library: ' + libraryKey))\r\n }, REQUEST_TIMEOUT_MS)\r\n\r\n pendingRequests.set(requestId, {\r\n resolve: resolve,\r\n reject: reject,\r\n timeout: timeout,\r\n })\r\n\r\n try {\r\n postHostRequest(assetKey, requestId)\r\n } catch (error) {\r\n pendingRequests.delete(requestId)\r\n clearTimeout(timeout)\r\n reject(error)\r\n }\r\n })\r\n }\r\n\r\n function buildCdnUrl(config, entry) {\r\n var base = config.cdnBase || ''\r\n if (!base.endsWith('/')) {\r\n base += '/'\r\n }\r\n var path = entry.cdnPath\r\n if (path.charAt(0) === '/') {\r\n path = path.substring(1)\r\n }\r\n return base + path\r\n }\r\n\r\n async function loadLibraryViaCdn(config, entry, libraryKey) {\r\n if (!config.cdnBase) {\r\n throw new Error('CDN base URL is not configured')\r\n }\r\n var url = buildCdnUrl(config, entry)\r\n var response = await fetch(url, { credentials: 'omit' })\r\n if (!response.ok) {\r\n throw new Error(\r\n 'Failed to fetch embedded library from CDN: ' + libraryKey,\r\n )\r\n }\r\n return await response.text()\r\n }\r\n\r\n function decodeBase64ToUtf8(base64) {\r\n if (typeof base64 !== 'string') {\r\n throw new Error('Invalid base64 payload')\r\n }\r\n\r\n if (typeof atob === 'function') {\r\n var binary = atob(base64)\r\n if (typeof TextDecoder !== 'undefined') {\r\n var len = binary.length\r\n var bytes = new Uint8Array(len)\r\n for (var i = 0; i < len; i++) {\r\n bytes[i] = binary.charCodeAt(i)\r\n }\r\n return new TextDecoder('utf-8').decode(bytes)\r\n }\r\n return decodeURIComponent(escape(binary))\r\n }\r\n\r\n var bufferCtor =\r\n (typeof globalThis !== 'undefined' && globalThis.Buffer) ||\r\n (typeof window !== 'undefined' && window.Buffer)\r\n if (bufferCtor) {\r\n return bufferCtor.from(base64, 'base64').toString('utf-8')\r\n }\r\n\r\n throw new Error('No base64 decoder available')\r\n }\r\n\r\n function evaluateLibrarySource(libraryKey, globalVar, source) {\r\n var registry = ensureExportsRegistry()\r\n if (!source) {\r\n throw new Error('Embedded library source was empty for ' + libraryKey)\r\n }\r\n\r\n var previousValue = window[globalVar]\r\n try {\r\n var executor = new Function(\r\n source + '\\n//# sourceURL=venus-library-' + libraryKey + '.js',\r\n )\r\n executor.call(window)\r\n } catch (error) {\r\n throw new Error(\r\n 'Failed to evaluate embedded library ' +\r\n libraryKey +\r\n ': ' +\r\n (error && error.message ? error.message : error),\r\n )\r\n }\r\n\r\n var exported = window[globalVar] || previousValue\r\n if (!exported) {\r\n throw new Error(\r\n 'Embedded library ' + libraryKey + ' did not register ' + globalVar,\r\n )\r\n }\r\n\r\n registry[libraryKey] = exported\r\n return exported\r\n }\r\n\r\n async function ensureLibraryLoaded(config, libraryKey) {\r\n var registry = ensureExportsRegistry()\r\n if (registry[libraryKey]) {\r\n return registry[libraryKey]\r\n }\r\n\r\n var entry = config.manifest && config.manifest[libraryKey]\r\n if (!entry) {\r\n throw new Error('No manifest entry for embedded library ' + libraryKey)\r\n }\r\n\r\n var source = null\r\n if (config.useHost !== false && hasHostBridge()) {\r\n try {\r\n var base64 = await loadLibraryViaHost(entry.assetKey, libraryKey)\r\n source = decodeBase64ToUtf8(base64)\r\n } catch (error) {\r\n // Log the RPC error loudly before fallback\r\n console.error(\r\n '[Venus Libraries] Failed to load ' +\r\n libraryKey +\r\n ' from host via RPC:',\r\n error,\r\n )\r\n console.warn(\r\n '[Venus Libraries] Falling back to CDN for ' +\r\n libraryKey +\r\n '. This may indicate an asset packaging issue.',\r\n )\r\n }\r\n }\r\n\r\n if (!source) {\r\n source = await loadLibraryViaCdn(config, entry, libraryKey)\r\n }\r\n\r\n return evaluateLibrarySource(libraryKey, entry.globalVar, source)\r\n }\r\n\r\n async function bootstrap() {\r\n try {\r\n registerResponseListeners()\r\n getBootstrapPromise()\r\n\r\n var config = ensureConfig()\r\n\r\n if (!config.enabled) {\r\n if (bootstrapResolve) bootstrapResolve()\r\n return\r\n }\r\n\r\n if (!Array.isArray(config.required) || config.required.length === 0) {\r\n if (bootstrapResolve) bootstrapResolve()\r\n return\r\n }\r\n\r\n // Group libraries by load stage for parallel loading within stages\r\n var librariesByStage = {}\r\n for (var i = 0; i < config.required.length; i++) {\r\n var libraryKey = config.required[i]\r\n var entry = config.manifest[libraryKey]\r\n var stage = entry.loadStage || 0\r\n if (!librariesByStage[stage]) librariesByStage[stage] = []\r\n librariesByStage[stage].push(libraryKey)\r\n }\r\n\r\n // Load stages sequentially, libraries within each stage in parallel\r\n var stages = Object.keys(librariesByStage).sort(function (a, b) {\r\n return parseInt(a, 10) - parseInt(b, 10)\r\n })\r\n\r\n for (var s = 0; s < stages.length; s++) {\r\n var stage = stages[s]\r\n var libs = librariesByStage[stage]\r\n\r\n // Load all libraries in this stage in parallel\r\n var stagePromises = libs.map(function (libraryKey) {\r\n return ensureLibraryLoaded(config, libraryKey).catch(\r\n function (error) {\r\n console.error(\r\n '[Venus Libraries] Failed to load library ' + libraryKey,\r\n error,\r\n )\r\n throw error\r\n },\r\n )\r\n })\r\n\r\n await Promise.all(stagePromises)\r\n }\r\n\r\n if (bootstrapResolve) bootstrapResolve()\r\n } catch (error) {\r\n console.error('[Venus Libraries] Bootstrap error', error)\r\n if (bootstrapReject) bootstrapReject(error)\r\n throw error\r\n }\r\n }\r\n\r\n // Create a promise that resolves when bootstrap completes\r\n var bootstrapPromise = null\r\n var bootstrapResolve = null\r\n var bootstrapReject = null\r\n\r\n function getBootstrapPromise() {\r\n if (!bootstrapPromise) {\r\n bootstrapPromise = new Promise(function (resolve, reject) {\r\n bootstrapResolve = resolve\r\n bootstrapReject = reject\r\n })\r\n }\r\n return bootstrapPromise\r\n }\r\n\r\n window.__venusLibraryShim = {\r\n bootstrap: bootstrap,\r\n ready: getBootstrapPromise,\r\n getExports: function (libraryKey) {\r\n var registry = ensureExportsRegistry()\r\n return registry[libraryKey]\r\n },\r\n __initialized: true,\r\n }\r\n})()\r\n";
|
|
3
3
|
|
|
4
4
|
// src/webview/webviewLibraryShimSource.ts
|
|
@@ -8,5 +8,5 @@ function getWebviewLibraryShimSource() {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export { WEBVIEW_LIBRARY_SHIM_SOURCE, getWebviewLibraryShimSource };
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-UXY5CKKG.mjs.map
|
|
12
|
+
//# sourceMappingURL=chunk-UXY5CKKG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["raw-loader:/Users/pchan/Development/series/venus/venus-sdk/packages/api/src/webview/webviewLibraryShim.js","../src/webview/webviewLibraryShimSource.ts"],"names":[],"mappings":";AAAA,IAAO,0BAAA,GAAQ,omYAAA;;;ACcR,IAAM,2BAAA,GAA8B;AAEpC,SAAS,2BAAA,GAAsC;AACpD,EAAA,OAAO,2BAAA;AACT","file":"chunk-UXY5CKKG.mjs","sourcesContent":["export default \"/**\\r\\n * Venus Embedded Libraries WebView Shim\\r\\n *\\r\\n * This code is injected into H5 game WebViews BEFORE the game's main script runs.\\r\\n * It bootstraps the embedded libraries system by:\\r\\n * 1. Reading window.__venusLibrariesConfig (set by the Vite plugin)\\r\\n * 2. Loading libraries via RPC (mobile) or CDN (web)\\r\\n * 3. Registering libraries in window.__venusLibraryExports\\r\\n * 4. Allowing the game's virtual modules to access them\\r\\n *\\r\\n * This shim is NOT imported by H5 games - it's injected by the Venus host via\\r\\n * injectedJavaScriptBeforeContentLoaded in H5AppPoolRenderer.\\r\\n */\\r\\n\\r\\n;(function () {\\r\\n if (typeof window === 'undefined') {\\r\\n return\\r\\n }\\r\\n\\r\\n if (window.__venusLibraryShim && window.__venusLibraryShim.__initialized) {\\r\\n return\\r\\n }\\r\\n\\r\\n var RESPONSE_TYPE = 'H5_RESPONSE'\\r\\n var REQUEST_TYPE = 'H5_LOAD_EMBEDDED_ASSET'\\r\\n var REQUEST_TIMEOUT_MS = 12000\\r\\n var pendingRequests = new Map()\\r\\n\\r\\n function ensureConfig() {\\r\\n if (!window.__venusLibrariesConfig) {\\r\\n window.__venusLibrariesConfig = {\\r\\n enabled: false,\\r\\n required: [],\\r\\n manifest: {},\\r\\n cdnBase: '',\\r\\n }\\r\\n }\\r\\n if (!window.__venusLibrariesConfig.manifest) {\\r\\n window.__venusLibrariesConfig.manifest = {}\\r\\n }\\r\\n if (!Array.isArray(window.__venusLibrariesConfig.required)) {\\r\\n window.__venusLibrariesConfig.required = []\\r\\n }\\r\\n return window.__venusLibrariesConfig\\r\\n }\\r\\n\\r\\n function ensureExportsRegistry() {\\r\\n if (!window.__venusLibraryExports) {\\r\\n window.__venusLibraryExports = {}\\r\\n }\\r\\n return window.__venusLibraryExports\\r\\n }\\r\\n\\r\\n function hasHostBridge() {\\r\\n return !!(\\r\\n window.ReactNativeWebView &&\\r\\n typeof window.ReactNativeWebView.postMessage === 'function'\\r\\n )\\r\\n }\\r\\n\\r\\n function registerResponseListeners() {\\r\\n if (\\r\\n window.__venusLibraryShim &&\\r\\n window.__venusLibraryShim.__listenerRegistered\\r\\n ) {\\r\\n return\\r\\n }\\r\\n\\r\\n function handleMessage(event) {\\r\\n var payload = parsePayload(event && event.data)\\r\\n if (!payload || payload.type !== RESPONSE_TYPE || !payload.data) {\\r\\n return\\r\\n }\\r\\n var requestId = payload.data.requestId\\r\\n if (!requestId || !pendingRequests.has(requestId)) {\\r\\n return\\r\\n }\\r\\n var pending = pendingRequests.get(requestId)\\r\\n pendingRequests.delete(requestId)\\r\\n clearTimeout(pending.timeout)\\r\\n\\r\\n if (payload.data.success === false) {\\r\\n pending.reject(\\r\\n new Error(payload.data.error || 'Embedded library load failed'),\\r\\n )\\r\\n return\\r\\n }\\r\\n\\r\\n var value = payload.data.value || payload.data\\r\\n if (!value || !value.base64Data) {\\r\\n pending.reject(\\r\\n new Error('Embedded library response was missing base64Data'),\\r\\n )\\r\\n return\\r\\n }\\r\\n\\r\\n pending.resolve(value.base64Data)\\r\\n }\\r\\n\\r\\n if (\\r\\n typeof document !== 'undefined' &&\\r\\n typeof document.addEventListener === 'function'\\r\\n ) {\\r\\n document.addEventListener('message', handleMessage, false)\\r\\n }\\r\\n if (\\r\\n typeof window !== 'undefined' &&\\r\\n typeof window.addEventListener === 'function'\\r\\n ) {\\r\\n window.addEventListener('message', handleMessage, false)\\r\\n }\\r\\n\\r\\n if (!window.__venusLibraryShim) {\\r\\n window.__venusLibraryShim = {}\\r\\n }\\r\\n window.__venusLibraryShim.__listenerRegistered = true\\r\\n }\\r\\n\\r\\n function parsePayload(raw) {\\r\\n if (!raw || typeof raw !== 'string') {\\r\\n return null\\r\\n }\\r\\n try {\\r\\n return JSON.parse(raw)\\r\\n } catch (error) {\\r\\n return null\\r\\n }\\r\\n }\\r\\n\\r\\n function createRequestId(libraryKey) {\\r\\n var sanitized = ''\\r\\n for (var i = 0; i < libraryKey.length; i++) {\\r\\n var c = libraryKey.charAt(i)\\r\\n if (\\r\\n (c >= 'a' && c <= 'z') ||\\r\\n (c >= 'A' && c <= 'Z') ||\\r\\n (c >= '0' && c <= '9') ||\\r\\n c === '-' ||\\r\\n c === '_'\\r\\n ) {\\r\\n sanitized += c\\r\\n } else {\\r\\n sanitized += '_'\\r\\n }\\r\\n }\\r\\n return (\\r\\n 'embedded-lib-' +\\r\\n sanitized +\\r\\n '-' +\\r\\n Date.now() +\\r\\n '-' +\\r\\n Math.random().toString(36).slice(2)\\r\\n )\\r\\n }\\r\\n\\r\\n function postHostRequest(assetKey, requestId) {\\r\\n if (!hasHostBridge()) {\\r\\n throw new Error('Host bridge is unavailable')\\r\\n }\\r\\n var bridge = window.ReactNativeWebView\\r\\n var message = {\\r\\n type: REQUEST_TYPE,\\r\\n direction: 'H5_TO_APP',\\r\\n data: {\\r\\n requestId: requestId,\\r\\n assetKey: assetKey,\\r\\n },\\r\\n instanceId:\\r\\n (window._venusInitState && window._venusInitState.poolId) || 'unknown',\\r\\n timestamp: Date.now(),\\r\\n }\\r\\n bridge.postMessage(JSON.stringify(message))\\r\\n }\\r\\n\\r\\n function loadLibraryViaHost(assetKey, libraryKey) {\\r\\n return new Promise(function (resolve, reject) {\\r\\n var requestId = createRequestId(libraryKey)\\r\\n var timeout = setTimeout(function () {\\r\\n pendingRequests.delete(requestId)\\r\\n reject(new Error('Timed out loading embedded library: ' + libraryKey))\\r\\n }, REQUEST_TIMEOUT_MS)\\r\\n\\r\\n pendingRequests.set(requestId, {\\r\\n resolve: resolve,\\r\\n reject: reject,\\r\\n timeout: timeout,\\r\\n })\\r\\n\\r\\n try {\\r\\n postHostRequest(assetKey, requestId)\\r\\n } catch (error) {\\r\\n pendingRequests.delete(requestId)\\r\\n clearTimeout(timeout)\\r\\n reject(error)\\r\\n }\\r\\n })\\r\\n }\\r\\n\\r\\n function buildCdnUrl(config, entry) {\\r\\n var base = config.cdnBase || ''\\r\\n if (!base.endsWith('/')) {\\r\\n base += '/'\\r\\n }\\r\\n var path = entry.cdnPath\\r\\n if (path.charAt(0) === '/') {\\r\\n path = path.substring(1)\\r\\n }\\r\\n return base + path\\r\\n }\\r\\n\\r\\n async function loadLibraryViaCdn(config, entry, libraryKey) {\\r\\n if (!config.cdnBase) {\\r\\n throw new Error('CDN base URL is not configured')\\r\\n }\\r\\n var url = buildCdnUrl(config, entry)\\r\\n var response = await fetch(url, { credentials: 'omit' })\\r\\n if (!response.ok) {\\r\\n throw new Error(\\r\\n 'Failed to fetch embedded library from CDN: ' + libraryKey,\\r\\n )\\r\\n }\\r\\n return await response.text()\\r\\n }\\r\\n\\r\\n function decodeBase64ToUtf8(base64) {\\r\\n if (typeof base64 !== 'string') {\\r\\n throw new Error('Invalid base64 payload')\\r\\n }\\r\\n\\r\\n if (typeof atob === 'function') {\\r\\n var binary = atob(base64)\\r\\n if (typeof TextDecoder !== 'undefined') {\\r\\n var len = binary.length\\r\\n var bytes = new Uint8Array(len)\\r\\n for (var i = 0; i < len; i++) {\\r\\n bytes[i] = binary.charCodeAt(i)\\r\\n }\\r\\n return new TextDecoder('utf-8').decode(bytes)\\r\\n }\\r\\n return decodeURIComponent(escape(binary))\\r\\n }\\r\\n\\r\\n var bufferCtor =\\r\\n (typeof globalThis !== 'undefined' && globalThis.Buffer) ||\\r\\n (typeof window !== 'undefined' && window.Buffer)\\r\\n if (bufferCtor) {\\r\\n return bufferCtor.from(base64, 'base64').toString('utf-8')\\r\\n }\\r\\n\\r\\n throw new Error('No base64 decoder available')\\r\\n }\\r\\n\\r\\n function evaluateLibrarySource(libraryKey, globalVar, source) {\\r\\n var registry = ensureExportsRegistry()\\r\\n if (!source) {\\r\\n throw new Error('Embedded library source was empty for ' + libraryKey)\\r\\n }\\r\\n\\r\\n var previousValue = window[globalVar]\\r\\n try {\\r\\n var executor = new Function(\\r\\n source + '\\\\n//# sourceURL=venus-library-' + libraryKey + '.js',\\r\\n )\\r\\n executor.call(window)\\r\\n } catch (error) {\\r\\n throw new Error(\\r\\n 'Failed to evaluate embedded library ' +\\r\\n libraryKey +\\r\\n ': ' +\\r\\n (error && error.message ? error.message : error),\\r\\n )\\r\\n }\\r\\n\\r\\n var exported = window[globalVar] || previousValue\\r\\n if (!exported) {\\r\\n throw new Error(\\r\\n 'Embedded library ' + libraryKey + ' did not register ' + globalVar,\\r\\n )\\r\\n }\\r\\n\\r\\n registry[libraryKey] = exported\\r\\n return exported\\r\\n }\\r\\n\\r\\n async function ensureLibraryLoaded(config, libraryKey) {\\r\\n var registry = ensureExportsRegistry()\\r\\n if (registry[libraryKey]) {\\r\\n return registry[libraryKey]\\r\\n }\\r\\n\\r\\n var entry = config.manifest && config.manifest[libraryKey]\\r\\n if (!entry) {\\r\\n throw new Error('No manifest entry for embedded library ' + libraryKey)\\r\\n }\\r\\n\\r\\n var source = null\\r\\n if (config.useHost !== false && hasHostBridge()) {\\r\\n try {\\r\\n var base64 = await loadLibraryViaHost(entry.assetKey, libraryKey)\\r\\n source = decodeBase64ToUtf8(base64)\\r\\n } catch (error) {\\r\\n // Log the RPC error loudly before fallback\\r\\n console.error(\\r\\n '[Venus Libraries] Failed to load ' +\\r\\n libraryKey +\\r\\n ' from host via RPC:',\\r\\n error,\\r\\n )\\r\\n console.warn(\\r\\n '[Venus Libraries] Falling back to CDN for ' +\\r\\n libraryKey +\\r\\n '. This may indicate an asset packaging issue.',\\r\\n )\\r\\n }\\r\\n }\\r\\n\\r\\n if (!source) {\\r\\n source = await loadLibraryViaCdn(config, entry, libraryKey)\\r\\n }\\r\\n\\r\\n return evaluateLibrarySource(libraryKey, entry.globalVar, source)\\r\\n }\\r\\n\\r\\n async function bootstrap() {\\r\\n try {\\r\\n registerResponseListeners()\\r\\n getBootstrapPromise()\\r\\n\\r\\n var config = ensureConfig()\\r\\n\\r\\n if (!config.enabled) {\\r\\n if (bootstrapResolve) bootstrapResolve()\\r\\n return\\r\\n }\\r\\n\\r\\n if (!Array.isArray(config.required) || config.required.length === 0) {\\r\\n if (bootstrapResolve) bootstrapResolve()\\r\\n return\\r\\n }\\r\\n\\r\\n // Group libraries by load stage for parallel loading within stages\\r\\n var librariesByStage = {}\\r\\n for (var i = 0; i < config.required.length; i++) {\\r\\n var libraryKey = config.required[i]\\r\\n var entry = config.manifest[libraryKey]\\r\\n var stage = entry.loadStage || 0\\r\\n if (!librariesByStage[stage]) librariesByStage[stage] = []\\r\\n librariesByStage[stage].push(libraryKey)\\r\\n }\\r\\n\\r\\n // Load stages sequentially, libraries within each stage in parallel\\r\\n var stages = Object.keys(librariesByStage).sort(function (a, b) {\\r\\n return parseInt(a, 10) - parseInt(b, 10)\\r\\n })\\r\\n\\r\\n for (var s = 0; s < stages.length; s++) {\\r\\n var stage = stages[s]\\r\\n var libs = librariesByStage[stage]\\r\\n\\r\\n // Load all libraries in this stage in parallel\\r\\n var stagePromises = libs.map(function (libraryKey) {\\r\\n return ensureLibraryLoaded(config, libraryKey).catch(\\r\\n function (error) {\\r\\n console.error(\\r\\n '[Venus Libraries] Failed to load library ' + libraryKey,\\r\\n error,\\r\\n )\\r\\n throw error\\r\\n },\\r\\n )\\r\\n })\\r\\n\\r\\n await Promise.all(stagePromises)\\r\\n }\\r\\n\\r\\n if (bootstrapResolve) bootstrapResolve()\\r\\n } catch (error) {\\r\\n console.error('[Venus Libraries] Bootstrap error', error)\\r\\n if (bootstrapReject) bootstrapReject(error)\\r\\n throw error\\r\\n }\\r\\n }\\r\\n\\r\\n // Create a promise that resolves when bootstrap completes\\r\\n var bootstrapPromise = null\\r\\n var bootstrapResolve = null\\r\\n var bootstrapReject = null\\r\\n\\r\\n function getBootstrapPromise() {\\r\\n if (!bootstrapPromise) {\\r\\n bootstrapPromise = new Promise(function (resolve, reject) {\\r\\n bootstrapResolve = resolve\\r\\n bootstrapReject = reject\\r\\n })\\r\\n }\\r\\n return bootstrapPromise\\r\\n }\\r\\n\\r\\n window.__venusLibraryShim = {\\r\\n bootstrap: bootstrap,\\r\\n ready: getBootstrapPromise,\\r\\n getExports: function (libraryKey) {\\r\\n var registry = ensureExportsRegistry()\\r\\n return registry[libraryKey]\\r\\n },\\r\\n __initialized: true,\\r\\n }\\r\\n})()\\r\\n\"","/**\r\n * Webview Library Shim Source\r\n *\r\n * This module exports the shim code that is injected into H5 game WebViews.\r\n * The actual shim code is in webviewLibraryShim.js and imported as a raw string.\r\n *\r\n * Using Vite's ?raw import allows us to:\r\n * - Keep the shim as actual JavaScript (not a string literal)\r\n * - Get proper IDE support (syntax highlighting, linting)\r\n * - Avoid escaping issues\r\n */\r\n\r\nimport shimSource from './webviewLibraryShim.js?raw'\r\n\r\nexport const WEBVIEW_LIBRARY_SHIM_SOURCE = shimSource\r\n\r\nexport function getWebviewLibraryShimSource(): string {\r\n return WEBVIEW_LIBRARY_SHIM_SOURCE\r\n}\r\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -3438,11 +3438,7 @@ function initializeTime(venusApi, host) {
|
|
|
3438
3438
|
}
|
|
3439
3439
|
|
|
3440
3440
|
// src/version.ts
|
|
3441
|
-
var SDK_VERSION = "3.
|
|
3442
|
-
|
|
3443
|
-
// src/shared-assets/consts.ts
|
|
3444
|
-
var BurgerTimeAssetsCdnPath = "burger-time/Core.stow";
|
|
3445
|
-
var CharacterAssetsCdnPath = "burger-time/Character.stow";
|
|
3441
|
+
var SDK_VERSION = "3.2.0";
|
|
3446
3442
|
|
|
3447
3443
|
// src/shared-assets/embeddedLibrariesManifest.ts
|
|
3448
3444
|
var DEFAULT_SHARED_LIB_CDN_BASE = "https://venus-static-01293ak.web.app/libs";
|
|
@@ -3621,33 +3617,18 @@ var RpcSharedAssetsApi = class {
|
|
|
3621
3617
|
this.rpcClient = rpcClient;
|
|
3622
3618
|
this.venusApi = venusApi;
|
|
3623
3619
|
}
|
|
3624
|
-
async
|
|
3625
|
-
try {
|
|
3626
|
-
const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
|
|
3627
|
-
assetKey: "burgerTimeCoreBundle"
|
|
3628
|
-
});
|
|
3629
|
-
return base64ToArrayBuffer(response.base64Data);
|
|
3630
|
-
} catch (err) {
|
|
3631
|
-
try {
|
|
3632
|
-
const blob = await this.venusApi.cdn.fetchBlob(BurgerTimeAssetsCdnPath);
|
|
3633
|
-
return await blob.arrayBuffer();
|
|
3634
|
-
} catch (e) {
|
|
3635
|
-
throw new Error("Failed to load burgerTimeAssetsBundle");
|
|
3636
|
-
}
|
|
3637
|
-
}
|
|
3638
|
-
}
|
|
3639
|
-
async loadCharactersBundle() {
|
|
3620
|
+
async loadAssetsBundle(game, bundleKey, fileType = "stow") {
|
|
3640
3621
|
try {
|
|
3641
3622
|
const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
|
|
3642
|
-
assetKey:
|
|
3623
|
+
assetKey: bundleKey
|
|
3643
3624
|
});
|
|
3644
3625
|
return base64ToArrayBuffer(response.base64Data);
|
|
3645
3626
|
} catch (err) {
|
|
3646
3627
|
try {
|
|
3647
|
-
const blob = await this.venusApi.cdn.fetchBlob(
|
|
3628
|
+
const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}.${fileType}`);
|
|
3648
3629
|
return await blob.arrayBuffer();
|
|
3649
3630
|
} catch (e) {
|
|
3650
|
-
throw new Error(
|
|
3631
|
+
throw new Error(`Failed to load ${bundleKey}`);
|
|
3651
3632
|
}
|
|
3652
3633
|
}
|
|
3653
3634
|
}
|
|
@@ -3685,12 +3666,8 @@ var MockSharedAssetsApi = class {
|
|
|
3685
3666
|
__publicField(this, "venusApi");
|
|
3686
3667
|
this.venusApi = venusApi;
|
|
3687
3668
|
}
|
|
3688
|
-
async
|
|
3689
|
-
const blob = await this.venusApi.cdn.fetchBlob(
|
|
3690
|
-
return await blob.arrayBuffer();
|
|
3691
|
-
}
|
|
3692
|
-
async loadCharactersBundle() {
|
|
3693
|
-
const blob = await this.venusApi.cdn.fetchBlob(CharacterAssetsCdnPath);
|
|
3669
|
+
async loadAssetsBundle(game, bundleKey, fileType = "stow") {
|
|
3670
|
+
const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}.${fileType}`);
|
|
3694
3671
|
return await blob.arrayBuffer();
|
|
3695
3672
|
}
|
|
3696
3673
|
async loadLibraryCode(libraryKey) {
|
|
@@ -5183,7 +5160,7 @@ function initializeSocial(venusApi, host) {
|
|
|
5183
5160
|
};
|
|
5184
5161
|
}
|
|
5185
5162
|
|
|
5186
|
-
// raw-loader
|
|
5163
|
+
// raw-loader:/Users/pchan/Development/series/venus/venus-sdk/packages/api/src/webview/webviewLibraryShim.js
|
|
5187
5164
|
var webviewLibraryShim_default = "/**\r\n * Venus Embedded Libraries WebView Shim\r\n *\r\n * This code is injected into H5 game WebViews BEFORE the game's main script runs.\r\n * It bootstraps the embedded libraries system by:\r\n * 1. Reading window.__venusLibrariesConfig (set by the Vite plugin)\r\n * 2. Loading libraries via RPC (mobile) or CDN (web)\r\n * 3. Registering libraries in window.__venusLibraryExports\r\n * 4. Allowing the game's virtual modules to access them\r\n *\r\n * This shim is NOT imported by H5 games - it's injected by the Venus host via\r\n * injectedJavaScriptBeforeContentLoaded in H5AppPoolRenderer.\r\n */\r\n\r\n;(function () {\r\n if (typeof window === 'undefined') {\r\n return\r\n }\r\n\r\n if (window.__venusLibraryShim && window.__venusLibraryShim.__initialized) {\r\n return\r\n }\r\n\r\n var RESPONSE_TYPE = 'H5_RESPONSE'\r\n var REQUEST_TYPE = 'H5_LOAD_EMBEDDED_ASSET'\r\n var REQUEST_TIMEOUT_MS = 12000\r\n var pendingRequests = new Map()\r\n\r\n function ensureConfig() {\r\n if (!window.__venusLibrariesConfig) {\r\n window.__venusLibrariesConfig = {\r\n enabled: false,\r\n required: [],\r\n manifest: {},\r\n cdnBase: '',\r\n }\r\n }\r\n if (!window.__venusLibrariesConfig.manifest) {\r\n window.__venusLibrariesConfig.manifest = {}\r\n }\r\n if (!Array.isArray(window.__venusLibrariesConfig.required)) {\r\n window.__venusLibrariesConfig.required = []\r\n }\r\n return window.__venusLibrariesConfig\r\n }\r\n\r\n function ensureExportsRegistry() {\r\n if (!window.__venusLibraryExports) {\r\n window.__venusLibraryExports = {}\r\n }\r\n return window.__venusLibraryExports\r\n }\r\n\r\n function hasHostBridge() {\r\n return !!(\r\n window.ReactNativeWebView &&\r\n typeof window.ReactNativeWebView.postMessage === 'function'\r\n )\r\n }\r\n\r\n function registerResponseListeners() {\r\n if (\r\n window.__venusLibraryShim &&\r\n window.__venusLibraryShim.__listenerRegistered\r\n ) {\r\n return\r\n }\r\n\r\n function handleMessage(event) {\r\n var payload = parsePayload(event && event.data)\r\n if (!payload || payload.type !== RESPONSE_TYPE || !payload.data) {\r\n return\r\n }\r\n var requestId = payload.data.requestId\r\n if (!requestId || !pendingRequests.has(requestId)) {\r\n return\r\n }\r\n var pending = pendingRequests.get(requestId)\r\n pendingRequests.delete(requestId)\r\n clearTimeout(pending.timeout)\r\n\r\n if (payload.data.success === false) {\r\n pending.reject(\r\n new Error(payload.data.error || 'Embedded library load failed'),\r\n )\r\n return\r\n }\r\n\r\n var value = payload.data.value || payload.data\r\n if (!value || !value.base64Data) {\r\n pending.reject(\r\n new Error('Embedded library response was missing base64Data'),\r\n )\r\n return\r\n }\r\n\r\n pending.resolve(value.base64Data)\r\n }\r\n\r\n if (\r\n typeof document !== 'undefined' &&\r\n typeof document.addEventListener === 'function'\r\n ) {\r\n document.addEventListener('message', handleMessage, false)\r\n }\r\n if (\r\n typeof window !== 'undefined' &&\r\n typeof window.addEventListener === 'function'\r\n ) {\r\n window.addEventListener('message', handleMessage, false)\r\n }\r\n\r\n if (!window.__venusLibraryShim) {\r\n window.__venusLibraryShim = {}\r\n }\r\n window.__venusLibraryShim.__listenerRegistered = true\r\n }\r\n\r\n function parsePayload(raw) {\r\n if (!raw || typeof raw !== 'string') {\r\n return null\r\n }\r\n try {\r\n return JSON.parse(raw)\r\n } catch (error) {\r\n return null\r\n }\r\n }\r\n\r\n function createRequestId(libraryKey) {\r\n var sanitized = ''\r\n for (var i = 0; i < libraryKey.length; i++) {\r\n var c = libraryKey.charAt(i)\r\n if (\r\n (c >= 'a' && c <= 'z') ||\r\n (c >= 'A' && c <= 'Z') ||\r\n (c >= '0' && c <= '9') ||\r\n c === '-' ||\r\n c === '_'\r\n ) {\r\n sanitized += c\r\n } else {\r\n sanitized += '_'\r\n }\r\n }\r\n return (\r\n 'embedded-lib-' +\r\n sanitized +\r\n '-' +\r\n Date.now() +\r\n '-' +\r\n Math.random().toString(36).slice(2)\r\n )\r\n }\r\n\r\n function postHostRequest(assetKey, requestId) {\r\n if (!hasHostBridge()) {\r\n throw new Error('Host bridge is unavailable')\r\n }\r\n var bridge = window.ReactNativeWebView\r\n var message = {\r\n type: REQUEST_TYPE,\r\n direction: 'H5_TO_APP',\r\n data: {\r\n requestId: requestId,\r\n assetKey: assetKey,\r\n },\r\n instanceId:\r\n (window._venusInitState && window._venusInitState.poolId) || 'unknown',\r\n timestamp: Date.now(),\r\n }\r\n bridge.postMessage(JSON.stringify(message))\r\n }\r\n\r\n function loadLibraryViaHost(assetKey, libraryKey) {\r\n return new Promise(function (resolve, reject) {\r\n var requestId = createRequestId(libraryKey)\r\n var timeout = setTimeout(function () {\r\n pendingRequests.delete(requestId)\r\n reject(new Error('Timed out loading embedded library: ' + libraryKey))\r\n }, REQUEST_TIMEOUT_MS)\r\n\r\n pendingRequests.set(requestId, {\r\n resolve: resolve,\r\n reject: reject,\r\n timeout: timeout,\r\n })\r\n\r\n try {\r\n postHostRequest(assetKey, requestId)\r\n } catch (error) {\r\n pendingRequests.delete(requestId)\r\n clearTimeout(timeout)\r\n reject(error)\r\n }\r\n })\r\n }\r\n\r\n function buildCdnUrl(config, entry) {\r\n var base = config.cdnBase || ''\r\n if (!base.endsWith('/')) {\r\n base += '/'\r\n }\r\n var path = entry.cdnPath\r\n if (path.charAt(0) === '/') {\r\n path = path.substring(1)\r\n }\r\n return base + path\r\n }\r\n\r\n async function loadLibraryViaCdn(config, entry, libraryKey) {\r\n if (!config.cdnBase) {\r\n throw new Error('CDN base URL is not configured')\r\n }\r\n var url = buildCdnUrl(config, entry)\r\n var response = await fetch(url, { credentials: 'omit' })\r\n if (!response.ok) {\r\n throw new Error(\r\n 'Failed to fetch embedded library from CDN: ' + libraryKey,\r\n )\r\n }\r\n return await response.text()\r\n }\r\n\r\n function decodeBase64ToUtf8(base64) {\r\n if (typeof base64 !== 'string') {\r\n throw new Error('Invalid base64 payload')\r\n }\r\n\r\n if (typeof atob === 'function') {\r\n var binary = atob(base64)\r\n if (typeof TextDecoder !== 'undefined') {\r\n var len = binary.length\r\n var bytes = new Uint8Array(len)\r\n for (var i = 0; i < len; i++) {\r\n bytes[i] = binary.charCodeAt(i)\r\n }\r\n return new TextDecoder('utf-8').decode(bytes)\r\n }\r\n return decodeURIComponent(escape(binary))\r\n }\r\n\r\n var bufferCtor =\r\n (typeof globalThis !== 'undefined' && globalThis.Buffer) ||\r\n (typeof window !== 'undefined' && window.Buffer)\r\n if (bufferCtor) {\r\n return bufferCtor.from(base64, 'base64').toString('utf-8')\r\n }\r\n\r\n throw new Error('No base64 decoder available')\r\n }\r\n\r\n function evaluateLibrarySource(libraryKey, globalVar, source) {\r\n var registry = ensureExportsRegistry()\r\n if (!source) {\r\n throw new Error('Embedded library source was empty for ' + libraryKey)\r\n }\r\n\r\n var previousValue = window[globalVar]\r\n try {\r\n var executor = new Function(\r\n source + '\\n//# sourceURL=venus-library-' + libraryKey + '.js',\r\n )\r\n executor.call(window)\r\n } catch (error) {\r\n throw new Error(\r\n 'Failed to evaluate embedded library ' +\r\n libraryKey +\r\n ': ' +\r\n (error && error.message ? error.message : error),\r\n )\r\n }\r\n\r\n var exported = window[globalVar] || previousValue\r\n if (!exported) {\r\n throw new Error(\r\n 'Embedded library ' + libraryKey + ' did not register ' + globalVar,\r\n )\r\n }\r\n\r\n registry[libraryKey] = exported\r\n return exported\r\n }\r\n\r\n async function ensureLibraryLoaded(config, libraryKey) {\r\n var registry = ensureExportsRegistry()\r\n if (registry[libraryKey]) {\r\n return registry[libraryKey]\r\n }\r\n\r\n var entry = config.manifest && config.manifest[libraryKey]\r\n if (!entry) {\r\n throw new Error('No manifest entry for embedded library ' + libraryKey)\r\n }\r\n\r\n var source = null\r\n if (config.useHost !== false && hasHostBridge()) {\r\n try {\r\n var base64 = await loadLibraryViaHost(entry.assetKey, libraryKey)\r\n source = decodeBase64ToUtf8(base64)\r\n } catch (error) {\r\n // Log the RPC error loudly before fallback\r\n console.error(\r\n '[Venus Libraries] Failed to load ' +\r\n libraryKey +\r\n ' from host via RPC:',\r\n error,\r\n )\r\n console.warn(\r\n '[Venus Libraries] Falling back to CDN for ' +\r\n libraryKey +\r\n '. This may indicate an asset packaging issue.',\r\n )\r\n }\r\n }\r\n\r\n if (!source) {\r\n source = await loadLibraryViaCdn(config, entry, libraryKey)\r\n }\r\n\r\n return evaluateLibrarySource(libraryKey, entry.globalVar, source)\r\n }\r\n\r\n async function bootstrap() {\r\n try {\r\n registerResponseListeners()\r\n getBootstrapPromise()\r\n\r\n var config = ensureConfig()\r\n\r\n if (!config.enabled) {\r\n if (bootstrapResolve) bootstrapResolve()\r\n return\r\n }\r\n\r\n if (!Array.isArray(config.required) || config.required.length === 0) {\r\n if (bootstrapResolve) bootstrapResolve()\r\n return\r\n }\r\n\r\n // Group libraries by load stage for parallel loading within stages\r\n var librariesByStage = {}\r\n for (var i = 0; i < config.required.length; i++) {\r\n var libraryKey = config.required[i]\r\n var entry = config.manifest[libraryKey]\r\n var stage = entry.loadStage || 0\r\n if (!librariesByStage[stage]) librariesByStage[stage] = []\r\n librariesByStage[stage].push(libraryKey)\r\n }\r\n\r\n // Load stages sequentially, libraries within each stage in parallel\r\n var stages = Object.keys(librariesByStage).sort(function (a, b) {\r\n return parseInt(a, 10) - parseInt(b, 10)\r\n })\r\n\r\n for (var s = 0; s < stages.length; s++) {\r\n var stage = stages[s]\r\n var libs = librariesByStage[stage]\r\n\r\n // Load all libraries in this stage in parallel\r\n var stagePromises = libs.map(function (libraryKey) {\r\n return ensureLibraryLoaded(config, libraryKey).catch(\r\n function (error) {\r\n console.error(\r\n '[Venus Libraries] Failed to load library ' + libraryKey,\r\n error,\r\n )\r\n throw error\r\n },\r\n )\r\n })\r\n\r\n await Promise.all(stagePromises)\r\n }\r\n\r\n if (bootstrapResolve) bootstrapResolve()\r\n } catch (error) {\r\n console.error('[Venus Libraries] Bootstrap error', error)\r\n if (bootstrapReject) bootstrapReject(error)\r\n throw error\r\n }\r\n }\r\n\r\n // Create a promise that resolves when bootstrap completes\r\n var bootstrapPromise = null\r\n var bootstrapResolve = null\r\n var bootstrapReject = null\r\n\r\n function getBootstrapPromise() {\r\n if (!bootstrapPromise) {\r\n bootstrapPromise = new Promise(function (resolve, reject) {\r\n bootstrapResolve = resolve\r\n bootstrapReject = reject\r\n })\r\n }\r\n return bootstrapPromise\r\n }\r\n\r\n window.__venusLibraryShim = {\r\n bootstrap: bootstrap,\r\n ready: getBootstrapPromise,\r\n getExports: function (libraryKey) {\r\n var registry = ensureExportsRegistry()\r\n return registry[libraryKey]\r\n },\r\n __initialized: true,\r\n }\r\n})()\r\n";
|
|
5188
5165
|
|
|
5189
5166
|
// src/webview/webviewLibraryShimSource.ts
|