zsydgithub 1 vuosi sitten
vanhempi
commit
2f2f0c8be0
100 muutettua tiedostoa jossa 4663 lisäystä ja 0 poistoa
  1. 46 0
      Ts/1_hello.html
  2. 9 0
      Ts/1hello.ts
  3. 9 0
      Ts/js/1hello.js
  4. 72 0
      Ts/tsconfig.json
  5. 31 0
      cloud/.eslintrc.js
  6. 12 0
      cloud/README.md
  7. 6 0
      cloud/cloudfunctions/mpdb1/config.json
  8. 39 0
      cloud/cloudfunctions/mpdb1/index.js
  9. 14 0
      cloud/cloudfunctions/mpdb1/package.json
  10. 6 0
      cloud/cloudfunctions/mptodoDone1/config.json
  11. 31 0
      cloud/cloudfunctions/mptodoDone1/index.js
  12. 14 0
      cloud/cloudfunctions/mptodoDone1/package.json
  13. 7 0
      cloud/cloudfunctions/quickstartFunctions/config.json
  14. 56 0
      cloud/cloudfunctions/quickstartFunctions/createCollection/index.js
  15. 20 0
      cloud/cloudfunctions/quickstartFunctions/getMiniProgramCode/index.js
  16. 17 0
      cloud/cloudfunctions/quickstartFunctions/getOpenId/index.js
  17. 25 0
      cloud/cloudfunctions/quickstartFunctions/index.js
  18. 14 0
      cloud/cloudfunctions/quickstartFunctions/package.json
  19. 12 0
      cloud/cloudfunctions/quickstartFunctions/selectRecord/index.js
  20. 18 0
      cloud/cloudfunctions/quickstartFunctions/sumRecord/index.js
  21. 32 0
      cloud/cloudfunctions/quickstartFunctions/updateRecord/index.js
  22. 6 0
      cloud/cloudfunctions/vip1/config.json
  23. 23 0
      cloud/cloudfunctions/vip1/index.js
  24. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/pbjs
  25. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/pbjs.cmd
  26. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/pbjs.ps1
  27. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/pbts
  28. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/pbts.cmd
  29. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/pbts.ps1
  30. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/semver
  31. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/semver.cmd
  32. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/semver.ps1
  33. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-conv
  34. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-conv.cmd
  35. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-conv.ps1
  36. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-sign
  37. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-sign.cmd
  38. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-sign.ps1
  39. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-verify
  40. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-verify.cmd
  41. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-verify.ps1
  42. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node
  43. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-script
  44. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-script.cmd
  45. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-script.ps1
  46. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-transpile-only
  47. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-transpile-only.cmd
  48. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-transpile-only.ps1
  49. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node.cmd
  50. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-node.ps1
  51. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-script
  52. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-script.cmd
  53. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/ts-script.ps1
  54. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/tsc
  55. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/tsc.cmd
  56. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/tsc.ps1
  57. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/tsserver
  58. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/tsserver.cmd
  59. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/tsserver.ps1
  60. 12 0
      cloud/cloudfunctions/vip1/node_modules/.bin/uuid
  61. 17 0
      cloud/cloudfunctions/vip1/node_modules/.bin/uuid.cmd
  62. 28 0
      cloud/cloudfunctions/vip1/node_modules/.bin/uuid.ps1
  63. 1410 0
      cloud/cloudfunctions/vip1/node_modules/.package-lock.json
  64. 9 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/.editorconfig
  65. 1 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/.eslintignore
  66. 43 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/.eslintrc
  67. 29 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/.prettierrc.js
  68. 119 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/README.md
  69. 11 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/ObjectId/index.d.ts
  70. 21 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/ObjectId/index.js
  71. 29 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/aggregate.d.ts
  72. 124 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/aggregate.js
  73. 17 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/collection.d.ts
  74. 72 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/collection.js
  75. 175 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/command.d.ts
  76. 285 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/command.js
  77. 24 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/logic.d.ts
  78. 79 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/logic.js
  79. 73 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/query.d.ts
  80. 147 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/query.js
  81. 29 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/update.d.ts
  82. 49 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/update.js
  83. 6 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/config/app.config.d.ts
  84. 7 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/config/app.config.js
  85. 3 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/config/error.config.d.ts
  86. 15 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/config/error.config.js
  87. 34 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/const/code.d.ts
  88. 36 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/const/code.js
  89. 54 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/constant.d.ts
  90. 76 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/constant.js
  91. 14 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/document.d.ts
  92. 219 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/document.js
  93. 6 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/index.d.ts
  94. 11 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/index.js
  95. 24 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/interface.d.ts
  96. 2 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/interface.js
  97. 19 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/lineString.d.ts
  98. 57 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/lineString.js
  99. 18 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/multiLineString.d.ts
  100. 56 0
      cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/multiLineString.js

+ 46 - 0
Ts/1_hello.html

@@ -0,0 +1,46 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <meta http-equiv="X-UA-Compatible" content="IE=edge">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>Document</title>
+</head>
+<body>
+  Ts 始于Js  
+    可以编译出纯净的、简洁得JS代码  可以支持任何浏览器  node.js环境  
+  强大得类型系统
+    类型系统允许js得开发者   在开发的时候 更加高效
+  先进的js
+    可以用到js基础用不到的语法
+
+  安装Ts
+    npm install -g typescript
+  检查版本
+    tsc -V
+    
+
+  ts不能被浏览器直接解析
+    类型系统:类型信息 在我们解析的时候是不需要的 所以我们需要将ts转化为js 
+    编译时候的特性: ts提供了许多的编译时特性 编译阶段就已经处理完成 生成了可以在我们浏览器解析的js代码 
+
+  tsc + 文件名 可以把ts转化为js文件
+  <!-- <script src="./1_hello.ts"></script> -->
+  <script src="./js/1hello.js"></script>
+
+
+  总结: ts中的文件 如果直接书写js中的代码  在html文件种直接引入ts  会进行报错
+  ts文件种的变量使用的是let进行编译 编译的js文件中的修饰符变为var
+
+  ts的严格模式: 编译器的选项  用于增强TS代码的类型检查和错误检查 
+
+  1.生成配置文件 tsconfig.json
+    tsc --init
+  2.修改tsconfig.json 配置项
+    outDir 输出的文件目录
+    strict 关闭严格模式
+  3.启动监视任务:
+    终端 -> 运行任务 ->监视
+    
+</body>
+</html>

+ 9 - 0
Ts/1hello.ts

@@ -0,0 +1,9 @@
+(() => {
+  function sayHi(str:string){
+    return '你好' + str
+  }
+  let text = 'xiaoming'
+  console.log(sayHi(text))
+  console.log(222)
+  console.log(333)
+})()

+ 9 - 0
Ts/js/1hello.js

@@ -0,0 +1,9 @@
+(function () {
+    function sayHi(str) {
+        return '你好' + str;
+    }
+    var text = 'xiaoming';
+    console.log(sayHi(text));
+    console.log(222);
+    console.log(333);
+})();

+ 72 - 0
Ts/tsconfig.json

@@ -0,0 +1,72 @@
+{
+  "compilerOptions": {
+    /* Visit https://aka.ms/tsconfig.json to read more about this file */
+
+    /* Basic Options */
+    // "incremental": true,                         /* Enable incremental compilation */
+    "target": "es5",//目标语言的版本                                /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
+    "module": "commonjs",//生成代码的模板标准                           /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
+    // "lib": [], //Ts需要引用的库  ES5 ES6 ES7                                  /* Specify library files to be included in the compilation. */
+    // "allowJs": true, //允许编译器编译JS、JSX                            /* Allow javascript files to be compiled. */
+    // "checkJs": true, //允许在JS文件中报错,通常和allowJS一起使用                            /* Report errors in .js files. */
+    // "jsx": "preserve",                           /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
+    // "declaration": true,                         /* Generates corresponding '.d.ts' file. */
+    // "declarationMap": true,                      /* Generates a sourcemap for each corresponding '.d.ts' file. */
+    // "sourceMap": true,                           /* Generates corresponding '.map' file. */
+    // "outFile": "./",                             /* Concatenate and emit output to single file. */
+    "outDir": "./js",//指定的输出目录                              /* Redirect output structure to the directory. */
+    // "rootDir": "./",//指定输出的文件目录 控制输出目录结构                             /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
+    // "composite": true,                           /* Enable project compilation */
+    // "tsBuildInfoFile": "./",                     /* Specify file to store incremental compilation information */
+    // "removeComments": true,// 删除注释                      /* Do not emit comments to output. */
+    // "noEmit": true,                              /* Do not emit outputs. */
+    // "importHelpers": true,                       /* Import emit helpers from 'tslib'. */
+    // "downlevelIteration": true,                  /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
+    // "isolatedModules": true,                     /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
+
+    /* Strict Type-Checking Options */
+    "strict": false,//严格模式  开启所有严格的类型检查                                 /* Enable all strict type-checking options. */
+    // "noImplicitAny": true, //不允许使用隐式的any类型                      /* Raise error on expressions and declarations with an implied 'any' type. */
+    // "strictNullChecks": true,//不允许把null undefined 赋值给其他变量                    /* Enable strict null checks. */
+    // "strictFunctionTypes": true, //不允许函数参数双向协变                /* Enable strict checking of function types. */
+    // "strictBindCallApply": true, //严格的bind、call、apply检查                /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
+    // "strictPropertyInitialization": true,// 类的实例属性必须初始化        /* Enable strict checking of property initialization in classes. */
+    // "noImplicitThis": true,// 不允许this具有隐式的any类型                      /* Raise error on 'this' expressions with an implied 'any' type. */
+    // "alwaysStrict": true,//在代码中注入 use strict                        /* Parse in strict mode and emit "use strict" for each source file. */
+
+    /* Additional Checks */
+    // "noUnusedLocals": true,                      /* Report errors on unused locals. */
+    // "noUnusedParameters": true,                  /* Report errors on unused parameters. */
+    // "noImplicitReturns": true,                   /* Report error when not all code paths in function return a value. */
+    // "noFallthroughCasesInSwitch": true,          /* Report errors for fallthrough cases in switch statement. */
+    // "noUncheckedIndexedAccess": true,            /* Include 'undefined' in index signature results */
+    // "noImplicitOverride": true,                  /* Ensure overriding members in derived classes are marked with an 'override' modifier. */
+    // "noPropertyAccessFromIndexSignature": true,  /* Require undeclared properties from index signatures to use element accesses. */
+
+    /* Module Resolution Options */
+    // "moduleResolution": "node",                  /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
+    // "baseUrl": "./",                             /* Base directory to resolve non-absolute module names. */
+    // "paths": {},                                 /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
+    // "rootDirs": [],                              /* List of root folders whose combined content represents the structure of the project at runtime. */
+    // "typeRoots": [],                             /* List of folders to include type definitions from. */
+    // "types": [],                                 /* Type declaration files to be included in compilation. */
+    // "allowSyntheticDefaultImports": true,        /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
+    "esModuleInterop": true,                        /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
+    // "preserveSymlinks": true,                    /* Do not resolve the real path of symlinks. */
+    // "allowUmdGlobalAccess": true,                /* Allow accessing UMD globals from modules. */
+
+    /* Source Map Options */
+    // "sourceRoot": "",                            /* Specify the location where debugger should locate TypeScript files instead of source locations. */
+    // "mapRoot": "",                               /* Specify the location where debugger should locate map files instead of generated locations. */
+    // "inlineSourceMap": true,                     /* Emit a single file with source maps instead of having a separate file. */
+    // "inlineSources": true,                       /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
+
+    /* Experimental Options */
+    // "experimentalDecorators": true,              /* Enables experimental support for ES7 decorators. */
+    // "emitDecoratorMetadata": true,               /* Enables experimental support for emitting type metadata for decorators. */
+
+    /* Advanced Options */
+    "skipLibCheck": true,                           /* Skip type checking of declaration files. */
+    "forceConsistentCasingInFileNames": true        /* Disallow inconsistently-cased references to the same file. */
+  }
+}

+ 31 - 0
cloud/.eslintrc.js

@@ -0,0 +1,31 @@
+/*
+ * Eslint config file
+ * Documentation: https://eslint.org/docs/user-guide/configuring/
+ * Install the Eslint extension before using this feature.
+ */
+module.exports = {
+  env: {
+    es6: true,
+    browser: true,
+    node: true,
+  },
+  ecmaFeatures: {
+    modules: true,
+  },
+  parserOptions: {
+    ecmaVersion: 2018,
+    sourceType: 'module',
+  },
+  globals: {
+    wx: true,
+    App: true,
+    Page: true,
+    getCurrentPages: true,
+    getApp: true,
+    Component: true,
+    requirePlugin: true,
+    requireMiniProgram: true,
+  },
+  // extends: 'eslint:recommended',
+  rules: {},
+}

+ 12 - 0
cloud/README.md

@@ -0,0 +1,12 @@
+# 云开发 quickstart
+
+这是云开发的快速启动指引,其中演示了如何上手使用云开发的三大基础能力:
+
+- 数据库:一个既可在小程序前端操作,也能在云函数中读写的 JSON 文档型数据库
+- 文件存储:在小程序前端直接上传/下载云端文件,在云开发控制台可视化管理
+- 云函数:在云端运行的代码,微信私有协议天然鉴权,开发者只需编写业务逻辑代码
+
+## 参考文档
+
+- [云开发文档](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)
+

+ 6 - 0
cloud/cloudfunctions/mpdb1/config.json

@@ -0,0 +1,6 @@
+{
+    "permissions": {
+        "openapi": [
+        ]
+    }
+}

+ 39 - 0
cloud/cloudfunctions/mpdb1/index.js

@@ -0,0 +1,39 @@
+// 云函数入口文件
+const cloud = require('wx-server-sdk')
+
+cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) // 使用当前云环境
+
+const db = cloud.database()
+const mpdb1 = db.collection('mpdb1')
+const _ = db.command
+
+// 云函数入口函数
+exports.main = async (event, context) => {
+    const wxContext = cloud.getWXContext()
+
+    // return {
+    //     event,
+    //     openid: wxContext.OPENID,
+    //     appid: wxContext.APPID,
+    //     unionid: wxContext.UNIONID,
+    // }
+    // return console.log(111)
+    // return mpdb1.get().then((res)=>{
+    //     console.log(res)
+    // })
+
+
+    // return await mpdb1.get()
+
+    return await mpdb1.where({
+        _id: _.in(["b751f28065b20b2708757dd94908a1d0","1601815765b20cc7000084e144cd60bf"])
+    }).update({
+        data:{
+            msg: "hello word"
+        }
+    })
+
+    // return await mpdb1.where({
+    //     _id: "b751f28065b20a7908756e32765ee932"
+    // }).remove()
+}

+ 14 - 0
cloud/cloudfunctions/mpdb1/package.json

@@ -0,0 +1,14 @@
+{
+    "name": "mpdb1",
+    "version": "1.0.0",
+    "description": "",
+    "main": "index.js",
+    "scripts": {
+        "test": "echo \"Error: no test specified\" && exit 1"
+    },
+    "author": "",
+    "license": "ISC",
+    "dependencies": {
+        "wx-server-sdk": "~2.6.3"
+    }
+}

+ 6 - 0
cloud/cloudfunctions/mptodoDone1/config.json

@@ -0,0 +1,6 @@
+{
+    "permissions": {
+        "openapi": [
+        ]
+    }
+}

+ 31 - 0
cloud/cloudfunctions/mptodoDone1/index.js

@@ -0,0 +1,31 @@
+// 云函数入口文件
+const cloud = require('wx-server-sdk')
+
+cloud.init({
+    env: cloud.DYNAMIC_CURRENT_ENV
+}) // 使用当前云环境
+
+const db = cloud.database()
+const mptodo1 = db.collection('mptodo1')
+const _ = db.command
+
+// 云函数入口函数
+exports.main = async (event, context) => {
+    const wxContext = cloud.getWXContext()
+
+    // return {
+    //     event,
+    //     openid: wxContext.OPENID,
+    //     appid: wxContext.APPID,
+    //     unionid: wxContext.UNIONID,
+    // }
+    console.log(event._arr)
+    return await mptodo1.where({
+        _id: _.in(event._arr)
+    }).update({
+        data: {
+            isDone: true
+        }
+    })
+
+}

+ 14 - 0
cloud/cloudfunctions/mptodoDone1/package.json

@@ -0,0 +1,14 @@
+{
+    "name": "mptodoDone1",
+    "version": "1.0.0",
+    "description": "",
+    "main": "index.js",
+    "scripts": {
+        "test": "echo \"Error: no test specified\" && exit 1"
+    },
+    "author": "",
+    "license": "ISC",
+    "dependencies": {
+        "wx-server-sdk": "~2.6.3"
+    }
+}

+ 7 - 0
cloud/cloudfunctions/quickstartFunctions/config.json

@@ -0,0 +1,7 @@
+{
+  "permissions": {
+    "openapi": [
+      "wxacode.get"
+    ]
+  }
+}

+ 56 - 0
cloud/cloudfunctions/quickstartFunctions/createCollection/index.js

@@ -0,0 +1,56 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+
+const db = cloud.database();
+
+// 创建集合云函数入口函数
+exports.main = async (event, context) => {
+  try {
+    // 创建集合
+    await db.createCollection('sales');
+    await db.collection('sales').add({
+      // data 字段表示需新增的 JSON 数据
+      data: {
+        region: '华东',
+        city: '上海',
+        sales: 11
+      }
+    });
+    await db.collection('sales').add({
+      // data 字段表示需新增的 JSON 数据
+      data: {
+        region: '华东',
+        city: '南京',
+        sales: 11
+      }
+    });
+    await db.collection('sales').add({
+      // data 字段表示需新增的 JSON 数据
+      data: {
+        region: '华南',
+        city: '广州',
+        sales: 22
+      }
+    });
+    await db.collection('sales').add({
+      // data 字段表示需新增的 JSON 数据
+      data: {
+        region: '华南',
+        city: '深圳',
+        sales: 22
+      }
+    });
+    return {
+      success: true
+    };
+  } catch (e) {
+    // 这里catch到的是该collection已经存在,从业务逻辑上来说是运行成功的,所以catch返回success给前端,避免工具在前端抛出异常
+    return {
+      success: true,
+      data: 'create collection success'
+    };
+  }
+};

