@cloudbase/container 2.5.37-alpha.1 → 2.5.37-alpha.3
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/cjs/index.js +1 -3
- package/dist/cjs/utils/loader.js +5 -3
- package/dist/esm/index.js +1 -3
- package/dist/esm/utils/loader.js +5 -3
- package/dist/miniprogram/index.js +1 -1
- package/dist/miniprogram/test.js +2242 -0
- package/package.json +3 -5
- package/src/index.ts +0 -3
- package/src/utils/loader.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/container",
|
|
3
|
-
"version": "2.5.37-alpha.
|
|
3
|
+
"version": "2.5.37-alpha.3",
|
|
4
4
|
"description": "cloudbase javascript sdk functions componets",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,13 +31,11 @@
|
|
|
31
31
|
"license": "Apache-2.0",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@cloudbase/adapter-interface": "^0.4.1",
|
|
34
|
-
"@cloudbase/
|
|
35
|
-
"@cloudbase/utilities": "^2.5.25-beta.0",
|
|
36
|
-
"brotli": "^1.3.3",
|
|
37
|
-
"brotli-dec-wasm": "^2.0.1"
|
|
34
|
+
"@cloudbase/utilities": "^2.5.25-beta.0"
|
|
38
35
|
},
|
|
39
36
|
"gitHead": "c462902b6702463670d27acb88ebccf93dbd51cd",
|
|
40
37
|
"devDependencies": {
|
|
38
|
+
"@cloudbase/types": "^2.5.25-beta.0",
|
|
41
39
|
"terser-webpack-plugin": "^3.0.2",
|
|
42
40
|
"webpack-bundle-analyzer": "^4.9.1"
|
|
43
41
|
}
|
package/src/index.ts
CHANGED
|
@@ -89,9 +89,6 @@ export class CloudbaseContainers {
|
|
|
89
89
|
throw new InvalieParamsError(`${COMPONENT_NAME}`, '缺少 privatelink sdk 地址')
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
console.log('>>******', this.config)
|
|
93
|
-
debugger
|
|
94
|
-
|
|
95
92
|
if (this.config.wasmUrl) {
|
|
96
93
|
this.wasm = getExportFunction(this.config.wasmUrl).catch((e) => {
|
|
97
94
|
if (this.config.jsUrl) {
|
package/src/utils/loader.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import decompress from 'brotli/decompress'
|
|
1
|
+
// import decompress from 'brotli/decompress'
|
|
2
2
|
import Go from '../go_wams_exec'
|
|
3
3
|
import { parseURL } from '.'
|
|
4
4
|
|
|
5
5
|
async function instantiateStreaming(resp, importObject, brotliCompressed = false) {
|
|
6
6
|
if (brotliCompressed || !WebAssembly.instantiateStreaming) {
|
|
7
7
|
const source = await (await resp).arrayBuffer()
|
|
8
|
-
|
|
8
|
+
if (brotliCompressed) {
|
|
9
|
+
throw new Error('do not support *.br')
|
|
10
|
+
}
|
|
11
|
+
// const buffer = brotliCompressed ? decompress(new Int8Array(source)) : source
|
|
12
|
+
const buffer = source
|
|
9
13
|
return WebAssembly.instantiate(buffer, importObject)
|
|
10
14
|
}
|
|
11
15
|
|