@rex0220/kintone-sql-tools 3.76.0 → 3.77.0
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/README.md +38 -0
- package/dist-cli/ksql.js +17525 -232
- package/dist-engine/index.cjs +12 -12
- package/dist-engine/index.mjs +12 -12
- package/dist-engine/ksql-engine.umd.js +12 -12
- package/dist-engine/meta/bundle-baseline.json +7 -7
- package/dist-engine/meta/cjs.json +3 -3
- package/dist-engine/meta/esm.json +3 -3
- package/dist-engine/meta/umd.json +3 -3
- package/dist-flow/export/types.d.ts +56 -0
- package/dist-flow/flow-library/exportSinks.d.ts +5 -0
- package/dist-flow/flow-library/index.d.ts +2 -1
- package/dist-flow/flow-library/publicTypes.d.ts +15 -0
- package/dist-flow/index.cjs +15 -11
- package/dist-flow/index.mjs +15 -11
- package/dist-flow/meta/cjs.json +172 -6
- package/dist-flow/meta/esm.json +176 -6
- package/dist-mcp/ksql-mcp.js +12 -3
- package/dist-mcpb/ksql-mcp.mcpb +0 -0
- package/package.json +2 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-09-
|
|
2
|
+
"generatedAt": "2026-09-04T05:52:08.271Z",
|
|
3
3
|
"baseline": "B66 Phase1 initial measured values; no arbitrary size ceiling",
|
|
4
4
|
"bundles": {
|
|
5
5
|
"index.cjs": {
|
|
6
6
|
"inputCount": 115,
|
|
7
|
-
"minifiedBytes":
|
|
8
|
-
"gzipBytes":
|
|
7
|
+
"minifiedBytes": 690947,
|
|
8
|
+
"gzipBytes": 189428,
|
|
9
9
|
"forbidden": {
|
|
10
10
|
"mcp-instructions": [],
|
|
11
11
|
"src-mcp": [],
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"index.mjs": {
|
|
26
26
|
"inputCount": 115,
|
|
27
|
-
"minifiedBytes":
|
|
28
|
-
"gzipBytes":
|
|
27
|
+
"minifiedBytes": 690402,
|
|
28
|
+
"gzipBytes": 189139,
|
|
29
29
|
"forbidden": {
|
|
30
30
|
"mcp-instructions": [],
|
|
31
31
|
"src-mcp": [],
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"ksql-engine.umd.js": {
|
|
46
46
|
"inputCount": 117,
|
|
47
|
-
"minifiedBytes":
|
|
48
|
-
"gzipBytes":
|
|
47
|
+
"minifiedBytes": 691426,
|
|
48
|
+
"gzipBytes": 189464,
|
|
49
49
|
"forbidden": {
|
|
50
50
|
"mcp-instructions": [],
|
|
51
51
|
"src-mcp": [],
|
|
@@ -1446,7 +1446,7 @@
|
|
|
1446
1446
|
"format": "esm"
|
|
1447
1447
|
},
|
|
1448
1448
|
"src/execute.ts": {
|
|
1449
|
-
"bytes":
|
|
1449
|
+
"bytes": 636914,
|
|
1450
1450
|
"imports": [
|
|
1451
1451
|
{
|
|
1452
1452
|
"path": "src/lexer/lexer.ts",
|
|
@@ -2460,7 +2460,7 @@
|
|
|
2460
2460
|
"bytesInOutput": 412
|
|
2461
2461
|
},
|
|
2462
2462
|
"src/execute.ts": {
|
|
2463
|
-
"bytesInOutput":
|
|
2463
|
+
"bytesInOutput": 244324
|
|
2464
2464
|
},
|
|
2465
2465
|
"src/engine-library/errors.ts": {
|
|
2466
2466
|
"bytesInOutput": 1441
|
|
@@ -2517,7 +2517,7 @@
|
|
|
2517
2517
|
"bytesInOutput": 1446
|
|
2518
2518
|
}
|
|
2519
2519
|
},
|
|
2520
|
-
"bytes":
|
|
2520
|
+
"bytes": 690947
|
|
2521
2521
|
}
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
@@ -1446,7 +1446,7 @@
|
|
|
1446
1446
|
"format": "esm"
|
|
1447
1447
|
},
|
|
1448
1448
|
"src/execute.ts": {
|
|
1449
|
-
"bytes":
|
|
1449
|
+
"bytes": 636914,
|
|
1450
1450
|
"imports": [
|
|
1451
1451
|
{
|
|
1452
1452
|
"path": "src/lexer/lexer.ts",
|
|
@@ -2464,7 +2464,7 @@
|
|
|
2464
2464
|
"bytesInOutput": 412
|
|
2465
2465
|
},
|
|
2466
2466
|
"src/execute.ts": {
|
|
2467
|
-
"bytesInOutput":
|
|
2467
|
+
"bytesInOutput": 244324
|
|
2468
2468
|
},
|
|
2469
2469
|
"src/engine-library/errors.ts": {
|
|
2470
2470
|
"bytesInOutput": 1441
|
|
@@ -2524,7 +2524,7 @@
|
|
|
2524
2524
|
"bytesInOutput": 16
|
|
2525
2525
|
}
|
|
2526
2526
|
},
|
|
2527
|
-
"bytes":
|
|
2527
|
+
"bytes": 690402
|
|
2528
2528
|
}
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
@@ -1446,7 +1446,7 @@
|
|
|
1446
1446
|
"format": "esm"
|
|
1447
1447
|
},
|
|
1448
1448
|
"src/execute.ts": {
|
|
1449
|
-
"bytes":
|
|
1449
|
+
"bytes": 636914,
|
|
1450
1450
|
"imports": [
|
|
1451
1451
|
{
|
|
1452
1452
|
"path": "src/lexer/lexer.ts",
|
|
@@ -2478,7 +2478,7 @@
|
|
|
2478
2478
|
"bytesInOutput": 412
|
|
2479
2479
|
},
|
|
2480
2480
|
"src/execute.ts": {
|
|
2481
|
-
"bytesInOutput":
|
|
2481
|
+
"bytesInOutput": 244324
|
|
2482
2482
|
},
|
|
2483
2483
|
"src/engine-library/errors.ts": {
|
|
2484
2484
|
"bytesInOutput": 1441
|
|
@@ -2544,7 +2544,7 @@
|
|
|
2544
2544
|
"bytesInOutput": 127
|
|
2545
2545
|
}
|
|
2546
2546
|
},
|
|
2547
|
-
"bytes":
|
|
2547
|
+
"bytes": 691426
|
|
2548
2548
|
}
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type ExportEncoding = "utf8" | "sjis";
|
|
2
|
+
export interface CsvExportColumnMeta {
|
|
3
|
+
readonly fieldType?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface CsvExportInput {
|
|
6
|
+
readonly columns: readonly string[];
|
|
7
|
+
readonly rows: readonly Readonly<Record<string, string | null | undefined>>[];
|
|
8
|
+
readonly columnMeta?: ReadonlyMap<string, CsvExportColumnMeta>;
|
|
9
|
+
}
|
|
10
|
+
export interface ExportTextEncoder {
|
|
11
|
+
readonly encoding: "sjis";
|
|
12
|
+
encode(text: string): Uint8Array;
|
|
13
|
+
}
|
|
14
|
+
export interface CsvExportOptions {
|
|
15
|
+
readonly encoding?: ExportEncoding;
|
|
16
|
+
readonly timezone?: string;
|
|
17
|
+
readonly encoder?: ExportTextEncoder;
|
|
18
|
+
}
|
|
19
|
+
export interface CsvExportReceipt {
|
|
20
|
+
readonly rows: number;
|
|
21
|
+
readonly columns: number;
|
|
22
|
+
readonly bytes: number;
|
|
23
|
+
readonly encoding: ExportEncoding;
|
|
24
|
+
}
|
|
25
|
+
export interface CsvExportResult {
|
|
26
|
+
readonly text: string;
|
|
27
|
+
readonly data: Uint8Array;
|
|
28
|
+
readonly receipt: CsvExportReceipt;
|
|
29
|
+
}
|
|
30
|
+
export type ExportSerializerErrorCode = "ExportSinkDuplicateHeaderError" | "ExportSinkUnsupportedColumnError" | "ExportSinkInvalidValueError" | "ExportSinkInvalidTimezoneError" | "ExportSinkEncoderRequiredError" | "ExportSinkEncodingError" | "ExportSinkInvalidEncoderResultError";
|
|
31
|
+
export declare class ExportSerializerError extends Error {
|
|
32
|
+
readonly code: ExportSerializerErrorCode;
|
|
33
|
+
readonly cause?: unknown;
|
|
34
|
+
constructor(code: ExportSerializerErrorCode, message: string, cause?: unknown);
|
|
35
|
+
}
|
|
36
|
+
export declare class ExportSinkDuplicateHeaderError extends ExportSerializerError {
|
|
37
|
+
constructor(message: string);
|
|
38
|
+
}
|
|
39
|
+
export declare class ExportSinkUnsupportedColumnError extends ExportSerializerError {
|
|
40
|
+
constructor(message: string);
|
|
41
|
+
}
|
|
42
|
+
export declare class ExportSinkInvalidValueError extends ExportSerializerError {
|
|
43
|
+
constructor(message: string);
|
|
44
|
+
}
|
|
45
|
+
export declare class ExportSinkInvalidTimezoneError extends ExportSerializerError {
|
|
46
|
+
constructor(message: string, cause?: unknown);
|
|
47
|
+
}
|
|
48
|
+
export declare class ExportSinkEncoderRequiredError extends ExportSerializerError {
|
|
49
|
+
constructor(message: string);
|
|
50
|
+
}
|
|
51
|
+
export declare class ExportSinkEncodingError extends ExportSerializerError {
|
|
52
|
+
constructor(message: string, cause?: unknown);
|
|
53
|
+
}
|
|
54
|
+
export declare class ExportSinkInvalidEncoderResultError extends ExportSerializerError {
|
|
55
|
+
constructor(message: string);
|
|
56
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ExecutionContext, FlowCsvExportInput, FlowCsvExportOptions, FlowCsvExportResult, FlowExportSinkStatus, StatementResult } from "./publicTypes";
|
|
2
|
+
export declare function serializeCsvExport(input: FlowCsvExportInput, options?: FlowCsvExportOptions): FlowCsvExportResult;
|
|
3
|
+
export declare function serializeSelectResultAsCsv(statement: StatementResult, options?: FlowCsvExportOptions): FlowCsvExportResult;
|
|
4
|
+
export declare function exportSinkStatus(context: ExecutionContext, name: string): FlowExportSinkStatus;
|
|
5
|
+
export declare function serializeExportSink(context: ExecutionContext, name: string, options?: FlowCsvExportOptions): FlowCsvExportResult;
|
|
@@ -11,5 +11,6 @@ export declare function previewStatement(statement: Statement, context: Executio
|
|
|
11
11
|
export declare function executeStatement(statement: Statement, context: ExecutionContext): Promise<StatementResult>;
|
|
12
12
|
export declare function disposeExecutionContext(context: ExecutionContext): Promise<void>;
|
|
13
13
|
export { isDmlResult } from "./publicTypes";
|
|
14
|
+
export { exportSinkStatus, serializeCsvExport, serializeExportSink, serializeSelectResultAsCsv, } from "./exportSinks";
|
|
14
15
|
export { createImportSourceResolver, createKintoneClient, FlowImportProviderError, KsqlFlowError };
|
|
15
|
-
export type { CreateExecutionContextOptions, CreateKintoneClientConfig, Diagnostic, DiagnosticCode, ExecutionContext, ExplainScriptOptions, ExplainScriptResult, FieldInfo, FlowImportProviderErrorCode, FlowImportSourceLoader, FlowImportSourceMaterializedInfo, FlowImportSourcePayload, FlowImportSourceResolver, FlowNamedImportSource, FlowChunkWrittenInfo, FlowDeleteResult, FlowDmlResult, FlowInsertResult, FlowKintoneClient, KintoneNativeUpdateKey, KintoneNativeUpsertRecord, KintoneNativeUpsertParams, KintoneNativeUpsertRecordResult, KintoneNativeUpsertResult, FlowUpdateResult, FlowUpsertResult, ImportEncoding, ParseScriptOptions, ParseScriptResult, PreviewResult, PreviewSample, PreviewStatementOptions, SchemaResolver, ScriptHeaderMeta, Statement, StatementResult, StatementResultKind, ValidateScriptOptions, } from "./publicTypes";
|
|
16
|
+
export type { CreateExecutionContextOptions, CreateKintoneClientConfig, Diagnostic, DiagnosticCode, ExecutionContext, ExportEncoding, ExplainScriptOptions, ExplainScriptResult, FieldInfo, FlowImportProviderErrorCode, FlowCsvExportColumnMeta, FlowCsvExportInput, FlowCsvExportOptions, FlowCsvExportReceipt, FlowCsvExportResult, FlowExportSinkStatus, FlowExportTextEncoder, FlowImportSourceLoader, FlowImportSourceMaterializedInfo, FlowImportSourcePayload, FlowImportSourceResolver, FlowNamedImportSource, FlowNamedExportSink, FlowChunkWrittenInfo, FlowDeleteResult, FlowDmlResult, FlowInsertResult, FlowKintoneClient, KintoneNativeUpdateKey, KintoneNativeUpsertRecord, KintoneNativeUpsertParams, KintoneNativeUpsertRecordResult, KintoneNativeUpsertResult, FlowUpdateResult, FlowUpsertResult, ImportEncoding, ParseScriptOptions, ParseScriptResult, PreviewResult, PreviewSample, PreviewStatementOptions, SchemaResolver, ScriptHeaderMeta, Statement, StatementResult, StatementResultKind, ValidateScriptOptions, } from "./publicTypes";
|
|
@@ -139,6 +139,19 @@ export interface FlowNamedImportSource {
|
|
|
139
139
|
readonly name: string;
|
|
140
140
|
readonly loader: FlowImportSourceLoader;
|
|
141
141
|
}
|
|
142
|
+
/** Browser-neutral CSV export types shared with the engine serializer. */
|
|
143
|
+
export type ExportEncoding = import("../export/types").ExportEncoding;
|
|
144
|
+
export type FlowCsvExportColumnMeta = import("../export/types").CsvExportColumnMeta;
|
|
145
|
+
export type FlowCsvExportInput = import("../export/types").CsvExportInput;
|
|
146
|
+
export type FlowExportTextEncoder = import("../export/types").ExportTextEncoder;
|
|
147
|
+
export type FlowCsvExportOptions = import("../export/types").CsvExportOptions;
|
|
148
|
+
export type FlowCsvExportReceipt = import("../export/types").CsvExportReceipt;
|
|
149
|
+
export type FlowCsvExportResult = import("../export/types").CsvExportResult;
|
|
150
|
+
export interface FlowNamedExportSink {
|
|
151
|
+
/** Exact, case-sensitive temp-table name without the leading #. */
|
|
152
|
+
readonly name: string;
|
|
153
|
+
}
|
|
154
|
+
export type FlowExportSinkStatus = "materialized" | "not-created" | "failed" | "incomplete";
|
|
142
155
|
export interface FlowImportSourceMaterializedInfo {
|
|
143
156
|
/** バッチ内の文 index。StatementResult.index と同じ0始まり。 */
|
|
144
157
|
readonly statementIndex: number;
|
|
@@ -218,6 +231,8 @@ export interface CreateExecutionContextOptions extends ParseScriptOptions {
|
|
|
218
231
|
asOf?: Date;
|
|
219
232
|
timezone?: string;
|
|
220
233
|
continueOnError?: boolean;
|
|
234
|
+
/** Named CREATE TEMP TABLE outputs made available to the export API. */
|
|
235
|
+
exportSinks?: readonly FlowNamedExportSink[];
|
|
221
236
|
/** Named, path-free source resolver. It never enables IMPORT implicitly. */
|
|
222
237
|
importSource?: FlowImportSourceResolver;
|
|
223
238
|
/**
|