+ 20 - 0
cloud/cloudfunctions/quickstartFunctions/getMiniProgramCode/index.js

@@ -0,0 +1,20 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+
+// 获取小程序二维码云函数入口函数
+exports.main = async (event, context) => {
+  // 获取小程序二维码的buffer
+  const resp = await cloud.openapi.wxacode.get({
+    path: 'pages/index/index'
+  });
+  const { buffer } = resp;
+  // 将图片上传云存储空间
+  const upload = await cloud.uploadFile({
+    cloudPath: 'code.png',
+    fileContent: buffer
+  });
+  return upload.fileID;
+};

+ 17 - 0
cloud/cloudfunctions/quickstartFunctions/getOpenId/index.js

@@ -0,0 +1,17 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+
+// 获取openId云函数入口函数
+exports.main = async (event, context) => {
+  // 获取基础信息
+  const wxContext = cloud.getWXContext();
+
+  return {
+    openid: wxContext.OPENID,
+    appid: wxContext.APPID,
+    unionid: wxContext.UNIONID,
+  };
+};

+ 25 - 0
cloud/cloudfunctions/quickstartFunctions/index.js

@@ -0,0 +1,25 @@
+const getOpenId = require('./getOpenId/index');
+const getMiniProgramCode = require('./getMiniProgramCode/index');
+const createCollection = require('./createCollection/index');
+const selectRecord = require('./selectRecord/index');
+const updateRecord = require('./updateRecord/index');
+const sumRecord = require('./sumRecord/index');
+
+
+// 云函数入口函数
+exports.main = async (event, context) => {
+  switch (event.type) {
+    case 'getOpenId':
+      return await getOpenId.main(event, context);
+    case 'getMiniProgramCode':
+      return await getMiniProgramCode.main(event, context);
+    case 'createCollection':
+      return await createCollection.main(event, context);
+    case 'selectRecord':
+      return await selectRecord.main(event, context);
+    case 'updateRecord':
+      return await updateRecord.main(event, context);
+    case 'sumRecord':
+      return await sumRecord.main(event, context);
+  }
+};

+ 14 - 0
cloud/cloudfunctions/quickstartFunctions/package.json

@@ -0,0 +1,14 @@
+{
+  "name": "quickstartFunctions",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "wx-server-sdk": "~2.4.0"
+  }
+}

+ 12 - 0
cloud/cloudfunctions/quickstartFunctions/selectRecord/index.js

@@ -0,0 +1,12 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+const db = cloud.database();
+
+// 查询数据库集合云函数入口函数
+exports.main = async (event, context) => {
+  // 返回数据库查询结果
+  return await db.collection('sales').get();
+};

+ 18 - 0
cloud/cloudfunctions/quickstartFunctions/sumRecord/index.js

@@ -0,0 +1,18 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+const db = cloud.database();
+const $ = db.command.aggregate;
+
+// 聚合记录云函数入口函数
+exports.main = async (event, context) => {
+  // 返回数据库聚合结果
+  return db.collection('sales').aggregate()
+    .group({
+      _id: '$region',
+      sum: $.sum('$sales')
+    })
+    .end();
+};

+ 32 - 0
cloud/cloudfunctions/quickstartFunctions/updateRecord/index.js

@@ -0,0 +1,32 @@
+const cloud = require('wx-server-sdk');
+
+cloud.init({
+  env: cloud.DYNAMIC_CURRENT_ENV
+});
+const db = cloud.database();
+
+// 修改数据库信息云函数入口函数
+exports.main = async (event, context) => {
+  try {
+    // 遍历修改数据库信息
+    for (let i = 0; i < event.data.length; i++) {
+      await db.collection('sales').where({
+        _id: event.data[i]._id
+      })
+        .update({
+          data: {
+            sales: event.data[i].sales
+          },
+        });
+    }
+    return {
+      success: true,
+      data: event.data
+    };
+  } catch (e) {
+    return {
+      success: false,
+      errMsg: e
+    };
+  }
+};

+ 6 - 0
cloud/cloudfunctions/vip1/config.json

@@ -0,0 +1,6 @@
+{
+    "permissions": {
+        "openapi": [
+        ]
+    }
+}

+ 23 - 0
cloud/cloudfunctions/vip1/index.js

