@rex0220/kintone-sql-tools 3.69.0 → 3.70.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 +1 -1
- package/dist-cli/ksql.js +12 -5
- package/dist-engine/index.cjs +14 -14
- package/dist-engine/index.mjs +14 -14
- package/dist-engine/ksql-engine.umd.js +14 -14
- 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/flow-library/index.d.ts +2 -1
- package/dist-flow/flow-library/publicTypes.d.ts +46 -0
- package/dist-flow/index.cjs +13 -13
- package/dist-flow/index.mjs +13 -13
- package/dist-flow/meta/cjs.json +18 -5
- package/dist-flow/meta/esm.json +19 -5
- package/dist-mcp/ksql-mcp.js +14 -7
- package/dist-mcpb/ksql-mcp.mcpb +0 -0
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-08-
|
|
2
|
+
"generatedAt": "2026-08-21T15:03:34.935Z",
|
|
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": 680144,
|
|
8
|
+
"gzipBytes": 185767,
|
|
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": 679599,
|
|
28
|
+
"gzipBytes": 185448,
|
|
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": 680623,
|
|
48
|
+
"gzipBytes": 185765,
|
|
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": 593690,
|
|
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": 235779
|
|
2464
2464
|
},
|
|
2465
2465
|
"src/engine-library/errors.ts": {
|
|
2466
2466
|
"bytesInOutput": 1441
|
|
@@ -2517,7 +2517,7 @@
|
|
|
2517
2517
|
"bytesInOutput": 1406
|
|
2518
2518
|
}
|
|
2519
2519
|
},
|
|
2520
|
-
"bytes":
|
|
2520
|
+
"bytes": 680144
|
|
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": 593690,
|
|
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": 235779
|
|
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": 679599
|
|
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": 593690,
|
|
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": 235779
|
|
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": 680623
|
|
2548
2548
|
}
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
@@ -8,5 +8,6 @@ export declare function explainScript(source: string, opts: ExplainScriptOptions
|
|
|
8
8
|
export declare function createExecutionContext(opts: CreateExecutionContextOptions): ExecutionContext;
|
|
9
9
|
export declare function executeStatement(statement: Statement, context: ExecutionContext): Promise<StatementResult>;
|
|
10
10
|
export declare function disposeExecutionContext(context: ExecutionContext): Promise<void>;
|
|
11
|
+
export { isDmlResult } from "./publicTypes";
|
|
11
12
|
export { createKintoneClient, KsqlFlowError };
|
|
12
|
-
export type { CreateExecutionContextOptions, CreateKintoneClientConfig, Diagnostic, DiagnosticCode, ExecutionContext, ExplainScriptOptions, ExplainScriptResult, FieldInfo, FlowKintoneClient, ParseScriptOptions, ParseScriptResult, SchemaResolver, ScriptHeaderMeta, Statement, StatementResult, StatementResultKind, ValidateScriptOptions, } from "./publicTypes";
|
|
13
|
+
export type { CreateExecutionContextOptions, CreateKintoneClientConfig, Diagnostic, DiagnosticCode, ExecutionContext, ExplainScriptOptions, ExplainScriptResult, FieldInfo, FlowChunkWrittenInfo, FlowDeleteResult, FlowDmlResult, FlowInsertResult, FlowKintoneClient, FlowUpdateResult, FlowUpsertResult, ParseScriptOptions, ParseScriptResult, SchemaResolver, ScriptHeaderMeta, Statement, StatementResult, StatementResultKind, ValidateScriptOptions, } from "./publicTypes";
|
|
@@ -123,6 +123,10 @@ export interface ValidateScriptOptions extends ParseScriptOptions {
|
|
|
123
123
|
export interface ExplainScriptOptions extends ParseScriptOptions {
|
|
124
124
|
client: FlowKintoneClient;
|
|
125
125
|
variables?: Readonly<Record<string, string>>;
|
|
126
|
+
/** dialect 1 の @ 付き時刻関数が共有する explain 呼出し単位の基準時刻。 */
|
|
127
|
+
asOf?: Date;
|
|
128
|
+
/** @TODAY() などの暦日境界に使う IANA timezone。省略時はホスト timezone。 */
|
|
129
|
+
timezone?: string;
|
|
126
130
|
maxRecords?: number;
|
|
127
131
|
cursorMaxActive?: number;
|
|
128
132
|
dmlMaxRows?: number;
|
|
@@ -161,6 +165,23 @@ export interface CreateExecutionContextOptions extends ParseScriptOptions {
|
|
|
161
165
|
asOf?: Date;
|
|
162
166
|
timezone?: string;
|
|
163
167
|
continueOnError?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* 書込 API の各成功直後に await される。順序は現在の書込順であり、キー順は保証しない。
|
|
170
|
+
* コールバックが throw した場合、その文は error になるが、通知対象チャンクは書込済み。
|
|
171
|
+
*/
|
|
172
|
+
onChunkWritten?: (info: FlowChunkWrittenInfo) => void | Promise<void>;
|
|
173
|
+
}
|
|
174
|
+
export interface FlowChunkWrittenInfo {
|
|
175
|
+
/** バッチ内の文 index(0 始まり)。 */
|
|
176
|
+
statementIndex: number;
|
|
177
|
+
/** 書込 API に渡される物理アプリ ID(LAPP は解決済み)。 */
|
|
178
|
+
appId: number;
|
|
179
|
+
operation: "INSERT" | "UPDATE" | "DELETE";
|
|
180
|
+
records: number;
|
|
181
|
+
/** その文で成功した書込 API リクエストの index(0 始まり)。 */
|
|
182
|
+
chunkIndex: number;
|
|
183
|
+
/** 単一キー UPSERT でキー値を payload から特定できる場合のみ設定される。 */
|
|
184
|
+
lastKeyValue?: string;
|
|
164
185
|
}
|
|
165
186
|
declare const executionContextBrand: unique symbol;
|
|
166
187
|
/** Opaque, sequential-only statement execution handle. */
|
|
@@ -195,6 +216,30 @@ export interface ExecutionMetrics {
|
|
|
195
216
|
limitReachedApps: number[];
|
|
196
217
|
elapsedMs: number;
|
|
197
218
|
}
|
|
219
|
+
export interface FlowInsertResult {
|
|
220
|
+
type: "INSERT";
|
|
221
|
+
createdIds: string[][];
|
|
222
|
+
insertedCount: number;
|
|
223
|
+
}
|
|
224
|
+
export interface FlowUpdateResult {
|
|
225
|
+
type: "UPDATE";
|
|
226
|
+
updatedCount: number;
|
|
227
|
+
}
|
|
228
|
+
export interface FlowDeleteResult {
|
|
229
|
+
type: "DELETE";
|
|
230
|
+
deletedCount: number;
|
|
231
|
+
}
|
|
232
|
+
export interface FlowUpsertResult {
|
|
233
|
+
type: "UPSERT";
|
|
234
|
+
insertedCount: number;
|
|
235
|
+
updatedCount: number;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* /flow が安定契約とする通常 DML 結果。
|
|
239
|
+
* 実体に APPLY / IMPORT 系の任意フィールドが載っていても、それらはこの契約の対象外。
|
|
240
|
+
*/
|
|
241
|
+
export type FlowDmlResult = FlowInsertResult | FlowUpdateResult | FlowDeleteResult | FlowUpsertResult;
|
|
242
|
+
export declare function isDmlResult(result: unknown): result is FlowDmlResult;
|
|
198
243
|
export type StatementResultKind = "STATEMENT" | "ASSERT_PASSED" | "ASSERT_WARNING" | "ASSERT_VIOLATION" | "EXIT_NO_DATA";
|
|
199
244
|
export interface StatementResult {
|
|
200
245
|
index: number;
|
|
@@ -206,6 +251,7 @@ export interface StatementResult {
|
|
|
206
251
|
rowCount?: number;
|
|
207
252
|
error?: StatementError;
|
|
208
253
|
skippedReason?: string;
|
|
254
|
+
/** コンテキスト開始から当該文終了時までの累積 deep-copy スナップショット。文単位値は前回との差分で求める。 */
|
|
209
255
|
metrics: ExecutionMetrics;
|
|
210
256
|
}
|
|
211
257
|
export interface CreateKintoneClientConfig {
|