@eagleoutice/flowr 2.1.3 → 2.1.5
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/benchmark/slicer.js +1 -1
- package/cli/repl/commands/repl-parse.js +1 -1
- package/cli/repl/commands/repl-query.js +4 -5
- package/cli/repl/server/connection.js +6 -1
- package/cli/repl/server/messages/message-query.js +2 -2
- package/cli/repl/server/net.js +1 -1
- package/cli/repl/server/send.js +3 -6
- package/cli/repl/server/server.d.ts +2 -2
- package/cli/repl/server/server.js +1 -1
- package/config.js +1 -1
- package/core/pipeline-executor.js +2 -1
- package/core/steps/all/core/00-parse.d.ts +11 -4
- package/core/steps/all/core/00-parse.js +5 -5
- package/core/steps/all/core/10-normalize.d.ts +2 -1
- package/core/steps/all/core/20-dataflow.d.ts +2 -2
- package/core/steps/all/core/20-dataflow.js +2 -2
- package/core/steps/pipeline/default-pipelines.d.ts +41 -23
- package/core/steps/pipeline/pipeline.d.ts +15 -3
- package/core/steps/pipeline/pipeline.js +2 -2
- package/dataflow/environments/built-in.d.ts +8 -6
- package/dataflow/environments/built-in.js +6 -1
- package/dataflow/environments/default-builtin-config.js +21 -5
- package/dataflow/environments/environment.d.ts +1 -0
- package/dataflow/environments/environment.js +5 -5
- package/dataflow/extractor.js +23 -0
- package/dataflow/graph/dataflowgraph-builder.d.ts +2 -0
- package/dataflow/graph/dataflowgraph-builder.js +9 -0
- package/dataflow/graph/diff.js +1 -1
- package/dataflow/graph/graph.d.ts +7 -2
- package/dataflow/graph/graph.js +10 -2
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +1 -1
- package/dataflow/internal/process/functions/call/argument/unpack-argument.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +13 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
- package/dataflow/internal/process/functions/call/named-call-handling.js +1 -1
- package/dataflow/processor.d.ts +3 -3
- package/documentation/data/server/doc-data-server-messages.js +8 -14
- package/documentation/doc-util/doc-cli-option.js +4 -4
- package/documentation/doc-util/doc-query.d.ts +4 -6
- package/documentation/doc-util/doc-query.js +16 -156
- package/documentation/doc-util/doc-repl.js +2 -2
- package/documentation/print-dataflow-graph-wiki.js +2 -1
- package/documentation/print-interface-wiki.js +8 -3
- package/documentation/print-query-wiki.js +107 -16
- package/package.json +1 -1
- package/queries/base-query-format.d.ts +6 -0
- package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +26 -80
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +14 -13
- package/queries/catalog/call-context-query/call-context-query-format.js +32 -14
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.d.ts +17 -0
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +99 -0
- package/queries/catalog/cluster-query/cluster-query-executor.d.ts +1 -1
- package/queries/catalog/cluster-query/cluster-query-format.d.ts +59 -0
- package/queries/catalog/cluster-query/cluster-query-format.js +29 -0
- package/queries/catalog/dataflow-query/dataflow-query-executor.d.ts +1 -1
- package/queries/catalog/dataflow-query/dataflow-query-format.d.ts +59 -0
- package/queries/catalog/dataflow-query/dataflow-query-format.js +21 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.d.ts +3 -0
- package/queries/catalog/dependencies-query/dependencies-query-executor.js +144 -0
- package/queries/catalog/dependencies-query/dependencies-query-format.d.ts +102 -0
- package/queries/catalog/dependencies-query/dependencies-query-format.js +187 -0
- package/queries/catalog/id-map-query/id-map-query-executor.d.ts +1 -1
- package/queries/catalog/id-map-query/id-map-query-format.d.ts +59 -0
- package/queries/catalog/id-map-query/id-map-query-format.js +21 -0
- package/queries/catalog/lineage-query/lineage-query-executor.d.ts +1 -1
- package/queries/catalog/lineage-query/lineage-query-format.d.ts +59 -0
- package/queries/catalog/lineage-query/lineage-query-format.js +24 -0
- package/queries/catalog/location-map-query/location-map-query-executor.d.ts +3 -0
- package/queries/catalog/location-map-query/location-map-query-executor.js +21 -0
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +17 -0
- package/queries/catalog/location-map-query/location-map-query-format.js +24 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-executor.d.ts +1 -1
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.d.ts +59 -0
- package/queries/catalog/normalized-ast-query/normalized-ast-query-format.js +21 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.d.ts +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +8 -3
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +59 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.js +40 -0
- package/queries/query-print.d.ts +8 -0
- package/queries/query-print.js +94 -0
- package/queries/query.d.ts +431 -26
- package/queries/query.js +36 -18
- package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +2 -1
- package/r-bridge/lang-4.x/ast/parser/json/parser.js +2 -2
- package/r-bridge/lang-4.x/ast/parser/main/internal/functions/normalize-argument.js +2 -1
- package/r-bridge/retriever.js +1 -1
- package/r-bridge/shell-executor.js +1 -1
- package/r-bridge/shell.d.ts +1 -2
- package/r-bridge/shell.js +22 -18
- package/slicing/static/static-slicer.js +3 -1
- package/statistics/features/supported/used-functions/used-functions.js +1 -1
- package/{documentation/doc-util/doc-hover-over.js → util/html-hover-over.js} +1 -1
- package/util/json.d.ts +2 -1
- package/util/json.js +101 -3
- package/util/objects.d.ts +2 -1
- package/util/objects.js +3 -0
- package/util/version.js +1 -1
- package/queries/query-schema.d.ts +0 -13
- package/queries/query-schema.js +0 -54
- /package/{documentation/doc-util/doc-hover-over.d.ts → util/html-hover-over.d.ts} +0 -0
package/queries/query.d.ts
CHANGED
|
@@ -1,45 +1,445 @@
|
|
|
1
1
|
import type { CallContextQuery } from './catalog/call-context-query/call-context-query-format';
|
|
2
|
-
import type {
|
|
3
|
-
import type { BaseQueryFormat, BaseQueryResult } from './base-query-format';
|
|
4
|
-
import { executeCallContextQueries } from './catalog/call-context-query/call-context-query-executor';
|
|
2
|
+
import type { BaseQueryFormat, BaseQueryResult, BasicQueryData } from './base-query-format';
|
|
5
3
|
import type { VirtualQueryArgumentsWithType } from './virtual-query/virtual-queries';
|
|
6
4
|
import type { VirtualCompoundConstraint } from './virtual-query/compound-query';
|
|
7
|
-
import type { NormalizedAst } from '../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
8
|
-
import { executeDataflowQuery } from './catalog/dataflow-query/dataflow-query-executor';
|
|
9
5
|
import type { DataflowQuery } from './catalog/dataflow-query/dataflow-query-format';
|
|
10
|
-
import { executeIdMapQuery } from './catalog/id-map-query/id-map-query-executor';
|
|
11
6
|
import type { IdMapQuery } from './catalog/id-map-query/id-map-query-format';
|
|
12
|
-
import { executeNormalizedAstQuery } from './catalog/normalized-ast-query/normalized-ast-query-executor';
|
|
13
7
|
import type { NormalizedAstQuery } from './catalog/normalized-ast-query/normalized-ast-query-format';
|
|
14
|
-
import type { DataflowClusterQuery } from './catalog/cluster-query/cluster-query-format';
|
|
15
|
-
import { executeDataflowClusterQuery } from './catalog/cluster-query/cluster-query-executor';
|
|
16
|
-
import type { StaticSliceQuery } from './catalog/static-slice-query/static-slice-query-format';
|
|
17
|
-
import { executeStaticSliceClusterQuery } from './catalog/static-slice-query/static-slice-query-executor';
|
|
18
8
|
import type { LineageQuery } from './catalog/lineage-query/lineage-query-format';
|
|
19
|
-
import {
|
|
20
|
-
|
|
9
|
+
import type { StaticSliceQuery } from './catalog/static-slice-query/static-slice-query-format';
|
|
10
|
+
import type { DataflowClusterQuery } from './catalog/cluster-query/cluster-query-format';
|
|
11
|
+
import type { DependenciesQuery } from './catalog/dependencies-query/dependencies-query-format';
|
|
12
|
+
import type { OutputFormatter } from '../util/ansi';
|
|
13
|
+
import type { PipelineOutput } from '../core/steps/pipeline/pipeline';
|
|
14
|
+
import type { DEFAULT_DATAFLOW_PIPELINE } from '../core/steps/pipeline/default-pipelines';
|
|
15
|
+
import Joi from 'joi';
|
|
16
|
+
import type { LocationMapQuery } from './catalog/location-map-query/location-map-query-format';
|
|
17
|
+
export type Query = CallContextQuery | DataflowQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | LineageQuery | DependenciesQuery | LocationMapQuery;
|
|
21
18
|
export type QueryArgumentsWithType<QueryType extends BaseQueryFormat['type']> = Query & {
|
|
22
19
|
type: QueryType;
|
|
23
20
|
};
|
|
24
|
-
export interface BasicQueryData {
|
|
25
|
-
readonly ast: NormalizedAst;
|
|
26
|
-
readonly graph: DataflowGraph;
|
|
27
|
-
}
|
|
28
21
|
export type QueryExecutor<Query extends BaseQueryFormat, Result extends BaseQueryResult> = (data: BasicQueryData, query: readonly Query[]) => Result;
|
|
29
22
|
type SupportedQueries = {
|
|
30
|
-
[QueryType in Query['type']]:
|
|
23
|
+
[QueryType in Query['type']]: SupportedQuery<QueryType>;
|
|
31
24
|
};
|
|
25
|
+
export interface SupportedQuery<QueryType extends BaseQueryFormat['type']> {
|
|
26
|
+
executor: QueryExecutor<QueryArgumentsWithType<QueryType>, BaseQueryResult>;
|
|
27
|
+
asciiSummarizer: (formatter: OutputFormatter, processed: PipelineOutput<typeof DEFAULT_DATAFLOW_PIPELINE>, queryResults: BaseQueryResult, resultStrings: string[]) => boolean;
|
|
28
|
+
schema: Joi.ObjectSchema;
|
|
29
|
+
}
|
|
32
30
|
export declare const SupportedQueries: {
|
|
33
|
-
readonly 'call-context':
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
readonly
|
|
39
|
-
|
|
31
|
+
readonly 'call-context': {
|
|
32
|
+
readonly executor: typeof import("./catalog/call-context-query/call-context-query-executor").executeCallContextQueries;
|
|
33
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, processed: PipelineOutput<typeof DEFAULT_DATAFLOW_PIPELINE>, queryResults: BaseQueryResult, result: string[]) => boolean;
|
|
34
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
35
|
+
};
|
|
36
|
+
readonly dataflow: {
|
|
37
|
+
readonly executor: typeof import("./catalog/dataflow-query/dataflow-query-executor").executeDataflowQuery;
|
|
38
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _processed: PipelineOutput<import("../core/steps/pipeline/pipeline").Pipeline<{
|
|
39
|
+
readonly name: "parse";
|
|
40
|
+
readonly humanReadableName: "parse with R shell";
|
|
41
|
+
readonly description: "Parse the given R code into an AST";
|
|
42
|
+
readonly processor: (_results: unknown, input: Partial<import("../core/steps/all/core/00-parse").ParseRequiredInput>) => Promise<import("../core/steps/all/core/00-parse").ParseStepOutput>;
|
|
43
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
44
|
+
readonly printer: {
|
|
45
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
46
|
+
readonly 2: {
|
|
47
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
48
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
49
|
+
};
|
|
50
|
+
readonly 5: ({ parsed }: import("../core/steps/all/core/00-parse").ParseStepOutput, config: import("../util/quads").QuadSerializationConfiguration) => string;
|
|
51
|
+
};
|
|
52
|
+
readonly dependencies: readonly [];
|
|
53
|
+
readonly requiredInput: import("../core/steps/all/core/00-parse").ParseRequiredInput;
|
|
54
|
+
} | {
|
|
55
|
+
readonly name: "normalize";
|
|
56
|
+
readonly humanReadableName: "normalize";
|
|
57
|
+
readonly description: "Normalize the AST to flowR's AST";
|
|
58
|
+
readonly processor: (results: {
|
|
59
|
+
parse?: import("../core/steps/all/core/00-parse").ParseStepOutput;
|
|
60
|
+
}, input: Partial<import("../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../r-bridge/lang-4.x/ast/model/model").RNode<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
61
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
62
|
+
readonly printer: {
|
|
63
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
64
|
+
readonly 2: typeof import("../core/print/normalize-printer").normalizedAstToJson;
|
|
65
|
+
readonly 5: typeof import("../core/print/normalize-printer").normalizedAstToQuads;
|
|
66
|
+
readonly 3: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaid;
|
|
67
|
+
readonly 4: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
|
|
68
|
+
};
|
|
69
|
+
readonly dependencies: readonly ["parse"];
|
|
70
|
+
readonly requiredInput: import("../core/steps/all/core/10-normalize").NormalizeRequiredInput;
|
|
71
|
+
} | {
|
|
72
|
+
readonly humanReadableName: "dataflow";
|
|
73
|
+
readonly processor: (results: {
|
|
74
|
+
normalize?: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
|
|
75
|
+
}, input: {
|
|
76
|
+
request?: import("../r-bridge/retriever").RParseRequests;
|
|
77
|
+
}) => import("../dataflow/info").DataflowInformation;
|
|
78
|
+
readonly requiredInput: {};
|
|
79
|
+
readonly name: "dataflow";
|
|
80
|
+
readonly description: "Construct the dataflow graph";
|
|
81
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
82
|
+
readonly printer: {
|
|
83
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
84
|
+
readonly 2: typeof import("../core/print/dataflow-printer").dataflowGraphToJson;
|
|
85
|
+
readonly 5: typeof import("../core/print/dataflow-printer").dataflowGraphToQuads;
|
|
86
|
+
readonly 3: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaid;
|
|
87
|
+
readonly 4: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
|
|
88
|
+
};
|
|
89
|
+
readonly dependencies: readonly ["normalize"];
|
|
90
|
+
}>>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
91
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
92
|
+
};
|
|
93
|
+
readonly 'id-map': {
|
|
94
|
+
readonly executor: typeof import("./catalog/id-map-query/id-map-query-executor").executeIdMapQuery;
|
|
95
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _processed: PipelineOutput<import("../core/steps/pipeline/pipeline").Pipeline<{
|
|
96
|
+
readonly name: "parse";
|
|
97
|
+
readonly humanReadableName: "parse with R shell";
|
|
98
|
+
readonly description: "Parse the given R code into an AST";
|
|
99
|
+
readonly processor: (_results: unknown, input: Partial<import("../core/steps/all/core/00-parse").ParseRequiredInput>) => Promise<import("../core/steps/all/core/00-parse").ParseStepOutput>;
|
|
100
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
101
|
+
readonly printer: {
|
|
102
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
103
|
+
readonly 2: {
|
|
104
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
105
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
106
|
+
};
|
|
107
|
+
readonly 5: ({ parsed }: import("../core/steps/all/core/00-parse").ParseStepOutput, config: import("../util/quads").QuadSerializationConfiguration) => string;
|
|
108
|
+
};
|
|
109
|
+
readonly dependencies: readonly [];
|
|
110
|
+
readonly requiredInput: import("../core/steps/all/core/00-parse").ParseRequiredInput;
|
|
111
|
+
} | {
|
|
112
|
+
readonly name: "normalize";
|
|
113
|
+
readonly humanReadableName: "normalize";
|
|
114
|
+
readonly description: "Normalize the AST to flowR's AST";
|
|
115
|
+
readonly processor: (results: {
|
|
116
|
+
parse?: import("../core/steps/all/core/00-parse").ParseStepOutput;
|
|
117
|
+
}, input: Partial<import("../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../r-bridge/lang-4.x/ast/model/model").RNode<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
118
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
119
|
+
readonly printer: {
|
|
120
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
121
|
+
readonly 2: typeof import("../core/print/normalize-printer").normalizedAstToJson;
|
|
122
|
+
readonly 5: typeof import("../core/print/normalize-printer").normalizedAstToQuads;
|
|
123
|
+
readonly 3: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaid;
|
|
124
|
+
readonly 4: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
|
|
125
|
+
};
|
|
126
|
+
readonly dependencies: readonly ["parse"];
|
|
127
|
+
readonly requiredInput: import("../core/steps/all/core/10-normalize").NormalizeRequiredInput;
|
|
128
|
+
} | {
|
|
129
|
+
readonly humanReadableName: "dataflow";
|
|
130
|
+
readonly processor: (results: {
|
|
131
|
+
normalize?: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
|
|
132
|
+
}, input: {
|
|
133
|
+
request?: import("../r-bridge/retriever").RParseRequests;
|
|
134
|
+
}) => import("../dataflow/info").DataflowInformation;
|
|
135
|
+
readonly requiredInput: {};
|
|
136
|
+
readonly name: "dataflow";
|
|
137
|
+
readonly description: "Construct the dataflow graph";
|
|
138
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
139
|
+
readonly printer: {
|
|
140
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
141
|
+
readonly 2: typeof import("../core/print/dataflow-printer").dataflowGraphToJson;
|
|
142
|
+
readonly 5: typeof import("../core/print/dataflow-printer").dataflowGraphToQuads;
|
|
143
|
+
readonly 3: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaid;
|
|
144
|
+
readonly 4: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
|
|
145
|
+
};
|
|
146
|
+
readonly dependencies: readonly ["normalize"];
|
|
147
|
+
}>>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
148
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
149
|
+
};
|
|
150
|
+
readonly 'normalized-ast': {
|
|
151
|
+
readonly executor: typeof import("./catalog/normalized-ast-query/normalized-ast-query-executor").executeNormalizedAstQuery;
|
|
152
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _processed: PipelineOutput<import("../core/steps/pipeline/pipeline").Pipeline<{
|
|
153
|
+
readonly name: "parse";
|
|
154
|
+
readonly humanReadableName: "parse with R shell";
|
|
155
|
+
readonly description: "Parse the given R code into an AST";
|
|
156
|
+
readonly processor: (_results: unknown, input: Partial<import("../core/steps/all/core/00-parse").ParseRequiredInput>) => Promise<import("../core/steps/all/core/00-parse").ParseStepOutput>;
|
|
157
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
158
|
+
readonly printer: {
|
|
159
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
160
|
+
readonly 2: {
|
|
161
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
162
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
163
|
+
};
|
|
164
|
+
readonly 5: ({ parsed }: import("../core/steps/all/core/00-parse").ParseStepOutput, config: import("../util/quads").QuadSerializationConfiguration) => string;
|
|
165
|
+
};
|
|
166
|
+
readonly dependencies: readonly [];
|
|
167
|
+
readonly requiredInput: import("../core/steps/all/core/00-parse").ParseRequiredInput;
|
|
168
|
+
} | {
|
|
169
|
+
readonly name: "normalize";
|
|
170
|
+
readonly humanReadableName: "normalize";
|
|
171
|
+
readonly description: "Normalize the AST to flowR's AST";
|
|
172
|
+
readonly processor: (results: {
|
|
173
|
+
parse?: import("../core/steps/all/core/00-parse").ParseStepOutput;
|
|
174
|
+
}, input: Partial<import("../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../r-bridge/lang-4.x/ast/model/model").RNode<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
175
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
176
|
+
readonly printer: {
|
|
177
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
178
|
+
readonly 2: typeof import("../core/print/normalize-printer").normalizedAstToJson;
|
|
179
|
+
readonly 5: typeof import("../core/print/normalize-printer").normalizedAstToQuads;
|
|
180
|
+
readonly 3: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaid;
|
|
181
|
+
readonly 4: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
|
|
182
|
+
};
|
|
183
|
+
readonly dependencies: readonly ["parse"];
|
|
184
|
+
readonly requiredInput: import("../core/steps/all/core/10-normalize").NormalizeRequiredInput;
|
|
185
|
+
} | {
|
|
186
|
+
readonly humanReadableName: "dataflow";
|
|
187
|
+
readonly processor: (results: {
|
|
188
|
+
normalize?: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
|
|
189
|
+
}, input: {
|
|
190
|
+
request?: import("../r-bridge/retriever").RParseRequests;
|
|
191
|
+
}) => import("../dataflow/info").DataflowInformation;
|
|
192
|
+
readonly requiredInput: {};
|
|
193
|
+
readonly name: "dataflow";
|
|
194
|
+
readonly description: "Construct the dataflow graph";
|
|
195
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
196
|
+
readonly printer: {
|
|
197
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
198
|
+
readonly 2: typeof import("../core/print/dataflow-printer").dataflowGraphToJson;
|
|
199
|
+
readonly 5: typeof import("../core/print/dataflow-printer").dataflowGraphToQuads;
|
|
200
|
+
readonly 3: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaid;
|
|
201
|
+
readonly 4: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
|
|
202
|
+
};
|
|
203
|
+
readonly dependencies: readonly ["normalize"];
|
|
204
|
+
}>>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
205
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
206
|
+
};
|
|
207
|
+
readonly 'dataflow-cluster': {
|
|
208
|
+
readonly executor: typeof import("./catalog/cluster-query/cluster-query-executor").executeDataflowClusterQuery;
|
|
209
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, processed: PipelineOutput<import("../core/steps/pipeline/pipeline").Pipeline<{
|
|
210
|
+
readonly name: "parse";
|
|
211
|
+
readonly humanReadableName: "parse with R shell";
|
|
212
|
+
readonly description: "Parse the given R code into an AST";
|
|
213
|
+
readonly processor: (_results: unknown, input: Partial<import("../core/steps/all/core/00-parse").ParseRequiredInput>) => Promise<import("../core/steps/all/core/00-parse").ParseStepOutput>;
|
|
214
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
215
|
+
readonly printer: {
|
|
216
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
217
|
+
readonly 2: {
|
|
218
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
219
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
220
|
+
};
|
|
221
|
+
readonly 5: ({ parsed }: import("../core/steps/all/core/00-parse").ParseStepOutput, config: import("../util/quads").QuadSerializationConfiguration) => string;
|
|
222
|
+
};
|
|
223
|
+
readonly dependencies: readonly [];
|
|
224
|
+
readonly requiredInput: import("../core/steps/all/core/00-parse").ParseRequiredInput;
|
|
225
|
+
} | {
|
|
226
|
+
readonly name: "normalize";
|
|
227
|
+
readonly humanReadableName: "normalize";
|
|
228
|
+
readonly description: "Normalize the AST to flowR's AST";
|
|
229
|
+
readonly processor: (results: {
|
|
230
|
+
parse?: import("../core/steps/all/core/00-parse").ParseStepOutput;
|
|
231
|
+
}, input: Partial<import("../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../r-bridge/lang-4.x/ast/model/model").RNode<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
232
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
233
|
+
readonly printer: {
|
|
234
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
235
|
+
readonly 2: typeof import("../core/print/normalize-printer").normalizedAstToJson;
|
|
236
|
+
readonly 5: typeof import("../core/print/normalize-printer").normalizedAstToQuads;
|
|
237
|
+
readonly 3: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaid;
|
|
238
|
+
readonly 4: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
|
|
239
|
+
};
|
|
240
|
+
readonly dependencies: readonly ["parse"];
|
|
241
|
+
readonly requiredInput: import("../core/steps/all/core/10-normalize").NormalizeRequiredInput;
|
|
242
|
+
} | {
|
|
243
|
+
readonly humanReadableName: "dataflow";
|
|
244
|
+
readonly processor: (results: {
|
|
245
|
+
normalize?: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
|
|
246
|
+
}, input: {
|
|
247
|
+
request?: import("../r-bridge/retriever").RParseRequests;
|
|
248
|
+
}) => import("../dataflow/info").DataflowInformation;
|
|
249
|
+
readonly requiredInput: {};
|
|
250
|
+
readonly name: "dataflow";
|
|
251
|
+
readonly description: "Construct the dataflow graph";
|
|
252
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
253
|
+
readonly printer: {
|
|
254
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
255
|
+
readonly 2: typeof import("../core/print/dataflow-printer").dataflowGraphToJson;
|
|
256
|
+
readonly 5: typeof import("../core/print/dataflow-printer").dataflowGraphToQuads;
|
|
257
|
+
readonly 3: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaid;
|
|
258
|
+
readonly 4: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
|
|
259
|
+
};
|
|
260
|
+
readonly dependencies: readonly ["normalize"];
|
|
261
|
+
}>>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
262
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
263
|
+
};
|
|
264
|
+
readonly 'static-slice': {
|
|
265
|
+
readonly executor: typeof import("./catalog/static-slice-query/static-slice-query-executor").executeStaticSliceClusterQuery;
|
|
266
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _processed: PipelineOutput<import("../core/steps/pipeline/pipeline").Pipeline<{
|
|
267
|
+
readonly name: "parse";
|
|
268
|
+
readonly humanReadableName: "parse with R shell";
|
|
269
|
+
readonly description: "Parse the given R code into an AST";
|
|
270
|
+
readonly processor: (_results: unknown, input: Partial<import("../core/steps/all/core/00-parse").ParseRequiredInput>) => Promise<import("../core/steps/all/core/00-parse").ParseStepOutput>;
|
|
271
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
272
|
+
readonly printer: {
|
|
273
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
274
|
+
readonly 2: {
|
|
275
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
276
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
277
|
+
};
|
|
278
|
+
readonly 5: ({ parsed }: import("../core/steps/all/core/00-parse").ParseStepOutput, config: import("../util/quads").QuadSerializationConfiguration) => string;
|
|
279
|
+
};
|
|
280
|
+
readonly dependencies: readonly [];
|
|
281
|
+
readonly requiredInput: import("../core/steps/all/core/00-parse").ParseRequiredInput;
|
|
282
|
+
} | {
|
|
283
|
+
readonly name: "normalize";
|
|
284
|
+
readonly humanReadableName: "normalize";
|
|
285
|
+
readonly description: "Normalize the AST to flowR's AST";
|
|
286
|
+
readonly processor: (results: {
|
|
287
|
+
parse?: import("../core/steps/all/core/00-parse").ParseStepOutput;
|
|
288
|
+
}, input: Partial<import("../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../r-bridge/lang-4.x/ast/model/model").RNode<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
289
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
290
|
+
readonly printer: {
|
|
291
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
292
|
+
readonly 2: typeof import("../core/print/normalize-printer").normalizedAstToJson;
|
|
293
|
+
readonly 5: typeof import("../core/print/normalize-printer").normalizedAstToQuads;
|
|
294
|
+
readonly 3: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaid;
|
|
295
|
+
readonly 4: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
|
|
296
|
+
};
|
|
297
|
+
readonly dependencies: readonly ["parse"];
|
|
298
|
+
readonly requiredInput: import("../core/steps/all/core/10-normalize").NormalizeRequiredInput;
|
|
299
|
+
} | {
|
|
300
|
+
readonly humanReadableName: "dataflow";
|
|
301
|
+
readonly processor: (results: {
|
|
302
|
+
normalize?: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
|
|
303
|
+
}, input: {
|
|
304
|
+
request?: import("../r-bridge/retriever").RParseRequests;
|
|
305
|
+
}) => import("../dataflow/info").DataflowInformation;
|
|
306
|
+
readonly requiredInput: {};
|
|
307
|
+
readonly name: "dataflow";
|
|
308
|
+
readonly description: "Construct the dataflow graph";
|
|
309
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
310
|
+
readonly printer: {
|
|
311
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
312
|
+
readonly 2: typeof import("../core/print/dataflow-printer").dataflowGraphToJson;
|
|
313
|
+
readonly 5: typeof import("../core/print/dataflow-printer").dataflowGraphToQuads;
|
|
314
|
+
readonly 3: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaid;
|
|
315
|
+
readonly 4: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
|
|
316
|
+
};
|
|
317
|
+
readonly dependencies: readonly ["normalize"];
|
|
318
|
+
}>>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
319
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
320
|
+
};
|
|
321
|
+
readonly lineage: {
|
|
322
|
+
readonly executor: typeof import("./catalog/lineage-query/lineage-query-executor").executeLineageQuery;
|
|
323
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _processed: PipelineOutput<import("../core/steps/pipeline/pipeline").Pipeline<{
|
|
324
|
+
readonly name: "parse";
|
|
325
|
+
readonly humanReadableName: "parse with R shell";
|
|
326
|
+
readonly description: "Parse the given R code into an AST";
|
|
327
|
+
readonly processor: (_results: unknown, input: Partial<import("../core/steps/all/core/00-parse").ParseRequiredInput>) => Promise<import("../core/steps/all/core/00-parse").ParseStepOutput>;
|
|
328
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
329
|
+
readonly printer: {
|
|
330
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
331
|
+
readonly 2: {
|
|
332
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
333
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
334
|
+
};
|
|
335
|
+
readonly 5: ({ parsed }: import("../core/steps/all/core/00-parse").ParseStepOutput, config: import("../util/quads").QuadSerializationConfiguration) => string;
|
|
336
|
+
};
|
|
337
|
+
readonly dependencies: readonly [];
|
|
338
|
+
readonly requiredInput: import("../core/steps/all/core/00-parse").ParseRequiredInput;
|
|
339
|
+
} | {
|
|
340
|
+
readonly name: "normalize";
|
|
341
|
+
readonly humanReadableName: "normalize";
|
|
342
|
+
readonly description: "Normalize the AST to flowR's AST";
|
|
343
|
+
readonly processor: (results: {
|
|
344
|
+
parse?: import("../core/steps/all/core/00-parse").ParseStepOutput;
|
|
345
|
+
}, input: Partial<import("../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../r-bridge/lang-4.x/ast/model/model").RNode<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
346
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
347
|
+
readonly printer: {
|
|
348
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
349
|
+
readonly 2: typeof import("../core/print/normalize-printer").normalizedAstToJson;
|
|
350
|
+
readonly 5: typeof import("../core/print/normalize-printer").normalizedAstToQuads;
|
|
351
|
+
readonly 3: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaid;
|
|
352
|
+
readonly 4: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
|
|
353
|
+
};
|
|
354
|
+
readonly dependencies: readonly ["parse"];
|
|
355
|
+
readonly requiredInput: import("../core/steps/all/core/10-normalize").NormalizeRequiredInput;
|
|
356
|
+
} | {
|
|
357
|
+
readonly humanReadableName: "dataflow";
|
|
358
|
+
readonly processor: (results: {
|
|
359
|
+
normalize?: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
|
|
360
|
+
}, input: {
|
|
361
|
+
request?: import("../r-bridge/retriever").RParseRequests;
|
|
362
|
+
}) => import("../dataflow/info").DataflowInformation;
|
|
363
|
+
readonly requiredInput: {};
|
|
364
|
+
readonly name: "dataflow";
|
|
365
|
+
readonly description: "Construct the dataflow graph";
|
|
366
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
367
|
+
readonly printer: {
|
|
368
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
369
|
+
readonly 2: typeof import("../core/print/dataflow-printer").dataflowGraphToJson;
|
|
370
|
+
readonly 5: typeof import("../core/print/dataflow-printer").dataflowGraphToQuads;
|
|
371
|
+
readonly 3: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaid;
|
|
372
|
+
readonly 4: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
|
|
373
|
+
};
|
|
374
|
+
readonly dependencies: readonly ["normalize"];
|
|
375
|
+
}>>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
376
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
377
|
+
};
|
|
378
|
+
readonly dependencies: {
|
|
379
|
+
readonly executor: typeof import("./catalog/dependencies-query/dependencies-query-executor").executeDependenciesQuery;
|
|
380
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _processed: PipelineOutput<import("../core/steps/pipeline/pipeline").Pipeline<{
|
|
381
|
+
readonly name: "parse";
|
|
382
|
+
readonly humanReadableName: "parse with R shell";
|
|
383
|
+
readonly description: "Parse the given R code into an AST";
|
|
384
|
+
readonly processor: (_results: unknown, input: Partial<import("../core/steps/all/core/00-parse").ParseRequiredInput>) => Promise<import("../core/steps/all/core/00-parse").ParseStepOutput>;
|
|
385
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
386
|
+
readonly printer: {
|
|
387
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
388
|
+
readonly 2: {
|
|
389
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
390
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
391
|
+
};
|
|
392
|
+
readonly 5: ({ parsed }: import("../core/steps/all/core/00-parse").ParseStepOutput, config: import("../util/quads").QuadSerializationConfiguration) => string;
|
|
393
|
+
};
|
|
394
|
+
readonly dependencies: readonly [];
|
|
395
|
+
readonly requiredInput: import("../core/steps/all/core/00-parse").ParseRequiredInput;
|
|
396
|
+
} | {
|
|
397
|
+
readonly name: "normalize";
|
|
398
|
+
readonly humanReadableName: "normalize";
|
|
399
|
+
readonly description: "Normalize the AST to flowR's AST";
|
|
400
|
+
readonly processor: (results: {
|
|
401
|
+
parse?: import("../core/steps/all/core/00-parse").ParseStepOutput;
|
|
402
|
+
}, input: Partial<import("../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../r-bridge/lang-4.x/ast/model/model").RNode<import("../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
|
|
403
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
404
|
+
readonly printer: {
|
|
405
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
406
|
+
readonly 2: typeof import("../core/print/normalize-printer").normalizedAstToJson;
|
|
407
|
+
readonly 5: typeof import("../core/print/normalize-printer").normalizedAstToQuads;
|
|
408
|
+
readonly 3: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaid;
|
|
409
|
+
readonly 4: typeof import("../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
|
|
410
|
+
};
|
|
411
|
+
readonly dependencies: readonly ["parse"];
|
|
412
|
+
readonly requiredInput: import("../core/steps/all/core/10-normalize").NormalizeRequiredInput;
|
|
413
|
+
} | {
|
|
414
|
+
readonly humanReadableName: "dataflow";
|
|
415
|
+
readonly processor: (results: {
|
|
416
|
+
normalize?: import("../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
|
|
417
|
+
}, input: {
|
|
418
|
+
request?: import("../r-bridge/retriever").RParseRequests;
|
|
419
|
+
}) => import("../dataflow/info").DataflowInformation;
|
|
420
|
+
readonly requiredInput: {};
|
|
421
|
+
readonly name: "dataflow";
|
|
422
|
+
readonly description: "Construct the dataflow graph";
|
|
423
|
+
readonly executed: import("../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
|
|
424
|
+
readonly printer: {
|
|
425
|
+
readonly 0: typeof import("../core/print/print").internalPrinter;
|
|
426
|
+
readonly 2: typeof import("../core/print/dataflow-printer").dataflowGraphToJson;
|
|
427
|
+
readonly 5: typeof import("../core/print/dataflow-printer").dataflowGraphToQuads;
|
|
428
|
+
readonly 3: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaid;
|
|
429
|
+
readonly 4: typeof import("../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
|
|
430
|
+
};
|
|
431
|
+
readonly dependencies: readonly ["normalize"];
|
|
432
|
+
}>>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
433
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
434
|
+
};
|
|
435
|
+
readonly 'location-map': {
|
|
436
|
+
readonly executor: typeof import("./catalog/location-map-query/location-map-query-executor").executeLocationMapQuery;
|
|
437
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _processed: unknown, queryResults: BaseQueryResult, result: string[]) => boolean;
|
|
438
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
439
|
+
};
|
|
40
440
|
};
|
|
41
441
|
export type SupportedQueryTypes = keyof typeof SupportedQueries;
|
|
42
|
-
export type QueryResult<Type extends Query['type']> = ReturnType<typeof SupportedQueries[Type]>;
|
|
442
|
+
export type QueryResult<Type extends Query['type']> = ReturnType<typeof SupportedQueries[Type]['executor']>;
|
|
43
443
|
export declare function executeQueriesOfSameType<SpecificQuery extends Query>(data: BasicQueryData, ...queries: readonly SpecificQuery[]): QueryResult<SpecificQuery['type']>;
|
|
44
444
|
export type QueryResults<Base extends SupportedQueryTypes> = {
|
|
45
445
|
readonly [QueryType in Base]: QueryResult<QueryType>;
|
|
@@ -50,4 +450,9 @@ type OmitFromValues<T, K extends string | number | symbol> = {
|
|
|
50
450
|
export type QueryResultsWithoutMeta<Queries extends Query> = OmitFromValues<Omit<QueryResults<Queries['type']>, '.meta'>, '.meta'>;
|
|
51
451
|
export type Queries<Base extends SupportedQueryTypes, VirtualArguments extends VirtualCompoundConstraint<Base> = VirtualCompoundConstraint<Base>> = readonly (QueryArgumentsWithType<Base> | VirtualQueryArgumentsWithType<Base, VirtualArguments>)[];
|
|
52
452
|
export declare function executeQueries<Base extends SupportedQueryTypes, VirtualArguments extends VirtualCompoundConstraint<Base> = VirtualCompoundConstraint<Base>>(data: BasicQueryData, queries: Queries<Base, VirtualArguments>): QueryResults<Base>;
|
|
453
|
+
export declare const SupportedQueriesSchema: Joi.AlternativesSchema<any>;
|
|
454
|
+
export declare const CompoundQuerySchema: Joi.ObjectSchema<any>;
|
|
455
|
+
export declare const VirtualQuerySchema: Joi.AlternativesSchema<any>;
|
|
456
|
+
export declare const AnyQuerySchema: Joi.AlternativesSchema<any>;
|
|
457
|
+
export declare const QueriesSchema: Joi.ArraySchema<any[]>;
|
|
53
458
|
export {};
|
package/queries/query.js
CHANGED
|
@@ -1,33 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SupportedQueries = void 0;
|
|
6
|
+
exports.QueriesSchema = exports.AnyQuerySchema = exports.VirtualQuerySchema = exports.CompoundQuerySchema = exports.SupportedQueriesSchema = exports.SupportedQueries = void 0;
|
|
4
7
|
exports.executeQueriesOfSameType = executeQueriesOfSameType;
|
|
5
8
|
exports.executeQueries = executeQueries;
|
|
6
|
-
const
|
|
9
|
+
const call_context_query_format_1 = require("./catalog/call-context-query/call-context-query-format");
|
|
7
10
|
const assert_1 = require("../util/assert");
|
|
8
11
|
const virtual_queries_1 = require("./virtual-query/virtual-queries");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
12
|
+
const dataflow_query_format_1 = require("./catalog/dataflow-query/dataflow-query-format");
|
|
13
|
+
const id_map_query_format_1 = require("./catalog/id-map-query/id-map-query-format");
|
|
14
|
+
const normalized_ast_query_format_1 = require("./catalog/normalized-ast-query/normalized-ast-query-format");
|
|
15
|
+
const lineage_query_format_1 = require("./catalog/lineage-query/lineage-query-format");
|
|
16
|
+
const static_slice_query_format_1 = require("./catalog/static-slice-query/static-slice-query-format");
|
|
17
|
+
const cluster_query_format_1 = require("./catalog/cluster-query/cluster-query-format");
|
|
18
|
+
const dependencies_query_format_1 = require("./catalog/dependencies-query/dependencies-query-format");
|
|
19
|
+
const joi_1 = __importDefault(require("joi"));
|
|
20
|
+
const location_map_query_format_1 = require("./catalog/location-map-query/location-map-query-format");
|
|
15
21
|
exports.SupportedQueries = {
|
|
16
|
-
'call-context':
|
|
17
|
-
'dataflow':
|
|
18
|
-
'id-map':
|
|
19
|
-
'normalized-ast':
|
|
20
|
-
'dataflow-cluster':
|
|
21
|
-
'static-slice':
|
|
22
|
-
'lineage':
|
|
22
|
+
'call-context': call_context_query_format_1.CallContextQueryDefinition,
|
|
23
|
+
'dataflow': dataflow_query_format_1.DataflowQueryDefinition,
|
|
24
|
+
'id-map': id_map_query_format_1.IdMapQueryDefinition,
|
|
25
|
+
'normalized-ast': normalized_ast_query_format_1.NormalizedAstQueryDefinition,
|
|
26
|
+
'dataflow-cluster': cluster_query_format_1.ClusterQueryDefinition,
|
|
27
|
+
'static-slice': static_slice_query_format_1.StaticSliceQueryDefinition,
|
|
28
|
+
'lineage': lineage_query_format_1.LineageQueryDefinition,
|
|
29
|
+
'dependencies': dependencies_query_format_1.DependenciesQueryDefinition,
|
|
30
|
+
'location-map': location_map_query_format_1.LocationMapQueryDefinition
|
|
23
31
|
};
|
|
24
32
|
function executeQueriesOfSameType(data, ...queries) {
|
|
25
33
|
(0, assert_1.guard)(queries.length > 0, 'At least one query must be provided');
|
|
26
34
|
/* every query must have the same type */
|
|
27
35
|
(0, assert_1.guard)(queries.every(q => q.type === queries[0].type), 'All queries must have the same type');
|
|
28
|
-
const
|
|
29
|
-
(0, assert_1.guard)(
|
|
30
|
-
return executor(data, queries);
|
|
36
|
+
const query = exports.SupportedQueries[queries[0].type];
|
|
37
|
+
(0, assert_1.guard)(query !== undefined, `Unsupported query type: ${queries[0].type}`);
|
|
38
|
+
return query.executor(data, queries);
|
|
31
39
|
}
|
|
32
40
|
function isVirtualQuery(query) {
|
|
33
41
|
return virtual_queries_1.SupportedVirtualQueries[query.type] !== undefined;
|
|
@@ -66,4 +74,14 @@ function executeQueries(data, queries) {
|
|
|
66
74
|
};
|
|
67
75
|
return results;
|
|
68
76
|
}
|
|
77
|
+
exports.SupportedQueriesSchema = joi_1.default.alternatives(Object.values(exports.SupportedQueries).map(q => q.schema)).description('Supported queries');
|
|
78
|
+
exports.CompoundQuerySchema = joi_1.default.object({
|
|
79
|
+
type: joi_1.default.string().valid('compound').required().description('The type of the query.'),
|
|
80
|
+
query: joi_1.default.string().required().description('The query to run on the file analysis information.'),
|
|
81
|
+
commonArguments: joi_1.default.object().required().description('Common arguments for all queries.'),
|
|
82
|
+
arguments: joi_1.default.array().items(joi_1.default.object()).required().description('Arguments for each query.')
|
|
83
|
+
}).description('Compound query used to combine queries of the same type');
|
|
84
|
+
exports.VirtualQuerySchema = joi_1.default.alternatives(exports.CompoundQuerySchema).description('Virtual queries (used for structure)');
|
|
85
|
+
exports.AnyQuerySchema = joi_1.default.alternatives(exports.SupportedQueriesSchema, exports.VirtualQuerySchema).description('Any query');
|
|
86
|
+
exports.QueriesSchema = joi_1.default.array().items(exports.AnyQuerySchema).description('Queries to run on the file analysis information (in the form of an array)');
|
|
69
87
|
//# sourceMappingURL=query.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IdGenerator, NormalizedAst } from '../../model/processing/decorate';
|
|
2
2
|
import type { NoInfo } from '../../model/model';
|
|
3
|
+
import type { ParseStepOutput } from '../../../../../core/steps/all/core/00-parse';
|
|
3
4
|
export declare const parseLog: import("tslog").Logger<import("tslog").ILogObj>;
|
|
4
|
-
export declare function normalize(
|
|
5
|
+
export declare function normalize({ parsed }: ParseStepOutput, getId?: IdGenerator<NoInfo>): NormalizedAst;
|
|
@@ -7,9 +7,9 @@ const log_1 = require("../../../../../util/log");
|
|
|
7
7
|
const decorate_1 = require("../../model/processing/decorate");
|
|
8
8
|
const normalize_root_1 = require("../main/internal/structure/normalize-root");
|
|
9
9
|
exports.parseLog = log_1.log.getSubLogger({ name: 'ast-parser' });
|
|
10
|
-
function normalize(
|
|
10
|
+
function normalize({ parsed }, getId = (0, decorate_1.deterministicCountingIdGenerator)(0)) {
|
|
11
11
|
const data = { currentRange: undefined, currentLexeme: undefined };
|
|
12
|
-
const object = (0, format_1.convertPreparedParsedData)((0, format_1.prepareParsedData)(
|
|
12
|
+
const object = (0, format_1.convertPreparedParsedData)((0, format_1.prepareParsedData)(parsed));
|
|
13
13
|
return (0, decorate_1.decorateAst)((0, normalize_root_1.normalizeRootObjToAst)(data, object), getId);
|
|
14
14
|
}
|
|
15
15
|
//# sourceMappingURL=parser.js.map
|
|
@@ -6,6 +6,7 @@ const normalize_meta_1 = require("../../normalize-meta");
|
|
|
6
6
|
const assert_1 = require("../../../../../../../util/assert");
|
|
7
7
|
const type_1 = require("../../../../model/type");
|
|
8
8
|
const normalize_single_node_1 = require("../structure/normalize-single-node");
|
|
9
|
+
const strings_1 = require("../../../../../../../util/strings");
|
|
9
10
|
/**
|
|
10
11
|
* Either parses `[expr]` or `[SYMBOL_SUB, EQ_SUB, expr]` as an argument of a function call in R.
|
|
11
12
|
* Probably directly called by the function call parser as otherwise, we do not expect to find arguments.
|
|
@@ -32,7 +33,7 @@ function tryToNormalizeArgument(data, objs) {
|
|
|
32
33
|
name = {
|
|
33
34
|
type: type_1.RType.Symbol,
|
|
34
35
|
location,
|
|
35
|
-
content: symbolOrExpr.name === type_1.RawRType.StringConst ? content.slice(1, -1) : content,
|
|
36
|
+
content: symbolOrExpr.name === type_1.RawRType.StringConst ? content.slice(1, -1) : ((0, strings_1.startAndEndsWith)(content, '`') ? content.slice(1, -1) : content),
|
|
36
37
|
namespace: undefined,
|
|
37
38
|
lexeme: content,
|
|
38
39
|
info: {
|
package/r-bridge/retriever.js
CHANGED
|
@@ -92,7 +92,7 @@ function retrieveParseDataFromRCode(request, shell) {
|
|
|
92
92
|
*/
|
|
93
93
|
async function retrieveNormalizedAstFromRCode(request, shell) {
|
|
94
94
|
const data = await retrieveParseDataFromRCode(request, shell);
|
|
95
|
-
return (0, parser_1.normalize)(data);
|
|
95
|
+
return (0, parser_1.normalize)({ parsed: data });
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* If the string has (R-)quotes around it, they will be removed; otherwise the string is returned unchanged.
|