@@ -0,0 +1,23 @@
+// 云函数入口文件
+const cloud = require('wx-server-sdk')
+
+cloud.init({ env: cloud.DYNAMIC_CURRENT_ENV }) // 使用当前云环境
+
+// 云函数入口函数
+exports.main = async (event, context) => {
+    const wxContext = cloud.getWXContext()
+
+    // return {
+    //     event,
+    //     openid: wxContext.OPENID,
+    //     appid: wxContext.APPID,
+    //     unionid: wxContext.UNIONID,
+    // }
+    let result = event.a + event.b
+    console.log(result)
+    return{
+        code: '200',
+        msg: '成功',
+        data: result
+    }
+}

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/pbjs

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../protobufjs/bin/pbjs" "$@"
+else 
+  exec node  "$basedir/../protobufjs/bin/pbjs" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/pbjs.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\protobufjs\bin\pbjs" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/pbjs.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../protobufjs/bin/pbjs" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../protobufjs/bin/pbjs" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../protobufjs/bin/pbjs" $args
+  } else {
+    & "node$exe"  "$basedir/../protobufjs/bin/pbjs" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/pbts

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../protobufjs/bin/pbts" "$@"
+else 
+  exec node  "$basedir/../protobufjs/bin/pbts" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/pbts.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\protobufjs\bin\pbts" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/pbts.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../protobufjs/bin/pbts" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../protobufjs/bin/pbts" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../protobufjs/bin/pbts" $args
+  } else {
+    & "node$exe"  "$basedir/../protobufjs/bin/pbts" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/semver

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../semver/bin/semver" "$@"
+else 
+  exec node  "$basedir/../semver/bin/semver" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/semver.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\semver\bin\semver" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/semver.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../semver/bin/semver" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../semver/bin/semver" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../semver/bin/semver" $args
+  } else {
+    & "node$exe"  "$basedir/../semver/bin/semver" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-conv

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../sshpk/bin/sshpk-conv" "$@"
+else 
+  exec node  "$basedir/../sshpk/bin/sshpk-conv" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-conv.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\sshpk\bin\sshpk-conv" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-conv.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-conv" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-conv" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../sshpk/bin/sshpk-conv" $args
+  } else {
+    & "node$exe"  "$basedir/../sshpk/bin/sshpk-conv" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-sign

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../sshpk/bin/sshpk-sign" "$@"
+else 
+  exec node  "$basedir/../sshpk/bin/sshpk-sign" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-sign.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\sshpk\bin\sshpk-sign" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-sign.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-sign" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-sign" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../sshpk/bin/sshpk-sign" $args
+  } else {
+    & "node$exe"  "$basedir/../sshpk/bin/sshpk-sign" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-verify

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../sshpk/bin/sshpk-verify" "$@"
+else 
+  exec node  "$basedir/../sshpk/bin/sshpk-verify" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-verify.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\sshpk\bin\sshpk-verify" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/sshpk-verify.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-verify" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../sshpk/bin/sshpk-verify" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../sshpk/bin/sshpk-verify" $args
+  } else {
+    & "node$exe"  "$basedir/../sshpk/bin/sshpk-verify" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../ts-node/dist/bin.js" "$@"
+else 
+  exec node  "$basedir/../ts-node/dist/bin.js" "$@"
+fi

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-script

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../ts-node/dist/bin-script.js" "$@"
+else 
+  exec node  "$basedir/../ts-node/dist/bin-script.js" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-script.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\ts-node\dist\bin-script.js" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-script.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../ts-node/dist/bin-script.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../ts-node/dist/bin-script.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../ts-node/dist/bin-script.js" $args
+  } else {
+    & "node$exe"  "$basedir/../ts-node/dist/bin-script.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-transpile-only

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../ts-node/dist/bin-transpile.js" "$@"
+else 
+  exec node  "$basedir/../ts-node/dist/bin-transpile.js" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-transpile-only.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\ts-node\dist\bin-transpile.js" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node-transpile-only.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../ts-node/dist/bin-transpile.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../ts-node/dist/bin-transpile.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../ts-node/dist/bin-transpile.js" $args
+  } else {
+    & "node$exe"  "$basedir/../ts-node/dist/bin-transpile.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\ts-node\dist\bin.js" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-node.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../ts-node/dist/bin.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../ts-node/dist/bin.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../ts-node/dist/bin.js" $args
+  } else {
+    & "node$exe"  "$basedir/../ts-node/dist/bin.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-script

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../ts-node/dist/bin-script-deprecated.js" "$@"
+else 
+  exec node  "$basedir/../ts-node/dist/bin-script-deprecated.js" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-script.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\ts-node\dist\bin-script-deprecated.js" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/ts-script.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../ts-node/dist/bin-script-deprecated.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../ts-node/dist/bin-script-deprecated.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../ts-node/dist/bin-script-deprecated.js" $args
+  } else {
+    & "node$exe"  "$basedir/../ts-node/dist/bin-script-deprecated.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/tsc

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../typescript/bin/tsc" "$@"
+else 
+  exec node  "$basedir/../typescript/bin/tsc" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/tsc.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\typescript\bin\tsc" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/tsc.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../typescript/bin/tsc" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../typescript/bin/tsc" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../typescript/bin/tsc" $args
+  } else {
+    & "node$exe"  "$basedir/../typescript/bin/tsc" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/tsserver

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../typescript/bin/tsserver" "$@"
+else 
+  exec node  "$basedir/../typescript/bin/tsserver" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/tsserver.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\typescript\bin\tsserver" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/tsserver.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../typescript/bin/tsserver" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../typescript/bin/tsserver" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../typescript/bin/tsserver" $args
+  } else {
+    & "node$exe"  "$basedir/../typescript/bin/tsserver" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 12 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/uuid

@@ -0,0 +1,12 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
+esac
+
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../uuid/bin/uuid" "$@"
+else 
+  exec node  "$basedir/../uuid/bin/uuid" "$@"
+fi

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/uuid.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\uuid\bin\uuid" %*

+ 28 - 0
cloud/cloudfunctions/vip1/node_modules/.bin/uuid.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../uuid/bin/uuid" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../uuid/bin/uuid" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../uuid/bin/uuid" $args
+  } else {
+    & "node$exe"  "$basedir/../uuid/bin/uuid" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 1410 - 0
cloud/cloudfunctions/vip1/node_modules/.package-lock.json

@@ -0,0 +1,1410 @@
+{
+    "name": "vip1",
+    "version": "1.0.0",
+    "lockfileVersion": 2,
+    "requires": true,
+    "packages": {
+        "node_modules/@cloudbase/database": {
+            "version": "1.4.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@cloudbase/database/-/database-1.4.1.tgz",
+            "integrity": "sha512-BYLXHS6c+WhxAvvdak8Z3W+heScqBBPu/CQ76gC8v1Scuy5qf4qxuPWNzyoxde/eZsmc+BRRCFyIq4xUnIot8g==",
+            "license": "ISC",
+            "dependencies": {
+                "bson": "^4.0.3",
+                "lodash.clonedeep": "4.5.0",
+                "lodash.set": "4.3.2",
+                "lodash.unset": "4.5.2"
+            }
+        },
+        "node_modules/@cloudbase/node-sdk": {
+            "version": "2.9.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@cloudbase/node-sdk/-/node-sdk-2.9.1.tgz",
+            "integrity": "sha512-4JGLiy9/Ko7d1pnBgq5mtIUm5v9ig1tHqAeLrkMc8b4vVBRTnYlxJer3uKXq6+9fjLprxNyRSahEg4QR8/Gbkw==",
+            "license": "MIT",
+            "dependencies": {
+                "@cloudbase/database": "1.4.1",
+                "@cloudbase/signature-nodejs": "1.0.0-beta.0",
+                "@types/retry": "^0.12.0",
+                "agentkeepalive": "^4.1.3",
+                "axios": "^0.21.1",
+                "is-regex": "^1.0.4",
+                "jsonwebtoken": "^8.5.1",
+                "lodash.merge": "^4.6.1",
+                "request": "^2.87.0",
+                "request-promise": "^4.2.5",
+                "retry": "^0.12.0",
+                "ts-node": "^8.10.2",
+                "xml2js": "^0.4.19"
+            },
+            "engines": {
+                "node": ">=8.6.0"
+            }
+        },
+        "node_modules/@cloudbase/signature-nodejs": {
+            "version": "1.0.0-beta.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@cloudbase/signature-nodejs/-/signature-nodejs-1.0.0-beta.0.tgz",
+            "integrity": "sha512-gpKqwsVk/D2PzvFamYNReymXSdvRSY90eZ1ARf+1wZ8oT6OpK9kr6nmevGykMxN1n17Gn92hBbWqAxU9o3+kAQ==",
+            "dependencies": {
+                "@types/clone": "^0.1.30",
+                "clone": "^2.1.2",
+                "is-stream": "^2.0.0",
+                "url": "^0.11.0"
+            }
+        },
+        "node_modules/@protobufjs/aspromise": {
+            "version": "1.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
+            "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@protobufjs/base64": {
+            "version": "1.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/base64/-/base64-1.1.2.tgz",
+            "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@protobufjs/codegen": {
+            "version": "2.0.4",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/codegen/-/codegen-2.0.4.tgz",
+            "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@protobufjs/eventemitter": {
+            "version": "1.1.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
+            "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@protobufjs/fetch": {
+            "version": "1.1.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/fetch/-/fetch-1.1.0.tgz",
+            "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
+            "license": "BSD-3-Clause",
+            "dependencies": {
+                "@protobufjs/aspromise": "^1.1.1",
+                "@protobufjs/inquire": "^1.1.0"
+            }
+        },
+        "node_modules/@protobufjs/float": {
+            "version": "1.0.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/float/-/float-1.0.2.tgz",
+            "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@protobufjs/inquire": {
+            "version": "1.1.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/inquire/-/inquire-1.1.0.tgz",
+            "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@protobufjs/path": {
+            "version": "1.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/path/-/path-1.1.2.tgz",
+            "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@protobufjs/pool": {
+            "version": "1.1.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/pool/-/pool-1.1.0.tgz",
+            "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@protobufjs/utf8": {
+            "version": "1.1.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@protobufjs/utf8/-/utf8-1.1.0.tgz",
+            "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/@types/clone": {
+            "version": "0.1.30",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@types/clone/-/clone-0.1.30.tgz",
+            "integrity": "sha512-vcxBr+ybljeSiasmdke1cQ9ICxoEwaBgM1OQ/P5h4MPj/kRyLcDl5L8PrftlbyV1kBbJIs3M3x1A1+rcWd4mEA==",
+            "license": "MIT"
+        },
+        "node_modules/@types/long": {
+            "version": "4.0.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@types/long/-/long-4.0.2.tgz",
+            "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==",
+            "license": "MIT"
+        },
+        "node_modules/@types/node": {
+            "version": "20.11.5",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@types/node/-/node-20.11.5.tgz",
+            "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==",
+            "license": "MIT",
+            "dependencies": {
+                "undici-types": "~5.26.4"
+            }
+        },
+        "node_modules/@types/retry": {
+            "version": "0.12.5",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@types/retry/-/retry-0.12.5.tgz",
+            "integrity": "sha512-3xSjTp3v03X/lSQLkczaN9UIEwJMoMCA1+Nb5HfbJEQWogdeQIyVtTvxPXDQjZ5zws8rFQfVfRdz03ARihPJgw==",
+            "license": "MIT"
+        },
+        "node_modules/agentkeepalive": {
+            "version": "4.5.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/agentkeepalive/-/agentkeepalive-4.5.0.tgz",
+            "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==",
+            "license": "MIT",
+            "dependencies": {
+                "humanize-ms": "^1.2.1"
+            },
+            "engines": {
+                "node": ">= 8.0.0"
+            }
+        },
+        "node_modules/ajv": {
+            "version": "6.12.6",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/ajv/-/ajv-6.12.6.tgz",
+            "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+            "license": "MIT",
+            "dependencies": {
+                "fast-deep-equal": "^3.1.1",
+                "fast-json-stable-stringify": "^2.0.0",
+                "json-schema-traverse": "^0.4.1",
+                "uri-js": "^4.2.2"
+            },
+            "funding": {
+                "type": "github",
+                "url": "https://github.com/sponsors/epoberezkin"
+            }
+        },
+        "node_modules/arg": {
+            "version": "4.1.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/arg/-/arg-4.1.3.tgz",
+            "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
+            "license": "MIT"
+        },
+        "node_modules/asn1": {
+            "version": "0.2.6",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/asn1/-/asn1-0.2.6.tgz",
+            "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
+            "license": "MIT",
+            "dependencies": {
+                "safer-buffer": "~2.1.0"
+            }
+        },
+        "node_modules/assert-plus": {
+            "version": "1.0.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/assert-plus/-/assert-plus-1.0.0.tgz",
+            "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==",
+            "license": "MIT",
+            "engines": {
+                "node": ">=0.8"
+            }
+        },
+        "node_modules/asynckit": {
+            "version": "0.4.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/asynckit/-/asynckit-0.4.0.tgz",
+            "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+            "license": "MIT"
+        },
+        "node_modules/aws-sign2": {
+            "version": "0.7.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/aws-sign2/-/aws-sign2-0.7.0.tgz",
+            "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==",
+            "license": "Apache-2.0",
+            "engines": {
+                "node": "*"
+            }
+        },
+        "node_modules/aws4": {
+            "version": "1.12.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/aws4/-/aws4-1.12.0.tgz",
+            "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==",
+            "license": "MIT"
+        },
+        "node_modules/axios": {
+            "version": "0.21.4",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/axios/-/axios-0.21.4.tgz",
+            "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
+            "license": "MIT",
+            "dependencies": {
+                "follow-redirects": "^1.14.0"
+            }
+        },
+        "node_modules/base64-js": {
+            "version": "1.5.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/base64-js/-/base64-js-1.5.1.tgz",
+            "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+            "funding": [
+                {
+                    "type": "github",
+                    "url": "https://github.com/sponsors/feross"
+                },
+                {
+                    "type": "patreon",
+                    "url": "https://www.patreon.com/feross"
+                },
+                {
+                    "type": "consulting",
+                    "url": "https://feross.org/support"
+                }
+            ],
+            "license": "MIT"
+        },
+        "node_modules/bcrypt-pbkdf": {
+            "version": "1.0.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
+            "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
+            "license": "BSD-3-Clause",
+            "dependencies": {
+                "tweetnacl": "^0.14.3"
+            }
+        },
+        "node_modules/bignumber.js": {
+            "version": "9.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/bignumber.js/-/bignumber.js-9.1.2.tgz",
+            "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==",
+            "license": "MIT",
+            "engines": {
+                "node": "*"
+            }
+        },
+        "node_modules/bluebird": {
+            "version": "3.7.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/bluebird/-/bluebird-3.7.2.tgz",
+            "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
+            "license": "MIT"
+        },
+        "node_modules/bson": {
+            "version": "4.7.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/bson/-/bson-4.7.2.tgz",
+            "integrity": "sha512-Ry9wCtIZ5kGqkJoi6aD8KjxFZEx78guTQDnpXWiNthsxzrxAK/i8E6pCHAIZTbaEFWcOCvbecMukfK7XUvyLpQ==",
+            "license": "Apache-2.0",
+            "dependencies": {
+                "buffer": "^5.6.0"
+            },
+            "engines": {
+                "node": ">=6.9.0"
+            }
+        },
+        "node_modules/buffer": {
+            "version": "5.7.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/buffer/-/buffer-5.7.1.tgz",
+            "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+            "funding": [
+                {
+                    "type": "github",
+                    "url": "https://github.com/sponsors/feross"
+                },
+                {
+                    "type": "patreon",
+                    "url": "https://www.patreon.com/feross"
+                },
+                {
+                    "type": "consulting",
+                    "url": "https://feross.org/support"
+                }
+            ],
+            "license": "MIT",
+            "dependencies": {
+                "base64-js": "^1.3.1",
+                "ieee754": "^1.1.13"
+            }
+        },
+        "node_modules/buffer-equal-constant-time": {
+            "version": "1.0.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
+            "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==",
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/buffer-from": {
+            "version": "1.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/buffer-from/-/buffer-from-1.1.2.tgz",
+            "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+            "license": "MIT"
+        },
+        "node_modules/call-bind": {
+            "version": "1.0.5",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/call-bind/-/call-bind-1.0.5.tgz",
+            "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
+            "license": "MIT",
+            "dependencies": {
+                "function-bind": "^1.1.2",
+                "get-intrinsic": "^1.2.1",
+                "set-function-length": "^1.1.1"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/caseless": {
+            "version": "0.12.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/caseless/-/caseless-0.12.0.tgz",
+            "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==",
+            "license": "Apache-2.0"
+        },
+        "node_modules/clone": {
+            "version": "2.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/clone/-/clone-2.1.2.tgz",
+            "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
+            "license": "MIT",
+            "engines": {
+                "node": ">=0.8"
+            }
+        },
+        "node_modules/combined-stream": {
+            "version": "1.0.8",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/combined-stream/-/combined-stream-1.0.8.tgz",
+            "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+            "license": "MIT",
+            "dependencies": {
+                "delayed-stream": "~1.0.0"
+            },
+            "engines": {
+                "node": ">= 0.8"
+            }
+        },
+        "node_modules/core-util-is": {
+            "version": "1.0.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/core-util-is/-/core-util-is-1.0.2.tgz",
+            "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==",
+            "license": "MIT"
+        },
+        "node_modules/dashdash": {
+            "version": "1.14.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/dashdash/-/dashdash-1.14.1.tgz",
+            "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==",
+            "license": "MIT",
+            "dependencies": {
+                "assert-plus": "^1.0.0"
+            },
+            "engines": {
+                "node": ">=0.10"
+            }
+        },
+        "node_modules/define-data-property": {
+            "version": "1.1.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/define-data-property/-/define-data-property-1.1.1.tgz",
+            "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
+            "license": "MIT",
+            "dependencies": {
+                "get-intrinsic": "^1.2.1",
+                "gopd": "^1.0.1",
+                "has-property-descriptors": "^1.0.0"
+            },
+            "engines": {
+                "node": ">= 0.4"
+            }
+        },
+        "node_modules/delayed-stream": {
+            "version": "1.0.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/delayed-stream/-/delayed-stream-1.0.0.tgz",
+            "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+            "license": "MIT",
+            "engines": {
+                "node": ">=0.4.0"
+            }
+        },
+        "node_modules/diff": {
+            "version": "4.0.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/diff/-/diff-4.0.2.tgz",
+            "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+            "license": "BSD-3-Clause",
+            "engines": {
+                "node": ">=0.3.1"
+            }
+        },
+        "node_modules/ecc-jsbn": {
+            "version": "0.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
+            "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==",
+            "license": "MIT",
+            "dependencies": {
+                "jsbn": "~0.1.0",
+                "safer-buffer": "^2.1.0"
+            }
+        },
+        "node_modules/ecdsa-sig-formatter": {
+            "version": "1.0.11",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
+            "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
+            "license": "Apache-2.0",
+            "dependencies": {
+                "safe-buffer": "^5.0.1"
+            }
+        },
+        "node_modules/extend": {
+            "version": "3.0.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/extend/-/extend-3.0.2.tgz",
+            "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+            "license": "MIT"
+        },
+        "node_modules/extsprintf": {
+            "version": "1.3.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/extsprintf/-/extsprintf-1.3.0.tgz",
+            "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==",
+            "engines": [
+                "node >=0.6.0"
+            ],
+            "license": "MIT"
+        },
+        "node_modules/fast-deep-equal": {
+            "version": "3.1.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+            "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+            "license": "MIT"
+        },
+        "node_modules/fast-json-stable-stringify": {
+            "version": "2.1.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+            "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+            "license": "MIT"
+        },
+        "node_modules/follow-redirects": {
+            "version": "1.15.5",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/follow-redirects/-/follow-redirects-1.15.5.tgz",
+            "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
+            "funding": [
+                {
+                    "type": "individual",
+                    "url": "https://github.com/sponsors/RubenVerborgh"
+                }
+            ],
+            "license": "MIT",
+            "engines": {
+                "node": ">=4.0"
+            },
+            "peerDependenciesMeta": {
+                "debug": {
+                    "optional": true
+                }
+            }
+        },
+        "node_modules/forever-agent": {
+            "version": "0.6.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/forever-agent/-/forever-agent-0.6.1.tgz",
+            "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==",
+            "license": "Apache-2.0",
+            "engines": {
+                "node": "*"
+            }
+        },
+        "node_modules/form-data": {
+            "version": "2.3.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/form-data/-/form-data-2.3.3.tgz",
+            "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
+            "license": "MIT",
+            "dependencies": {
+                "asynckit": "^0.4.0",
+                "combined-stream": "^1.0.6",
+                "mime-types": "^2.1.12"
+            },
+            "engines": {
+                "node": ">= 0.12"
+            }
+        },
+        "node_modules/function-bind": {
+            "version": "1.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/function-bind/-/function-bind-1.1.2.tgz",
+            "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+            "license": "MIT",
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/get-intrinsic": {
+            "version": "1.2.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
+            "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",
+            "license": "MIT",
+            "dependencies": {
+                "function-bind": "^1.1.2",
+                "has-proto": "^1.0.1",
+                "has-symbols": "^1.0.3",
+                "hasown": "^2.0.0"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/getpass": {
+            "version": "0.1.7",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/getpass/-/getpass-0.1.7.tgz",
+            "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==",
+            "license": "MIT",
+            "dependencies": {
+                "assert-plus": "^1.0.0"
+            }
+        },
+        "node_modules/gopd": {
+            "version": "1.0.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/gopd/-/gopd-1.0.1.tgz",
+            "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+            "license": "MIT",
+            "dependencies": {
+                "get-intrinsic": "^1.1.3"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/har-schema": {
+            "version": "2.0.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/har-schema/-/har-schema-2.0.0.tgz",
+            "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==",
+            "license": "ISC",
+            "engines": {
+                "node": ">=4"
+            }
+        },
+        "node_modules/har-validator": {
+            "version": "5.1.5",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/har-validator/-/har-validator-5.1.5.tgz",
+            "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
+            "deprecated": "this library is no longer supported",
+            "license": "MIT",
+            "dependencies": {
+                "ajv": "^6.12.3",
+                "har-schema": "^2.0.0"
+            },
+            "engines": {
+                "node": ">=6"
+            }
+        },
+        "node_modules/has-property-descriptors": {
+            "version": "1.0.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
+            "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==",
+            "license": "MIT",
+            "dependencies": {
+                "get-intrinsic": "^1.2.2"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/has-proto": {
+            "version": "1.0.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/has-proto/-/has-proto-1.0.1.tgz",
+            "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
+            "license": "MIT",
+            "engines": {
+                "node": ">= 0.4"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/has-symbols": {
+            "version": "1.0.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/has-symbols/-/has-symbols-1.0.3.tgz",
+            "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+            "license": "MIT",
+            "engines": {
+                "node": ">= 0.4"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/has-tostringtag": {
+            "version": "1.0.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
+            "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
+            "license": "MIT",
+            "dependencies": {
+                "has-symbols": "^1.0.2"
+            },
+            "engines": {
+                "node": ">= 0.4"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/hasown": {
+            "version": "2.0.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/hasown/-/hasown-2.0.0.tgz",
+            "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+            "license": "MIT",
+            "dependencies": {
+                "function-bind": "^1.1.2"
+            },
+            "engines": {
+                "node": ">= 0.4"
+            }
+        },
+        "node_modules/http-signature": {
+            "version": "1.2.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/http-signature/-/http-signature-1.2.0.tgz",
+            "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==",
+            "license": "MIT",
+            "dependencies": {
+                "assert-plus": "^1.0.0",
+                "jsprim": "^1.2.2",
+                "sshpk": "^1.7.0"
+            },
+            "engines": {
+                "node": ">=0.8",
+                "npm": ">=1.3.7"
+            }
+        },
+        "node_modules/humanize-ms": {
+            "version": "1.2.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/humanize-ms/-/humanize-ms-1.2.1.tgz",
+            "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==",
+            "license": "MIT",
+            "dependencies": {
+                "ms": "^2.0.0"
+            }
+        },
+        "node_modules/ieee754": {
+            "version": "1.2.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/ieee754/-/ieee754-1.2.1.tgz",
+            "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+            "funding": [
+                {
+                    "type": "github",
+                    "url": "https://github.com/sponsors/feross"
+                },
+                {
+                    "type": "patreon",
+                    "url": "https://www.patreon.com/feross"
+                },
+                {
+                    "type": "consulting",
+                    "url": "https://feross.org/support"
+                }
+            ],
+            "license": "BSD-3-Clause"
+        },
+        "node_modules/is-regex": {
+            "version": "1.1.4",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/is-regex/-/is-regex-1.1.4.tgz",
+            "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
+            "license": "MIT",
+            "dependencies": {
+                "call-bind": "^1.0.2",
+                "has-tostringtag": "^1.0.0"
+            },
+            "engines": {
+                "node": ">= 0.4"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/is-stream": {
+            "version": "2.0.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/is-stream/-/is-stream-2.0.1.tgz",
+            "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
+            "license": "MIT",
+            "engines": {
+                "node": ">=8"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/sindresorhus"
+            }
+        },
+        "node_modules/is-typedarray": {
+            "version": "1.0.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/is-typedarray/-/is-typedarray-1.0.0.tgz",
+            "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
+            "license": "MIT"
+        },
+        "node_modules/isstream": {
+            "version": "0.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/isstream/-/isstream-0.1.2.tgz",
+            "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==",
+            "license": "MIT"
+        },
+        "node_modules/jsbn": {
+            "version": "0.1.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/jsbn/-/jsbn-0.1.1.tgz",
+            "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==",
+            "license": "MIT"
+        },
+        "node_modules/json-bigint": {
+            "version": "1.0.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/json-bigint/-/json-bigint-1.0.0.tgz",
+            "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
+            "license": "MIT",
+            "dependencies": {
+                "bignumber.js": "^9.0.0"
+            }
+        },
+        "node_modules/json-schema": {
+            "version": "0.4.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/json-schema/-/json-schema-0.4.0.tgz",
+            "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==",
+            "license": "(AFL-2.1 OR BSD-3-Clause)"
+        },
+        "node_modules/json-schema-traverse": {
+            "version": "0.4.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+            "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+            "license": "MIT"
+        },
+        "node_modules/json-stringify-safe": {
+            "version": "5.0.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
+            "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
+            "license": "ISC"
+        },
+        "node_modules/jsonwebtoken": {
+            "version": "8.5.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
+            "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
+            "license": "MIT",
+            "dependencies": {
+                "jws": "^3.2.2",
+                "lodash.includes": "^4.3.0",
+                "lodash.isboolean": "^3.0.3",
+                "lodash.isinteger": "^4.0.4",
+                "lodash.isnumber": "^3.0.3",
+                "lodash.isplainobject": "^4.0.6",
+                "lodash.isstring": "^4.0.1",
+                "lodash.once": "^4.0.0",
+                "ms": "^2.1.1",
+                "semver": "^5.6.0"
+            },
+            "engines": {
+                "node": ">=4",
+                "npm": ">=1.4.28"
+            }
+        },
+        "node_modules/jsprim": {
+            "version": "1.4.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/jsprim/-/jsprim-1.4.2.tgz",
+            "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==",
+            "license": "MIT",
+            "dependencies": {
+                "assert-plus": "1.0.0",
+                "extsprintf": "1.3.0",
+                "json-schema": "0.4.0",
+                "verror": "1.10.0"
+            },
+            "engines": {
+                "node": ">=0.6.0"
+            }
+        },
+        "node_modules/jwa": {
+            "version": "1.4.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/jwa/-/jwa-1.4.1.tgz",
+            "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
+            "license": "MIT",
+            "dependencies": {
+                "buffer-equal-constant-time": "1.0.1",
+                "ecdsa-sig-formatter": "1.0.11",
+                "safe-buffer": "^5.0.1"
+            }
+        },
+        "node_modules/jws": {
+            "version": "3.2.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/jws/-/jws-3.2.2.tgz",
+            "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
+            "license": "MIT",
+            "dependencies": {
+                "jwa": "^1.4.1",
+                "safe-buffer": "^5.0.1"
+            }
+        },
+        "node_modules/lodash": {
+            "version": "4.17.21",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash/-/lodash-4.17.21.tgz",
+            "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.clonedeep": {
+            "version": "4.5.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
+            "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.includes": {
+            "version": "4.3.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.includes/-/lodash.includes-4.3.0.tgz",
+            "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.isboolean": {
+            "version": "3.0.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
+            "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.isinteger": {
+            "version": "4.0.4",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
+            "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.isnumber": {
+            "version": "3.0.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
+            "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.isplainobject": {
+            "version": "4.0.6",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
+            "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.isstring": {
+            "version": "4.0.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
+            "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.merge": {
+            "version": "4.6.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.merge/-/lodash.merge-4.6.2.tgz",
+            "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.once": {
+            "version": "4.1.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.once/-/lodash.once-4.1.1.tgz",
+            "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.set": {
+            "version": "4.3.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.set/-/lodash.set-4.3.2.tgz",
+            "integrity": "sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg==",
+            "license": "MIT"
+        },
+        "node_modules/lodash.unset": {
+            "version": "4.5.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/lodash.unset/-/lodash.unset-4.5.2.tgz",
+            "integrity": "sha512-bwKX88k2JhCV9D1vtE8+naDKlLiGrSmf8zi/Y9ivFHwbmRfA8RxS/aVJ+sIht2XOwqoNr4xUPUkGZpc1sHFEKg==",
+            "license": "MIT"
+        },
+        "node_modules/long": {
+            "version": "4.0.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/long/-/long-4.0.0.tgz",
+            "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
+            "license": "Apache-2.0"
+        },
+        "node_modules/make-error": {
+            "version": "1.3.6",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/make-error/-/make-error-1.3.6.tgz",
+            "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
+            "license": "ISC"
+        },
+        "node_modules/mime-db": {
+            "version": "1.52.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/mime-db/-/mime-db-1.52.0.tgz",
+            "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+            "license": "MIT",
+            "engines": {
+                "node": ">= 0.6"
+            }
+        },
+        "node_modules/mime-types": {
+            "version": "2.1.35",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/mime-types/-/mime-types-2.1.35.tgz",
+            "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+            "license": "MIT",
+            "dependencies": {
+                "mime-db": "1.52.0"
+            },
+            "engines": {
+                "node": ">= 0.6"
+            }
+        },
+        "node_modules/ms": {
+            "version": "2.1.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/ms/-/ms-2.1.3.tgz",
+            "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+            "license": "MIT"
+        },
+        "node_modules/oauth-sign": {
+            "version": "0.9.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/oauth-sign/-/oauth-sign-0.9.0.tgz",
+            "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
+            "license": "Apache-2.0",
+            "engines": {
+                "node": "*"
+            }
+        },
+        "node_modules/object-inspect": {
+            "version": "1.13.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/object-inspect/-/object-inspect-1.13.1.tgz",
+            "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
+            "license": "MIT",
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/performance-now": {
+            "version": "2.1.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/performance-now/-/performance-now-2.1.0.tgz",
+            "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==",
+            "license": "MIT"
+        },
+        "node_modules/protobufjs": {
+            "version": "6.11.4",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/protobufjs/-/protobufjs-6.11.4.tgz",
+            "integrity": "sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==",
+            "hasInstallScript": true,
+            "license": "BSD-3-Clause",
+            "dependencies": {
+                "@protobufjs/aspromise": "^1.1.2",
+                "@protobufjs/base64": "^1.1.2",
+                "@protobufjs/codegen": "^2.0.4",
+                "@protobufjs/eventemitter": "^1.1.0",
+                "@protobufjs/fetch": "^1.1.0",
+                "@protobufjs/float": "^1.0.2",
+                "@protobufjs/inquire": "^1.1.0",
+                "@protobufjs/path": "^1.1.2",
+                "@protobufjs/pool": "^1.1.0",
+                "@protobufjs/utf8": "^1.1.0",
+                "@types/long": "^4.0.1",
+                "@types/node": ">=13.7.0",
+                "long": "^4.0.0"
+            },
+            "bin": {
+                "pbjs": "bin/pbjs",
+                "pbts": "bin/pbts"
+            }
+        },
+        "node_modules/psl": {
+            "version": "1.9.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/psl/-/psl-1.9.0.tgz",
+            "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==",
+            "license": "MIT"
+        },
+        "node_modules/punycode": {
+            "version": "2.3.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/punycode/-/punycode-2.3.1.tgz",
+            "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+            "license": "MIT",
+            "engines": {
+                "node": ">=6"
+            }
+        },
+        "node_modules/qs": {
+            "version": "6.5.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/qs/-/qs-6.5.3.tgz",
+            "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
+            "license": "BSD-3-Clause",
+            "engines": {
+                "node": ">=0.6"
+            }
+        },
+        "node_modules/request": {
+            "version": "2.88.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/request/-/request-2.88.2.tgz",
+            "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
+            "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
+            "license": "Apache-2.0",
+            "dependencies": {
+                "aws-sign2": "~0.7.0",
+                "aws4": "^1.8.0",
+                "caseless": "~0.12.0",
+                "combined-stream": "~1.0.6",
+                "extend": "~3.0.2",
+                "forever-agent": "~0.6.1",
+                "form-data": "~2.3.2",
+                "har-validator": "~5.1.3",
+                "http-signature": "~1.2.0",
+                "is-typedarray": "~1.0.0",
+                "isstream": "~0.1.2",
+                "json-stringify-safe": "~5.0.1",
+                "mime-types": "~2.1.19",
+                "oauth-sign": "~0.9.0",
+                "performance-now": "^2.1.0",
+                "qs": "~6.5.2",
+                "safe-buffer": "^5.1.2",
+                "tough-cookie": "~2.5.0",
+                "tunnel-agent": "^0.6.0",
+                "uuid": "^3.3.2"
+            },
+            "engines": {
+                "node": ">= 6"
+            }
+        },
+        "node_modules/request-promise": {
+            "version": "4.2.6",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/request-promise/-/request-promise-4.2.6.tgz",
+            "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==",
+            "deprecated": "request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142",
+            "license": "ISC",
+            "dependencies": {
+                "bluebird": "^3.5.0",
+                "request-promise-core": "1.1.4",
+                "stealthy-require": "^1.1.1",
+                "tough-cookie": "^2.3.3"
+            },
+            "engines": {
+                "node": ">=0.10.0"
+            },
+            "peerDependencies": {
+                "request": "^2.34"
+            }
+        },
+        "node_modules/request-promise-core": {
+            "version": "1.1.4",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/request-promise-core/-/request-promise-core-1.1.4.tgz",
+            "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==",
+            "license": "ISC",
+            "dependencies": {
+                "lodash": "^4.17.19"
+            },
+            "engines": {
+                "node": ">=0.10.0"
+            },
+            "peerDependencies": {
+                "request": "^2.34"
+            }
+        },
+        "node_modules/retry": {
+            "version": "0.12.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/retry/-/retry-0.12.0.tgz",
+            "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==",
+            "license": "MIT",
+            "engines": {
+                "node": ">= 4"
+            }
+        },
+        "node_modules/safe-buffer": {
+            "version": "5.2.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/safe-buffer/-/safe-buffer-5.2.1.tgz",
+            "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+            "funding": [
+                {
+                    "type": "github",
+                    "url": "https://github.com/sponsors/feross"
+                },
+                {
+                    "type": "patreon",
+                    "url": "https://www.patreon.com/feross"
+                },
+                {
+                    "type": "consulting",
+                    "url": "https://feross.org/support"
+                }
+            ],
+            "license": "MIT"
+        },
+        "node_modules/safer-buffer": {
+            "version": "2.1.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/safer-buffer/-/safer-buffer-2.1.2.tgz",
+            "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+            "license": "MIT"
+        },
+        "node_modules/sax": {
+            "version": "1.3.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/sax/-/sax-1.3.0.tgz",
+            "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==",
+            "license": "ISC"
+        },
+        "node_modules/semver": {
+            "version": "5.7.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/semver/-/semver-5.7.2.tgz",
+            "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
+            "license": "ISC",
+            "bin": {
+                "semver": "bin/semver"
+            }
+        },
+        "node_modules/set-function-length": {
+            "version": "1.2.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/set-function-length/-/set-function-length-1.2.0.tgz",
+            "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==",
+            "license": "MIT",
+            "dependencies": {
+                "define-data-property": "^1.1.1",
+                "function-bind": "^1.1.2",
+                "get-intrinsic": "^1.2.2",
+                "gopd": "^1.0.1",
+                "has-property-descriptors": "^1.0.1"
+            },
+            "engines": {
+                "node": ">= 0.4"
+            }
+        },
+        "node_modules/side-channel": {
+            "version": "1.0.4",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/side-channel/-/side-channel-1.0.4.tgz",
+            "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+            "license": "MIT",
+            "dependencies": {
+                "call-bind": "^1.0.0",
+                "get-intrinsic": "^1.0.2",
+                "object-inspect": "^1.9.0"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/source-map": {
+            "version": "0.6.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/source-map/-/source-map-0.6.1.tgz",
+            "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+            "license": "BSD-3-Clause",
+            "engines": {
+                "node": ">=0.10.0"
+            }
+        },
+        "node_modules/source-map-support": {
+            "version": "0.5.21",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/source-map-support/-/source-map-support-0.5.21.tgz",
+            "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+            "license": "MIT",
+            "dependencies": {
+                "buffer-from": "^1.0.0",
+                "source-map": "^0.6.0"
+            }
+        },
+        "node_modules/sshpk": {
+            "version": "1.18.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/sshpk/-/sshpk-1.18.0.tgz",
+            "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==",
+            "license": "MIT",
+            "dependencies": {
+                "asn1": "~0.2.3",
+                "assert-plus": "^1.0.0",
+                "bcrypt-pbkdf": "^1.0.0",
+                "dashdash": "^1.12.0",
+                "ecc-jsbn": "~0.1.1",
+                "getpass": "^0.1.1",
+                "jsbn": "~0.1.0",
+                "safer-buffer": "^2.0.2",
+                "tweetnacl": "~0.14.0"
+            },
+            "bin": {
+                "sshpk-conv": "bin/sshpk-conv",
+                "sshpk-sign": "bin/sshpk-sign",
+                "sshpk-verify": "bin/sshpk-verify"
+            },
+            "engines": {
+                "node": ">=0.10.0"
+            }
+        },
+        "node_modules/stealthy-require": {
+            "version": "1.1.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/stealthy-require/-/stealthy-require-1.1.1.tgz",
+            "integrity": "sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==",
+            "license": "ISC",
+            "engines": {
+                "node": ">=0.10.0"
+            }
+        },
+        "node_modules/tcb-admin-node": {
+            "version": "1.23.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/tcb-admin-node/-/tcb-admin-node-1.23.0.tgz",
+            "integrity": "sha512-SAbjTqMsSi63SId1BJ4kWdyGJzhxh9Tjvy3YXxcsoaAC2PtASn4UIYsBsiNEUfcn58QEn2tdvCvvf69WLLjjrg==",
+            "license": "MIT",
+            "dependencies": {
+                "@cloudbase/database": "0.9.15",
+                "@cloudbase/signature-nodejs": "^1.0.0-beta.0",
+                "is-regex": "^1.0.4",
+                "jsonwebtoken": "^8.5.1",
+                "lodash.merge": "^4.6.1",
+                "request": "^2.87.0",
+                "xml2js": "^0.4.19"
+            },
+            "engines": {
+                "node": ">=8.6.0"
+            }
+        },
+        "node_modules/tcb-admin-node/node_modules/@cloudbase/database": {
+            "version": "0.9.15",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/@cloudbase/database/-/database-0.9.15.tgz",
+            "integrity": "sha512-63e7iIl+van41B39Tw4ScNe9TRCt+5GHjc7q6i8NzkWBLC3U3KlbWo79YHsUHUPI79POpQ8UMlMVo7HXIAO3dg==",
+            "license": "ISC",
+            "dependencies": {
+                "bson": "^4.0.2",
+                "lodash.clonedeep": "4.5.0",
+                "lodash.set": "4.3.2",
+                "lodash.unset": "4.5.2"
+            }
+        },
+        "node_modules/tough-cookie": {
+            "version": "2.5.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/tough-cookie/-/tough-cookie-2.5.0.tgz",
+            "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
+            "license": "BSD-3-Clause",
+            "dependencies": {
+                "psl": "^1.1.28",
+                "punycode": "^2.1.1"
+            },
+            "engines": {
+                "node": ">=0.8"
+            }
+        },
+        "node_modules/ts-node": {
+            "version": "8.10.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/ts-node/-/ts-node-8.10.2.tgz",
+            "integrity": "sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA==",
+            "license": "MIT",
+            "dependencies": {
+                "arg": "^4.1.0",
+                "diff": "^4.0.1",
+                "make-error": "^1.1.1",
+                "source-map-support": "^0.5.17",
+                "yn": "3.1.1"
+            },
+            "bin": {
+                "ts-node": "dist/bin.js",
+                "ts-node-script": "dist/bin-script.js",
+                "ts-node-transpile-only": "dist/bin-transpile.js",
+                "ts-script": "dist/bin-script-deprecated.js"
+            },
+            "engines": {
+                "node": ">=6.0.0"
+            },
+            "peerDependencies": {
+                "typescript": ">=2.7"
+            }
+        },
+        "node_modules/tslib": {
+            "version": "1.14.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/tslib/-/tslib-1.14.1.tgz",
+            "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+            "license": "0BSD"
+        },
+        "node_modules/tunnel-agent": {
+            "version": "0.6.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
+            "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
+            "license": "Apache-2.0",
+            "dependencies": {
+                "safe-buffer": "^5.0.1"
+            },
+            "engines": {
+                "node": "*"
+            }
+        },
+        "node_modules/tweetnacl": {
+            "version": "0.14.5",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/tweetnacl/-/tweetnacl-0.14.5.tgz",
+            "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==",
+            "license": "Unlicense"
+        },
+        "node_modules/typescript": {
+            "version": "5.3.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/typescript/-/typescript-5.3.3.tgz",
+            "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
+            "license": "Apache-2.0",
+            "peer": true,
+            "bin": {
+                "tsc": "bin/tsc",
+                "tsserver": "bin/tsserver"
+            },
+            "engines": {
+                "node": ">=14.17"
+            }
+        },
+        "node_modules/undici-types": {
+            "version": "5.26.5",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/undici-types/-/undici-types-5.26.5.tgz",
+            "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+            "license": "MIT"
+        },
+        "node_modules/uri-js": {
+            "version": "4.4.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/uri-js/-/uri-js-4.4.1.tgz",
+            "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+            "license": "BSD-2-Clause",
+            "dependencies": {
+                "punycode": "^2.1.0"
+            }
+        },
+        "node_modules/url": {
+            "version": "0.11.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/url/-/url-0.11.3.tgz",
+            "integrity": "sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==",
+            "license": "MIT",
+            "dependencies": {
+                "punycode": "^1.4.1",
+                "qs": "^6.11.2"
+            }
+        },
+        "node_modules/url/node_modules/punycode": {
+            "version": "1.4.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/punycode/-/punycode-1.4.1.tgz",
+            "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==",
+            "license": "MIT"
+        },
+        "node_modules/url/node_modules/qs": {
+            "version": "6.11.2",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/qs/-/qs-6.11.2.tgz",
+            "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==",
+            "license": "BSD-3-Clause",
+            "dependencies": {
+                "side-channel": "^1.0.4"
+            },
+            "engines": {
+                "node": ">=0.6"
+            },
+            "funding": {
+                "url": "https://github.com/sponsors/ljharb"
+            }
+        },
+        "node_modules/uuid": {
+            "version": "3.4.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/uuid/-/uuid-3.4.0.tgz",
+            "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+            "deprecated": "Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.",
+            "license": "MIT",
+            "bin": {
+                "uuid": "bin/uuid"
+            }
+        },
+        "node_modules/verror": {
+            "version": "1.10.0",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/verror/-/verror-1.10.0.tgz",
+            "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==",
+            "engines": [
+                "node >=0.6.0"
+            ],
+            "license": "MIT",
+            "dependencies": {
+                "assert-plus": "^1.0.0",
+                "core-util-is": "1.0.2",
+                "extsprintf": "^1.2.0"
+            }
+        },
+        "node_modules/wx-server-sdk": {
+            "version": "2.6.3",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/wx-server-sdk/-/wx-server-sdk-2.6.3.tgz",
+            "integrity": "sha512-wCSAO94HScMVnalb4WVbOqjTyKxus4/jPYV41ct9liHXv/hGGlDqUWV1vb1icyQKXp+mSslvpBNNjYnZAM5MVA==",
+            "license": "MIT",
+            "dependencies": {
+                "@cloudbase/node-sdk": "2.9.1",
+                "json-bigint": "^1.0.0",
+                "protobufjs": "^6.8.8",
+                "tcb-admin-node": "latest",
+                "tslib": "^1.9.3"
+            }
+        },
+        "node_modules/xml2js": {
+            "version": "0.4.23",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/xml2js/-/xml2js-0.4.23.tgz",
+            "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
+            "license": "MIT",
+            "dependencies": {
+                "sax": ">=0.6.0",
+                "xmlbuilder": "~11.0.0"
+            },
+            "engines": {
+                "node": ">=4.0.0"
+            }
+        },
+        "node_modules/xmlbuilder": {
+            "version": "11.0.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
+            "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
+            "license": "MIT",
+            "engines": {
+                "node": ">=4.0"
+            }
+        },
+        "node_modules/yn": {
+            "version": "3.1.1",
+            "resolved": "https://repo.huaweicloud.com/repository/npm/yn/-/yn-3.1.1.tgz",
+            "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
+            "license": "MIT",
+            "engines": {
+                "node": ">=6"
+            }
+        }
+    }
+}

+ 9 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/.editorconfig

@@ -0,0 +1,9 @@
+root = true
+
+[!{node_modules}/**]
+end_of_line = lf
+charset = utf-8
+
+[{*.js,*.ts}]
+indent_style = space
+indent_size = 2

+ 1 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/.eslintignore

@@ -0,0 +1 @@
+dist/

+ 43 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/.eslintrc

@@ -0,0 +1,43 @@
+{
+  "extends": [
+    "prettier"
+  ],
+  "plugins": [
+    "typescript"
+  ],
+  "rules": {
+    "indent": [
+      "error",
+      2,
+      {
+          "SwitchCase": 1,
+          "flatTernaryExpressions": true
+      }
+    ],
+    "no-unused-vars": "warn",
+    "typescript/no-unused-vars": "warn",
+    "semi": [
+      "error",
+      "never"
+    ],
+    "quotes": [
+      "error",
+      "single",
+      {
+        "avoidEscape": true
+      }
+    ]
+  },
+  "env": {
+    "es6": true,
+    "node": true
+  },
+  "parser": "typescript-eslint-parser",
+  "parserOptions": {
+    "ecmaVersion": 2018,
+    "sourceType": "module",
+    "ecmaFeatures": {
+      "modules": true
+    }
+  }
+}

+ 29 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/.prettierrc.js

@@ -0,0 +1,29 @@
+module.exports = {
+  // 一行最多 100 字符
+  printWidth: 100,
+  // 使用 2 个空格缩进
+  tabWidth: 2,
+  // 不使用缩进符,而使用空格
+  useTabs: false,
+  // 行尾无分号
+  semi: false,
+  // 使用单引号
+  singleQuote: true,
+  // 对象的 key 仅在必要时用引号
+  quoteProps: 'as-needed',
+  // 末尾不需要逗号
+  trailingComma: 'none',
+  // 大括号内的首尾需要空格
+  bracketSpacing: true,
+  // 每个文件格式化的范围是文件的全部内容
+  rangeStart: 0,
+  rangeEnd: Infinity,
+  // 不需要写文件开头的 @prettier
+  requirePragma: false,
+  // 不需要自动在文件开头插入 @prettier
+  insertPragma: false,
+  // 使用默认的折行标准
+  proseWrap: 'preserve',
+  // 换行符使用 lf
+  endOfLine: 'lf'
+}

+ 119 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/README.md

@@ -0,0 +1,119 @@
+# @cloudbase/database
+
+[![NPM Version](https://img.shields.io/npm/v/@cloudbase/database.svg?style=flat)](https://www.npmjs.com/package/@cloudbase/database)
+[![](https://img.shields.io/npm/dt/@cloudbase/database.svg)](https://www.npmjs.com/package/@cloudbase/database)
+
+## 介绍
+
+提供 TCB JS SDK 操作数据库的接口。
+
+## 安装
+
+```
+yarn add @cloudbase/database
+```
+
+## 使用
+
+使用 `@cloudbase/database` 时,需要提供发送请求的类 `reqClass`。
+
+```js
+// index.js
+
+const database = require('@cloudbase/database/').Db;
+const Request = require('./request');
+
+class Tcb {
+  ...
+  database(dbConfig) {
+    database.reqClass = Request;
+    return new database(dbConfig);
+  }
+}
+```
+
+实现 `Request` 类,需要提供异步的 `send` 方法。
+
+```js
+// request.js
+
+// 进一步处理,鉴权等...
+const requestHandler = require('requestHandler')
+
+class Request {
+  constructor(config) {
+    this.config = config
+  }
+
+  async send(action, data) {
+    const params = Object.assign({}, data, {
+      action
+    })
+
+    const slowQueryWarning = setTimeout(() => {
+      console.warn(
+        'Database operation is longer than 3s. Please check query performance and your network environment.'
+      )
+    }, 3000)
+
+    try {
+      return await requestHandler({
+        timeout: this.config.timeout,
+        config: this.config.config,
+        params,
+        method: 'post',
+        headers: {
+          'content-type': 'application/json'
+        }
+      })
+    } finally {
+      clearTimeout(slowQueryWarning)
+    }
+  }
+}
+
+module.exports = Request
+```
+
+请求数据样例
+
+```json
+{
+  "url": "https://tcb-admin.tencentcloudapi.com/admin?eventId=1554896261428_92044",
+  "method": "post",
+  "timeout": 15000,
+  "headers": { "user-agent": "tcb-admin-sdk/1.4.6", "content-type": "application/json" },
+  "body": {
+    "collectionName": "coll-1",
+    "action": "database.addCollection",
+    "envName": "base-830cab",
+    "timestamp": 1554896261428,
+    "eventId": "1554896261428_92044",
+    "authorization": "q-sign-algorithm=sha1&q-ak=xxx&q-sign-time=1554896260;1554897160&q-key-time=1554896260;1554897160&q-header-list=content-type;user-agent&q-url-param-list=action;collectionname;envname;eventid;timestamp&q-signature=xxxxx",
+    "sdk_version": "1.4.6"
+  },
+  "json": true
+}
+```
+
+## 开发指南
+
+### 注意
+
+当前 database 库是通过分支来控制了两个不同的版本,主干版提供给@cloudbase/js-sdk 库使用,feature/support_db_2.0 分支提供给@cloudbase/node-sdk 库使用。
+
+两个分支区别:
+support_db_2.0 分支进行了数据库接口的升级,将原有的 json 协议转换为 mongo 支持的 bson 协议处理,目的是解决旧接口存在的问题,描述如下
+
+- 日期对象 是走约定协议处理,即转换为 {$date: timestamp},这种方式应摒弃(EJSON 协议可解决)
+- 无法支持 null, NaN 等特殊类型处理(EJSON 协议可解决)
+- serverDate 这种自定义类型的实现,是继续保留 还是摒弃
+- 接口实现混杂,普通 CRUD 接口均走 flexdb,而聚合,事务又用 runcommand 方式
+- 原插入文档接口返回 docId 形式混杂
+
+目前仅针对服务端 sdk @cloudbase/node-sdk 完成了升级,而客户端 sdk @cloudbase/js-sdk 以及 小程序端 SDK 仍保留为旧接口形式。
+
+### 开发及发布事项
+
+1. 数据库接口的改动务必补充测试用例验证
+2. 发布时,约定 feature/support_db_2.0 分支上发布正式版(for @cloudbase/node-sdk)使用,master 分支上发布 beta 版 (for @cloudbase/js-sdk)使用。两 sdk 均通过锁版本方式依赖该库,不会受自动更新依赖影响。

+ 11 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/ObjectId/index.d.ts

@@ -0,0 +1,11 @@
+export declare class ObjectId {
+    id: string;
+    constructor({ id }?: {
+        id?: string;
+    });
+    readonly _internalType: import("../utils/symbol").InternalSymbol;
+    parse(): {
+        $oid: string;
+    };
+}
+export declare function ObjectIdConstructor(opt: any): ObjectId;

+ 21 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/ObjectId/index.js

@@ -0,0 +1,21 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const symbol_1 = require("../helper/symbol");
+class ObjectId {
+    constructor({ id = '' } = {}) {
+        this.id = id;
+    }
+    get _internalType() {
+        return symbol_1.SYMBOL_OBJECTID;
+    }
+    parse() {
+        return {
+            $oid: this.id
+        };
+    }
+}
+exports.ObjectId = ObjectId;
+function ObjectIdConstructor(opt) {
+    return new ObjectId(opt);
+}
+exports.ObjectIdConstructor = ObjectIdConstructor;

+ 29 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/aggregate.d.ts

@@ -0,0 +1,29 @@
+export default class Aggregation {
+    _db: any;
+    _request: any;
+    _stages: any[];
+    _collectionName: string;
+    constructor(db?: any, collectionName?: any, rawPipeline?: any);
+    end(): Promise<any>;
+    unwrap(): any[];
+    done(): {
+        [x: number]: any;
+    }[];
+    _pipe(stage: any, param: any, raw?: boolean): this;
+    addFields(param: any): this;
+    bucket(param: any): this;
+    bucketAuto(param: any): this;
+    count(param: any): this;
+    geoNear(param: any): this;
+    group(param: any): this;
+    limit(param: any): this;
+    match(param: any): this;
+    project(param: any): this;
+    lookup(param: any): this;
+    replaceRoot(param: any): this;
+    sample(param: any): this;
+    skip(param: any): this;
+    sort(param: any): this;
+    sortByCount(param: any): this;
+    unwind(param: any): this;
+}

+ 124 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/aggregate.js

@@ -0,0 +1,124 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const index_1 = require("./index");
+const bson_1 = require("bson");
+const query_1 = require("./serializer/query");
+const utils_1 = require("./utils/utils");
+const type_1 = require("./utils/type");
+const validate_1 = require("./validate");
+const point_1 = require("./geo/point");
+class Aggregation {
+    constructor(db, collectionName, rawPipeline) {
+        this._stages = [];
+        if (db && collectionName) {
+            this._db = db;
+            this._request = new index_1.Db.reqClass(this._db.config);
+            this._collectionName = collectionName;
+            if (rawPipeline && rawPipeline.length > 0) {
+                rawPipeline.forEach((stage) => {
+                    validate_1.Validate.isValidAggregation(stage);
+                    const stageName = Object.keys(stage)[0];
+                    this._pipe(stageName, stage[stageName], true);
+                });
+            }
+        }
+    }
+    async end() {
+        if (!this._collectionName || !this._db) {
+            throw new Error('Aggregation pipeline cannot send request');
+        }
+        const result = await this._request.send('database.aggregateDocuments', {
+            collectionName: this._collectionName,
+            stages: this._stages
+        });
+        if (result && result.data && result.data.list) {
+            return {
+                requestId: result.requestId,
+                data: result.data.list.map(bson_1.EJSON.parse)
+            };
+        }
+        return result;
+    }
+    unwrap() {
+        return this._stages;
+    }
+    done() {
+        return this._stages.map(({ stageKey, stageValue }) => {
+            return {
+                [stageKey]: JSON.parse(stageValue)
+            };
+        });
+    }
+    _pipe(stage, param, raw = false) {
+        let transformParam = '';
+        if (type_1.getType(param) === 'object') {
+            transformParam = utils_1.stringifyByEJSON(param);
+        }
+        else {
+            transformParam = JSON.stringify(param);
+        }
+        this._stages.push({
+            stageKey: raw ? stage : `$${stage}`,
+            stageValue: transformParam
+        });
+        return this;
+    }
+    addFields(param) {
+        return this._pipe('addFields', param);
+    }
+    bucket(param) {
+        return this._pipe('bucket', param);
+    }
+    bucketAuto(param) {
+        return this._pipe('bucketAuto', param);
+    }
+    count(param) {
+        return this._pipe('count', param);
+    }
+    geoNear(param) {
+        if (param.query) {
+            param.query = query_1.QuerySerializer.encode(param.query);
+        }
+        if (param.distanceMultiplier && typeof (param.distanceMultiplier) === 'number') {
+            param.distanceMultiplier = param.distanceMultiplier;
+        }
+        if (param.near) {
+            param.near = new point_1.Point(param.near.longitude, param.near.latitude).toJSON();
+        }
+        return this._pipe('geoNear', param);
+    }
+    group(param) {
+        return this._pipe('group', param);
+    }
+    limit(param) {
+        return this._pipe('limit', param);
+    }
+    match(param) {
+        return this._pipe('match', query_1.QuerySerializer.encode(param));
+    }
+    project(param) {
+        return this._pipe('project', param);
+    }
+    lookup(param) {
+        return this._pipe('lookup', param);
+    }
+    replaceRoot(param) {
+        return this._pipe('replaceRoot', param);
+    }
+    sample(param) {
+        return this._pipe('sample', param);
+    }
+    skip(param) {
+        return this._pipe('skip', param);
+    }
+    sort(param) {
+        return this._pipe('sort', param);
+    }
+    sortByCount(param) {
+        return this._pipe('sortByCount', param);
+    }
+    unwind(param) {
+        return this._pipe('unwind', param);
+    }
+}
+exports.default = Aggregation;

+ 17 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/collection.d.ts

@@ -0,0 +1,17 @@
+import { DocumentReference } from './document';
+import { Query, QueryOption, UpdateOption } from './query';
+import Aggregation from './aggregate';
+export declare class CollectionReference extends Query {
+    protected _transactionId: string;
+    readonly name: string;
+    doc(docID: string | number): DocumentReference;
+    add(data: any): Promise<{
+        ids?: string[];
+        id?: string;
+        inserted?: number;
+        ok?: number;
+        requestId: string;
+    }>;
+    aggregate(rawPipeline?: object[]): Aggregation;
+    options(apiOptions: QueryOption | UpdateOption): CollectionReference;
+}

+ 72 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/collection.js

@@ -0,0 +1,72 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const document_1 = require("./document");
+const query_1 = require("./query");
+const aggregate_1 = require("./aggregate");
+const datatype_1 = require("./serializer/datatype");
+const utils_1 = require("./utils/utils");
+const validate_1 = require("./validate");
+const type_1 = require("./utils/type");
+class CollectionReference extends query_1.Query {
+    constructor(db, coll, apiOptions, transactionId) {
+        super(db, coll, '', apiOptions, transactionId);
+        if (transactionId) {
+            this._transactionId = transactionId;
+        }
+    }
+    get name() {
+        return this._coll;
+    }
+    doc(docID) {
+        if (typeof docID !== 'string' && typeof docID !== 'number') {
+            throw new Error('docId必须为字符串或数字');
+        }
+        return new document_1.DocumentReference(this._db, this._coll, this._apiOptions, docID, this._transactionId);
+    }
+    async add(data) {
+        let transformData = data;
+        if (!type_1.isArray(data)) {
+            transformData = [data];
+        }
+        transformData = transformData.map(item => {
+            return utils_1.stringifyByEJSON(datatype_1.serialize(item));
+        });
+        let params = {
+            collectionName: this._coll,
+            data: transformData
+        };
+        if (this._transactionId) {
+            params.transactionId = this._transactionId;
+        }
+        const res = await this._request.send('database.insertDocument', params, utils_1.getReqOpts(this._apiOptions));
+        if (res.code) {
+            return res;
+        }
+        if (!type_1.isArray(data)) {
+            if (this._transactionId) {
+                return {
+                    inserted: 1,
+                    ok: 1,
+                    id: res.data.insertedIds[0],
+                    requestId: res.requestId
+                };
+            }
+            return {
+                id: res.data.insertedIds[0],
+                requestId: res.requestId
+            };
+        }
+        return {
+            ids: res.data.insertedIds,
+            requestId: res.requestId
+        };
+    }
+    aggregate(rawPipeline = []) {
+        return new aggregate_1.default(this._db, this._coll, (this._apiOptions.raw || false) ? rawPipeline : []);
+    }
+    options(apiOptions) {
+        validate_1.Validate.isValidOptions(apiOptions);
+        return new CollectionReference(this._db, this._coll, apiOptions, this._transactionId);
+    }
+}
+exports.CollectionReference = CollectionReference;

+ 175 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/command.d.ts

@@ -0,0 +1,175 @@
+import { QueryCommand } from './commands/query';
+import { LogicCommand } from './commands/logic';
+import { UpdateCommand } from './commands/update';
+import Aggregation from './aggregate';
+export declare type IQueryCondition = Record<string, any> | LogicCommand;
+export declare const Command: {
+    eq(val: any): QueryCommand;
+    neq(val: any): QueryCommand;
+    lt(val: any): QueryCommand;
+    lte(val: any): QueryCommand;
+    gt(val: any): QueryCommand;
+    gte(val: any): QueryCommand;
+    in(val: any): QueryCommand;
+    nin(val: any): QueryCommand;
+    all(val: any): QueryCommand;
+    elemMatch(val: any): QueryCommand;
+    exists(val: boolean): QueryCommand;
+    size(val: number): QueryCommand;
+    mod(): QueryCommand;
+    geoNear(val: any): QueryCommand;
+    geoWithin(val: any): QueryCommand;
+    geoIntersects(val: any): QueryCommand;
+    and(...__expressions__: import("./serializer/datatype").IQueryCondition[]): LogicCommand;
+    nor(...__expressions__: import("./serializer/datatype").IQueryCondition[]): LogicCommand;
+    or(...__expressions__: import("./serializer/datatype").IQueryCondition[]): LogicCommand;
+    not(...__expressions__: import("./serializer/datatype").IQueryCondition[]): LogicCommand;
+    set(val: any): UpdateCommand;
+    remove(): UpdateCommand;
+    inc(val: number): UpdateCommand;
+    mul(val: number): UpdateCommand;
+    push(...args: any[]): UpdateCommand;
+    pull(values: any): UpdateCommand;
+    pullAll(values: any): UpdateCommand;
+    pop(): UpdateCommand;
+    shift(): UpdateCommand;
+    unshift(...__values__: any[]): UpdateCommand;
+    addToSet(values: any): UpdateCommand;
+    rename(values: any): UpdateCommand;
+    bit(values: any): UpdateCommand;
+    max(values: any): UpdateCommand;
+    min(values: any): UpdateCommand;
+    expr(values: AggregationOperator): {
+        $expr: AggregationOperator;
+    };
+    jsonSchema(schema: any): {
+        $jsonSchema: any;
+    };
+    text(values: string | {
+        search: string;
+        language?: string;
+        caseSensitive?: boolean;
+        diacriticSensitive: boolean;
+    }): {
+        $search: {
+            (regexp: string | RegExp): number;
+            (searcher: {
+                [Symbol.search](string: string): number;
+            }): number;
+        };
+        $language?: undefined;
+        $caseSensitive?: undefined;
+        $diacriticSensitive?: undefined;
+    } | {
+        $search: string;
+        $language: string;
+        $caseSensitive: boolean;
+        $diacriticSensitive: boolean;
+    };
+    aggregate: {
+        pipeline(): Aggregation;
+        abs: (param: any) => AggregationOperator;
+        add: (param: any) => AggregationOperator;
+        ceil: (param: any) => AggregationOperator;
+        divide: (param: any) => AggregationOperator;
+        exp: (param: any) => AggregationOperator;
+        floor: (param: any) => AggregationOperator;
+        ln: (param: any) => AggregationOperator;
+        log: (param: any) => AggregationOperator;
+        log10: (param: any) => AggregationOperator;
+        mod: (param: any) => AggregationOperator;
+        multiply: (param: any) => AggregationOperator;
+        pow: (param: any) => AggregationOperator;
+        sqrt: (param: any) => AggregationOperator;
+        subtract: (param: any) => AggregationOperator;
+        trunc: (param: any) => AggregationOperator;
+        arrayElemAt: (param: any) => AggregationOperator;
+        arrayToObject: (param: any) => AggregationOperator;
+        concatArrays: (param: any) => AggregationOperator;
+        filter: (param: any) => AggregationOperator;
+        in: (param: any) => AggregationOperator;
+        indexOfArray: (param: any) => AggregationOperator;
+        isArray: (param: any) => AggregationOperator;
+        map: (param: any) => AggregationOperator;
+        range: (param: any) => AggregationOperator;
+        reduce: (param: any) => AggregationOperator;
+        reverseArray: (param: any) => AggregationOperator;
+        size: (param: any) => AggregationOperator;
+        slice: (param: any) => AggregationOperator;
+        zip: (param: any) => AggregationOperator;
+        and: (param: any) => AggregationOperator;
+        not: (param: any) => AggregationOperator;
+        or: (param: any) => AggregationOperator;
+        cmp: (param: any) => AggregationOperator;
+        eq: (param: any) => AggregationOperator;
+        gt: (param: any) => AggregationOperator;
+        gte: (param: any) => AggregationOperator;
+        lt: (param: any) => AggregationOperator;
+        lte: (param: any) => AggregationOperator;
+        neq: (param: any) => AggregationOperator;
+        cond: (param: any) => AggregationOperator;
+        ifNull: (param: any) => AggregationOperator;
+        switch: (param: any) => AggregationOperator;
+        dateFromParts: (param: any) => AggregationOperator;
+        dateFromString: (param: any) => AggregationOperator;
+        dayOfMonth: (param: any) => AggregationOperator;
+        dayOfWeek: (param: any) => AggregationOperator;
+        dayOfYear: (param: any) => AggregationOperator;
+        isoDayOfWeek: (param: any) => AggregationOperator;
+        isoWeek: (param: any) => AggregationOperator;
+        isoWeekYear: (param: any) => AggregationOperator;
+        millisecond: (param: any) => AggregationOperator;
+        minute: (param: any) => AggregationOperator;
+        month: (param: any) => AggregationOperator;
+        second: (param: any) => AggregationOperator;
+        hour: (param: any) => AggregationOperator;
+        week: (param: any) => AggregationOperator;
+        year: (param: any) => AggregationOperator;
+        literal: (param: any) => AggregationOperator;
+        mergeObjects: (param: any) => AggregationOperator;
+        objectToArray: (param: any) => AggregationOperator;
+        allElementsTrue: (param: any) => AggregationOperator;
+        anyElementTrue: (param: any) => AggregationOperator;
+        setDifference: (param: any) => AggregationOperator;
+        setEquals: (param: any) => AggregationOperator;
+        setIntersection: (param: any) => AggregationOperator;
+        setIsSubset: (param: any) => AggregationOperator;
+        setUnion: (param: any) => AggregationOperator;
+        concat: (param: any) => AggregationOperator;
+        dateToString: (param: any) => AggregationOperator;
+        indexOfBytes: (param: any) => AggregationOperator;
+        indexOfCP: (param: any) => AggregationOperator;
+        split: (param: any) => AggregationOperator;
+        strLenBytes: (param: any) => AggregationOperator;
+        strLenCP: (param: any) => AggregationOperator;
+        strcasecmp: (param: any) => AggregationOperator;
+        substr: (param: any) => AggregationOperator;
+        substrBytes: (param: any) => AggregationOperator;
+        substrCP: (param: any) => AggregationOperator;
+        toLower: (param: any) => AggregationOperator;
+        toUpper: (param: any) => AggregationOperator;
+        meta: (param: any) => AggregationOperator;
+        addToSet: (param: any) => AggregationOperator;
+        avg: (param: any) => AggregationOperator;
+        first: (param: any) => AggregationOperator;
+        last: (param: any) => AggregationOperator;
+        max: (param: any) => AggregationOperator;
+        min: (param: any) => AggregationOperator;
+        push: (param: any) => AggregationOperator;
+        stdDevPop: (param: any) => AggregationOperator;
+        stdDevSamp: (param: any) => AggregationOperator;
+        sum: (param: any) => AggregationOperator;
+        let: (param: any) => AggregationOperator;
+    };
+    project: {
+        slice: (param: any) => ProjectionOperator;
+        elemMatch: (param: any) => ProjectionOperator;
+    };
+};
+export declare class AggregationOperator {
+    constructor(name: any, param: any);
+}
+export declare class ProjectionOperator {
+    constructor(name: any, param: any);
+}
+export default Command;

+ 285 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/command.js

@@ -0,0 +1,285 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const query_1 = require("./commands/query");
+const logic_1 = require("./commands/logic");
+const update_1 = require("./commands/update");
+const type_1 = require("./utils/type");
+const aggregate_1 = require("./aggregate");
+exports.Command = {
+    eq(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.EQ, [val]);
+    },
+    neq(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.NEQ, [val]);
+    },
+    lt(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.LT, [val]);
+    },
+    lte(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.LTE, [val]);
+    },
+    gt(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.GT, [val]);
+    },
+    gte(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.GTE, [val]);
+    },
+    in(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.IN, val);
+    },
+    nin(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.NIN, val);
+    },
+    all(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.ALL, val);
+    },
+    elemMatch(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.ELEM_MATCH, [val]);
+    },
+    exists(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.EXISTS, [val]);
+    },
+    size(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.SIZE, [val]);
+    },
+    mod() {
+        if (arguments.length == 1)
+            return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.MOD, [arguments[0]]);
+        if (arguments.length == 2)
+            return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.MOD, [[arguments[0], arguments[1]]]);
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.MOD, arguments);
+    },
+    geoNear(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.GEO_NEAR, [val]);
+    },
+    geoWithin(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.GEO_WITHIN, [val]);
+    },
+    geoIntersects(val) {
+        return new query_1.QueryCommand(query_1.QUERY_COMMANDS_LITERAL.GEO_INTERSECTS, [val]);
+    },
+    and(...__expressions__) {
+        const expressions = type_1.isArray(arguments[0]) ? arguments[0] : Array.from(arguments);
+        return new logic_1.LogicCommand(logic_1.LOGIC_COMMANDS_LITERAL.AND, expressions);
+    },
+    nor(...__expressions__) {
+        const expressions = type_1.isArray(arguments[0]) ? arguments[0] : Array.from(arguments);
+        return new logic_1.LogicCommand(logic_1.LOGIC_COMMANDS_LITERAL.NOR, expressions);
+    },
+    or(...__expressions__) {
+        const expressions = type_1.isArray(arguments[0]) ? arguments[0] : Array.from(arguments);
+        return new logic_1.LogicCommand(logic_1.LOGIC_COMMANDS_LITERAL.OR, expressions);
+    },
+    not(...__expressions__) {
+        const expressions = type_1.isArray(arguments[0]) ? arguments[0] : Array.from(arguments);
+        return new logic_1.LogicCommand(logic_1.LOGIC_COMMANDS_LITERAL.NOT, expressions);
+    },
+    set(val) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.SET, [val]);
+    },
+    remove() {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.REMOVE, []);
+    },
+    inc(val) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.INC, [val]);
+    },
+    mul(val) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.MUL, [val]);
+    },
+    push(...args) {
+        let values;
+        if (type_1.isObject(args[0]) && args[0].hasOwnProperty('each')) {
+            values = {};
+            const options = args[0];
+            if (options.each !== undefined) {
+                values['$each'] = options.each;
+            }
+            if (options.position !== undefined) {
+                values['$position'] = options.position;
+            }
+            if (options.sort !== undefined) {
+                values['$sort'] = options.sort;
+            }
+            if (options.slice !== undefined) {
+                values['$slice'] = options.slice;
+            }
+        }
+        else if (type_1.isArray(args[0])) {
+            values = args[0];
+        }
+        else {
+            values = Array.from(args);
+        }
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.PUSH, values);
+    },
+    pull(values) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.PULL, values);
+    },
+    pullAll(values) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.PULL_ALL, values);
+    },
+    pop() {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.POP, []);
+    },
+    shift() {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.SHIFT, []);
+    },
+    unshift(...__values__) {
+        const values = type_1.isArray(arguments[0]) ? arguments[0] : Array.from(arguments);
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.UNSHIFT, values);
+    },
+    addToSet(values) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.ADD_TO_SET, values);
+    },
+    rename(values) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.RENAME, [values]);
+    },
+    bit(values) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.BIT, [values]);
+    },
+    max(values) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.MAX, [values]);
+    },
+    min(values) {
+        return new update_1.UpdateCommand(update_1.UPDATE_COMMANDS_LITERAL.MIN, [values]);
+    },
+    expr(values) {
+        return {
+            $expr: values
+        };
+    },
+    jsonSchema(schema) {
+        return {
+            $jsonSchema: schema
+        };
+    },
+    text(values) {
+        if (type_1.isString(values)) {
+            return {
+                $search: values.search
+            };
+        }
+        else {
+            return {
+                $search: values.search,
+                $language: values.language,
+                $caseSensitive: values.caseSensitive,
+                $diacriticSensitive: values.diacriticSensitive
+            };
+        }
+    },
+    aggregate: {
+        pipeline() {
+            return new aggregate_1.default();
+        },
+        abs: param => new AggregationOperator('abs', param),
+        add: param => new AggregationOperator('add', param),
+        ceil: param => new AggregationOperator('ceil', param),
+        divide: param => new AggregationOperator('divide', param),
+        exp: param => new AggregationOperator('exp', param),
+        floor: param => new AggregationOperator('floor', param),
+        ln: param => new AggregationOperator('ln', param),
+        log: param => new AggregationOperator('log', param),
+        log10: param => new AggregationOperator('log10', param),
+        mod: param => new AggregationOperator('mod', param),
+        multiply: param => new AggregationOperator('multiply', param),
+        pow: param => new AggregationOperator('pow', param),
+        sqrt: param => new AggregationOperator('sqrt', param),
+        subtract: param => new AggregationOperator('subtract', param),
+        trunc: param => new AggregationOperator('trunc', param),
+        arrayElemAt: param => new AggregationOperator('arrayElemAt', param),
+        arrayToObject: param => new AggregationOperator('arrayToObject', param),
+        concatArrays: param => new AggregationOperator('concatArrays', param),
+        filter: param => new AggregationOperator('filter', param),
+        in: param => new AggregationOperator('in', param),
+        indexOfArray: param => new AggregationOperator('indexOfArray', param),
+        isArray: param => new AggregationOperator('isArray', param),
+        map: param => new AggregationOperator('map', param),
+        range: param => new AggregationOperator('range', param),
+        reduce: param => new AggregationOperator('reduce', param),
+        reverseArray: param => new AggregationOperator('reverseArray', param),
+        size: param => new AggregationOperator('size', param),
+        slice: param => new AggregationOperator('slice', param),
+        zip: param => new AggregationOperator('zip', param),
+        and: param => new AggregationOperator('and', param),
+        not: param => new AggregationOperator('not', param),
+        or: param => new AggregationOperator('or', param),
+        cmp: param => new AggregationOperator('cmp', param),
+        eq: param => new AggregationOperator('eq', param),
+        gt: param => new AggregationOperator('gt', param),
+        gte: param => new AggregationOperator('gte', param),
+        lt: param => new AggregationOperator('lt', param),
+        lte: param => new AggregationOperator('lte', param),
+        neq: param => new AggregationOperator('ne', param),
+        cond: param => new AggregationOperator('cond', param),
+        ifNull: param => new AggregationOperator('ifNull', param),
+        switch: param => new AggregationOperator('switch', param),
+        dateFromParts: param => new AggregationOperator('dateFromParts', param),
+        dateFromString: param => new AggregationOperator('dateFromString', param),
+        dayOfMonth: param => new AggregationOperator('dayOfMonth', param),
+        dayOfWeek: param => new AggregationOperator('dayOfWeek', param),
+        dayOfYear: param => new AggregationOperator('dayOfYear', param),
+        isoDayOfWeek: param => new AggregationOperator('isoDayOfWeek', param),
+        isoWeek: param => new AggregationOperator('isoWeek', param),
+        isoWeekYear: param => new AggregationOperator('isoWeekYear', param),
+        millisecond: param => new AggregationOperator('millisecond', param),
+        minute: param => new AggregationOperator('minute', param),
+        month: param => new AggregationOperator('month', param),
+        second: param => new AggregationOperator('second', param),
+        hour: param => new AggregationOperator('hour', param),
+        week: param => new AggregationOperator('week', param),
+        year: param => new AggregationOperator('year', param),
+        literal: param => new AggregationOperator('literal', param),
+        mergeObjects: param => new AggregationOperator('mergeObjects', param),
+        objectToArray: param => new AggregationOperator('objectToArray', param),
+        allElementsTrue: param => new AggregationOperator('allElementsTrue', param),
+        anyElementTrue: param => new AggregationOperator('anyElementTrue', param),
+        setDifference: param => new AggregationOperator('setDifference', param),
+        setEquals: param => new AggregationOperator('setEquals', param),
+        setIntersection: param => new AggregationOperator('setIntersection', param),
+        setIsSubset: param => new AggregationOperator('setIsSubset', param),
+        setUnion: param => new AggregationOperator('setUnion', param),
+        concat: param => new AggregationOperator('concat', param),
+        dateToString: param => new AggregationOperator('dateToString', param),
+        indexOfBytes: param => new AggregationOperator('indexOfBytes', param),
+        indexOfCP: param => new AggregationOperator('indexOfCP', param),
+        split: param => new AggregationOperator('split', param),
+        strLenBytes: param => new AggregationOperator('strLenBytes', param),
+        strLenCP: param => new AggregationOperator('strLenCP', param),
+        strcasecmp: param => new AggregationOperator('strcasecmp', param),
+        substr: param => new AggregationOperator('substr', param),
+        substrBytes: param => new AggregationOperator('substrBytes', param),
+        substrCP: param => new AggregationOperator('substrCP', param),
+        toLower: param => new AggregationOperator('toLower', param),
+        toUpper: param => new AggregationOperator('toUpper', param),
+        meta: param => new AggregationOperator('meta', param),
+        addToSet: param => new AggregationOperator('addToSet', param),
+        avg: param => new AggregationOperator('avg', param),
+        first: param => new AggregationOperator('first', param),
+        last: param => new AggregationOperator('last', param),
+        max: param => new AggregationOperator('max', param),
+        min: param => new AggregationOperator('min', param),
+        push: param => new AggregationOperator('push', param),
+        stdDevPop: param => new AggregationOperator('stdDevPop', param),
+        stdDevSamp: param => new AggregationOperator('stdDevSamp', param),
+        sum: param => new AggregationOperator('sum', param),
+        let: param => new AggregationOperator('let', param)
+    },
+    project: {
+        slice: param => new ProjectionOperator('slice', param),
+        elemMatch: param => new ProjectionOperator('elemMatch', param)
+    }
+};
+class AggregationOperator {
+    constructor(name, param) {
+        this['$' + name] = param;
+    }
+}
+exports.AggregationOperator = AggregationOperator;
+class ProjectionOperator {
+    constructor(name, param) {
+        this['$' + name] = param;
+    }
+}
+exports.ProjectionOperator = ProjectionOperator;
+exports.default = exports.Command;

+ 24 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/logic.d.ts

@@ -0,0 +1,24 @@
+import { InternalSymbol } from '../helper/symbol';
+export declare const AND = "and";
+export declare const OR = "or";
+export declare const NOT = "not";
+export declare const NOR = "nor";
+export declare enum LOGIC_COMMANDS_LITERAL {
+    AND = "and",
+    OR = "or",
+    NOT = "not",
+    NOR = "nor"
+}
+export declare class LogicCommand {
+    fieldName: string | InternalSymbol;
+    operator: LOGIC_COMMANDS_LITERAL | string;
+    operands: any[];
+    _internalType: InternalSymbol;
+    constructor(operator: LOGIC_COMMANDS_LITERAL | string, operands: any, fieldName?: string | InternalSymbol);
+    _setFieldName(fieldName: string): LogicCommand;
+    and(...__expressions__: LogicCommand[]): LogicCommand;
+    or(...__expressions__: LogicCommand[]): LogicCommand;
+}
+export declare function isLogicCommand(object: any): object is LogicCommand;
+export declare function isKnownLogicCommand(object: any): object is LogicCommand;
+export default LogicCommand;

+ 79 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/logic.js

@@ -0,0 +1,79 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const symbol_1 = require("../helper/symbol");
+const query_1 = require("./query");
+exports.AND = 'and';
+exports.OR = 'or';
+exports.NOT = 'not';
+exports.NOR = 'nor';
+var LOGIC_COMMANDS_LITERAL;
+(function (LOGIC_COMMANDS_LITERAL) {
+    LOGIC_COMMANDS_LITERAL["AND"] = "and";
+    LOGIC_COMMANDS_LITERAL["OR"] = "or";
+    LOGIC_COMMANDS_LITERAL["NOT"] = "not";
+    LOGIC_COMMANDS_LITERAL["NOR"] = "nor";
+})(LOGIC_COMMANDS_LITERAL = exports.LOGIC_COMMANDS_LITERAL || (exports.LOGIC_COMMANDS_LITERAL = {}));
+class LogicCommand {
+    constructor(operator, operands, fieldName) {
+        this._internalType = symbol_1.SYMBOL_LOGIC_COMMAND;
+        Object.defineProperties(this, {
+            _internalType: {
+                enumerable: false,
+                configurable: false,
+            },
+        });
+        this.operator = operator;
+        this.operands = operands;
+        this.fieldName = fieldName || symbol_1.SYMBOL_UNSET_FIELD_NAME;
+        if (this.fieldName !== symbol_1.SYMBOL_UNSET_FIELD_NAME) {
+            if (Array.isArray(operands)) {
+                operands = operands.slice();
+                this.operands = operands;
+                for (let i = 0, len = operands.length; i < len; i++) {
+                    const query = operands[i];
+                    if (isLogicCommand(query) || query_1.isQueryCommand(query)) {
+                        operands[i] = query._setFieldName(this.fieldName);
+                    }
+                }
+            }
+            else {
+                const query = operands;
+                if (isLogicCommand(query) || query_1.isQueryCommand(query)) {
+                    operands = query._setFieldName(this.fieldName);
+                }
+            }
+        }
+    }
+    _setFieldName(fieldName) {
+        const operands = this.operands.map(operand => {
+            if (operand instanceof LogicCommand) {
+                return operand._setFieldName(fieldName);
+            }
+            else {
+                return operand;
+            }
+        });
+        const command = new LogicCommand(this.operator, operands, fieldName);
+        return command;
+    }
+    and(...__expressions__) {
+        const expressions = Array.isArray(arguments[0]) ? arguments[0] : Array.from(arguments);
+        expressions.unshift(this);
+        return new LogicCommand(LOGIC_COMMANDS_LITERAL.AND, expressions, this.fieldName);
+    }
+    or(...__expressions__) {
+        const expressions = Array.isArray(arguments[0]) ? arguments[0] : Array.from(arguments);
+        expressions.unshift(this);
+        return new LogicCommand(LOGIC_COMMANDS_LITERAL.OR, expressions, this.fieldName);
+    }
+}
+exports.LogicCommand = LogicCommand;
+function isLogicCommand(object) {
+    return object && (object instanceof LogicCommand) && (object._internalType === symbol_1.SYMBOL_LOGIC_COMMAND);
+}
+exports.isLogicCommand = isLogicCommand;
+function isKnownLogicCommand(object) {
+    return isLogicCommand && (object.operator.toUpperCase() in LOGIC_COMMANDS_LITERAL);
+}
+exports.isKnownLogicCommand = isKnownLogicCommand;
+exports.default = LogicCommand;

+ 73 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/query.d.ts

@@ -0,0 +1,73 @@
+import { LogicCommand } from './logic';
+import { InternalSymbol } from '../helper/symbol';
+import { Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon } from '../geo/index';
+import { CenterSphere } from '../typings';
+export declare const EQ = "eq";
+export declare const NEQ = "neq";
+export declare const GT = "gt";
+export declare const GTE = "gte";
+export declare const LT = "lt";
+export declare const LTE = "lte";
+export declare const IN = "in";
+export declare const NIN = "nin";
+export declare const ALL = "all";
+export declare const ELEM_MATCH = "elemMatch";
+export declare const EXISTS = "exists";
+export declare const SIZE = "size";
+export declare const MOD = "mod";
+export declare enum QUERY_COMMANDS_LITERAL {
+    EQ = "eq",
+    NEQ = "neq",
+    GT = "gt",
+    GTE = "gte",
+    LT = "lt",
+    LTE = "lte",
+    IN = "in",
+    NIN = "nin",
+    ALL = "all",
+    ELEM_MATCH = "elemMatch",
+    EXISTS = "exists",
+    SIZE = "size",
+    MOD = "mod",
+    GEO_NEAR = "geoNear",
+    GEO_WITHIN = "geoWithin",
+    GEO_INTERSECTS = "geoIntersects"
+}
+export declare class QueryCommand extends LogicCommand {
+    operator: QUERY_COMMANDS_LITERAL;
+    constructor(operator: QUERY_COMMANDS_LITERAL, operands: any, fieldName?: string | InternalSymbol);
+    toJSON(): {
+        ['$ne']: any;
+    } | {
+        [x: string]: any;
+        $ne?: undefined;
+    };
+    _setFieldName(fieldName: string): QueryCommand;
+    eq(val: any): LogicCommand;
+    neq(val: any): LogicCommand;
+    gt(val: any): LogicCommand;
+    gte(val: any): LogicCommand;
+    lt(val: any): LogicCommand;
+    lte(val: any): LogicCommand;
+    in(list: any[]): LogicCommand;
+    nin(list: any[]): LogicCommand;
+    geoNear(val: IGeoNearOptions): LogicCommand;
+    geoWithin(val: IGeoWithinOptions): LogicCommand;
+    geoIntersects(val: IGeoIntersectsOptions): LogicCommand;
+}
+export declare function isQueryCommand(object: any): object is QueryCommand;
+export declare function isKnownQueryCommand(object: any): object is QueryCommand;
+export declare function isComparisonCommand(object: any): object is QueryCommand;
+export default QueryCommand;
+export interface IGeoNearOptions {
+    geometry: Point;
+    maxDistance?: number;
+    minDistance?: number;
+}
+export interface IGeoWithinOptions {
+    geometry?: Polygon | MultiPolygon;
+    centerSphere?: CenterSphere;
+}
+export interface IGeoIntersectsOptions {
+    geometry: Point | LineString | Polygon | MultiPoint | MultiLineString | MultiPolygon;
+}

+ 147 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/query.js

@@ -0,0 +1,147 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const logic_1 = require("./logic");
+const symbol_1 = require("../helper/symbol");
+const index_1 = require("../geo/index");
+const type_1 = require("../utils/type");
+const validate_1 = require("../validate");
+exports.EQ = 'eq';
+exports.NEQ = 'neq';
+exports.GT = 'gt';
+exports.GTE = 'gte';
+exports.LT = 'lt';
+exports.LTE = 'lte';
+exports.IN = 'in';
+exports.NIN = 'nin';
+exports.ALL = 'all';
+exports.ELEM_MATCH = 'elemMatch';
+exports.EXISTS = 'exists';
+exports.SIZE = 'size';
+exports.MOD = 'mod';
+var QUERY_COMMANDS_LITERAL;
+(function (QUERY_COMMANDS_LITERAL) {
+    QUERY_COMMANDS_LITERAL["EQ"] = "eq";
+    QUERY_COMMANDS_LITERAL["NEQ"] = "neq";
+    QUERY_COMMANDS_LITERAL["GT"] = "gt";
+    QUERY_COMMANDS_LITERAL["GTE"] = "gte";
+    QUERY_COMMANDS_LITERAL["LT"] = "lt";
+    QUERY_COMMANDS_LITERAL["LTE"] = "lte";
+    QUERY_COMMANDS_LITERAL["IN"] = "in";
+    QUERY_COMMANDS_LITERAL["NIN"] = "nin";
+    QUERY_COMMANDS_LITERAL["ALL"] = "all";
+    QUERY_COMMANDS_LITERAL["ELEM_MATCH"] = "elemMatch";
+    QUERY_COMMANDS_LITERAL["EXISTS"] = "exists";
+    QUERY_COMMANDS_LITERAL["SIZE"] = "size";
+    QUERY_COMMANDS_LITERAL["MOD"] = "mod";
+    QUERY_COMMANDS_LITERAL["GEO_NEAR"] = "geoNear";
+    QUERY_COMMANDS_LITERAL["GEO_WITHIN"] = "geoWithin";
+    QUERY_COMMANDS_LITERAL["GEO_INTERSECTS"] = "geoIntersects";
+})(QUERY_COMMANDS_LITERAL = exports.QUERY_COMMANDS_LITERAL || (exports.QUERY_COMMANDS_LITERAL = {}));
+class QueryCommand extends logic_1.LogicCommand {
+    constructor(operator, operands, fieldName) {
+        super(operator, operands, fieldName);
+        this.operator = operator;
+        this._internalType = symbol_1.SYMBOL_QUERY_COMMAND;
+    }
+    toJSON() {
+        switch (this.operator) {
+            case QUERY_COMMANDS_LITERAL.IN:
+            case QUERY_COMMANDS_LITERAL.NIN:
+                return {
+                    ['$' + this.operator]: this.operands
+                };
+            case QUERY_COMMANDS_LITERAL.NEQ:
+                return {
+                    ['$ne']: this.operands[0]
+                };
+            default:
+                return {
+                    ['$' + this.operator]: this.operands[0]
+                };
+        }
+    }
+    _setFieldName(fieldName) {
+        const command = new QueryCommand(this.operator, this.operands, fieldName);
+        return command;
+    }
+    eq(val) {
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.EQ, [val], this.fieldName);
+        return this.and(command);
+    }
+    neq(val) {
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.NEQ, [val], this.fieldName);
+        return this.and(command);
+    }
+    gt(val) {
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.GT, [val], this.fieldName);
+        return this.and(command);
+    }
+    gte(val) {
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.GTE, [val], this.fieldName);
+        return this.and(command);
+    }
+    lt(val) {
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.LT, [val], this.fieldName);
+        return this.and(command);
+    }
+    lte(val) {
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.LTE, [val], this.fieldName);
+        return this.and(command);
+    }
+    in(list) {
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.IN, list, this.fieldName);
+        return this.and(command);
+    }
+    nin(list) {
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.NIN, list, this.fieldName);
+        return this.and(command);
+    }
+    geoNear(val) {
+        if (!(val.geometry instanceof index_1.Point)) {
+            throw new TypeError(`"geometry" must be of type Point. Received type ${typeof val.geometry}`);
+        }
+        if (val.maxDistance !== undefined && !type_1.isNumber(val.maxDistance)) {
+            throw new TypeError(`"maxDistance" must be of type Number. Received type ${typeof val.maxDistance}`);
+        }
+        if (val.minDistance !== undefined && !type_1.isNumber(val.minDistance)) {
+            throw new TypeError(`"minDistance" must be of type Number. Received type ${typeof val.minDistance}`);
+        }
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.GEO_NEAR, [val], this.fieldName);
+        return this.and(command);
+    }
+    geoWithin(val) {
+        if (!(val.geometry instanceof index_1.MultiPolygon) &&
+            !(val.geometry instanceof index_1.Polygon) &&
+            !validate_1.Validate.isCentersPhere(val.centerSphere)) {
+            throw new TypeError(`"geometry" must be of type Polygon or MultiPolygon. Received type ${typeof val.geometry}`);
+        }
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.GEO_WITHIN, [val], this.fieldName);
+        return this.and(command);
+    }
+    geoIntersects(val) {
+        if (!(val.geometry instanceof index_1.Point) &&
+            !(val.geometry instanceof index_1.LineString) &&
+            !(val.geometry instanceof index_1.Polygon) &&
+            !(val.geometry instanceof index_1.MultiPoint) &&
+            !(val.geometry instanceof index_1.MultiLineString) &&
+            !(val.geometry instanceof index_1.MultiPolygon)) {
+            throw new TypeError(`"geometry" must be of type Point, LineString, Polygon, MultiPoint, MultiLineString or MultiPolygon. Received type ${typeof val.geometry}`);
+        }
+        const command = new QueryCommand(QUERY_COMMANDS_LITERAL.GEO_INTERSECTS, [val], this.fieldName);
+        return this.and(command);
+    }
+}
+exports.QueryCommand = QueryCommand;
+function isQueryCommand(object) {
+    return object && object instanceof QueryCommand && object._internalType === symbol_1.SYMBOL_QUERY_COMMAND;
+}
+exports.isQueryCommand = isQueryCommand;
+function isKnownQueryCommand(object) {
+    return isQueryCommand(object) && object.operator.toUpperCase() in QUERY_COMMANDS_LITERAL;
+}
+exports.isKnownQueryCommand = isKnownQueryCommand;
+function isComparisonCommand(object) {
+    return isQueryCommand(object);
+}
+exports.isComparisonCommand = isComparisonCommand;
+exports.default = QueryCommand;

+ 29 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/update.d.ts

@@ -0,0 +1,29 @@
+import { InternalSymbol } from '../helper/symbol';
+export declare enum UPDATE_COMMANDS_LITERAL {
+    SET = "set",
+    REMOVE = "remove",
+    INC = "inc",
+    MUL = "mul",
+    PUSH = "push",
+    PULL = "pull",
+    PULL_ALL = "pullAll",
+    POP = "pop",
+    SHIFT = "shift",
+    UNSHIFT = "unshift",
+    ADD_TO_SET = "addToSet",
+    BIT = "bit",
+    RENAME = "rename",
+    MAX = "max",
+    MIN = "min"
+}
+export declare class UpdateCommand {
+    fieldName: string | InternalSymbol;
+    operator: UPDATE_COMMANDS_LITERAL;
+    operands: any;
+    _internalType: InternalSymbol;
+    constructor(operator: UPDATE_COMMANDS_LITERAL, operands?: any, fieldName?: string | InternalSymbol);
+    _setFieldName(fieldName: string): UpdateCommand;
+}
+export declare function isUpdateCommand(object: any): object is UpdateCommand;
+export declare function isKnownUpdateCommand(object: any): object is UpdateCommand;
+export default UpdateCommand;

+ 49 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/commands/update.js

@@ -0,0 +1,49 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const symbol_1 = require("../helper/symbol");
+var UPDATE_COMMANDS_LITERAL;
+(function (UPDATE_COMMANDS_LITERAL) {
+    UPDATE_COMMANDS_LITERAL["SET"] = "set";
+    UPDATE_COMMANDS_LITERAL["REMOVE"] = "remove";
+    UPDATE_COMMANDS_LITERAL["INC"] = "inc";
+    UPDATE_COMMANDS_LITERAL["MUL"] = "mul";
+    UPDATE_COMMANDS_LITERAL["PUSH"] = "push";
+    UPDATE_COMMANDS_LITERAL["PULL"] = "pull";
+    UPDATE_COMMANDS_LITERAL["PULL_ALL"] = "pullAll";
+    UPDATE_COMMANDS_LITERAL["POP"] = "pop";
+    UPDATE_COMMANDS_LITERAL["SHIFT"] = "shift";
+    UPDATE_COMMANDS_LITERAL["UNSHIFT"] = "unshift";
+    UPDATE_COMMANDS_LITERAL["ADD_TO_SET"] = "addToSet";
+    UPDATE_COMMANDS_LITERAL["BIT"] = "bit";
+    UPDATE_COMMANDS_LITERAL["RENAME"] = "rename";
+    UPDATE_COMMANDS_LITERAL["MAX"] = "max";
+    UPDATE_COMMANDS_LITERAL["MIN"] = "min";
+})(UPDATE_COMMANDS_LITERAL = exports.UPDATE_COMMANDS_LITERAL || (exports.UPDATE_COMMANDS_LITERAL = {}));
+class UpdateCommand {
+    constructor(operator, operands, fieldName) {
+        this._internalType = symbol_1.SYMBOL_UPDATE_COMMAND;
+        Object.defineProperties(this, {
+            _internalType: {
+                enumerable: false,
+                configurable: false,
+            },
+        });
+        this.operator = operator;
+        this.operands = operands;
+        this.fieldName = fieldName || symbol_1.SYMBOL_UNSET_FIELD_NAME;
+    }
+    _setFieldName(fieldName) {
+        const command = new UpdateCommand(this.operator, this.operands, fieldName);
+        return command;
+    }
+}
+exports.UpdateCommand = UpdateCommand;
+function isUpdateCommand(object) {
+    return object && (object instanceof UpdateCommand) && (object._internalType === symbol_1.SYMBOL_UPDATE_COMMAND);
+}
+exports.isUpdateCommand = isUpdateCommand;
+function isKnownUpdateCommand(object) {
+    return isUpdateCommand(object) && (object.operator.toUpperCase() in UPDATE_COMMANDS_LITERAL);
+}
+exports.isKnownUpdateCommand = isKnownUpdateCommand;
+exports.default = UpdateCommand;

+ 6 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/config/app.config.d.ts

@@ -0,0 +1,6 @@
+declare const _default: {
+    db_doc_size_limit: number;
+    db_realtime_ping_interval: number;
+    db_realtime_pong_wait_timeout: number;
+};
+export default _default;

+ 7 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/config/app.config.js

@@ -0,0 +1,7 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.default = {
+    db_doc_size_limit: 512 * 1024,
+    db_realtime_ping_interval: 15 * 1000,
+    db_realtime_pong_wait_timeout: 15 * 1000,
+};

+ 3 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/config/error.config.d.ts

@@ -0,0 +1,3 @@
+export declare const ERR_CODE: {
+    [key: string]: string | number;
+};

+ 15 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/config/error.config.js

@@ -0,0 +1,15 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ERR_CODE = {
+    UNKNOWN_ERROR: 'UNKNOWN_ERROR',
+    SDK_DATABASE_REALTIME_LISTENER_INIT_WATCH_FAIL: 'SDK_DATABASE_REALTIME_LISTENER_INIT_WATCH_FAIL',
+    SDK_DATABASE_REALTIME_LISTENER_RECONNECT_WATCH_FAIL: 'SDK_DATABASE_REALTIME_LISTENER_RECONNECT_WATCH_FAIL',
+    SDK_DATABASE_REALTIME_LISTENER_REBUILD_WATCH_FAIL: 'SDK_DATABASE_REALTIME_LISTENER_REBUILD_WATCH_FAIL',
+    SDK_DATABASE_REALTIME_LISTENER_CLOSE_WATCH_FAIL: 'SDK_DATABASE_REALTIME_LISTENER_CLOSE_WATCH_FAIL',
+    SDK_DATABASE_REALTIME_LISTENER_SERVER_ERROR_MSG: 'SDK_DATABASE_REALTIME_LISTENER_SERVER_ERROR_MSG',
+    SDK_DATABASE_REALTIME_LISTENER_RECEIVE_INVALID_SERVER_DATA: 'SDK_DATABASE_REALTIME_LISTENER_RECEIVE_INVALID_SERVER_DATA',
+    SDK_DATABASE_REALTIME_LISTENER_WEBSOCKET_CONNECTION_ERROR: 'SDK_DATABASE_REALTIME_LISTENER_WEBSOCKET_CONNECTION_ERROR',
+    SDK_DATABASE_REALTIME_LISTENER_WEBSOCKET_CONNECTION_CLOSED: 'SDK_DATABASE_REALTIME_LISTENER_WEBSOCKET_CONNECTION_CLOSED',
+    SDK_DATABASE_REALTIME_LISTENER_CHECK_LAST_FAIL: 'SDK_DATABASE_REALTIME_LISTENER_CHECK_LAST_FAIL',
+    SDK_DATABASE_REALTIME_LISTENER_UNEXPECTED_FATAL_ERROR: 'SDK_DATABASE_REALTIME_LISTENER_UNEXPECTED_FATAL_ERROR'
+};

+ 34 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/const/code.d.ts

@@ -0,0 +1,34 @@
+export declare const ERRORS: {
+    CREATE_WATCH_NET_ERROR: {
+        code: string;
+        message: string;
+    };
+    CREATE_WACTH_EXCEED_ERROR: {
+        code: string;
+        message: string;
+    };
+    CREATE_WATCH_SERVER_ERROR: {
+        code: string;
+        message: string;
+    };
+    CONN_ERROR: {
+        code: string;
+        message: string;
+    };
+    INVALID_PARAM: {
+        code: string;
+        message: string;
+    };
+    INSERT_DOC_FAIL: {
+        code: string;
+        message: string;
+    };
+    DATABASE_TRANSACTION_CONFLICT: {
+        code: string;
+        message: string;
+    };
+    DATABASE_REQUEST_FAILED: {
+        code: string;
+        message: string;
+    };
+};

+ 36 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/const/code.js

@@ -0,0 +1,36 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ERRORS = {
+    CREATE_WATCH_NET_ERROR: {
+        code: 'CREATE_WATCH_NET_ERROR',
+        message: 'create watch network error'
+    },
+    CREATE_WACTH_EXCEED_ERROR: {
+        code: 'CREATE_WACTH_EXCEED_ERROR',
+        message: 'maximum connections exceed'
+    },
+    CREATE_WATCH_SERVER_ERROR: {
+        code: 'CREATE_WATCH_SERVER_ERROR',
+        message: 'create watch server error'
+    },
+    CONN_ERROR: {
+        code: 'CONN_ERROR',
+        message: 'connection error'
+    },
+    INVALID_PARAM: {
+        code: 'INVALID_PARAM',
+        message: 'Invalid request param'
+    },
+    INSERT_DOC_FAIL: {
+        code: 'INSERT_DOC_FAIL',
+        message: 'insert document failed'
+    },
+    DATABASE_TRANSACTION_CONFLICT: {
+        code: 'DATABASE_TRANSACTION_CONFLICT',
+        message: 'database transaction conflict'
+    },
+    DATABASE_REQUEST_FAILED: {
+        code: 'DATABASE_REQUEST_FAILED',
+        message: 'database request failed'
+    }
+};

+ 54 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/constant.d.ts

@@ -0,0 +1,54 @@
+declare enum ErrorCode {
+    DocIDError = "\u6587\u6863ID\u4E0D\u5408\u6CD5",
+    CollNameError = "\u96C6\u5408\u540D\u79F0\u4E0D\u5408\u6CD5",
+    OpStrError = "\u64CD\u4F5C\u7B26\u4E0D\u5408\u6CD5",
+    DirectionError = "\u6392\u5E8F\u5B57\u7B26\u4E0D\u5408\u6CD5",
+    IntergerError = "must be integer",
+    BooleanError = "must be boolean",
+    ArrayError = "must be array",
+    QueryParamTypeError = "\u67E5\u8BE2\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61",
+    QueryParamValueError = "\u67E5\u8BE2\u53C2\u6570\u5BF9\u8C61\u503C\u4E0D\u80FD\u5747\u4E3Aundefined",
+    CentersPhereError = "centersPhere\u7ED3\u6784\u4E0D\u5408\u6CD5"
+}
+declare const FieldType: {
+    String: string;
+    Number: string;
+    Object: string;
+    Array: string;
+    Boolean: string;
+    Null: string;
+    GeoPoint: string;
+    GeoLineString: string;
+    GeoPolygon: string;
+    GeoMultiPoint: string;
+    GeoMultiLineString: string;
+    GeoMultiPolygon: string;
+    Date: string;
+    Command: string;
+    ServerDate: string;
+    BsonDate: string;
+};
+declare type OrderByDirection = 'desc' | 'asc';
+declare const OrderDirectionList: string[];
+declare type WhereFilterOp = '<' | '<=' | '==' | '>=' | '>';
+declare const WhereFilterOpList: string[];
+declare enum Opeartor {
+    lt = "<",
+    gt = ">",
+    lte = "<=",
+    gte = ">=",
+    eq = "=="
+}
+declare const OperatorMap: {
+    [Opeartor.eq]: string;
+    [Opeartor.lt]: string;
+    [Opeartor.lte]: string;
+    [Opeartor.gt]: string;
+    [Opeartor.gte]: string;
+};
+declare const UpdateOperatorList: string[];
+declare enum QueryType {
+    WHERE = "WHERE",
+    DOC = "DOC"
+}
+export { ErrorCode, FieldType, WhereFilterOp, WhereFilterOpList, Opeartor, OperatorMap, OrderByDirection, OrderDirectionList, UpdateOperatorList, QueryType };

+ 76 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/constant.js

@@ -0,0 +1,76 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var ErrorCode;
+(function (ErrorCode) {
+    ErrorCode["DocIDError"] = "\u6587\u6863ID\u4E0D\u5408\u6CD5";
+    ErrorCode["CollNameError"] = "\u96C6\u5408\u540D\u79F0\u4E0D\u5408\u6CD5";
+    ErrorCode["OpStrError"] = "\u64CD\u4F5C\u7B26\u4E0D\u5408\u6CD5";
+    ErrorCode["DirectionError"] = "\u6392\u5E8F\u5B57\u7B26\u4E0D\u5408\u6CD5";
+    ErrorCode["IntergerError"] = "must be integer";
+    ErrorCode["BooleanError"] = "must be boolean";
+    ErrorCode["ArrayError"] = "must be array";
+    ErrorCode["QueryParamTypeError"] = "\u67E5\u8BE2\u53C2\u6570\u5FC5\u987B\u4E3A\u5BF9\u8C61";
+    ErrorCode["QueryParamValueError"] = "\u67E5\u8BE2\u53C2\u6570\u5BF9\u8C61\u503C\u4E0D\u80FD\u5747\u4E3Aundefined";
+    ErrorCode["CentersPhereError"] = "centersPhere\u7ED3\u6784\u4E0D\u5408\u6CD5";
+})(ErrorCode || (ErrorCode = {}));
+exports.ErrorCode = ErrorCode;
+const FieldType = {
+    String: 'String',
+    Number: 'Number',
+    Object: 'Object',
+    Array: 'Array',
+    Boolean: 'Boolean',
+    Null: 'Null',
+    GeoPoint: 'GeoPoint',
+    GeoLineString: 'GeoLineString',
+    GeoPolygon: 'GeoPolygon',
+    GeoMultiPoint: 'GeoMultiPoint',
+    GeoMultiLineString: 'GeoMultiLineString',
+    GeoMultiPolygon: 'GeoMultiPolygon',
+    Date: 'Date',
+    Command: 'Command',
+    ServerDate: 'ServerDate',
+    BsonDate: 'BsonDate'
+};
+exports.FieldType = FieldType;
+const OrderDirectionList = ['desc', 'asc'];
+exports.OrderDirectionList = OrderDirectionList;
+const WhereFilterOpList = ['<', '<=', '==', '>=', '>'];
+exports.WhereFilterOpList = WhereFilterOpList;
+var Opeartor;
+(function (Opeartor) {
+    Opeartor["lt"] = "<";
+    Opeartor["gt"] = ">";
+    Opeartor["lte"] = "<=";
+    Opeartor["gte"] = ">=";
+    Opeartor["eq"] = "==";
+})(Opeartor || (Opeartor = {}));
+exports.Opeartor = Opeartor;
+const OperatorMap = {
+    [Opeartor.eq]: '$eq',
+    [Opeartor.lt]: '$lt',
+    [Opeartor.lte]: '$lte',
+    [Opeartor.gt]: '$gt',
+    [Opeartor.gte]: '$gte'
+};
+exports.OperatorMap = OperatorMap;
+const UpdateOperatorList = [
+    '$set',
+    '$inc',
+    '$mul',
+    '$unset',
+    '$push',
+    '$pop',
+    '$unshift',
+    '$shift',
+    '$currentDate',
+    '$each',
+    '$position'
+];
+exports.UpdateOperatorList = UpdateOperatorList;
+var QueryType;
+(function (QueryType) {
+    QueryType["WHERE"] = "WHERE";
+    QueryType["DOC"] = "DOC";
+})(QueryType || (QueryType = {}));
+exports.QueryType = QueryType;

+ 14 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/document.d.ts

@@ -0,0 +1,14 @@
+import { IWatchOptions, DBRealtimeListener } from './typings/index';
+export declare class DocumentReference {
+    readonly id: string | number;
+    readonly _transactionId: string;
+    readonly projection: Object;
+    private _apiOptions;
+    set(data: Object): Promise<any>;
+    update(data: Object): Promise<any>;
+    delete(): Promise<any>;
+    remove(): Promise<any>;
+    get(): Promise<any>;
+    field(projection: Object): DocumentReference;
+    watch: (options: IWatchOptions) => DBRealtimeListener;
+}

+ 219 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/document.js

@@ -0,0 +1,219 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const index_1 = require("./index");
+const util_1 = require("./util");
+const update_1 = require("./serializer/update");
+const datatype_1 = require("./serializer/datatype");
+const update_2 = require("./commands/update");
+const websocket_client_1 = require("./realtime/websocket-client");
+const constant_1 = require("./constant");
+const utils_1 = require("./utils/utils");
+const code_1 = require("./const/code");
+const bson_1 = require("bson");
+class DocumentReference {
+    constructor(db, coll, apiOptions, docID, transactionId) {
+        this.watch = (options) => {
+            if (!index_1.Db.ws) {
+                index_1.Db.ws = new websocket_client_1.RealtimeWebSocketClient({
+                    context: {
+                        appConfig: {
+                            docSizeLimit: 1000,
+                            realtimePingInterval: 10000,
+                            realtimePongWaitTimeout: 5000,
+                            request: this.request
+                        }
+                    }
+                });
+            }
+            return index_1.Db.ws.watch(Object.assign(Object.assign({}, options), { envId: this._db.config.env, collectionName: this._coll, query: JSON.stringify({
+                    _id: this.id
+                }) }));
+        };
+        this._db = db;
+        this._coll = coll;
+        this.id = docID;
+        this._transactionId = transactionId;
+        this.request = new index_1.Db.reqClass(this._db.config);
+        this._apiOptions = apiOptions;
+    }
+    async create(data) {
+        if (this.id) {
+            data['_id'] = this.id;
+        }
+        let params = {
+            collectionName: this._coll,
+            data: [utils_1.stringifyByEJSON(datatype_1.serialize(data))],
+            transactionId: this._transactionId
+        };
+        const res = await this.request.send('database.insertDocument', params, utils_1.getReqOpts(this._apiOptions));
+        if (res.code) {
+            return res;
+        }
+        if (this._transactionId) {
+            return {
+                inserted: 1,
+                ok: 1,
+                id: res.data.insertedIds[0],
+                requestId: res.requestId
+            };
+        }
+        return {
+            id: res.data.insertedIds[0],
+            requestId: res.requestId
+        };
+    }
+    async set(data) {
+        if (!this.id) {
+            return utils_1.processReturn(this._db.config.throwOnCode, Object.assign(Object.assign({}, code_1.ERRORS.INVALID_PARAM), { message: 'docId不能为空' }));
+        }
+        if (!data || typeof data !== 'object') {
+            return utils_1.processReturn(this._db.config.throwOnCode, Object.assign(Object.assign({}, code_1.ERRORS.INVALID_PARAM), { message: '参数必需是非空对象' }));
+        }
+        if (data.hasOwnProperty('_id')) {
+            return utils_1.processReturn(this._db.config.throwOnCode, Object.assign(Object.assign({}, code_1.ERRORS.INVALID_PARAM), { message: '不能更新_id的值' }));
+        }
+        let hasOperator = false;
+        const checkMixed = objs => {
+            if (typeof objs === 'object') {
+                for (let key in objs) {
+                    if (objs[key] instanceof update_2.UpdateCommand) {
+                        hasOperator = true;
+                    }
+                    else if (typeof objs[key] === 'object') {
+                        checkMixed(objs[key]);
+                    }
+                }
+            }
+        };
+        checkMixed(data);
+        if (hasOperator) {
+            return utils_1.processReturn(this._db.config.throwOnCode, Object.assign(Object.assign({}, code_1.ERRORS.DATABASE_REQUEST_FAILED), { message: 'update operator complicit' }));
+        }
+        let param = {
+            collectionName: this._coll,
+            queryType: constant_1.QueryType.DOC,
+            data: utils_1.stringifyByEJSON(datatype_1.serialize(data)),
+            transactionId: this._transactionId,
+            multi: false,
+            merge: false,
+            upsert: true
+        };
+        if (this.id) {
+            param['query'] = utils_1.stringifyByEJSON({ _id: this.id });
+        }
+        const res = await this.request.send('database.modifyDocument', param, utils_1.getReqOpts(this._apiOptions));
+        if (res.code) {
+            return res;
+        }
+        if (this._transactionId) {
+            return {
+                updated: res.data.updated,
+                upserted: [{ _id: res.data.upsert_id }],
+                requestId: res.requestId
+            };
+        }
+        return {
+            updated: res.data.updated,
+            upsertedId: res.data.upsert_id,
+            requestId: res.requestId
+        };
+    }
+    async update(data) {
+        if (!data || typeof data !== 'object') {
+            return utils_1.processReturn(this._db.config.throwOnCode, Object.assign(Object.assign({}, code_1.ERRORS.INVALID_PARAM), { message: '参数必需是非空对象' }));
+        }
+        if (data.hasOwnProperty('_id')) {
+            return utils_1.processReturn(this._db.config.throwOnCode, Object.assign(Object.assign({}, code_1.ERRORS.INVALID_PARAM), { message: '不能更新_id的值' }));
+        }
+        const query = utils_1.stringifyByEJSON({ _id: this.id });
+        const param = {
+            collectionName: this._coll,
+            transactionId: this._transactionId,
+            data: update_1.UpdateSerializer.encodeEJSON(data, this._apiOptions.raw || false),
+            query,
+            queryType: constant_1.QueryType.DOC,
+            multi: false,
+            merge: true,
+            upsert: false
+        };
+        const res = await this.request.send('database.modifyDocument', param, utils_1.getReqOpts(this._apiOptions));
+        if (res.code) {
+            return res;
+        }
+        return {
+            updated: res.data.updated,
+            requestId: res.requestId
+        };
+    }
+    async delete() {
+        return this.remove();
+    }
+    async remove() {
+        const query = utils_1.stringifyByEJSON({ _id: this.id });
+        const param = {
+            collectionName: this._coll,
+            transactionId: this._transactionId,
+            query: query,
+            queryType: constant_1.QueryType.DOC,
+            multi: false
+        };
+        const res = await this.request.send('database.removeDocument', param, utils_1.getReqOpts(this._apiOptions));
+        if (res.code) {
+            return res;
+        }
+        return {
+            deleted: res.data.deleted,
+            requestId: res.requestId
+        };
+    }
+    async get() {
+        const query = utils_1.stringifyByEJSON({ _id: this.id });
+        const { projection } = this._apiOptions;
+        const param = {
+            collectionName: this._coll,
+            query,
+            transactionId: this._transactionId,
+            queryType: constant_1.QueryType.DOC,
+            multi: false
+        };
+        if (projection) {
+            param.projection = utils_1.stringifyByEJSON(projection);
+        }
+        const res = await this.request.send('database.getDocument', param, utils_1.getReqOpts(this._apiOptions));
+        if (res.code) {
+            return res;
+        }
+        const list = res.data.list.map(item => bson_1.EJSON.parse(item));
+        const documents = util_1.Util.formatResDocumentData(list);
+        if (this._transactionId) {
+            return {
+                data: documents[0] || null,
+                requestId: res.requestId
+            };
+        }
+        return {
+            data: documents,
+            requestId: res.requestId,
+            offset: res.data.offset,
+            limit: res.data.limit
+        };
+    }
+    field(projection) {
+        let transformProjection = {};
+        for (let k in projection) {
+            if (typeof projection[k] === 'boolean') {
+                transformProjection[k] = projection[k] === true ? 1 : 0;
+            }
+            if (typeof projection[k] === 'number') {
+                transformProjection[k] = projection[k] > 0 ? 1 : 0;
+            }
+            if (typeof projection[k] === 'object') {
+                transformProjection[k] = projection[k];
+            }
+        }
+        let newApiOption = Object.assign({}, this._apiOptions);
+        newApiOption.projection = transformProjection;
+        return new DocumentReference(this._db, this._coll, newApiOption, this.id, this._transactionId);
+    }
+}
+exports.DocumentReference = DocumentReference;

+ 6 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/index.d.ts

@@ -0,0 +1,6 @@
+export * from './point';
+export * from './lineString';
+export * from './polygon';
+export * from './multiPoint';
+export * from './multiLineString';
+export * from './multiPolygon';

+ 11 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/index.js

@@ -0,0 +1,11 @@
+"use strict";
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
+Object.defineProperty(exports, "__esModule", { value: true });
+__export(require("./point"));
+__export(require("./lineString"));
+__export(require("./polygon"));
+__export(require("./multiPoint"));
+__export(require("./multiLineString"));
+__export(require("./multiPolygon"));

+ 24 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/interface.d.ts

@@ -0,0 +1,24 @@
+export interface ISerializedPoint {
+    type: string;
+    coordinates: [number, number];
+}
+export interface ISerializedLineString {
+    type: string;
+    coordinates: [number, number][];
+}
+export interface ISerializedPolygon {
+    type: string;
+    coordinates: [number, number][][];
+}
+export interface ISerializedMultiPoint {
+    type: string;
+    coordinates: [number, number][];
+}
+export interface ISerializedMultiLineString {
+    type: string;
+    coordinates: [number, number][][];
+}
+export interface ISerializedMultiPolygon {
+    type: string;
+    coordinates: [number, number][][][];
+}

+ 2 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/interface.js

@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });

+ 19 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/lineString.d.ts

@@ -0,0 +1,19 @@
+import { Point } from './point';
+import { ISerializedLineString } from './interface';
+export declare class LineString {
+    readonly points: Point[];
+    constructor(points: Point[]);
+    parse(key: any): {
+        [x: number]: {
+            type: string;
+            coordinates: number[][];
+        };
+    };
+    toJSON(): {
+        type: string;
+        coordinates: number[][];
+    };
+    static validate(lineString: ISerializedLineString): boolean;
+    static isClosed(lineString: LineString): boolean;
+    readonly _internalType: import("../utils/symbol").InternalSymbol;
+}

+ 57 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/lineString.js

@@ -0,0 +1,57 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const symbol_1 = require("../helper/symbol");
+const point_1 = require("./point");
+const type_1 = require("../utils/type");
+class LineString {
+    constructor(points) {
+        if (!type_1.isArray(points)) {
+            throw new TypeError(`"points" must be of type Point[]. Received type ${typeof points}`);
+        }
+        if (points.length < 2) {
+            throw new Error('"points" must contain 2 points at least');
+        }
+        points.forEach(point => {
+            if (!(point instanceof point_1.Point)) {
+                throw new TypeError(`"points" must be of type Point[]. Received type ${typeof point}[]`);
+            }
+        });
+        this.points = points;
+    }
+    parse(key) {
+        return {
+            [key]: {
+                type: 'LineString',
+                coordinates: this.points.map(point => point.toJSON().coordinates)
+            }
+        };
+    }
+    toJSON() {
+        return {
+            type: 'LineString',
+            coordinates: this.points.map(point => point.toJSON().coordinates)
+        };
+    }
+    static validate(lineString) {
+        if (lineString.type !== 'LineString' || !type_1.isArray(lineString.coordinates)) {
+            return false;
+        }
+        for (let point of lineString.coordinates) {
+            if (!type_1.isNumber(point[0]) || !type_1.isNumber(point[1])) {
+                return false;
+            }
+        }
+        return true;
+    }
+    static isClosed(lineString) {
+        const firstPoint = lineString.points[0];
+        const lastPoint = lineString.points[lineString.points.length - 1];
+        if (firstPoint.latitude === lastPoint.latitude && firstPoint.longitude === lastPoint.longitude) {
+            return true;
+        }
+    }
+    get _internalType() {
+        return symbol_1.SYMBOL_GEO_LINE_STRING;
+    }
+}
+exports.LineString = LineString;

+ 18 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/multiLineString.d.ts

@@ -0,0 +1,18 @@
+import { LineString } from './lineString';
+import { ISerializedMultiLineString } from './interface';
+export declare class MultiLineString {
+    readonly lines: LineString[];
+    constructor(lines: LineString[]);
+    parse(key: any): {
+        [x: number]: {
+            type: string;
+            coordinates: number[][][];
+        };
+    };
+    toJSON(): {
+        type: string;
+        coordinates: number[][][];
+    };
+    static validate(multiLineString: ISerializedMultiLineString): boolean;
+    readonly _internalType: import("../utils/symbol").InternalSymbol;
+}

+ 56 - 0
cloud/cloudfunctions/vip1/node_modules/@cloudbase/database/dist/commonjs/geo/multiLineString.js

@@ -0,0 +1,56 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const symbol_1 = require("../helper/symbol");
+const type_1 = require("../utils/type");
+const lineString_1 = require("./lineString");
+class MultiLineString {
+    constructor(lines) {
+        if (!type_1.isArray(lines)) {
+            throw new TypeError(`"lines" must be of type LineString[]. Received type ${typeof lines}`);
+        }
+        if (lines.length === 0) {
+            throw new Error('Polygon must contain 1 linestring at least');
+        }
+        lines.forEach(line => {
+            if (!(line instanceof lineString_1.LineString)) {
+                throw new TypeError(`"lines" must be of type LineString[]. Received type ${typeof line}[]`);
+            }
+        });
+        this.lines = lines;
+    }
+    parse(key) {
+        return {
+            [key]: {
+                type: 'MultiLineString',
+                coordinates: this.lines.map(line => {
+                    return line.points.map(point => [point.longitude, point.latitude]);
+                })
+            }
+        };
+    }
+    toJSON() {
+        return {
+            type: 'MultiLineString',
+            coordinates: this.lines.map(line => {
+                return line.points.map(point => [point.longitude, point.latitude]);
+            })
+        };
+    }
+    static validate(multiLineString) {
+        if (multiLineString.type !== 'MultiLineString' || !type_1.isArray(multiLineString.coordinates)) {
+            return false;
+        }
+        for (let line of multiLineString.coordinates) {
+            for (let point of line) {
+                if (!type_1.isNumber(point[0]) || !type_1.isNumber(point[1])) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+    get _internalType() {
+        return symbol_1.SYMBOL_GEO_MULTI_LINE_STRING;
+    }
+}
+exports.MultiLineString = MultiLineString;

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä