vouchington-tooling 0.37.3 → 0.38.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/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/sql-ast/index.d.mts +0 -3
- package/dist/sql-ast/index.mjs +0 -2
- package/package.json +1 -1
- package/dist/sql-ast/add-column.d.mts +0 -1
- package/dist/sql-ast/add-column.mjs +0 -22
- package/dist/sql-ast/drop-index.d.mts +0 -5
- package/dist/sql-ast/drop-index.mjs +0 -33
package/dist/index.d.mts
CHANGED
|
@@ -12,8 +12,8 @@ export { buildSessionFrictionReport, classifyFrictionObservation, FRICTION_LOG_M
|
|
|
12
12
|
export type { FrictionEvent, FrictionEventKind, FrictionLogOptions, FrictionLogReadResult, FrictionObservation, JournalEntry, JournalLoader, JournalLoadResult, PermissionRequestObservation, SessionFrictionReport, SessionFrictionReportOptions, ToolResultObservation, } from './session-friction/index.mts';
|
|
13
13
|
export { EphemeralListenerAttemptsExhaustedError, isRunnerReservedPort, listenOnRunnerUnreservedEphemeralPort, loadRunnerPortPolicy, runnerPortPolicy, validateRunnerPortPolicy, } from './runner-port-policy/index.mts';
|
|
14
14
|
export type { EphemeralListenerOptions, RunnerPortPolicy } from './runner-port-policy/index.mts';
|
|
15
|
-
export {
|
|
16
|
-
export type { ForeignKey, SqlCreateIndexMetadata, SqlCreateTableColumn, SqlCreateTableMetadata,
|
|
15
|
+
export { extractCreateIndexMetadata, extractCreateTableMetadata, extractDefaultFunction, extractFuncCallArgColumnNames, extractMigrationConstraintMetadata, initSqlAst, lineOfUtf8ByteOffset, MissingSqlAstParserError, parseSql, } from './sql-ast/index.mts';
|
|
16
|
+
export type { ForeignKey, SqlCreateIndexMetadata, SqlCreateTableColumn, SqlCreateTableMetadata, SqlIndexParam, SqlMigrationConstraintMetadata, } from './sql-ast/index.mts';
|
|
17
17
|
export { dollarQuoteEnd, lineOf, maskSqlQuotedText, readDollarQuoteDelimiter, readStringLiteral, splitSqlStatements, sqlFragments, stripSqlComments, } from './sql-scanner/index.mts';
|
|
18
18
|
export { auditCiJobRuntime, parseWorkflowNameMatch } from './gha-runtime-audit/index.mts';
|
|
19
19
|
export type { GhApiExecutor, RuntimeAuditOptions, RuntimeAuditResult, RuntimeAuditWorkflowFilter, RuntimeJobResult, RuntimeSample, } from './gha-runtime-audit/index.mts';
|
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ export { runRetrospectiveFacts } from "./retrospective-facts/index.mjs";
|
|
|
6
6
|
export { appendJournal, assertSessionId, cleanupSnapshotPartitions, partitionSnapshot, probeBlackboard, readJournal, resolveBlackboardConnection, } from "./agent-blackboard/index.mjs";
|
|
7
7
|
export { buildSessionFrictionReport, classifyFrictionObservation, FRICTION_LOG_MAX_EVENTS, isConformingCiFailureBlock, normalizeCommandPrefix, readFrictionLog, recordFriction, } from "./session-friction/index.mjs";
|
|
8
8
|
export { EphemeralListenerAttemptsExhaustedError, isRunnerReservedPort, listenOnRunnerUnreservedEphemeralPort, loadRunnerPortPolicy, runnerPortPolicy, validateRunnerPortPolicy, } from "./runner-port-policy/index.mjs";
|
|
9
|
-
export {
|
|
9
|
+
export { extractCreateIndexMetadata, extractCreateTableMetadata, extractDefaultFunction, extractFuncCallArgColumnNames, extractMigrationConstraintMetadata, initSqlAst, lineOfUtf8ByteOffset, MissingSqlAstParserError, parseSql, } from "./sql-ast/index.mjs";
|
|
10
10
|
export { dollarQuoteEnd, lineOf, maskSqlQuotedText, readDollarQuoteDelimiter, readStringLiteral, splitSqlStatements, sqlFragments, stripSqlComments, } from "./sql-scanner/index.mjs";
|
|
11
11
|
export { auditCiJobRuntime, parseWorkflowNameMatch } from "./gha-runtime-audit/index.mjs";
|
|
12
12
|
export { checkGhaWorkspacePolicy } from "./gha-workspace-policy/index.mjs";
|
package/dist/sql-ast/index.d.mts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
export { extractAlterTableAddColumnLocations } from './add-column.mts';
|
|
2
1
|
export { extractMigrationConstraintMetadata } from './constraint.mts';
|
|
3
2
|
export type { ForeignKey, SqlMigrationConstraintMetadata } from './constraint-shared.mts';
|
|
4
3
|
export { extractCreateTableMetadata } from './create-table.mts';
|
|
5
4
|
export type { SqlCreateTableColumn, SqlCreateTableColumnConstraint, SqlCreateTableMetadata, } from './create-table.mts';
|
|
6
5
|
export { extractDefaultFunction, extractFuncCallArgColumnNames } from './default-function.mts';
|
|
7
|
-
export { extractDropIndexMetadata } from './drop-index.mts';
|
|
8
|
-
export type { SqlDropIndexMetadata } from './drop-index.mts';
|
|
9
6
|
export { extractCreateIndexMetadata } from './index-metadata.mts';
|
|
10
7
|
export { extractIndexShapes } from './index-shapes.mts';
|
|
11
8
|
export type { SqlCreateIndexMetadata, SqlIndexParam } from './index-metadata.mts';
|
package/dist/sql-ast/index.mjs
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
export { extractAlterTableAddColumnLocations } from "./add-column.mjs";
|
|
2
1
|
export { extractMigrationConstraintMetadata } from "./constraint.mjs";
|
|
3
2
|
export { extractCreateTableMetadata } from "./create-table.mjs";
|
|
4
3
|
export { extractDefaultFunction, extractFuncCallArgColumnNames } from "./default-function.mjs";
|
|
5
|
-
export { extractDropIndexMetadata } from "./drop-index.mjs";
|
|
6
4
|
export { extractCreateIndexMetadata } from "./index-metadata.mjs";
|
|
7
5
|
export { extractIndexShapes } from "./index-shapes.mjs";
|
|
8
6
|
export { lineOfUtf8ByteOffset } from "./line-of-offset.mjs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vouchington-tooling",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "Vouchington CLI and extractable tooling libraries.",
|
|
5
5
|
"homepage": "https://github.com/vouchington/vouchington-tooling/tree/main/packages/vouchington-tooling#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function extractAlterTableAddColumnLocations(content: string): number[];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { parseSql } from "./parser.mjs";
|
|
2
|
-
export function extractAlterTableAddColumnLocations(content) {
|
|
3
|
-
const locations = [];
|
|
4
|
-
const parseResult = parseSql(content);
|
|
5
|
-
for (const rawStmt of parseResult.stmts ?? []) {
|
|
6
|
-
const node = rawStmt.stmt;
|
|
7
|
-
if (!node || !('AlterTableStmt' in node))
|
|
8
|
-
continue;
|
|
9
|
-
for (const rawCommand of node.AlterTableStmt.cmds ?? []) {
|
|
10
|
-
if (!rawCommand || !('AlterTableCmd' in rawCommand))
|
|
11
|
-
continue;
|
|
12
|
-
const command = rawCommand.AlterTableCmd;
|
|
13
|
-
if (command.subtype !== 'AT_AddColumn')
|
|
14
|
-
continue;
|
|
15
|
-
const definition = command.def;
|
|
16
|
-
if (!definition || !('ColumnDef' in definition))
|
|
17
|
-
continue;
|
|
18
|
-
locations.push(rawStmt.stmt_location ?? 0);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
return locations;
|
|
22
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { parseSql } from "./parser.mjs";
|
|
2
|
-
import { isRecord } from "./unknown-record.mjs";
|
|
3
|
-
export function extractDropIndexMetadata(content) {
|
|
4
|
-
const indexes = [];
|
|
5
|
-
const parseResult = parseSql(content);
|
|
6
|
-
for (const rawStmt of parseResult.stmts ?? []) {
|
|
7
|
-
const node = rawStmt.stmt;
|
|
8
|
-
/* v8 ignore next 2 */
|
|
9
|
-
if (!node || !('DropStmt' in node) || node.DropStmt.removeType !== 'OBJECT_INDEX')
|
|
10
|
-
continue;
|
|
11
|
-
for (const object of node.DropStmt.objects ?? []) {
|
|
12
|
-
// oxlint-disable-next-line no-mistakes/ts-no-const-aliases -- establish an unknown boundary before runtime shape validation
|
|
13
|
-
const objectValue = object;
|
|
14
|
-
const items = isRecord(objectValue) && isRecord(objectValue['List'])
|
|
15
|
-
? objectValue['List']['items']
|
|
16
|
-
: undefined;
|
|
17
|
-
if (!Array.isArray(items))
|
|
18
|
-
continue;
|
|
19
|
-
const names = items.flatMap((item) => {
|
|
20
|
-
// oxlint-disable-next-line no-mistakes/ts-no-const-aliases -- establish an unknown boundary before runtime shape validation
|
|
21
|
-
const itemValue = item;
|
|
22
|
-
const value = isRecord(itemValue) && isRecord(itemValue['String'])
|
|
23
|
-
? itemValue['String']['sval']
|
|
24
|
-
: undefined;
|
|
25
|
-
return typeof value === 'string' ? [value] : [];
|
|
26
|
-
});
|
|
27
|
-
const idxname = names.at(-1);
|
|
28
|
-
if (idxname)
|
|
29
|
-
indexes.push({ idxname, location: rawStmt.stmt_location ?? 0 });
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return indexes;
|
|
33
|
-
}
|