* refactor(#180): migrate state document module to sdk/src/state * test(#180): ratchet lint allowlists for state module relocation
This commit is contained in:
@@ -20,7 +20,7 @@ const BANNER = `'use strict';
|
||||
/**
|
||||
* GENERATED FILE — DO NOT EDIT.
|
||||
*
|
||||
* Source: sdk/src/query/state-document.ts
|
||||
* Source: sdk/src/state/index.ts
|
||||
* Regenerate: cd sdk && npm run gen:state-document
|
||||
*
|
||||
* STATE.md Document Module — pure transforms for STATE.md text.
|
||||
@@ -50,7 +50,7 @@ function extractFunctionFromSource(source, name) {
|
||||
return source.slice(start, i + 1);
|
||||
}
|
||||
|
||||
const distUrl = new URL('../dist/query/state-document.js', import.meta.url);
|
||||
const distUrl = new URL('../dist/state/index.js', import.meta.url);
|
||||
const {
|
||||
stateExtractField,
|
||||
stateReplaceField,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Generator for the STATE.md Document Module CJS artifact.
|
||||
*
|
||||
* Reads the compiled ESM output from sdk/dist/query/state-document.js,
|
||||
* Reads the compiled ESM output from sdk/dist/state/index.js,
|
||||
* extracts function source via Function.prototype.toString() for exports
|
||||
* and via source-text extraction for internal helpers, then emits
|
||||
* get-shit-done/bin/lib/state-document.generated.cjs.
|
||||
@@ -19,7 +19,7 @@ const BANNER = `'use strict';
|
||||
/**
|
||||
* GENERATED FILE — DO NOT EDIT.
|
||||
*
|
||||
* Source: sdk/src/query/state-document.ts
|
||||
* Source: sdk/src/state/index.ts
|
||||
* Regenerate: cd sdk && npm run gen:state-document
|
||||
*
|
||||
* STATE.md Document Module — pure transforms for STATE.md text.
|
||||
@@ -63,7 +63,7 @@ function extractFunctionFromSource(source: string, name: string): string {
|
||||
|
||||
export async function buildStateDocumentCjs(): Promise<string> {
|
||||
// Load the compiled ESM module to get exports via Function.prototype.toString()
|
||||
const distUrl = new URL('../dist/query/state-document.js', import.meta.url);
|
||||
const distUrl = new URL('../dist/state/index.js', import.meta.url);
|
||||
const {
|
||||
stateExtractField,
|
||||
stateReplaceField,
|
||||
|
||||
@@ -26,7 +26,7 @@ export { SUPPORTED_RUNTIMES, type Runtime } from '../model-catalog.js';
|
||||
import { SUPPORTED_RUNTIMES, type Runtime } from '../model-catalog.js';
|
||||
import { canonicalizeRuntimeName } from '../runtime-name-policy.js';
|
||||
import { workspacePlanningPaths, resolveWorkspaceContext, type PlanningPaths } from './workspace.js';
|
||||
export { stateExtractField } from './state-document.js';
|
||||
export { stateExtractField } from '../state/index.js';
|
||||
import { relPlanningPath, validateWorkstreamName } from '../workstream-utils.js';
|
||||
|
||||
// ─── Runtime-aware agents directory resolution ─────────────────────────────
|
||||
|
||||
@@ -41,7 +41,7 @@ import {
|
||||
releaseStateLock,
|
||||
stateReplaceField,
|
||||
} from './state-mutation.js';
|
||||
import { stateExtractField, stateReplaceFieldWithFallback } from './state-document.js';
|
||||
import { stateExtractField, stateReplaceFieldWithFallback } from '../state/index.js';
|
||||
import type { QueryHandler } from './utils.js';
|
||||
import {
|
||||
assertNoNullBytes,
|
||||
|
||||
@@ -36,7 +36,7 @@ import {
|
||||
} from './helpers.js';
|
||||
import { buildStateFrontmatter, getMilestonePhaseFilter } from './state.js';
|
||||
import { scanPhasePlans } from './plan-scan.js';
|
||||
import { stateExtractField, stateReplaceField, stateReplaceFieldWithFallback, computeProgressPercent } from './state-document.js';
|
||||
import { stateExtractField, stateReplaceField, stateReplaceFieldWithFallback, computeProgressPercent } from '../state/index.js';
|
||||
import type { QueryHandler } from './utils.js';
|
||||
|
||||
const PROGRESS_FRONTMATTER_FIELDS = new Set(['Progress', 'Total Plans in Phase', 'Total Phases']);
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
normalizeStateStatus,
|
||||
shouldPreserveExistingProgress,
|
||||
stateExtractField,
|
||||
} from './state-document.js';
|
||||
} from '../state/index.js';
|
||||
import { getMilestoneInfo, extractCurrentMilestone } from './roadmap.js';
|
||||
import { scanPhasePlans } from './plan-scan.js';
|
||||
import type { QueryHandler } from './utils.js';
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import { scanPhasePlans } from './plan-scan.js';
|
||||
import { stateExtractField } from './state-document.js';
|
||||
import { stateExtractField } from '../state/index.js';
|
||||
import { readActiveWorkstream } from './active-workstream-store.js';
|
||||
import { buildWorkstreamInventory } from '../workstream-inventory/builder.js';
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
computeProgressPercent,
|
||||
shouldPreserveExistingProgress,
|
||||
normalizeProgressNumbers,
|
||||
} from './state-document.js';
|
||||
} from './index.js';
|
||||
|
||||
describe('stateExtractField', () => {
|
||||
it('extracts value from bold pattern', () => {
|
||||
Reference in New Issue
Block a user