@based/type-gen 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -77
- package/dist/index.js.map +1 -1
- package/dist/updateTypesPath.d.ts +15 -0
- package/dist/updateTypesPath.d.ts.map +1 -0
- package/dist/updateTypesPath.js +88 -0
- package/dist/updateTypesPath.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +51 -101
- package/src/updateTypesPath.ts +109 -0
- package/test/types.ts +17 -9
- package/dist/auth.d.ts +0 -16
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -3
- package/dist/auth.js.map +0 -1
- package/dist/channel.d.ts +0 -6
- package/dist/channel.d.ts.map +0 -1
- package/dist/channel.js +0 -7
- package/dist/channel.js.map +0 -1
- package/dist/client.d.ts +0 -18
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -7
- package/dist/client.js.map +0 -1
- package/dist/context.d.ts +0 -100
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js +0 -39
- package/dist/context.js.map +0 -1
- package/dist/fromAst.d.ts +0 -4
- package/dist/fromAst.d.ts.map +0 -1
- package/dist/fromAst.js +0 -34
- package/dist/fromAst.js.map +0 -1
- package/dist/function.d.ts +0 -1
- package/dist/function.d.ts.map +0 -1
- package/dist/function.js +0 -1
- package/dist/function.js.map +0 -1
- package/dist/functions.d.ts +0 -181
- package/dist/functions.d.ts.map +0 -1
- package/dist/functions.js +0 -29
- package/dist/functions.js.map +0 -1
- package/dist/geo.d.ts +0 -36
- package/dist/geo.d.ts.map +0 -1
- package/dist/geo.js +0 -3
- package/dist/geo.js.map +0 -1
- package/dist/parseAst.d.ts +0 -4
- package/dist/parseAst.d.ts.map +0 -1
- package/dist/parseAst.js +0 -34
- package/dist/parseAst.js.map +0 -1
- package/dist/query.d.ts +0 -7
- package/dist/query.d.ts.map +0 -1
- package/dist/query.js +0 -7
- package/dist/query.js.map +0 -1
- package/dist/stream.d.ts +0 -40
- package/dist/stream.d.ts.map +0 -1
- package/dist/stream.js +0 -63
- package/dist/stream.js.map +0 -1
- package/dist/uws.d.ts +0 -469
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,11 @@ export declare const updateTypes: (fns: ({
|
|
|
7
7
|
payload: string;
|
|
8
8
|
result: string;
|
|
9
9
|
})[], opts?: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
imports?: string[];
|
|
11
|
+
clientPath?: string;
|
|
12
|
+
functionPath?: string;
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
clientPath: string | void;
|
|
15
|
+
functionPath: string | void;
|
|
16
|
+
}>;
|
|
13
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAGtD,eAAO,MAAM,WAAW,QACjB,CACD;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CACnE,EAAE,SACG;IACJ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAGtD,eAAO,MAAM,WAAW,QACjB,CACD;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CACnE,EAAE,SACG;IACJ,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;gBAEW,MAAM,GAAG,IAAI;kBACX,MAAM,GAAG,IAAI;EAwD5B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,87 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateTypes = void 0;
|
|
4
|
-
const
|
|
4
|
+
const updateTypesPath_1 = require("./updateTypesPath");
|
|
5
5
|
const updateTypes = async (fns, opts = {}) => {
|
|
6
|
-
|
|
7
|
-
const basedClientPath = opts.basedPath ||
|
|
6
|
+
const inputClientPath = opts.clientPath ||
|
|
8
7
|
require.resolve('@based/client', { paths: [process.cwd()] });
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const inputFunctionPath = opts.functionPath ||
|
|
9
|
+
require.resolve('@based/functions', { paths: [process.cwd()] });
|
|
10
|
+
let clientPath;
|
|
11
|
+
let functionPath;
|
|
12
|
+
if (inputClientPath) {
|
|
13
|
+
const declarationPath = inputClientPath.replace('/index.js', '/index.d.ts');
|
|
14
|
+
const originalDeclartionPath = inputClientPath.replace('/index.js', '/index_original.d.ts');
|
|
15
|
+
clientPath = await (0, updateTypesPath_1.updateTypesPath)(fns, {
|
|
16
|
+
imports: opts.imports,
|
|
17
|
+
originalDeclartionPath,
|
|
18
|
+
declarationPath,
|
|
19
|
+
}).catch(() => {
|
|
20
|
+
console.error('Cannot find original declaration file - you may need to upgrade to @based/client ^4.8.8');
|
|
21
|
+
});
|
|
11
22
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
let callFns = '\n';
|
|
24
|
-
let queryFns = '\n';
|
|
25
|
-
let fnCnt = 0;
|
|
26
|
-
let queryCnt = 0;
|
|
27
|
-
let queryMap = '\n';
|
|
28
|
-
let needsParsing = opts.extraImports ?? false;
|
|
29
|
-
for (const fn of fns) {
|
|
30
|
-
if (fn.config.type === 'function') {
|
|
31
|
-
needsParsing = true;
|
|
32
|
-
fnCnt++;
|
|
33
|
-
if ('path' in fn) {
|
|
34
|
-
const name = 'FN_Type_' + fnCnt;
|
|
35
|
-
imports += `import type ${name} from '${fn.path}';\n`;
|
|
36
|
-
callFns += `
|
|
37
|
-
call(
|
|
38
|
-
name: '${fn.config.name}',
|
|
39
|
-
payload: Parameters<typeof ${name}>[1],
|
|
40
|
-
opts?: CallOptions
|
|
41
|
-
): ReturnType<typeof ${name}>;
|
|
42
|
-
`;
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
callFns += `
|
|
46
|
-
call(
|
|
47
|
-
name: '${fn.config.name}',
|
|
48
|
-
payload: ${fn.payload},
|
|
49
|
-
opts?: CallOptions
|
|
50
|
-
): Promise<${fn.result}>
|
|
51
|
-
`;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else if (fn.config.type === 'query') {
|
|
55
|
-
queryCnt++;
|
|
56
|
-
if ('path' in fn) {
|
|
57
|
-
const name = 'Q_Type_' + queryCnt;
|
|
58
|
-
imports += `import type ${name} from '${fn.path}';\n`;
|
|
59
|
-
queryMap += `'${fn.config.name}': { payload: Parameters<typeof ${name}>[1], result: Parameters<Parameters<typeof ${name}>[2]>[0] },`;
|
|
60
|
-
queryFns += `
|
|
61
|
-
query(name: '${fn.config.name}', payload: Parameters<typeof ${name}>[1], opts?: QueryOptions): BasedQuery<Parameters<typeof ${name}>[1],Parameters<Parameters<typeof ${name}>[2]>[0]>;
|
|
62
|
-
`;
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
queryMap += `'${fn.config.name}': { payload: ${fn.payload}, result: ${fn.result} },`;
|
|
66
|
-
queryFns += `
|
|
67
|
-
query(name: '${fn.config.name}', payload: ${fn.payload}, opts?: QueryOptions): BasedQuery<${fn.payload},${fn.result}>;
|
|
68
|
-
`;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
if (needsParsing) {
|
|
73
|
-
let x = imports + decFile;
|
|
74
|
-
if (fnCnt > 0) {
|
|
75
|
-
x = x.replace('call(name: string, payload?: any, opts?: CallOptions): Promise<any>;', callFns);
|
|
76
|
-
}
|
|
77
|
-
if (queryCnt > 0) {
|
|
78
|
-
x = x.replace(`query(name: string, payload?: any, opts?: QueryOptions): BasedQuery;`, queryFns);
|
|
79
|
-
console.info('fix');
|
|
80
|
-
x = x.replace(/export type QueryMap = ([^@]*?)\};([^@]*?)\};/, `export type QueryMap = {${queryMap}}`);
|
|
81
|
-
}
|
|
82
|
-
await (0, fs_extra_1.writeFile)(decPath, x);
|
|
83
|
-
return decPath;
|
|
23
|
+
if (inputFunctionPath) {
|
|
24
|
+
const declarationPath = inputFunctionPath.replace('/index.js', '/client.d.ts');
|
|
25
|
+
const originalDeclartionPath = inputFunctionPath.replace('/index.js', '/client_original.d.ts');
|
|
26
|
+
functionPath = await (0, updateTypesPath_1.updateTypesPath)(fns, {
|
|
27
|
+
imports: opts.imports,
|
|
28
|
+
originalDeclartionPath,
|
|
29
|
+
declarationPath,
|
|
30
|
+
isAbstract: true,
|
|
31
|
+
}).catch(() => {
|
|
32
|
+
console.error('Cannot find original declaration file - you may need to upgrade to @based/functions ^2.2.4');
|
|
33
|
+
});
|
|
84
34
|
}
|
|
35
|
+
return {
|
|
36
|
+
functionPath,
|
|
37
|
+
clientPath,
|
|
38
|
+
};
|
|
85
39
|
};
|
|
86
40
|
exports.updateTypes = updateTypes;
|
|
87
41
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"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AC,OAAO;YACrB,sBAAsB;YACtB,eAAe;YACf,UAAU,EAAE,IAAI;SACjB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;YACZ,OAAO,CAAC,KAAK,CACX,4FAA4F,CAC7F,CAAA;QACH,CAAC,CAAC,CAAA;KACH;IAED,OAAO;QACL,YAAY;QACZ,UAAU;KACX,CAAA;AACH,CAAC,CAAA;AApEY,QAAA,WAAW,eAoEvB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BasedFunctionConfig } from '@based/functions';
|
|
2
|
+
export declare const updateTypesPath: (fns: ({
|
|
3
|
+
config: BasedFunctionConfig;
|
|
4
|
+
path: string;
|
|
5
|
+
} | {
|
|
6
|
+
config: BasedFunctionConfig;
|
|
7
|
+
payload: string;
|
|
8
|
+
result: string;
|
|
9
|
+
})[], opts: {
|
|
10
|
+
isAbstract?: boolean;
|
|
11
|
+
imports?: string[];
|
|
12
|
+
originalDeclartionPath: string;
|
|
13
|
+
declarationPath: string;
|
|
14
|
+
}) => Promise<string | void>;
|
|
15
|
+
//# sourceMappingURL=updateTypesPath.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateTypesPath.d.ts","sourceRoot":"","sources":["../src/updateTypesPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAGtD,eAAO,MAAM,eAAe,QACrB,CACD;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC7C;IAAE,MAAM,EAAE,mBAAmB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CACnE,EAAE,QACG;IACJ,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,sBAAsB,EAAE,MAAM,CAAA;IAC9B,eAAe,EAAE,MAAM,CAAA;CACxB,KACA,QAAQ,MAAM,GAAG,IAAI,CA8FvB,CAAA"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateTypesPath = void 0;
|
|
4
|
+
const fs_extra_1 = require("fs-extra");
|
|
5
|
+
const updateTypesPath = async (fns, opts) => {
|
|
6
|
+
let decFile = '';
|
|
7
|
+
try {
|
|
8
|
+
decFile = (await (0, fs_extra_1.readFile)(opts.originalDeclartionPath)).toString('utf-8');
|
|
9
|
+
}
|
|
10
|
+
catch (err) {
|
|
11
|
+
throw new Error(`Cannot find ${opts.originalDeclartionPath}`);
|
|
12
|
+
}
|
|
13
|
+
let imports = opts.imports ? opts.imports.join('\n') + '\n' : '\n';
|
|
14
|
+
let callFns = '\n';
|
|
15
|
+
let queryFns = '\n';
|
|
16
|
+
let fnCnt = 0;
|
|
17
|
+
let queryCnt = 0;
|
|
18
|
+
let queryMap = '\n';
|
|
19
|
+
let needsParsing = opts.imports ?? false;
|
|
20
|
+
const abstractPrefix = opts.isAbstract ? 'abstract ' : '';
|
|
21
|
+
for (const fn of fns) {
|
|
22
|
+
if (fn.config.type === 'function') {
|
|
23
|
+
needsParsing = true;
|
|
24
|
+
fnCnt++;
|
|
25
|
+
if ('path' in fn) {
|
|
26
|
+
const name = 'FN_Type_' + fnCnt;
|
|
27
|
+
imports += `import type ${name} from '${fn.path}';\n`;
|
|
28
|
+
callFns += `
|
|
29
|
+
${abstractPrefix}call(
|
|
30
|
+
name: '${fn.config.name}',
|
|
31
|
+
payload: Parameters<typeof ${name}>[1],
|
|
32
|
+
${opts.isAbstract ? 'ctx?: Context' : 'opts?: CallOptions'}
|
|
33
|
+
): ReturnType<typeof ${name}>;
|
|
34
|
+
`;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
callFns += `
|
|
38
|
+
${abstractPrefix}call(
|
|
39
|
+
name: '${fn.config.name}',
|
|
40
|
+
payload: ${fn.payload},
|
|
41
|
+
${opts.isAbstract ? 'ctx?: Context' : 'opts?: CallOptions'}
|
|
42
|
+
): Promise<${fn.result}>
|
|
43
|
+
`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else if (fn.config.type === 'query') {
|
|
47
|
+
queryCnt++;
|
|
48
|
+
if ('path' in fn) {
|
|
49
|
+
const name = 'Q_Type_' + queryCnt;
|
|
50
|
+
imports += `import type ${name} from '${fn.path}';\n`;
|
|
51
|
+
queryMap += `'${fn.config.name}': { payload: Parameters<typeof ${name}>[1], result: Parameters<Parameters<typeof ${name}>[2]>[0] },`;
|
|
52
|
+
queryFns += `
|
|
53
|
+
${abstractPrefix}query(name: '${fn.config.name}', payload: Parameters<typeof ${name}>[1], opts?: QueryOptions): BasedQuery<Parameters<typeof ${name}>[1],Parameters<Parameters<typeof ${name}>[2]>[0]>;
|
|
54
|
+
`;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
queryMap += `'${fn.config.name}': { payload: ${fn.payload}, result: ${fn.result} },`;
|
|
58
|
+
queryFns += `
|
|
59
|
+
${abstractPrefix}query(name: '${fn.config.name}', payload: ${fn.payload}, opts?: QueryOptions): BasedQuery<${fn.payload},${fn.result}>;
|
|
60
|
+
`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
if (needsParsing) {
|
|
65
|
+
let x = imports + decFile;
|
|
66
|
+
if (fnCnt > 0) {
|
|
67
|
+
if (opts.isAbstract) {
|
|
68
|
+
x = x.replace('abstract call(name: string, payload?: any, ctx?: Context): Promise<any>;', callFns);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
x = x.replace('call(name: string, payload?: any, opts?: CallOptions): Promise<any>;', callFns);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (queryCnt > 0) {
|
|
75
|
+
if (opts.isAbstract) {
|
|
76
|
+
x = x.replace(`abstract query(name: string, payload?: any): BasedQuery;`, queryFns);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
x = x.replace(`query(name: string, payload?: any, opts?: QueryOptions): BasedQuery;`, queryFns);
|
|
80
|
+
}
|
|
81
|
+
x = x.replace(/export type QueryMap = ([^@]*?)\};([^@]*?)\};/, `export type QueryMap = {${queryMap}}`);
|
|
82
|
+
}
|
|
83
|
+
await (0, fs_extra_1.writeFile)(opts.declarationPath, x);
|
|
84
|
+
return opts.declarationPath;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
exports.updateTypesPath = updateTypesPath;
|
|
88
|
+
//# sourceMappingURL=updateTypesPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateTypesPath.js","sourceRoot":"","sources":["../src/updateTypesPath.ts"],"names":[],"mappings":";;;AACA,uCAA8C;AAEvC,MAAM,eAAe,GAAG,KAAK,EAClC,GAGG,EACH,IAKC,EACuB,EAAE;IAC1B,IAAI,OAAO,GAAG,EAAE,CAAA;IAEhB,IAAI;QACF,OAAO,GAAG,CAAC,MAAM,IAAA,mBAAQ,EAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;KAC1E;IAAC,OAAO,GAAG,EAAE;QACZ,MAAM,IAAI,KAAK,CAAC,eAAe,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAAA;KAC9D;IAED,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IAClE,IAAI,OAAO,GAAG,IAAI,CAAA;IAClB,IAAI,QAAQ,GAAG,IAAI,CAAA;IACnB,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,QAAQ,GAAG,CAAC,CAAA;IAChB,IAAI,QAAQ,GAAG,IAAI,CAAA;IACnB,IAAI,YAAY,GAAG,IAAI,CAAC,OAAO,IAAI,KA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BasedFunctionConfig } from '@based/functions'
|
|
2
|
-
import {
|
|
2
|
+
import { updateTypesPath } from './updateTypesPath'
|
|
3
3
|
|
|
4
4
|
export const updateTypes = async (
|
|
5
5
|
fns: (
|
|
@@ -7,116 +7,66 @@ export const updateTypes = async (
|
|
|
7
7
|
| { config: BasedFunctionConfig; payload: string; result: string }
|
|
8
8
|
)[],
|
|
9
9
|
opts: {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
imports?: string[]
|
|
11
|
+
clientPath?: string
|
|
12
|
+
functionPath?: string
|
|
12
13
|
} = {}
|
|
13
|
-
): Promise<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
): Promise<{
|
|
15
|
+
clientPath: string | void
|
|
16
|
+
functionPath: string | void
|
|
17
|
+
}> => {
|
|
18
|
+
const inputClientPath =
|
|
19
|
+
opts.clientPath ||
|
|
18
20
|
require.resolve('@based/client', { paths: [process.cwd()] })
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// original
|
|
25
|
-
const decPath = basedClientPath.replace('/index.js', '/index.d.ts')
|
|
26
|
-
const decPathOriginal = basedClientPath.replace(
|
|
27
|
-
'/index.js',
|
|
28
|
-
'/index_original.d.ts'
|
|
29
|
-
)
|
|
22
|
+
const inputFunctionPath =
|
|
23
|
+
opts.functionPath ||
|
|
24
|
+
require.resolve('@based/functions', { paths: [process.cwd()] })
|
|
30
25
|
|
|
31
|
-
let
|
|
26
|
+
let clientPath: string | void
|
|
27
|
+
let functionPath: string | void
|
|
32
28
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
'
|
|
29
|
+
if (inputClientPath) {
|
|
30
|
+
const declarationPath = inputClientPath.replace('/index.js', '/index.d.ts')
|
|
31
|
+
const originalDeclartionPath = inputClientPath.replace(
|
|
32
|
+
'/index.js',
|
|
33
|
+
'/index_original.d.ts'
|
|
38
34
|
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
let imports = opts.extraImports ? opts.extraImports.join('\n') + '\n' : '\n'
|
|
42
|
-
|
|
43
|
-
let callFns = '\n'
|
|
44
|
-
let queryFns = '\n'
|
|
45
|
-
|
|
46
|
-
let fnCnt = 0
|
|
47
|
-
let queryCnt = 0
|
|
48
|
-
|
|
49
|
-
let queryMap = '\n'
|
|
50
|
-
|
|
51
|
-
let needsParsing = opts.extraImports ?? false
|
|
52
|
-
|
|
53
|
-
for (const fn of fns) {
|
|
54
|
-
if (fn.config.type === 'function') {
|
|
55
|
-
needsParsing = true
|
|
56
|
-
fnCnt++
|
|
57
|
-
if ('path' in fn) {
|
|
58
|
-
const name = 'FN_Type_' + fnCnt
|
|
59
|
-
imports += `import type ${name} from '${fn.path}';\n`
|
|
60
|
-
callFns += `
|
|
61
|
-
call(
|
|
62
|
-
name: '${fn.config.name}',
|
|
63
|
-
payload: Parameters<typeof ${name}>[1],
|
|
64
|
-
opts?: CallOptions
|
|
65
|
-
): ReturnType<typeof ${name}>;
|
|
66
|
-
`
|
|
67
|
-
} else {
|
|
68
|
-
callFns += `
|
|
69
|
-
call(
|
|
70
|
-
name: '${fn.config.name}',
|
|
71
|
-
payload: ${fn.payload},
|
|
72
|
-
opts?: CallOptions
|
|
73
|
-
): Promise<${fn.result}>
|
|
74
|
-
`
|
|
75
|
-
}
|
|
76
|
-
} else if (fn.config.type === 'query') {
|
|
77
|
-
queryCnt++
|
|
78
35
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
} else {
|
|
89
|
-
queryMap += `'${fn.config.name}': { payload: ${fn.payload}, result: ${fn.result} },`
|
|
90
|
-
|
|
91
|
-
queryFns += `
|
|
92
|
-
query(name: '${fn.config.name}', payload: ${fn.payload}, opts?: QueryOptions): BasedQuery<${fn.payload},${fn.result}>;
|
|
93
|
-
`
|
|
94
|
-
}
|
|
95
|
-
}
|
|
36
|
+
clientPath = await updateTypesPath(fns, {
|
|
37
|
+
imports: opts.imports,
|
|
38
|
+
originalDeclartionPath,
|
|
39
|
+
declarationPath,
|
|
40
|
+
}).catch(() => {
|
|
41
|
+
console.error(
|
|
42
|
+
'Cannot find original declaration file - you may need to upgrade to @based/client ^4.8.8'
|
|
43
|
+
)
|
|
44
|
+
})
|
|
96
45
|
}
|
|
97
46
|
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
47
|
+
if (inputFunctionPath) {
|
|
48
|
+
const declarationPath = inputFunctionPath.replace(
|
|
49
|
+
'/index.js',
|
|
50
|
+
'/client.d.ts'
|
|
51
|
+
)
|
|
52
|
+
const originalDeclartionPath = inputFunctionPath.replace(
|
|
53
|
+
'/index.js',
|
|
54
|
+
'/client_original.d.ts'
|
|
55
|
+
)
|
|
56
|
+
functionPath = await updateTypesPath(fns, {
|
|
57
|
+
imports: opts.imports,
|
|
58
|
+
originalDeclartionPath,
|
|
59
|
+
declarationPath,
|
|
60
|
+
isAbstract: true,
|
|
61
|
+
}).catch(() => {
|
|
62
|
+
console.error(
|
|
63
|
+
'Cannot find original declaration file - you may need to upgrade to @based/functions ^2.2.4'
|
|
110
64
|
)
|
|
65
|
+
})
|
|
66
|
+
}
|
|
111
67
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
/export type QueryMap = ([^@]*?)\};([^@]*?)\};/,
|
|
116
|
-
`export type QueryMap = {${queryMap}}`
|
|
117
|
-
)
|
|
118
|
-
}
|
|
119
|
-
await writeFile(decPath, x)
|
|
120
|
-
return decPath
|
|
68
|
+
return {
|
|
69
|
+
functionPath,
|
|
70
|
+
clientPath,
|
|
121
71
|
}
|
|
122
72
|
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { BasedFunctionConfig } from '@based/functions'
|
|
2
|
+
import { readFile, writeFile } from 'fs-extra'
|
|
3
|
+
|
|
4
|
+
export const updateTypesPath = async (
|
|
5
|
+
fns: (
|
|
6
|
+
| { config: BasedFunctionConfig; path: string }
|
|
7
|
+
| { config: BasedFunctionConfig; payload: string; result: string }
|
|
8
|
+
)[],
|
|
9
|
+
opts: {
|
|
10
|
+
isAbstract?: boolean
|
|
11
|
+
imports?: string[]
|
|
12
|
+
originalDeclartionPath: string
|
|
13
|
+
declarationPath: string
|
|
14
|
+
}
|
|
15
|
+
): Promise<string | void> => {
|
|
16
|
+
let decFile = ''
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
decFile = (await readFile(opts.originalDeclartionPath)).toString('utf-8')
|
|
20
|
+
} catch (err) {
|
|
21
|
+
throw new Error(`Cannot find ${opts.originalDeclartionPath}`)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let imports = opts.imports ? opts.imports.join('\n') + '\n' : '\n'
|
|
25
|
+
let callFns = '\n'
|
|
26
|
+
let queryFns = '\n'
|
|
27
|
+
let fnCnt = 0
|
|
28
|
+
let queryCnt = 0
|
|
29
|
+
let queryMap = '\n'
|
|
30
|
+
let needsParsing = opts.imports ?? false
|
|
31
|
+
|
|
32
|
+
const abstractPrefix = opts.isAbstract ? 'abstract ' : ''
|
|
33
|
+
|
|
34
|
+
for (const fn of fns) {
|
|
35
|
+
if (fn.config.type === 'function') {
|
|
36
|
+
needsParsing = true
|
|
37
|
+
fnCnt++
|
|
38
|
+
if ('path' in fn) {
|
|
39
|
+
const name = 'FN_Type_' + fnCnt
|
|
40
|
+
imports += `import type ${name} from '${fn.path}';\n`
|
|
41
|
+
callFns += `
|
|
42
|
+
${abstractPrefix}call(
|
|
43
|
+
name: '${fn.config.name}',
|
|
44
|
+
payload: Parameters<typeof ${name}>[1],
|
|
45
|
+
${opts.isAbstract ? 'ctx?: Context' : 'opts?: CallOptions'}
|
|
46
|
+
): ReturnType<typeof ${name}>;
|
|
47
|
+
`
|
|
48
|
+
} else {
|
|
49
|
+
callFns += `
|
|
50
|
+
${abstractPrefix}call(
|
|
51
|
+
name: '${fn.config.name}',
|
|
52
|
+
payload: ${fn.payload},
|
|
53
|
+
${opts.isAbstract ? 'ctx?: Context' : 'opts?: CallOptions'}
|
|
54
|
+
): Promise<${fn.result}>
|
|
55
|
+
`
|
|
56
|
+
}
|
|
57
|
+
} else if (fn.config.type === 'query') {
|
|
58
|
+
queryCnt++
|
|
59
|
+
if ('path' in fn) {
|
|
60
|
+
const name = 'Q_Type_' + queryCnt
|
|
61
|
+
imports += `import type ${name} from '${fn.path}';\n`
|
|
62
|
+
queryMap += `'${fn.config.name}': { payload: Parameters<typeof ${name}>[1], result: Parameters<Parameters<typeof ${name}>[2]>[0] },`
|
|
63
|
+
queryFns += `
|
|
64
|
+
${abstractPrefix}query(name: '${fn.config.name}', payload: Parameters<typeof ${name}>[1], opts?: QueryOptions): BasedQuery<Parameters<typeof ${name}>[1],Parameters<Parameters<typeof ${name}>[2]>[0]>;
|
|
65
|
+
`
|
|
66
|
+
} else {
|
|
67
|
+
queryMap += `'${fn.config.name}': { payload: ${fn.payload}, result: ${fn.result} },`
|
|
68
|
+
queryFns += `
|
|
69
|
+
${abstractPrefix}query(name: '${fn.config.name}', payload: ${fn.payload}, opts?: QueryOptions): BasedQuery<${fn.payload},${fn.result}>;
|
|
70
|
+
`
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (needsParsing) {
|
|
75
|
+
let x = imports + decFile
|
|
76
|
+
if (fnCnt > 0) {
|
|
77
|
+
if (opts.isAbstract) {
|
|
78
|
+
x = x.replace(
|
|
79
|
+
'abstract call(name: string, payload?: any, ctx?: Context): Promise<any>;',
|
|
80
|
+
callFns
|
|
81
|
+
)
|
|
82
|
+
} else {
|
|
83
|
+
x = x.replace(
|
|
84
|
+
'call(name: string, payload?: any, opts?: CallOptions): Promise<any>;',
|
|
85
|
+
callFns
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (queryCnt > 0) {
|
|
90
|
+
if (opts.isAbstract) {
|
|
91
|
+
x = x.replace(
|
|
92
|
+
`abstract query(name: string, payload?: any): BasedQuery;`,
|
|
93
|
+
queryFns
|
|
94
|
+
)
|
|
95
|
+
} else {
|
|
96
|
+
x = x.replace(
|
|
97
|
+
`query(name: string, payload?: any, opts?: QueryOptions): BasedQuery;`,
|
|
98
|
+
queryFns
|
|
99
|
+
)
|
|
100
|
+
}
|
|
101
|
+
x = x.replace(
|
|
102
|
+
/export type QueryMap = ([^@]*?)\};([^@]*?)\};/,
|
|
103
|
+
`export type QueryMap = {${queryMap}}`
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
await writeFile(opts.declarationPath, x)
|
|
107
|
+
return opts.declarationPath
|
|
108
|
+
}
|
|
109
|
+
}
|
package/test/types.ts
CHANGED
|
@@ -35,14 +35,22 @@ test.serial('Generate types file from examples', async (t) => {
|
|
|
35
35
|
},
|
|
36
36
|
])
|
|
37
37
|
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
const files = await Promise.all(
|
|
39
|
+
['client/dist/index.d.ts', 'functions/dist/client.d.ts'].map((f) =>
|
|
40
|
+
readFile(join(__dirname, '../../' + f), {
|
|
41
|
+
encoding: 'utf-8',
|
|
42
|
+
})
|
|
43
|
+
)
|
|
44
|
+
)
|
|
41
45
|
|
|
42
|
-
t.is(result, join(__dirname, '../../client/dist/index.d.ts'))
|
|
43
|
-
t.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
t.is(result.clientPath, join(__dirname, '../../client/dist/index.d.ts'))
|
|
47
|
+
t.is(result.functionPath, join(__dirname, '../../functions/dist/client.d.ts'))
|
|
48
|
+
|
|
49
|
+
for (const file of files) {
|
|
50
|
+
t.true(file.includes('counter'))
|
|
51
|
+
t.true(file.includes('db:schema'))
|
|
52
|
+
t.true(file.includes('db:update-schema'))
|
|
53
|
+
t.true(file.includes('db:set'))
|
|
54
|
+
t.true(file.includes('hello-world'))
|
|
55
|
+
}
|
|
48
56
|
})
|
package/dist/auth.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BasedFunctionClient } from './client';
|
|
2
|
-
import { HttpRequest } from './uws';
|
|
3
|
-
import { Context, WebSocketSession, HttpSession } from './context';
|
|
4
|
-
export type AuthState = {
|
|
5
|
-
token?: string;
|
|
6
|
-
userId?: string;
|
|
7
|
-
refreshToken?: string;
|
|
8
|
-
error?: string;
|
|
9
|
-
persistent?: boolean;
|
|
10
|
-
type?: string;
|
|
11
|
-
};
|
|
12
|
-
export type Authorize = (based: BasedFunctionClient, context: Context<HttpSession | WebSocketSession>, name: string, // name as generic dope
|
|
13
|
-
payload?: any) => Promise<boolean>;
|
|
14
|
-
export type VerifyAuthState = (based: BasedFunctionClient, context: Context<HttpSession | WebSocketSession>, authState: AuthState) => Promise<true | AuthState>;
|
|
15
|
-
export type AuthorizeConnection = (based: BasedFunctionClient, req: HttpRequest, ip: string) => Promise<boolean>;
|
|
16
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAElE,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CACtB,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,OAAO,CAAC,WAAW,GAAG,gBAAgB,CAAC,EAChD,IAAI,EAAE,MAAM,EAAE,uBAAuB;AACrC,OAAO,CAAC,EAAE,GAAG,KACV,OAAO,CAAC,OAAO,CAAC,CAAA;AAKrB,MAAM,MAAM,eAAe,GAAG,CAC5B,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,OAAO,CAAC,WAAW,GAAG,gBAAgB,CAAC,EAChD,SAAS,EAAE,SAAS,KACjB,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC,CAAA;AAE9B,MAAM,MAAM,mBAAmB,GAAG,CAChC,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,WAAW,EAChB,EAAE,EAAE,MAAM,KACP,OAAO,CAAC,OAAO,CAAC,CAAA"}
|
package/dist/auth.js
DELETED
package/dist/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":""}
|
package/dist/channel.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ChannelMessageFunction } from './functions';
|
|
2
|
-
export declare abstract class BasedChannel<K = any> {
|
|
3
|
-
abstract subscribe(onMessage: ChannelMessageFunction<K>, onError?: (err: any) => void): () => void;
|
|
4
|
-
abstract publish(message: K): void;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=channel.d.ts.map
|
package/dist/channel.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEpD,8BAAsB,YAAY,CAAC,CAAC,GAAG,GAAG;IACxC,QAAQ,CAAC,SAAS,CAChB,SAAS,EAAE,sBAAsB,CAAC,CAAC,CAAC,EACpC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,GAC3B,MAAM,IAAI;IAEb,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI;CACnC"}
|
package/dist/channel.js
DELETED
package/dist/channel.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../src/channel.ts"],"names":[],"mappings":";;;AAEA,MAAsB,YAAY;CAOjC;AAPD,oCAOC"}
|