@cloudbase/wx-cloud-client-sdk
Advanced tools
+11
-2
@@ -1,4 +0,5 @@ | ||
| import { CloudBaseInstance, ExtendedCloudBaseInstance, IMySqlOptions, OrmClient } from './types'; | ||
| import { CloudBaseInstance, ExtendedCloudBaseInstance, IMySqlOptions, IPgOptions, OrmClient } from './types'; | ||
| import { generateHTTPClient } from './orm/http-orm-client'; | ||
| import { MySqlClient } from './db/mysql'; | ||
| import { PostgrestClient } from './db/postgrest'; | ||
| import { Fetch } from './db/postgrest/types'; | ||
@@ -21,4 +22,11 @@ import type { CloudbaseAdapter } from '@cloudbase/adapter-interface'; | ||
| }): (options?: IMySqlOptions) => MySqlClient<any, {}>; | ||
| declare function generatePGClient(cloud: CloudBaseInstance, options?: { | ||
| envId?: string; | ||
| pgBaseUrl?: string; | ||
| fetch?: Fetch; | ||
| }): (clientOptions?: IPgOptions) => PostgrestClient<any, { | ||
| PostgrestVersion: "12"; | ||
| }, string, any>; | ||
| export * from './types'; | ||
| export { generateHTTPClient, generateMySQLClient }; | ||
| export { generateHTTPClient, generateMySQLClient, generatePGClient }; | ||
| declare const _default: { | ||
@@ -31,3 +39,4 @@ init: typeof init; | ||
| generateMySQLClient: typeof generateMySQLClient; | ||
| generatePGClient: typeof generatePGClient; | ||
| }; | ||
| export default _default; |
| import { SDKRequestInterface } from '@cloudbase/adapter-interface'; | ||
| import { MySqlClient } from '../db/mysql'; | ||
| import { PostgrestClient } from '../db/postgrest'; | ||
| /** | ||
@@ -718,2 +719,3 @@ * 基础 Model 类型定义 | ||
| export type IMySqlClient = (options?: IMySqlOptions) => MySqlClient; | ||
| export type IPgClient = (options?: IPgOptions) => PostgrestClient<any, any, string, any>; | ||
| /** | ||
@@ -726,3 +728,3 @@ * 扩展的云实例接口,扩展了云函数调用接口并包含ORM客户端。 | ||
| mysql: IMySqlClient; | ||
| rdb: IMySqlClient; | ||
| rdb: IPgClient; | ||
| } | ||
@@ -744,2 +746,5 @@ /** | ||
| } | ||
| export interface IPgOptions extends IMySqlOptions { | ||
| schema?: string; | ||
| } | ||
| export {}; |
+2
-2
| { | ||
| "name": "@cloudbase/wx-cloud-client-sdk", | ||
| "version": "1.8.6", | ||
| "version": "1.8.7", | ||
| "publishConfig": { | ||
@@ -45,3 +45,3 @@ "access": "public" | ||
| "@rollup/plugin-typescript": "^11.1.6", | ||
| "@tcwd/dev-tools": "workspace:^", | ||
| "@tcwd/dev-tools": "^1.0.1", | ||
| "jest": "^29.7.0", | ||
@@ -48,0 +48,0 @@ "jest-environment-jsdom": "^29.7.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
327353
1.7%3208
1.04%159
26.19%