New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kauth-sdk-node

Package Overview
Dependencies
Maintainers
5
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kauth-sdk-node - npm Package Compare versions

Comparing version 2.0.10 to 2.0.11-alpha.0

2

dist/common/config/config.d.ts

@@ -31,2 +31,4 @@ import { AuthenticationInformation } from '../../authenticator';

tracerInjected?: boolean;
traceConsumerKey?: string;
traceConsumer?: string;
marmotTenantId?: number;

@@ -33,0 +35,0 @@ marmotAccessKeyId?: string;

@@ -7,2 +7,6 @@ import { KauthConfig } from '../config/config';

constructor({ kflowOrigin, marmotTenantId, marmotAccessKeyId, marmotAccessKeySecret, kflowServiceName, kflowServicePort, }: KauthConfig);
setTraceId(traceId: string): void;
setSpanId(spanId: string): void;
setUserId(userId: string): void;
setTraceConsumers(consumers: Record<string, string> | ((val: Record<string, string>) => Record<string, string>)): void;
startProcessInstanceByKey(body: KflowCreateProcessRequest): Promise<string>;

@@ -9,0 +13,0 @@ completeTaskService(userId: string | number, body: KflowCompleteTaskServiceRequest): Promise<void>;

@@ -10,2 +10,14 @@ "use strict";

}
setTraceId(traceId) {
this.marmotUtil.setTraceId(traceId);
}
setSpanId(spanId) {
this.marmotUtil.setSpanId(spanId);
}
setUserId(userId) {
this.marmotUtil.setUserId(userId);
}
setTraceConsumers(consumers) {
this.marmotUtil.setTraceConsumers(consumers);
}
async startProcessInstanceByKey(body) {

@@ -12,0 +24,0 @@ return this.marmotUtil.post(http_1.ProcessUri, body);

@@ -6,2 +6,3 @@ import { MarmotOptions } from '../tool/marmot';

features: any;
traceConsumers?: any;
}

@@ -8,0 +9,0 @@ export interface KflowCompleteGraphServiceTaskRequest extends MarmotOptions {

@@ -41,2 +41,3 @@ /// <reference types="node" />

private spanId?;
private traceConsumers?;
constructor(origin: string, tenantId?: number, accessKeyId?: string, accessKeySecret?: string, serviceName?: string, servicePort?: string);

@@ -46,2 +47,3 @@ setUserId(userId: string): void;

setSpanId(spanId: string): void;
setTraceConsumers(traceConsumers: Record<string, string> | ((val: Record<string, string>) => Record<string, string>)): void;
get<RequestType extends ParsedUrlQueryInput | MarmotOptions, ResponseType>(path: string, params?: RequestType): Promise<ResponseType>;

@@ -54,3 +56,4 @@ post<RequestType extends MarmotOptions, ResponseType>(path: string, params?: RequestType, config?: AxiosRequestConfig): Promise<ResponseType>;

format<T>(response: AxiosResponse<BasicReponse<any>>): Promise<T>;
private formatTraceConsumers;
}
export {};

@@ -39,2 +39,10 @@ "use strict";

}
setTraceConsumers(traceConsumers) {
if (typeof traceConsumers === 'function') {
this.traceConsumers = traceConsumers(this.traceConsumers || {});
}
else {
this.traceConsumers = traceConsumers;
}
}
async get(path, params) {

@@ -95,2 +103,5 @@ // 兼容老的写法

}
if (this.traceConsumers) {
headers['x-kauth-trace-consumers'] = this.formatTraceConsumers(this.traceConsumers);
}
if (!this.proxyMatched) {

@@ -108,2 +119,3 @@ // 如果直连转发,需要传入 x-gw-tenant-id

headers.authorization = `Marmot ${this.accessKeyId}:${signature}`;
console.log('request headers', headers);
return headers;

@@ -127,3 +139,12 @@ }

}
formatTraceConsumers(traceConsumers) {
return Object
.keys(traceConsumers)
.map((k) => {
const v = this.traceConsumers[k];
return `${k}:${v}`;
})
.join(',');
}
}
exports.MarmotUtil = MarmotUtil;

2

package.json
{
"name": "kauth-sdk-node",
"version": "2.0.10",
"version": "2.0.11-alpha.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/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