Skip to content

Commit 4dacb94

Browse files
committed
Upgrade TypeScript to 5.3.3 for compatibility with modern dependencies
- Updated TypeScript from 3.5.3 to 5.3.3 - Fixed type assertion in axios.ts for AxiosRequestHeaders - Added skipLibCheck to tsconfig.json to avoid third-party type errors - Rebuilt dist files with updated TypeScript compiler
1 parent b4125f0 commit 4dacb94

12 files changed

Lines changed: 1266 additions & 5391 deletions

File tree

platform/dist/axios.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export declare function transformConfigForOauth(config: AxiosRequestConfig): {
55
};
66
declare function callAxios(step: any, config: AxiosRequestConfig, signConfig?: any): Promise<any>;
77
declare namespace callAxios {
8-
var create: (config?: AxiosRequestConfig | undefined, signConfig?: any) => import("axios").AxiosInstance;
8+
var create: (config?: AxiosRequestConfig, signConfig?: any) => import("axios").AxiosInstance;
99
}
1010
export default callAxios;

platform/dist/axios.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.transformConfigForOauth = void 0;
3+
exports.transformConfigForOauth = transformConfigForOauth;
44
const axios_1 = require("axios");
55
const querystring = require("querystring");
66
const utils_1 = require("./utils");
@@ -75,7 +75,6 @@ function transformConfigForOauth(config) {
7575
config.paramsSerializer = oauth1ParamsSerializer;
7676
return requestData;
7777
}
78-
exports.transformConfigForOauth = transformConfigForOauth;
7978
async function getOauthSignature(config, signConfig) {
8079
const { oauthSignerUri, token, } = signConfig;
8180
const requestData = transformConfigForOauth(config);
@@ -107,7 +106,7 @@ async function callAxios(step, config, signConfig) {
107106
if (config.debug) {
108107
stepExport(step, config, "debug_config");
109108
}
110-
const response = await axios_1.default(config);
109+
const response = await (0, axios_1.default)(config);
111110
if (config.debug) {
112111
stepExport(step, response.data, "debug_response");
113112
}
@@ -124,7 +123,7 @@ async function callAxios(step, config, signConfig) {
124123
}
125124
}
126125
function stepExport(step, message, key) {
127-
message = utils_1.cloneSafe(message);
126+
message = (0, utils_1.cloneSafe)(message);
128127
if (step) {
129128
if (step.export) {
130129
step.export(key, message);

platform/dist/index.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export declare const SendConfigEmail: t.PartialC<{
1313
subject: t.StringC;
1414
text: t.StringC;
1515
}>;
16-
export declare type SendConfigEmail = t.TypeOf<typeof SendConfigEmail>;
16+
export type SendConfigEmail = t.TypeOf<typeof SendConfigEmail>;
1717
export declare const SendConfigEmit_required: t.ExactC<t.TypeC<{
1818
raw_event: t.ObjectC;
1919
}>>;
@@ -25,7 +25,7 @@ export declare const SendConfigEmit: t.IntersectionC<[t.ExactC<t.TypeC<{
2525
}>>, t.PartialC<{
2626
event: t.ObjectC;
2727
}>]>;
28-
export declare type SendConfigEmit = t.TypeOf<typeof SendConfigEmit>;
28+
export type SendConfigEmit = t.TypeOf<typeof SendConfigEmit>;
2929
export declare const HTTP_METHODS: string[];
3030
export declare const SendConfigHTTP: t.IntersectionC<[t.ExactC<t.TypeC<{
3131
method: t.KeyofC<{}>;
@@ -39,18 +39,18 @@ export declare const SendConfigHTTP: t.IntersectionC<[t.ExactC<t.TypeC<{
3939
headers: t.ObjectC;
4040
params: t.ObjectC;
4141
}>]>;
42-
export declare type SendConfigHTTP = t.TypeOf<typeof SendConfigHTTP>;
42+
export type SendConfigHTTP = t.TypeOf<typeof SendConfigHTTP>;
4343
export declare const SendConfigS3: t.ExactC<t.TypeC<{
4444
bucket: t.StringC;
4545
payload: t.UnionC<[t.StringC, t.ObjectC]>;
4646
prefix: t.StringC;
4747
}>>;
48-
export declare type SendConfigS3 = t.TypeOf<typeof SendConfigS3>;
48+
export type SendConfigS3 = t.TypeOf<typeof SendConfigS3>;
4949
export declare const SendConfigSQL: t.ExactC<t.TypeC<{
5050
payload: t.UnionC<[t.StringC, t.ObjectC]>;
5151
table: t.StringC;
5252
}>>;
53-
export declare type SendConfigSQL = t.TypeOf<typeof SendConfigSQL>;
53+
export type SendConfigSQL = t.TypeOf<typeof SendConfigSQL>;
5454
export declare const SendConfigSnowflake: t.ExactC<t.TypeC<{
5555
account: t.StringC;
5656
database: t.StringC;
@@ -62,12 +62,12 @@ export declare const SendConfigSnowflake: t.ExactC<t.TypeC<{
6262
stage_name: t.StringC;
6363
user: t.StringC;
6464
}>>;
65-
export declare type SendConfigSnowflake = t.TypeOf<typeof SendConfigSnowflake>;
65+
export type SendConfigSnowflake = t.TypeOf<typeof SendConfigSnowflake>;
6666
export declare const SendConfigSSE: t.ExactC<t.TypeC<{
6767
channel: t.StringC;
6868
payload: t.UnionC<[t.StringC, t.ObjectC]>;
6969
}>>;
70-
export declare type SendConfigSSE = t.TypeOf<typeof SendConfigSSE>;
70+
export type SendConfigSSE = t.TypeOf<typeof SendConfigSSE>;
7171
interface SendFunctionsWrapper {
7272
email: (config: SendConfigEmail) => void;
7373
emit: (config: SendConfigEmit) => void;

platform/dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.$sendConfigRuntimeTypeChecker = exports.$send = exports.$end = exports.END_NEEDLE = exports.$event = exports.sendTypeMap = exports.SendConfigSSE = exports.SendConfigSnowflake = exports.SendConfigSQL = exports.SendConfigS3 = exports.SendConfigHTTP = exports.HTTP_METHODS = exports.SendConfigEmit = exports.SendConfigEmit_optional = exports.SendConfigEmit_required = exports.SendConfigEmail = exports.transformConfigForOauth = exports.axios = void 0;
3+
exports.$sendConfigRuntimeTypeChecker = exports.$send = exports.END_NEEDLE = exports.$event = exports.sendTypeMap = exports.SendConfigSSE = exports.SendConfigSnowflake = exports.SendConfigSQL = exports.SendConfigS3 = exports.SendConfigHTTP = exports.HTTP_METHODS = exports.SendConfigEmit = exports.SendConfigEmit_optional = exports.SendConfigEmit_required = exports.SendConfigEmail = exports.DEFAULT_POLLING_SOURCE_TIMER_INTERVAL = exports.sqlProxy = exports.sqlProp = exports.ConfigurationError = exports.jsonStringifySafe = exports.cloneSafe = exports.transformConfigForOauth = exports.axios = void 0;
4+
exports.$end = $end;
45
const t = require("io-ts");
56
const axios_1 = require("./axios");
67
exports.axios = axios_1.default;
@@ -118,7 +119,6 @@ function $end(message) {
118119
};
119120
throw err;
120121
}
121-
exports.$end = $end;
122122
exports.$sendConfigRuntimeTypeChecker = (function () {
123123
const ret = {};
124124
for (const [sendName, sendConfigType,] of Object.entries(exports.sendTypeMap)) {

platform/dist/sql-prop.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
import { JsonPrimitive } from "type-fest";
22
import { ExecuteQueryArgs } from "./sql";
3-
export declare type ColumnSchema = {
3+
export type ColumnSchema = {
44
columnDefault: JsonPrimitive;
55
dataType: string;
66
isNullable: boolean;
77
tableSchema?: string;
88
};
9-
export declare type TableMetadata = {
9+
export type TableMetadata = {
1010
rowCount?: number;
1111
};
12-
export declare type TableSchema = {
12+
export type TableSchema = {
1313
[columnName: string]: ColumnSchema;
1414
};
15-
export declare type TableInfo = {
15+
export type TableInfo = {
1616
metadata: TableMetadata;
1717
schema: TableSchema;
1818
};
19-
export declare type DbInfo = {
19+
export type DbInfo = {
2020
[tableName: string]: TableInfo;
2121
};
22-
export declare type SqlProp = {
22+
export type SqlProp = {
2323
query: string;
2424
params?: string[];
2525
};

platform/dist/sql-proxy.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { ExecuteQueryArgs } from "./sql";
2-
export declare type ClientConfiguration = object;
3-
export declare type ProxyArgs = {
2+
export type ClientConfiguration = object;
3+
export type ProxyArgs = {
44
query: string;
55
params?: unknown[];
66
};
7-
export declare type Row = object;
7+
export type Row = object;
88
declare const _default: {
99
methods: {
1010
/**

platform/dist/sql.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export declare type ExecuteQueryArgs = object | string;
1+
export type ExecuteQueryArgs = object | string;

platform/dist/utils.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.jsonStringifySafe = exports.cloneSafe = void 0;
3+
exports.cloneSafe = cloneSafe;
4+
exports.jsonStringifySafe = jsonStringifySafe;
45
function cloneSafe(o) {
56
const str = jsonStringifySafe(o);
67
return str
78
? JSON.parse(str)
89
: null;
910
}
10-
exports.cloneSafe = cloneSafe;
1111
// this looks pretty terrible, but on axios return value,
1212
//
1313
// jsonStringifySafe ~1ms
@@ -44,4 +44,3 @@ function jsonStringifySafe(v, set) {
4444
}
4545
}
4646
}
47-
exports.jsonStringifySafe = jsonStringifySafe;

platform/lib/axios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function create(config?: AxiosRequestConfig, signConfig?: any) {
164164
axiosInstance.interceptors.request.use(async (config) => {
165165
if (signConfig) {
166166
const oauthSignature = await getOauthSignature(config, signConfig);
167-
if (!config.headers) config.headers = {};
167+
if (!config.headers) config.headers = {} as any;
168168
config.headers.Authorization = oauthSignature;
169169
}
170170

0 commit comments

Comments
 (0)