@dbos-inc/dbos-sdk 0.8.28-preview → 0.8.32-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/cloud-cli/applications/configure.d.ts +2 -0
- package/dist/src/cloud-cli/applications/configure.d.ts.map +1 -0
- package/dist/src/cloud-cli/applications/configure.js +64 -0
- package/dist/src/cloud-cli/applications/configure.js.map +1 -0
- package/dist/src/cloud-cli/applications/deploy-app-code.d.ts.map +1 -1
- package/dist/src/cloud-cli/applications/deploy-app-code.js +63 -6
- package/dist/src/cloud-cli/applications/deploy-app-code.js.map +1 -1
- package/dist/src/cloud-cli/cli.js +0 -0
- package/dist/src/cloud-cli/userdb.d.ts.map +1 -1
- package/dist/src/cloud-cli/userdb.js +3 -2
- package/dist/src/cloud-cli/userdb.js.map +1 -1
- package/dist/src/cloud-cli/utils.d.ts +1 -0
- package/dist/src/cloud-cli/utils.d.ts.map +1 -1
- package/dist/src/cloud-cli/utils.js +21 -1
- package/dist/src/cloud-cli/utils.js.map +1 -1
- package/dist/src/dbos-executor.d.ts +4 -3
- package/dist/src/dbos-executor.d.ts.map +1 -1
- package/dist/src/dbos-executor.js +57 -33
- package/dist/src/dbos-executor.js.map +1 -1
- package/dist/src/dbos-runtime/TypeParser.d.ts +33 -0
- package/dist/src/dbos-runtime/TypeParser.d.ts.map +1 -0
- package/dist/src/dbos-runtime/TypeParser.js +104 -0
- package/dist/src/dbos-runtime/TypeParser.js.map +1 -0
- package/dist/src/dbos-runtime/openApi.d.ts +35 -0
- package/dist/src/dbos-runtime/openApi.d.ts.map +1 -0
- package/dist/src/dbos-runtime/openApi.js +595 -0
- package/dist/src/dbos-runtime/openApi.js.map +1 -0
- package/dist/src/dbos-runtime/tsDiagUtil.d.ts +16 -0
- package/dist/src/dbos-runtime/tsDiagUtil.d.ts.map +1 -0
- package/dist/src/dbos-runtime/tsDiagUtil.js +72 -0
- package/dist/src/dbos-runtime/tsDiagUtil.js.map +1 -0
- package/dist/src/httpServer/server.js +1 -1
- package/dist/src/httpServer/server.js.map +1 -1
- package/dist/src/provenance/provenance_daemon.d.ts +34 -0
- package/dist/src/provenance/provenance_daemon.d.ts.map +1 -0
- package/dist/src/provenance/provenance_daemon.js +86 -0
- package/dist/src/provenance/provenance_daemon.js.map +1 -0
- package/dist/src/system_database.d.ts +8 -4
- package/dist/src/system_database.d.ts.map +1 -1
- package/dist/src/system_database.js +71 -10
- package/dist/src/system_database.js.map +1 -1
- package/dist/src/telemetry/signals.d.ts +20 -0
- package/dist/src/telemetry/signals.d.ts.map +1 -0
- package/dist/src/telemetry/signals.js +11 -0
- package/dist/src/telemetry/signals.js.map +1 -0
- package/dist/src/workflow.d.ts +1 -1
- package/dist/src/workflow.d.ts.map +1 -1
- package/examples/hello/.eslintignore +4 -0
- package/examples/hello/.eslintrc +19 -0
- package/examples/hello/knexfile.ts +1 -1
- package/examples/hello/package.json +5 -2
- package/examples/hello/src/operations.ts +2 -2
- package/examples/hello/tsconfig.json +2 -2
- package/package.json +2 -2
@@ -0,0 +1,33 @@
|
|
1
|
+
import ts from 'typescript';
|
2
|
+
export interface ClassInfo {
|
3
|
+
readonly node: ts.ClassDeclaration;
|
4
|
+
readonly name?: string;
|
5
|
+
readonly decorators: readonly DecoratorInfo[];
|
6
|
+
readonly methods: readonly MethodInfo[];
|
7
|
+
}
|
8
|
+
export interface MethodInfo {
|
9
|
+
readonly node: ts.MethodDeclaration;
|
10
|
+
readonly name: string;
|
11
|
+
readonly decorators: readonly DecoratorInfo[];
|
12
|
+
readonly parameters: readonly ParameterInfo[];
|
13
|
+
}
|
14
|
+
export interface ParameterInfo {
|
15
|
+
readonly node: ts.ParameterDeclaration;
|
16
|
+
readonly name: string;
|
17
|
+
readonly decorators: readonly DecoratorInfo[];
|
18
|
+
readonly required: boolean;
|
19
|
+
}
|
20
|
+
export interface DecoratorInfo {
|
21
|
+
node: ts.Decorator;
|
22
|
+
identifier: ts.Identifier;
|
23
|
+
args: readonly ts.Expression[];
|
24
|
+
name?: string;
|
25
|
+
module?: string;
|
26
|
+
}
|
27
|
+
export declare class TypeParser {
|
28
|
+
#private;
|
29
|
+
get diags(): readonly ts.Diagnostic[];
|
30
|
+
constructor(program: ts.Program);
|
31
|
+
parse(): readonly ClassInfo[] | undefined;
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=TypeParser.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TypeParser.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/TypeParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,oBAAoB,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC;IACnB,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC;IAC1B,IAAI,EAAE,SAAS,EAAE,CAAC,UAAU,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAOD,qBAAa,UAAU;;IAIrB,IAAI,KAAK,6BAAgC;gBAE7B,OAAO,EAAE,EAAE,CAAC,OAAO;IAK/B,KAAK,IAAI,SAAS,SAAS,EAAE,GAAG,SAAS;CA2F1C"}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.TypeParser = void 0;
|
7
|
+
const typescript_1 = __importDefault(require("typescript"));
|
8
|
+
const tsDiagUtil_1 = require("./tsDiagUtil");
|
9
|
+
function isStaticMethod(node) {
|
10
|
+
const mods = node.modifiers ?? [];
|
11
|
+
return mods.some(m => m.kind === typescript_1.default.SyntaxKind.StaticKeyword);
|
12
|
+
}
|
13
|
+
class TypeParser {
|
14
|
+
#program;
|
15
|
+
#checker;
|
16
|
+
#diags = new tsDiagUtil_1.DiagnosticsCollector();
|
17
|
+
get diags() { return this.#diags.diags; }
|
18
|
+
constructor(program) {
|
19
|
+
this.#program = program;
|
20
|
+
this.#checker = program.getTypeChecker();
|
21
|
+
}
|
22
|
+
parse() {
|
23
|
+
const classes = new Array();
|
24
|
+
for (const file of this.#program.getSourceFiles()) {
|
25
|
+
if (file.isDeclarationFile)
|
26
|
+
continue;
|
27
|
+
for (const stmt of file.statements) {
|
28
|
+
if (typescript_1.default.isClassDeclaration(stmt)) {
|
29
|
+
const staticMethods = stmt.members
|
30
|
+
.filter(typescript_1.default.isMethodDeclaration)
|
31
|
+
// Only static methods are supported now, so filter out instance methods by default
|
32
|
+
.filter(isStaticMethod)
|
33
|
+
.map(m => this.#getMethod(m));
|
34
|
+
classes.push({
|
35
|
+
node: stmt,
|
36
|
+
// a class may not have a name if it's the default export
|
37
|
+
name: stmt.name?.getText(),
|
38
|
+
decorators: this.#getDecorators(stmt),
|
39
|
+
methods: staticMethods,
|
40
|
+
});
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
if (classes.length === 0) {
|
45
|
+
this.#diags.warn(`no classes found in ${JSON.stringify(this.#program.getRootFileNames())}`);
|
46
|
+
}
|
47
|
+
return (0, tsDiagUtil_1.diagResult)(classes, this.diags);
|
48
|
+
}
|
49
|
+
#getMethod(node) {
|
50
|
+
const name = node.name.getText();
|
51
|
+
const decorators = this.#getDecorators(node);
|
52
|
+
const parameters = node.parameters.map(p => this.#getParameter(p));
|
53
|
+
return { node, name, decorators, parameters };
|
54
|
+
}
|
55
|
+
#getParameter(node) {
|
56
|
+
const decorators = this.#getDecorators(node);
|
57
|
+
const name = node.name.getText();
|
58
|
+
const required = !node.questionToken && !node.initializer;
|
59
|
+
return { node, name, decorators, required };
|
60
|
+
}
|
61
|
+
#getDecoratorIdentifier(node) {
|
62
|
+
if (typescript_1.default.isCallExpression(node.expression)) {
|
63
|
+
if (typescript_1.default.isIdentifier(node.expression.expression)) {
|
64
|
+
return { identifier: node.expression.expression, args: node.expression.arguments };
|
65
|
+
}
|
66
|
+
this.#diags.raise(`Unexpected decorator CallExpression.expression type: ${typescript_1.default.SyntaxKind[node.expression.expression.kind]}`, node);
|
67
|
+
}
|
68
|
+
if (typescript_1.default.isIdentifier(node.expression)) {
|
69
|
+
return { identifier: node.expression, args: [] };
|
70
|
+
}
|
71
|
+
this.#diags.raise(`Unexpected decorator expression type: ${typescript_1.default.SyntaxKind[node.expression.kind]}`, node);
|
72
|
+
}
|
73
|
+
#getDecorators(node) {
|
74
|
+
return (typescript_1.default.getDecorators(node) ?? [])
|
75
|
+
.map(node => {
|
76
|
+
const decoratorIdentifier = this.#getDecoratorIdentifier(node);
|
77
|
+
if (!decoratorIdentifier)
|
78
|
+
return undefined;
|
79
|
+
const { identifier, args } = decoratorIdentifier;
|
80
|
+
const { name, module } = getImportSpecifier(identifier, this.#checker) ?? {};
|
81
|
+
return { node, identifier, name, module, args };
|
82
|
+
})
|
83
|
+
.filter((d) => !!d);
|
84
|
+
function getImportSpecifier(node, checker) {
|
85
|
+
const symbol = checker.getSymbolAtLocation(node);
|
86
|
+
const decls = symbol?.getDeclarations() ?? [];
|
87
|
+
for (const decl of decls) {
|
88
|
+
if (typescript_1.default.isImportSpecifier(decl)) {
|
89
|
+
// decl.name is the name for this type used in the local module.
|
90
|
+
// If the type name was overridden in the local module, the original type name is stored in decl.propertyName.
|
91
|
+
// Otherwise, decl.propertyName is undefined.
|
92
|
+
const name = (decl.propertyName ?? decl.name).getText();
|
93
|
+
// comment in TS AST declaration indicates moduleSpecifier *must* be a string literal
|
94
|
+
// "If [ImportDeclaration.moduleSpecifier] is not a StringLiteral it will be a grammar error."
|
95
|
+
const module = decl.parent.parent.parent.moduleSpecifier;
|
96
|
+
return { name, module: module.text };
|
97
|
+
}
|
98
|
+
}
|
99
|
+
return undefined;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
exports.TypeParser = TypeParser;
|
104
|
+
//# sourceMappingURL=TypeParser.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TypeParser.js","sourceRoot":"","sources":["../../../src/dbos-runtime/TypeParser.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA4B;AAC5B,6CAAgE;AA+BhE,SAAS,cAAc,CAAC,IAA0B;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC;IAClC,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,oBAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;AAChE,CAAC;AAED,MAAa,UAAU;IACZ,QAAQ,CAAa;IACrB,QAAQ,CAAiB;IACzB,MAAM,GAAG,IAAI,iCAAoB,EAAE,CAAC;IAC7C,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM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Y,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;oBAExD,qFAAqF;oBACrF,iGAAiG;oBACjG,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,eAAmC,CAAC;oBAE7E,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;iBACtC;aACF;YACD,OAAO,SAAS,CAAC;QACnB,CAAC;IACH,CAAC;CACF;AAtGD,gCAsGC"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import ts from 'typescript';
|
2
|
+
import { DecoratorInfo, MethodInfo, ClassInfo, ParameterInfo } from './TypeParser';
|
3
|
+
import { APITypes, ArgSources } from '../httpServer/handler';
|
4
|
+
import { Schema } from 'ts-json-schema-generator';
|
5
|
+
import { OpenAPIV3 as OpenApi3 } from 'openapi-types';
|
6
|
+
interface HttpEndpointInfo {
|
7
|
+
verb: APITypes;
|
8
|
+
path: string;
|
9
|
+
}
|
10
|
+
export declare class OpenApiGenerator {
|
11
|
+
#private;
|
12
|
+
readonly program: ts.Program;
|
13
|
+
get diags(): readonly ts.Diagnostic[];
|
14
|
+
constructor(program: ts.Program);
|
15
|
+
generate(classes: readonly ClassInfo[], title: string, version: string): OpenApi3.Document | undefined;
|
16
|
+
generatePath(method: MethodInfo, { verb, path }: HttpEndpointInfo, defaultRoles: readonly string[], securityScheme: string | undefined): [string, OpenApi3.PathItemObject] | undefined;
|
17
|
+
getMethodReturnType(node: ts.MethodDeclaration): ts.Type | undefined;
|
18
|
+
generateResponse(method: MethodInfo): [string, OpenApi3.ResponseObject] | undefined;
|
19
|
+
generateParameters(sourcedParams: [ParameterInfo, ArgSources][]): OpenApi3.ParameterObject[];
|
20
|
+
generateParameter(parameter: ParameterInfo, argSource: ArgSources): OpenApi3.ParameterObject | undefined;
|
21
|
+
getLocation(parameter: ParameterInfo, argSource: ArgSources): "query" | "path" | undefined;
|
22
|
+
generateRequestBody(sourcedParams: [ParameterInfo, ArgSources][]): OpenApi3.RequestBodyObject | undefined;
|
23
|
+
generateSchema(node?: ts.Node): OpenApi3.SchemaObject | OpenApi3.ReferenceObject | undefined;
|
24
|
+
getDBOSDecorator(decorated: MethodInfo | ParameterInfo | ClassInfo, name: string): DecoratorInfo | undefined;
|
25
|
+
getHttpInfo(method: MethodInfo): HttpEndpointInfo | undefined;
|
26
|
+
getParamSource(parameter: ParameterInfo, verb: APITypes): ArgSources.BODY | ArgSources.QUERY | ArgSources.URL | undefined;
|
27
|
+
getParamName(parameter: ParameterInfo): string | undefined;
|
28
|
+
mapSchema(schema: Schema): OpenApi3.SchemaObject | OpenApi3.ReferenceObject | undefined;
|
29
|
+
parseStringLiteralArray(node: ts.Expression | undefined): string[] | undefined;
|
30
|
+
parseSecurityScheme(arg?: ts.Expression): SecurityScheme | undefined;
|
31
|
+
}
|
32
|
+
type SecurityScheme = Exclude<OpenApi3.SecuritySchemeObject, OpenApi3.OAuth2SecurityScheme>;
|
33
|
+
export declare function generateOpenApi(entrypoint: string): Promise<OpenApi3.Document | undefined>;
|
34
|
+
export {};
|
35
|
+
//# sourceMappingURL=openApi.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"openApi.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/openApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,UAAU,EAAc,SAAS,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAmG,MAAM,EAAuD,MAAM,0BAA0B,CAAC;AACxM,OAAO,EAAE,SAAS,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAOtD,UAAU,gBAAgB;IAAG,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE;A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