Socket
Socket
Sign inDemoInstall

@alipay/faas-server-sdk

Package Overview
Dependencies
Maintainers
2
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alipay/faas-server-sdk - npm Package Compare versions

Comparing version 0.0.25 to 0.0.26

2

lib/Cloud.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Cloud=exports.initRuntimeEnv=void 0;const callFunction_1=require("./callFunction"),Database_1=require("./Database"),MySQL_1=require("./MySQL"),utils_1=require("./utils"),runtimeEnv={RUNTIME_ACCESS_KEY:"",RUNTIME_SECRET_KEY:"",RUNTIME_ENV_ID:"",RUNTIME_FUNCTION_NAME:"",RUNTIME_FUNCTION_GATEWAY_VIP:"",RUNTIME_FUNCTION_INSTANCE_ID:"",RUNTIME_MONGO_CLUSTER_ENDPOINT:"",RUNTIME_MONGO_DATABASE_NAME:""};function initRuntimeEnv(E){Object.assign(runtimeEnv,E)}exports.initRuntimeEnv=initRuntimeEnv;class Cloud{#t;#E;#N;constructor(){this.refreshConfig()}refreshConfig(){this.#t?(runtimeEnv.RUNTIME_ACCESS_KEY&&(this.#t.secretId=runtimeEnv.RUNTIME_ACCESS_KEY),runtimeEnv.RUNTIME_SECRET_KEY&&(this.#t.secretKey=runtimeEnv.RUNTIME_SECRET_KEY),runtimeEnv.RUNTIME_ENV_ID&&(this.#t.fromEnvId=runtimeEnv.RUNTIME_ENV_ID,this.#t.toEnvId||(this.#t.toEnvId=runtimeEnv.RUNTIME_ENV_ID)),runtimeEnv.RUNTIME_FUNCTION_NAME&&(this.#t.functionName=runtimeEnv.RUNTIME_FUNCTION_NAME),runtimeEnv.RUNTIME_FUNCTION_GATEWAY_VIP&&(this.#t.functionGatewayVip=runtimeEnv.RUNTIME_FUNCTION_GATEWAY_VIP),runtimeEnv.RUNTIME_FUNCTION_INSTANCE_ID&&(this.#t.functionInstanceId=runtimeEnv.RUNTIME_FUNCTION_INSTANCE_ID),runtimeEnv.RUNTIME_MONGO_CLUSTER_ENDPOINT&&(this.#t.functionDatabaseEndpoint=runtimeEnv.RUNTIME_MONGO_CLUSTER_ENDPOINT),runtimeEnv.RUNTIME_MONGO_DATABASE_NAME&&(this.#t.functionDatabaseName=runtimeEnv.RUNTIME_MONGO_DATABASE_NAME)):this.#t={secretId:runtimeEnv.RUNTIME_ACCESS_KEY,secretKey:runtimeEnv.RUNTIME_SECRET_KEY,fromEnvId:runtimeEnv.RUNTIME_ENV_ID,toEnvId:runtimeEnv.RUNTIME_ENV_ID,functionName:runtimeEnv.RUNTIME_FUNCTION_NAME,functionGatewayVip:runtimeEnv.RUNTIME_FUNCTION_GATEWAY_VIP,functionInstanceId:runtimeEnv.RUNTIME_FUNCTION_INSTANCE_ID,functionDatabaseEndpoint:runtimeEnv.RUNTIME_MONGO_CLUSTER_ENDPOINT,functionDatabaseName:runtimeEnv.RUNTIME_MONGO_DATABASE_NAME}}init(t){t?.env&&typeof t?.env=="string"&&(this.#t.toEnvId=t.env),t?.envId&&(this.#t.toEnvId=t.envId)}getAlipayContext(){return(0,utils_1.getAlipayContext)()}async callFunction(t){return await(0,callFunction_1.callFunction)(this.#t,t)}database(){return this.#E||(this.#E=new Database_1.Database(this.#t)),this.#E}mysql(){return this.#N||(this.#N=new MySQL_1.MySQL(this.#t)),this.#N}}exports.Cloud=Cloud;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Cloud=exports.initRuntimeEnv=void 0;const callFunction_1=require("./callFunction"),Database_1=require("./Database"),MySQL_1=require("./MySQL"),utils_1=require("./utils"),runtimeEnv={RUNTIME_ACCESS_KEY:process.env.RUNTIME_ACCESS_KEY||"",RUNTIME_SECRET_KEY:process.env.RUNTIME_SECRET_KEY||"",RUNTIME_ENV_ID:process.env.RUNTIME_ENV_ID||"",RUNTIME_FUNCTION_NAME:process.env.RUNTIME_FUNCTION_NAME||"",RUNTIME_FUNCTION_GATEWAY_VIP:process.env.RUNTIME_FUNCTION_GATEWAY_VIP||"",RUNTIME_FUNCTION_INSTANCE_ID:process.env.RUNTIME_FUNCTION_INSTANCE_ID||"",RUNTIME_MONGO_CLUSTER_ENDPOINT:process.env.RUNTIME_MONGO_CLUSTER_ENDPOINT||"",RUNTIME_MONGO_DATABASE_NAME:process.env.RUNTIME_MONGO_DATABASE_NAME||""};function initRuntimeEnv(E){Object.assign(runtimeEnv,E)}exports.initRuntimeEnv=initRuntimeEnv;class Cloud{#N;#E;#_;constructor(){this.refreshConfig()}refreshConfig(){this.#N?(runtimeEnv.RUNTIME_ACCESS_KEY&&(this.#N.secretId=runtimeEnv.RUNTIME_ACCESS_KEY),runtimeEnv.RUNTIME_SECRET_KEY&&(this.#N.secretKey=runtimeEnv.RUNTIME_SECRET_KEY),runtimeEnv.RUNTIME_ENV_ID&&(this.#N.fromEnvId=runtimeEnv.RUNTIME_ENV_ID,this.#N.toEnvId||(this.#N.toEnvId=runtimeEnv.RUNTIME_ENV_ID)),runtimeEnv.RUNTIME_FUNCTION_NAME&&(this.#N.functionName=runtimeEnv.RUNTIME_FUNCTION_NAME),runtimeEnv.RUNTIME_FUNCTION_GATEWAY_VIP&&(this.#N.functionGatewayVip=runtimeEnv.RUNTIME_FUNCTION_GATEWAY_VIP),runtimeEnv.RUNTIME_FUNCTION_INSTANCE_ID&&(this.#N.functionInstanceId=runtimeEnv.RUNTIME_FUNCTION_INSTANCE_ID),runtimeEnv.RUNTIME_MONGO_CLUSTER_ENDPOINT&&(this.#N.functionDatabaseEndpoint=runtimeEnv.RUNTIME_MONGO_CLUSTER_ENDPOINT),runtimeEnv.RUNTIME_MONGO_DATABASE_NAME&&(this.#N.functionDatabaseName=runtimeEnv.RUNTIME_MONGO_DATABASE_NAME)):this.#N={secretId:runtimeEnv.RUNTIME_ACCESS_KEY,secretKey:runtimeEnv.RUNTIME_SECRET_KEY,fromEnvId:runtimeEnv.RUNTIME_ENV_ID,toEnvId:runtimeEnv.RUNTIME_ENV_ID,functionName:runtimeEnv.RUNTIME_FUNCTION_NAME,functionGatewayVip:runtimeEnv.RUNTIME_FUNCTION_GATEWAY_VIP,functionInstanceId:runtimeEnv.RUNTIME_FUNCTION_INSTANCE_ID,functionDatabaseEndpoint:runtimeEnv.RUNTIME_MONGO_CLUSTER_ENDPOINT,functionDatabaseName:runtimeEnv.RUNTIME_MONGO_DATABASE_NAME}}init(N){N?.env&&typeof N?.env=="string"&&(this.#N.toEnvId=N.env),N?.envId&&(this.#N.toEnvId=N.envId)}getAlipayContext(){return(0,utils_1.getAlipayContext)()}async callFunction(N){return await(0,callFunction_1.callFunction)(this.#N,N)}database(){return this.#E||(this.#E=new Database_1.Database(this.#N)),this.#E}mysql(){return this.#_||(this.#_=new MySQL_1.MySQL(this.#N)),this.#_}}exports.Cloud=Cloud;
{
"name": "@alipay/faas-server-sdk",
"version": "0.0.25",
"version": "0.0.26",
"description": "云函数服务 SDK",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc