@grepr/cli 1.1.4 → 1.3.0-94fe60c
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/build/dist/commands/base-command.d.ts +3 -3
- package/build/dist/commands/base-command.d.ts.map +1 -1
- package/build/dist/commands/base-command.js +1 -7
- package/build/dist/commands/base-command.js.map +1 -1
- package/build/dist/commands/config-command.d.ts +5 -9
- package/build/dist/commands/config-command.d.ts.map +1 -1
- package/build/dist/commands/config-command.js +32 -4
- package/build/dist/commands/config-command.js.map +1 -1
- package/build/dist/commands/crud-command.d.ts +11 -18
- package/build/dist/commands/crud-command.d.ts.map +1 -1
- package/build/dist/commands/crud-command.js +27 -11
- package/build/dist/commands/crud-command.js.map +1 -1
- package/build/dist/commands/dataset-command.d.ts +8 -13
- package/build/dist/commands/dataset-command.d.ts.map +1 -1
- package/build/dist/commands/dataset-command.js.map +1 -1
- package/build/dist/commands/docs-command.d.ts +87 -0
- package/build/dist/commands/docs-command.d.ts.map +1 -0
- package/build/dist/commands/docs-command.js +164 -0
- package/build/dist/commands/docs-command.js.map +1 -0
- package/build/dist/commands/docs-get-command.d.ts +53 -0
- package/build/dist/commands/docs-get-command.d.ts.map +1 -0
- package/build/dist/commands/docs-get-command.js +75 -0
- package/build/dist/commands/docs-get-command.js.map +1 -0
- package/build/dist/commands/grok-command.d.ts +71 -0
- package/build/dist/commands/grok-command.d.ts.map +1 -0
- package/build/dist/commands/grok-command.js +258 -0
- package/build/dist/commands/grok-command.js.map +1 -0
- package/build/dist/commands/integration-command.d.ts +5 -7
- package/build/dist/commands/integration-command.d.ts.map +1 -1
- package/build/dist/commands/integration-command.js +4 -4
- package/build/dist/commands/integration-command.js.map +1 -1
- package/build/dist/commands/job-command.d.ts +7 -43
- package/build/dist/commands/job-command.d.ts.map +1 -1
- package/build/dist/commands/job-command.js +5 -3
- package/build/dist/commands/job-command.js.map +1 -1
- package/build/dist/commands/job-to-test-command.d.ts +74 -0
- package/build/dist/commands/job-to-test-command.d.ts.map +1 -0
- package/build/dist/commands/job-to-test-command.js +159 -0
- package/build/dist/commands/job-to-test-command.js.map +1 -0
- package/build/dist/commands/list-command.d.ts +5 -7
- package/build/dist/commands/list-command.d.ts.map +1 -1
- package/build/dist/commands/list-command.js +20 -4
- package/build/dist/commands/list-command.js.map +1 -1
- package/build/dist/commands/query-command.d.ts +3 -8
- package/build/dist/commands/query-command.d.ts.map +1 -1
- package/build/dist/commands/query-command.js +34 -14
- package/build/dist/commands/query-command.js.map +1 -1
- package/build/dist/docs-index/catalog.json +1 -0
- package/build/dist/docs-index/index.json +1 -0
- package/build/dist/grepr.js +43 -7
- package/build/dist/grepr.js.map +1 -1
- package/build/dist/lib/api-client-factory.d.ts +2 -2
- package/build/dist/lib/api-client-factory.d.ts.map +1 -1
- package/build/dist/lib/api-client-factory.js +1 -1
- package/build/dist/lib/api-client-factory.js.map +1 -1
- package/build/dist/lib/auth.d.ts +17 -9
- package/build/dist/lib/auth.d.ts.map +1 -1
- package/build/dist/lib/auth.js +53 -14
- package/build/dist/lib/auth.js.map +1 -1
- package/build/dist/lib/command-registry.d.ts +3 -2
- package/build/dist/lib/command-registry.d.ts.map +1 -1
- package/build/dist/lib/command-registry.js.map +1 -1
- package/build/dist/lib/config.d.ts +15 -0
- package/build/dist/lib/config.d.ts.map +1 -1
- package/build/dist/lib/config.js +45 -11
- package/build/dist/lib/config.js.map +1 -1
- package/build/dist/lib/docs-search.d.ts +154 -0
- package/build/dist/lib/docs-search.d.ts.map +1 -0
- package/build/dist/lib/docs-search.js +208 -0
- package/build/dist/lib/docs-search.js.map +1 -0
- package/build/dist/lib/grepr-api-client.d.ts +33 -193
- package/build/dist/lib/grepr-api-client.d.ts.map +1 -1
- package/build/dist/lib/grepr-api-client.js +58 -38
- package/build/dist/lib/grepr-api-client.js.map +1 -1
- package/build/dist/lib/job-graph-transformer.d.ts +89 -0
- package/build/dist/lib/job-graph-transformer.d.ts.map +1 -0
- package/build/dist/lib/job-graph-transformer.js +497 -0
- package/build/dist/lib/job-graph-transformer.js.map +1 -0
- package/build/dist/lib/job-graph-utils.d.ts +50 -0
- package/build/dist/lib/job-graph-utils.d.ts.map +1 -0
- package/build/dist/lib/job-graph-utils.js +84 -0
- package/build/dist/lib/job-graph-utils.js.map +1 -0
- package/build/dist/lib/json-formatter.d.ts +1 -0
- package/build/dist/lib/json-formatter.d.ts.map +1 -1
- package/build/dist/lib/json-formatter.js +28 -16
- package/build/dist/lib/json-formatter.js.map +1 -1
- package/build/dist/lib/parser.d.ts.map +1 -1
- package/build/dist/lib/parser.js +3 -6
- package/build/dist/lib/parser.js.map +1 -1
- package/build/dist/lib/streaming-job-executor.d.ts +3 -3
- package/build/dist/lib/streaming-job-executor.d.ts.map +1 -1
- package/build/dist/lib/streaming-job-executor.js +54 -21
- package/build/dist/lib/streaming-job-executor.js.map +1 -1
- package/build/dist/lib/time-utils.js +1 -1
- package/build/dist/lib/time-utils.js.map +1 -1
- package/build/dist/lib/transformers-embeddings.d.ts +76 -0
- package/build/dist/lib/transformers-embeddings.d.ts.map +1 -0
- package/build/dist/lib/transformers-embeddings.js +109 -0
- package/build/dist/lib/transformers-embeddings.js.map +1 -0
- package/build/dist/openapi/openApiTypes.d.ts +3967 -2240
- package/build/dist/openapi/openApiTypes.d.ts.map +1 -1
- package/build/dist/openapi/openApiTypes.js +341 -85
- package/build/dist/openapi/openApiTypes.js.map +1 -1
- package/build/dist/types.d.ts +48 -78
- package/build/dist/types.d.ts.map +1 -1
- package/build/dist/types.js +73 -0
- package/build/dist/types.js.map +1 -1
- package/package.json +41 -11
package/build/dist/types.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type definitions for the Grepr CLI tool
|
|
3
3
|
*/
|
|
4
|
+
import { PathsV1JobsGetParametersQueryExecution, PathsV1JobsGetParametersQueryProcessing, PathsV1JobsGetParametersQueryState, GreprRawLogsSourceType, LogsIcebergTableSourceType, GreprRawLogsSourceSortOrder, DatadogQueryPredicateType, NewRelicQueryPredicateType, SplQueryPredicateType, SchemaReadDatadog, SchemaReadDataWarehouse, SchemaReadS3DataWarehouse, SchemaReadNewRelic, SchemaReadOtlp, SchemaReadSplunk, SchemaReadSumo, SchemaOperation } from './openapi/openApiTypes.js';
|
|
4
5
|
export interface CliOptions {
|
|
5
6
|
orgName: string;
|
|
6
7
|
apiBaseUrl?: string;
|
|
7
8
|
authBaseUrl: string;
|
|
8
|
-
authMethod: 'oauth' | '
|
|
9
|
-
userId: string;
|
|
9
|
+
authMethod: 'oauth' | 'client-credentials';
|
|
10
10
|
debug?: boolean;
|
|
11
11
|
quiet?: boolean;
|
|
12
12
|
clientId: string;
|
|
13
|
+
clientSecret?: string;
|
|
13
14
|
timezone?: string;
|
|
14
15
|
conf?: string;
|
|
15
16
|
output?: string;
|
|
@@ -20,15 +21,16 @@ export interface SavedCliConfig {
|
|
|
20
21
|
orgName?: string;
|
|
21
22
|
apiBaseUrl?: string;
|
|
22
23
|
authBaseUrl?: string;
|
|
23
|
-
authMethod?: 'oauth' | '
|
|
24
|
-
userId?: string;
|
|
24
|
+
authMethod?: 'oauth' | 'client-credentials';
|
|
25
25
|
clientId?: string;
|
|
26
|
+
clientSecret?: string;
|
|
26
27
|
timezone?: string;
|
|
27
28
|
authCache: boolean;
|
|
28
29
|
browser: boolean;
|
|
29
30
|
}
|
|
30
31
|
export interface CliConfigFile {
|
|
31
|
-
|
|
32
|
+
_default?: string;
|
|
33
|
+
[configName: string]: SavedCliConfig | string | undefined;
|
|
32
34
|
}
|
|
33
35
|
export interface FormattableCommandOptions extends CliOptions {
|
|
34
36
|
format?: 'table' | 'pretty' | 'raw' | 'compact' | 'csv';
|
|
@@ -36,16 +38,15 @@ export interface FormattableCommandOptions extends CliOptions {
|
|
|
36
38
|
color?: boolean;
|
|
37
39
|
timestamps?: boolean;
|
|
38
40
|
jobState?: boolean;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
job: string;
|
|
41
|
+
maxDepth?: number;
|
|
42
|
+
maxLines?: number;
|
|
42
43
|
}
|
|
43
44
|
export interface QueryCommandOptions extends FormattableCommandOptions {
|
|
44
45
|
datasetId?: string;
|
|
45
46
|
datasetName?: string;
|
|
46
|
-
sortOrder?:
|
|
47
|
-
queryEngine?:
|
|
48
|
-
queryType?:
|
|
47
|
+
sortOrder?: GreprRawLogsSourceSortOrder;
|
|
48
|
+
queryEngine?: GreprRawLogsSourceType.grepr_raw_log_source | LogsIcebergTableSourceType.logs_iceberg_table_source;
|
|
49
|
+
queryType?: DatadogQueryPredicateType.datadog_query | NewRelicQueryPredicateType.newrelic_query | SplQueryPredicateType.spl_query;
|
|
49
50
|
query?: string;
|
|
50
51
|
start?: string;
|
|
51
52
|
end?: string;
|
|
@@ -55,28 +56,13 @@ export interface ApiClientConfig {
|
|
|
55
56
|
orgName: string;
|
|
56
57
|
apiBaseUrl: string;
|
|
57
58
|
authBaseUrl: string;
|
|
58
|
-
authMethod: 'oauth' | '
|
|
59
|
-
userId?: string;
|
|
59
|
+
authMethod: 'oauth' | 'client-credentials';
|
|
60
60
|
clientId: string;
|
|
61
|
+
clientSecret?: string;
|
|
61
62
|
authCache: boolean;
|
|
62
63
|
browser: boolean;
|
|
63
64
|
debug: boolean;
|
|
64
65
|
}
|
|
65
|
-
export interface JobDefinition {
|
|
66
|
-
name: string;
|
|
67
|
-
execution: string;
|
|
68
|
-
processing: string;
|
|
69
|
-
jobGraph: {
|
|
70
|
-
vertices: Array<{
|
|
71
|
-
type: string;
|
|
72
|
-
name: string;
|
|
73
|
-
[key: string]: any;
|
|
74
|
-
}>;
|
|
75
|
-
edges: string[];
|
|
76
|
-
};
|
|
77
|
-
metadata?: Record<string, any>;
|
|
78
|
-
teams?: string[];
|
|
79
|
-
}
|
|
80
66
|
export interface ProcessStats {
|
|
81
67
|
recordsProcessed: number;
|
|
82
68
|
heartbeatsSent: number;
|
|
@@ -86,27 +72,19 @@ export interface ProcessStats {
|
|
|
86
72
|
endTime: number | null;
|
|
87
73
|
duration?: string;
|
|
88
74
|
}
|
|
89
|
-
export interface OutputFormatterOptions {
|
|
90
|
-
format: 'table' | 'pretty' | 'raw' | 'compact' | 'csv';
|
|
91
|
-
showTimestamps: boolean;
|
|
92
|
-
showJobState: boolean;
|
|
93
|
-
colorize: boolean;
|
|
94
|
-
sortBy: string;
|
|
95
|
-
timezone?: string;
|
|
96
|
-
}
|
|
97
75
|
export interface EventRecord {
|
|
98
76
|
jobState: string;
|
|
99
|
-
data?:
|
|
77
|
+
data?: LogEventData;
|
|
100
78
|
heartbeatToken?: string;
|
|
101
79
|
}
|
|
102
80
|
export interface LogEventData {
|
|
103
81
|
id?: string;
|
|
104
82
|
receivedTimestamp?: string | number;
|
|
105
83
|
eventTimestamp?: string | number;
|
|
106
|
-
tags?: Record<string,
|
|
84
|
+
tags?: Record<string, unknown>;
|
|
107
85
|
severity?: string;
|
|
108
86
|
message?: string;
|
|
109
|
-
[key: string]:
|
|
87
|
+
[key: string]: unknown;
|
|
110
88
|
}
|
|
111
89
|
export declare const STREAM_EVENTS: {
|
|
112
90
|
HEARTBEAT_REQUEST: string;
|
|
@@ -124,45 +102,37 @@ export declare const HEARTBEAT_EVENTS: {
|
|
|
124
102
|
ERROR: string;
|
|
125
103
|
RETRY: string;
|
|
126
104
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
export
|
|
134
|
-
export type
|
|
135
|
-
export type
|
|
136
|
-
export type
|
|
137
|
-
export type
|
|
138
|
-
export
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
name
|
|
147
|
-
|
|
148
|
-
version?: number;
|
|
149
|
-
resolved?: boolean;
|
|
150
|
-
}
|
|
151
|
-
export interface JobCreateUpdateOptions extends CliOptions {
|
|
152
|
-
jobFile: string;
|
|
153
|
-
output?: string;
|
|
154
|
-
}
|
|
155
|
-
export interface DatasetCommandOptions extends FormattableCommandOptions {
|
|
156
|
-
}
|
|
157
|
-
export interface DatasetCreateUpdateOptions extends CliOptions {
|
|
158
|
-
datasetFile: string;
|
|
159
|
-
output?: string;
|
|
160
|
-
}
|
|
161
|
-
export interface IntegrationCommandOptions extends FormattableCommandOptions {
|
|
162
|
-
type?: 'datadog' | 'splunk' | 'newrelic' | 'otlp' | 'sumo' | 's3';
|
|
105
|
+
export interface CommandOption {
|
|
106
|
+
flags: string;
|
|
107
|
+
description: string;
|
|
108
|
+
defaultValue?: string | boolean | string[];
|
|
109
|
+
parser?: (value: string) => string | boolean | number;
|
|
110
|
+
}
|
|
111
|
+
export { PathsV1JobsGetParametersQueryExecution as JobExecution, PathsV1JobsGetParametersQueryProcessing as JobProcessing, PathsV1JobsGetParametersQueryState as JobState };
|
|
112
|
+
export type MergeConfiguration = (options: Record<string, string | boolean | number | string[]>) => Promise<CliOptions>;
|
|
113
|
+
export type CommandOptionValue = string | boolean | number | string[];
|
|
114
|
+
export type CommandOptionsRecord = Record<string, CommandOptionValue>;
|
|
115
|
+
export type IntegrationReadType = SchemaReadDatadog | SchemaReadDataWarehouse | SchemaReadS3DataWarehouse | SchemaReadNewRelic | SchemaReadOtlp | SchemaReadSplunk | SchemaReadSumo;
|
|
116
|
+
export interface IntegrationTypeAndList<T extends IntegrationReadType> {
|
|
117
|
+
type: T['type'];
|
|
118
|
+
items: T[];
|
|
119
|
+
}
|
|
120
|
+
export declare const DEFAULT_INPUT = "input";
|
|
121
|
+
export declare const DEFAULT_OUTPUT = "output";
|
|
122
|
+
export declare const DEFAULT_LIMIT = 100;
|
|
123
|
+
export interface IO {
|
|
124
|
+
name: string;
|
|
125
|
+
vertex: Vertex;
|
|
163
126
|
}
|
|
164
|
-
export
|
|
165
|
-
|
|
166
|
-
|
|
127
|
+
export declare class Vertex {
|
|
128
|
+
name: string;
|
|
129
|
+
operation: SchemaOperation;
|
|
130
|
+
prev: Map<string, IO[]>;
|
|
131
|
+
next: Map<string, IO[]>;
|
|
132
|
+
constructor(operation: SchemaOperation);
|
|
133
|
+
addPrev(inputPort: string, prev: IO, addToPrev?: boolean): void;
|
|
134
|
+
addNext(outputPort: string, next: IO, addToNext?: boolean): void;
|
|
135
|
+
removePrev(inputPort: string, prev: IO, removeFromPrev?: boolean): void;
|
|
136
|
+
removeNext(outputPort: string, next: IO, removeFromNext?: boolean): void;
|
|
167
137
|
}
|
|
168
138
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/main/typescript/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/main/typescript/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,sCAAsC,EACtC,uCAAuC,EACvC,kCAAkC,EAClC,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,0BAA0B,EAC1B,qBAAqB,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,yBAAyB,EAC5F,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EACtF,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,GAAG,oBAAoB,CAAC;IAC3C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IA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IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,MAAM;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,eAAe,CAAC;IAE3B,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAExB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;gBAEZ,SAAS,EAAE,eAAe;IAOtC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,UAAO,GAAG,IAAI;IAY5D,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,UAAO,GAAG,IAAI;IAY7D,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,cAAc,UAAO,GAAG,IAAI;IAqBpE,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,cAAc,UAAO,GAAG,IAAI;CAoBtE"}
|
package/build/dist/types.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type definitions for the Grepr CLI tool
|
|
3
3
|
*/
|
|
4
|
+
// Import OpenAPI generated types
|
|
5
|
+
import { PathsV1JobsGetParametersQueryExecution, PathsV1JobsGetParametersQueryProcessing, PathsV1JobsGetParametersQueryState, } from './openapi/openApiTypes.js';
|
|
4
6
|
export const STREAM_EVENTS = {
|
|
5
7
|
HEARTBEAT_REQUEST: 'heartbeat_request',
|
|
6
8
|
DATA: 'data',
|
|
@@ -17,4 +19,75 @@ export const HEARTBEAT_EVENTS = {
|
|
|
17
19
|
ERROR: 'error',
|
|
18
20
|
RETRY: 'retry'
|
|
19
21
|
};
|
|
22
|
+
// Re-export only enum types for convenience
|
|
23
|
+
export { PathsV1JobsGetParametersQueryExecution as JobExecution, PathsV1JobsGetParametersQueryProcessing as JobProcessing, PathsV1JobsGetParametersQueryState as JobState };
|
|
24
|
+
export const DEFAULT_INPUT = "input";
|
|
25
|
+
export const DEFAULT_OUTPUT = "output";
|
|
26
|
+
export const DEFAULT_LIMIT = 100;
|
|
27
|
+
export class Vertex {
|
|
28
|
+
name;
|
|
29
|
+
operation;
|
|
30
|
+
// Map from input name to connected prev vertices
|
|
31
|
+
prev;
|
|
32
|
+
// Map from output name to connected next vertices
|
|
33
|
+
next;
|
|
34
|
+
constructor(operation) {
|
|
35
|
+
this.operation = operation;
|
|
36
|
+
this.name = operation.name || '';
|
|
37
|
+
this.prev = new Map();
|
|
38
|
+
this.next = new Map();
|
|
39
|
+
}
|
|
40
|
+
addPrev(inputPort, prev, addToPrev = true) {
|
|
41
|
+
if (!this.prev.has(inputPort)) {
|
|
42
|
+
this.prev.set(inputPort, []);
|
|
43
|
+
}
|
|
44
|
+
this.prev.get(inputPort)?.push(prev);
|
|
45
|
+
// Add this vertex as next of the previous IO's vertex
|
|
46
|
+
if (addToPrev) {
|
|
47
|
+
prev.vertex.addNext(prev.name, { name: inputPort, vertex: this }, false);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
addNext(outputPort, next, addToNext = true) {
|
|
51
|
+
if (!this.next.has(outputPort)) {
|
|
52
|
+
this.next.set(outputPort, []);
|
|
53
|
+
}
|
|
54
|
+
this.next.get(outputPort)?.push(next);
|
|
55
|
+
// Add this vertex as prev of the next IO's vertex
|
|
56
|
+
if (addToNext) {
|
|
57
|
+
next.vertex.addPrev(next.name, { name: outputPort, vertex: this }, false);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
removePrev(inputPort, prev, removeFromPrev = true) {
|
|
61
|
+
if (!this.prev.has(inputPort)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (!prev) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const existingIoList = this.prev.get(inputPort) || [];
|
|
68
|
+
// Filter out the IO matching the prevName and prevOutput
|
|
69
|
+
const updatedList = existingIoList.filter((existingIo) => existingIo.vertex.name !== prev.vertex.name || existingIo.name !== prev.name) || [];
|
|
70
|
+
this.prev.set(inputPort, updatedList);
|
|
71
|
+
// Remove this vertex as next of the previous IO's vertex
|
|
72
|
+
if (removeFromPrev) {
|
|
73
|
+
prev.vertex.removeNext(prev.name, { name: inputPort, vertex: this }, false);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
removeNext(outputPort, next, removeFromNext = true) {
|
|
77
|
+
if (!this.next.has(outputPort)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (!next) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const existingIoList = this.next.get(outputPort) || [];
|
|
84
|
+
// Filter out the IO matching the nextName and nextInput
|
|
85
|
+
const updatedList = existingIoList.filter((existingIo) => existingIo.vertex.name !== next.vertex.name || existingIo.name !== next.name) || [];
|
|
86
|
+
this.next.set(outputPort, updatedList);
|
|
87
|
+
// Remove this vertex as prev of the next IO's vertex
|
|
88
|
+
if (removeFromNext) {
|
|
89
|
+
next.vertex.removePrev(next.name, { name: outputPort, vertex: this }, false);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
20
93
|
//# sourceMappingURL=types.js.map
|
package/build/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/main/typescript/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/main/typescript/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,iCAAiC;AACjC,OAAO,EACL,sCAAsC,EACtC,uCAAuC,EACvC,kCAAkC,GAQnC,MAAM,2BAA2B,CAAC;AA+FnC,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,iBAAiB,EAAE,mBAAmB;IACtC,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAA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name": "@grepr/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-94fe60c",
|
|
4
4
|
"description": "Official Grepr CLI tool for submitting synchronous batch jobs with OAuth authentication",
|
|
5
5
|
"main": "build/dist/grepr.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "
|
|
9
|
-
"
|
|
8
|
+
"build": "yarn lint && yarn typecheck && vitest --run && tsc && tsc-alias --resolve-full-paths && chmod +x build/dist/grepr.js && yarn build:docs-index",
|
|
9
|
+
"build:fast": "tsc && tsc-alias --resolve-full-paths && chmod +x build/dist/grepr.js && yarn build:docs-index",
|
|
10
|
+
"build:no-index": "tsc && tsc-alias --resolve-full-paths && chmod +x build/dist/grepr.js",
|
|
11
|
+
"build:docs-index": "tsx scripts/build-docs-index.ts",
|
|
12
|
+
"start": "yarn build:fast && node build/dist/grepr.js --version",
|
|
10
13
|
"dev": "tsc --watch",
|
|
11
14
|
"clean": "rm -rf build/dist build/customer-distributions",
|
|
12
|
-
"typecheck": "tsc --noEmit && tsc --noEmit --project tsconfig.test.json",
|
|
15
|
+
"typecheck": "yarn run lint && tsc --noEmit && tsc --noEmit --project tsconfig.test.json",
|
|
16
|
+
"lint": "eslint src/**/*.ts",
|
|
17
|
+
"lint:fix": "eslint src/**/*.ts --fix",
|
|
13
18
|
"test": "vitest --run",
|
|
14
19
|
"test:watch": "vitest --watch",
|
|
15
20
|
"test:coverage": "vitest --coverage",
|
|
16
|
-
"prepublishOnly": "
|
|
17
|
-
"pack": "
|
|
21
|
+
"prepublishOnly": "node -e \"const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json'));delete p.packageManager;fs.writeFileSync('package.json',JSON.stringify(p,null,2))\" && yarn clean && yarn build",
|
|
22
|
+
"pack": "yarn clean && yarn build && yarn pack",
|
|
18
23
|
"dist": "./scripts/create-distributions.sh",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
24
|
+
"dist:fast": "yarn build:fast && ./scripts/create-distributions.sh",
|
|
25
|
+
"link:local": "yarn build && yarn link",
|
|
26
|
+
"unlink:local": "yarn unlink -g grepr"
|
|
21
27
|
},
|
|
22
28
|
"bin": {
|
|
23
29
|
"grepr": "build/dist/grepr.js"
|
|
@@ -29,22 +35,46 @@
|
|
|
29
35
|
"LICENSE"
|
|
30
36
|
],
|
|
31
37
|
"dependencies": {
|
|
32
|
-
"
|
|
38
|
+
"@xenova/transformers": "^2.17.0",
|
|
39
|
+
"axios": "^1.13.5",
|
|
33
40
|
"chalk": "^5.3.0",
|
|
34
41
|
"commander": "^11.1.0",
|
|
35
42
|
"dayjs": "^1.11.18",
|
|
36
43
|
"fs-extra": "^11.1.1",
|
|
37
44
|
"open": "^9.1.0",
|
|
38
45
|
"openapi-fetch": "^0.15.0",
|
|
39
|
-
"patch-package": "^8.0.1"
|
|
46
|
+
"patch-package": "^8.0.1",
|
|
47
|
+
"vectra": "^0.9.0"
|
|
40
48
|
},
|
|
41
49
|
"devDependencies": {
|
|
42
50
|
"@types/fs-extra": "^11.0.4",
|
|
43
51
|
"@types/node": "^20.0.0",
|
|
52
|
+
"@types/react": "^19.2.14",
|
|
53
|
+
"@types/react-dom": "^19.2.3",
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
55
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
44
56
|
"@vitest/coverage-v8": "^4.0.5",
|
|
57
|
+
"esbuild": "^0.27.3",
|
|
58
|
+
"eslint": "^8.57.0",
|
|
59
|
+
"glob": "^10.3.0",
|
|
60
|
+
"mdx-bundler": "^10.1.1",
|
|
61
|
+
"react": "^19.2.4",
|
|
62
|
+
"react-dom": "^19.2.4",
|
|
63
|
+
"rehype-parse": "^9.0.1",
|
|
64
|
+
"rehype-remark": "^10.0.1",
|
|
65
|
+
"remark-gfm": "^4.0.1",
|
|
66
|
+
"remark-stringify": "^11.0.0",
|
|
67
|
+
"tsc-alias": "^1.8.16",
|
|
68
|
+
"tsx": "^4.7.0",
|
|
45
69
|
"typescript": "^5.3.0",
|
|
70
|
+
"typescript-eslint": "^8.53.1",
|
|
71
|
+
"unified": "^11.0.5",
|
|
46
72
|
"vitest": "^4.0.5"
|
|
47
73
|
},
|
|
74
|
+
"resolutions": {
|
|
75
|
+
"tar": "^7.5.9",
|
|
76
|
+
"axios": "^1.13.5"
|
|
77
|
+
},
|
|
48
78
|
"engines": {
|
|
49
79
|
"node": ">=20.0.0"
|
|
50
80
|
},
|
|
@@ -67,4 +97,4 @@
|
|
|
67
97
|
"publishConfig": {
|
|
68
98
|
"access": "public"
|
|
69
99
|
}
|
|
70
|
-
}
|
|
100
|
+
}
|