@shrkcrft/generator 0.1.0-alpha.2
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/LICENSE +21 -0
- package/README.md +15 -0
- package/dist/conflict-handler.d.ts +12 -0
- package/dist/conflict-handler.d.ts.map +1 -0
- package/dist/conflict-handler.js +25 -0
- package/dist/dry-run.d.ts +10 -0
- package/dist/dry-run.d.ts.map +1 -0
- package/dist/dry-run.js +178 -0
- package/dist/file-change.d.ts +46 -0
- package/dist/file-change.d.ts.map +1 -0
- package/dist/file-change.js +22 -0
- package/dist/folder-apply.d.ts +29 -0
- package/dist/folder-apply.d.ts.map +1 -0
- package/dist/folder-apply.js +117 -0
- package/dist/folder-safety.d.ts +12 -0
- package/dist/folder-safety.d.ts.map +1 -0
- package/dist/folder-safety.js +75 -0
- package/dist/generation-plan.d.ts +24 -0
- package/dist/generation-plan.d.ts.map +1 -0
- package/dist/generation-plan.js +1 -0
- package/dist/generation-request.d.ts +14 -0
- package/dist/generation-request.d.ts.map +1 -0
- package/dist/generation-request.js +1 -0
- package/dist/generator-engine.d.ts +12 -0
- package/dist/generator-engine.d.ts.map +1 -0
- package/dist/generator-engine.js +74 -0
- package/dist/grounding/extracted-plan.d.ts +42 -0
- package/dist/grounding/extracted-plan.d.ts.map +1 -0
- package/dist/grounding/extracted-plan.js +12 -0
- package/dist/grounding/extractor-registry.d.ts +21 -0
- package/dist/grounding/extractor-registry.d.ts.map +1 -0
- package/dist/grounding/extractor-registry.js +30 -0
- package/dist/grounding/extractor.d.ts +24 -0
- package/dist/grounding/extractor.d.ts.map +1 -0
- package/dist/grounding/extractor.js +8 -0
- package/dist/grounding/extractors/markdown-frontmatter-loose.d.ts +17 -0
- package/dist/grounding/extractors/markdown-frontmatter-loose.d.ts.map +1 -0
- package/dist/grounding/extractors/markdown-frontmatter-loose.js +160 -0
- package/dist/grounding/extractors/sharkcraft-spec-v1.d.ts +12 -0
- package/dist/grounding/extractors/sharkcraft-spec-v1.d.ts.map +1 -0
- package/dist/grounding/extractors/sharkcraft-spec-v1.js +56 -0
- package/dist/grounding/index.d.ts +6 -0
- package/dist/grounding/index.d.ts.map +1 -0
- package/dist/grounding/index.js +5 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/naming-strategy.d.ts +5 -0
- package/dist/naming-strategy.d.ts.map +1 -0
- package/dist/naming-strategy.js +28 -0
- package/dist/overwrite-strategy.d.ts +14 -0
- package/dist/overwrite-strategy.d.ts.map +1 -0
- package/dist/overwrite-strategy.js +15 -0
- package/dist/plan-signing.d.ts +37 -0
- package/dist/plan-signing.d.ts.map +1 -0
- package/dist/plan-signing.js +82 -0
- package/dist/planned-change.d.ts +167 -0
- package/dist/planned-change.d.ts.map +1 -0
- package/dist/planned-change.js +507 -0
- package/dist/saved-plan.d.ts +110 -0
- package/dist/saved-plan.d.ts.map +1 -0
- package/dist/saved-plan.js +281 -0
- package/dist/spec/index.d.ts +7 -0
- package/dist/spec/index.d.ts.map +1 -0
- package/dist/spec/index.js +6 -0
- package/dist/spec/spec-derive.d.ts +15 -0
- package/dist/spec/spec-derive.d.ts.map +1 -0
- package/dist/spec/spec-derive.js +294 -0
- package/dist/spec/spec-frontmatter.d.ts +37 -0
- package/dist/spec/spec-frontmatter.d.ts.map +1 -0
- package/dist/spec/spec-frontmatter.js +497 -0
- package/dist/spec/spec-id.d.ts +30 -0
- package/dist/spec/spec-id.d.ts.map +1 -0
- package/dist/spec/spec-id.js +38 -0
- package/dist/spec/spec-io.d.ts +56 -0
- package/dist/spec/spec-io.d.ts.map +1 -0
- package/dist/spec/spec-io.js +176 -0
- package/dist/spec/spec-model.d.ts +117 -0
- package/dist/spec/spec-model.d.ts.map +1 -0
- package/dist/spec/spec-model.js +225 -0
- package/dist/spec/spec-scaffold.d.ts +32 -0
- package/dist/spec/spec-scaffold.d.ts.map +1 -0
- package/dist/spec/spec-scaffold.js +106 -0
- package/dist/synthetic-plan.d.ts +14 -0
- package/dist/synthetic-plan.d.ts.map +1 -0
- package/dist/synthetic-plan.js +123 -0
- package/package.json +54 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator-engine.d.ts","sourceRoot":"","sources":["../src/generator-engine.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,KAAK,QAAQ,EACb,KAAK,MAAM,EACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CA2DrC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { dirname } from 'node:path';
|
|
3
|
+
import { AppErrorImpl, ERROR_CODES, err, ok, } from '@shrkcrft/core';
|
|
4
|
+
import { planGeneration } from "./dry-run.js";
|
|
5
|
+
import { FileChangeType } from "./file-change.js";
|
|
6
|
+
export function generate(template, request) {
|
|
7
|
+
const dryRun = planGeneration(template, request);
|
|
8
|
+
const plan = dryRun.plan;
|
|
9
|
+
if (!request.write) {
|
|
10
|
+
return ok({
|
|
11
|
+
plan,
|
|
12
|
+
summary: {
|
|
13
|
+
written: 0,
|
|
14
|
+
skipped: plan.changes.filter((c) => c.type === FileChangeType.Skip).length,
|
|
15
|
+
conflicts: plan.changes.filter((c) => c.type === FileChangeType.Conflict).length,
|
|
16
|
+
totalBytes: 0,
|
|
17
|
+
},
|
|
18
|
+
written: [],
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (plan.hasConflicts) {
|
|
22
|
+
return err(new AppErrorImpl(ERROR_CODES.TARGET_FILE_EXISTS, 'Generation refused: plan has conflicts (use --force / different overwrite strategy)', { details: { conflicts: plan.changes.filter((c) => c.type === FileChangeType.Conflict) } }));
|
|
23
|
+
}
|
|
24
|
+
const written = [];
|
|
25
|
+
let totalBytes = 0;
|
|
26
|
+
let skipped = 0;
|
|
27
|
+
for (const change of plan.changes) {
|
|
28
|
+
if (change.type === FileChangeType.Skip) {
|
|
29
|
+
skipped += 1;
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (isWriteableChange(change.type)) {
|
|
33
|
+
try {
|
|
34
|
+
mkdirSync(dirname(change.absolutePath), { recursive: true });
|
|
35
|
+
writeFileSync(change.absolutePath, change.contents, 'utf8');
|
|
36
|
+
written.push(change);
|
|
37
|
+
totalBytes += change.sizeBytes;
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
return err(new AppErrorImpl(ERROR_CODES.FILE_WRITE_ERROR, `Failed to write ${change.absolutePath}`, { details: { path: change.absolutePath }, cause: e }));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return ok({
|
|
45
|
+
plan,
|
|
46
|
+
summary: { written: written.length, skipped, conflicts: 0, totalBytes },
|
|
47
|
+
written,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Every kind whose evaluation produces final-byte `contents` that must be
|
|
52
|
+
* written to disk. Skip + Conflict are explicitly excluded.
|
|
53
|
+
*/
|
|
54
|
+
function isWriteableChange(type) {
|
|
55
|
+
switch (type) {
|
|
56
|
+
case FileChangeType.Create:
|
|
57
|
+
case FileChangeType.Update:
|
|
58
|
+
case FileChangeType.Append:
|
|
59
|
+
case FileChangeType.InsertAfter:
|
|
60
|
+
case FileChangeType.InsertBefore:
|
|
61
|
+
case FileChangeType.Replace:
|
|
62
|
+
case FileChangeType.Export:
|
|
63
|
+
return true;
|
|
64
|
+
case FileChangeType.Skip:
|
|
65
|
+
case FileChangeType.Conflict:
|
|
66
|
+
return false;
|
|
67
|
+
case FileChangeType.RenameFolder:
|
|
68
|
+
case FileChangeType.DeleteFolder:
|
|
69
|
+
// Folder ops require dedicated apply-time handling; the file-byte
|
|
70
|
+
// writer never produces them. apply rejects them unless `--allow-folder-ops`
|
|
71
|
+
// and the safety check is green.
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extractor-derived view of an external plan / spec.
|
|
3
|
+
*
|
|
4
|
+
* Any plan format (`sharkcraft.spec/v1`, a team's loose
|
|
5
|
+
* frontmatter, etc.) reduces to this shape so the shared validation
|
|
6
|
+
* pipeline in `@shrkcrft/inspector` can check it against the live
|
|
7
|
+
* workspace.
|
|
8
|
+
*
|
|
9
|
+
* Every field is optional. Extractors populate what they can read
|
|
10
|
+
* from the source; the validator reports gaps as warnings.
|
|
11
|
+
*/
|
|
12
|
+
export declare const EXTRACTED_PLAN_SCHEMA = "sharkcraft.extracted-plan/v1";
|
|
13
|
+
export interface IExtractedAcceptanceCriterion {
|
|
14
|
+
readonly id?: string;
|
|
15
|
+
readonly text: string;
|
|
16
|
+
readonly verifiedBy?: readonly string[];
|
|
17
|
+
}
|
|
18
|
+
export interface IExtractedProposedTemplate {
|
|
19
|
+
readonly templateId: string;
|
|
20
|
+
readonly variables?: Readonly<Record<string, string>>;
|
|
21
|
+
}
|
|
22
|
+
export interface IExtractedPlan {
|
|
23
|
+
readonly schema: typeof EXTRACTED_PLAN_SCHEMA;
|
|
24
|
+
/** Source path (relative or absolute). May be empty when the plan was passed inline. */
|
|
25
|
+
readonly source: string;
|
|
26
|
+
/** Which extractor produced this view. */
|
|
27
|
+
readonly extractorId: string;
|
|
28
|
+
readonly intent?: string;
|
|
29
|
+
readonly motivation?: string;
|
|
30
|
+
readonly title?: string;
|
|
31
|
+
readonly affectedFiles?: readonly string[];
|
|
32
|
+
readonly affectedPackages?: readonly string[];
|
|
33
|
+
readonly acceptanceCriteria?: readonly IExtractedAcceptanceCriterion[];
|
|
34
|
+
readonly relevantRules?: readonly string[];
|
|
35
|
+
readonly relevantKnowledge?: readonly string[];
|
|
36
|
+
readonly relevantPaths?: readonly string[];
|
|
37
|
+
readonly proposedTemplates?: readonly IExtractedProposedTemplate[];
|
|
38
|
+
readonly verificationCommandIds?: readonly string[];
|
|
39
|
+
/** Original parsed structure (extractor-specific), for traceability. */
|
|
40
|
+
readonly raw: unknown;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=extracted-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extracted-plan.d.ts","sourceRoot":"","sources":["../../src/grounding/extracted-plan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,qBAAqB,iCAAiC,CAAC;AAEpE,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,OAAO,qBAAqB,CAAC;IAC9C,wFAAwF;IACxF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,0CAA0C;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,6BAA6B,EAAE,CAAC;IACvE,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/C,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACnE,QAAQ,CAAC,sBAAsB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpD,wEAAwE;IACxE,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extractor-derived view of an external plan / spec.
|
|
3
|
+
*
|
|
4
|
+
* Any plan format (`sharkcraft.spec/v1`, a team's loose
|
|
5
|
+
* frontmatter, etc.) reduces to this shape so the shared validation
|
|
6
|
+
* pipeline in `@shrkcrft/inspector` can check it against the live
|
|
7
|
+
* workspace.
|
|
8
|
+
*
|
|
9
|
+
* Every field is optional. Extractors populate what they can read
|
|
10
|
+
* from the source; the validator reports gaps as warnings.
|
|
11
|
+
*/
|
|
12
|
+
export const EXTRACTED_PLAN_SCHEMA = 'sharkcraft.extracted-plan/v1';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in extractor registry.
|
|
3
|
+
*
|
|
4
|
+
* Two extractors, no plugin-api surface. Pack-contributed extractors
|
|
5
|
+
* are explicitly out of scope for now — revisit when a real pack
|
|
6
|
+
* needs one.
|
|
7
|
+
*/
|
|
8
|
+
import { MARKDOWN_FRONTMATTER_LOOSE_EXTRACTOR_ID } from './extractors/markdown-frontmatter-loose.js';
|
|
9
|
+
import { SHARKCRAFT_SPEC_V1_EXTRACTOR_ID } from './extractors/sharkcraft-spec-v1.js';
|
|
10
|
+
import type { IPlanExtractor } from './extractor.js';
|
|
11
|
+
export declare const BUILTIN_EXTRACTORS: readonly IPlanExtractor[];
|
|
12
|
+
export declare function getExtractorById(id: string): IPlanExtractor | null;
|
|
13
|
+
/**
|
|
14
|
+
* Pick the highest-confidence extractor for a path. Order:
|
|
15
|
+
* 1. The first extractor whose `accepts(path)` returns true,
|
|
16
|
+
* preferring `sharkcraft.spec/v1` over `markdown-frontmatter-loose`.
|
|
17
|
+
* 2. Otherwise, null — caller must pick explicitly.
|
|
18
|
+
*/
|
|
19
|
+
export declare function pickExtractor(path: string): IPlanExtractor | null;
|
|
20
|
+
export { MARKDOWN_FRONTMATTER_LOOSE_EXTRACTOR_ID, SHARKCRAFT_SPEC_V1_EXTRACTOR_ID, };
|
|
21
|
+
//# sourceMappingURL=extractor-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractor-registry.d.ts","sourceRoot":"","sources":["../../src/grounding/extractor-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,uCAAuC,EAExC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,+BAA+B,EAEhC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,eAAO,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAGtD,CAAC;AAEH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAElE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAKjE;AAED,OAAO,EACL,uCAAuC,EACvC,+BAA+B,GAChC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in extractor registry.
|
|
3
|
+
*
|
|
4
|
+
* Two extractors, no plugin-api surface. Pack-contributed extractors
|
|
5
|
+
* are explicitly out of scope for now — revisit when a real pack
|
|
6
|
+
* needs one.
|
|
7
|
+
*/
|
|
8
|
+
import { MARKDOWN_FRONTMATTER_LOOSE_EXTRACTOR_ID, markdownFrontmatterLooseExtractor, } from "./extractors/markdown-frontmatter-loose.js";
|
|
9
|
+
import { SHARKCRAFT_SPEC_V1_EXTRACTOR_ID, sharkcraftSpecV1Extractor, } from "./extractors/sharkcraft-spec-v1.js";
|
|
10
|
+
export const BUILTIN_EXTRACTORS = Object.freeze([
|
|
11
|
+
sharkcraftSpecV1Extractor,
|
|
12
|
+
markdownFrontmatterLooseExtractor,
|
|
13
|
+
]);
|
|
14
|
+
export function getExtractorById(id) {
|
|
15
|
+
return BUILTIN_EXTRACTORS.find((e) => e.id === id) ?? null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Pick the highest-confidence extractor for a path. Order:
|
|
19
|
+
* 1. The first extractor whose `accepts(path)` returns true,
|
|
20
|
+
* preferring `sharkcraft.spec/v1` over `markdown-frontmatter-loose`.
|
|
21
|
+
* 2. Otherwise, null — caller must pick explicitly.
|
|
22
|
+
*/
|
|
23
|
+
export function pickExtractor(path) {
|
|
24
|
+
for (const e of BUILTIN_EXTRACTORS) {
|
|
25
|
+
if (e.accepts(path))
|
|
26
|
+
return e;
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
export { MARKDOWN_FRONTMATTER_LOOSE_EXTRACTOR_ID, SHARKCRAFT_SPEC_V1_EXTRACTOR_ID, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `IPlanExtractor` contract.
|
|
3
|
+
*
|
|
4
|
+
* An extractor turns an external plan/spec file (markdown, JSON, …)
|
|
5
|
+
* into an `IExtractedPlan` view for the shared validator. Extractors
|
|
6
|
+
* are read-only — they never modify the source.
|
|
7
|
+
*/
|
|
8
|
+
import type { AppError, Result } from '@shrkcrft/core';
|
|
9
|
+
import type { IExtractedPlan } from './extracted-plan.js';
|
|
10
|
+
/** Field-map: external key → canonical IExtractedPlan key. */
|
|
11
|
+
export type ExtractorFieldMap = Readonly<Record<string, string>>;
|
|
12
|
+
export interface IExtractorContext {
|
|
13
|
+
readonly source: string;
|
|
14
|
+
readonly fieldMap?: ExtractorFieldMap;
|
|
15
|
+
}
|
|
16
|
+
export interface IPlanExtractor {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly description: string;
|
|
19
|
+
/** Quick check: does this extractor accept this file path? */
|
|
20
|
+
readonly accepts: (path: string) => boolean;
|
|
21
|
+
/** Parse the raw file content into the canonical view. */
|
|
22
|
+
readonly extract: (raw: string, ctx: IExtractorContext) => Result<IExtractedPlan, AppError>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../src/grounding/extractor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,8DAA8D;AAC9D,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEjE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CACvC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,8DAA8D;IAC9D,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC5C,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,KAAK,MAAM,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;CAC7F"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `markdown-frontmatter-loose` extractor.
|
|
3
|
+
*
|
|
4
|
+
* Accepts any markdown file with YAML-shaped frontmatter (delimited
|
|
5
|
+
* by `---`). Reuses the spec frontmatter parser. Field-map remaps
|
|
6
|
+
* team-specific keys to canonical IExtractedPlan keys, with one
|
|
7
|
+
* documented level of nesting (`affectedAreas.files`, etc.).
|
|
8
|
+
*
|
|
9
|
+
* Designed for: Claude-SDD-plugin output, Cursor / Aider plans,
|
|
10
|
+
* homegrown markdown plan templates. The parser is tolerant of
|
|
11
|
+
* unknown keys — they pass through into `raw` for traceability but
|
|
12
|
+
* do not become IExtractedPlan fields unless field-mapped.
|
|
13
|
+
*/
|
|
14
|
+
import type { IPlanExtractor } from '../extractor.js';
|
|
15
|
+
export declare const MARKDOWN_FRONTMATTER_LOOSE_EXTRACTOR_ID = "markdown-frontmatter-loose";
|
|
16
|
+
export declare const markdownFrontmatterLooseExtractor: IPlanExtractor;
|
|
17
|
+
//# sourceMappingURL=markdown-frontmatter-loose.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-frontmatter-loose.d.ts","sourceRoot":"","sources":["../../../src/grounding/extractors/markdown-frontmatter-loose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAUH,OAAO,KAAK,EAAwC,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE5F,eAAO,MAAM,uCAAuC,+BAA+B,CAAC;AAkBpF,eAAO,MAAM,iCAAiC,EAAE,cAuC/C,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `markdown-frontmatter-loose` extractor.
|
|
3
|
+
*
|
|
4
|
+
* Accepts any markdown file with YAML-shaped frontmatter (delimited
|
|
5
|
+
* by `---`). Reuses the spec frontmatter parser. Field-map remaps
|
|
6
|
+
* team-specific keys to canonical IExtractedPlan keys, with one
|
|
7
|
+
* documented level of nesting (`affectedAreas.files`, etc.).
|
|
8
|
+
*
|
|
9
|
+
* Designed for: Claude-SDD-plugin output, Cursor / Aider plans,
|
|
10
|
+
* homegrown markdown plan templates. The parser is tolerant of
|
|
11
|
+
* unknown keys — they pass through into `raw` for traceability but
|
|
12
|
+
* do not become IExtractedPlan fields unless field-mapped.
|
|
13
|
+
*/
|
|
14
|
+
import { AppErrorImpl, ERROR_CODES, err, ok } from '@shrkcrft/core';
|
|
15
|
+
import { splitSpecMd } from "../../spec/spec-frontmatter.js";
|
|
16
|
+
import { EXTRACTED_PLAN_SCHEMA, } from "../extracted-plan.js";
|
|
17
|
+
export const MARKDOWN_FRONTMATTER_LOOSE_EXTRACTOR_ID = 'markdown-frontmatter-loose';
|
|
18
|
+
const CANONICAL_KEYS = new Set([
|
|
19
|
+
'intent',
|
|
20
|
+
'motivation',
|
|
21
|
+
'title',
|
|
22
|
+
'affectedFiles',
|
|
23
|
+
'affectedAreas.files',
|
|
24
|
+
'affectedPackages',
|
|
25
|
+
'affectedAreas.packages',
|
|
26
|
+
'acceptanceCriteria',
|
|
27
|
+
'relevantRules',
|
|
28
|
+
'relevantKnowledge',
|
|
29
|
+
'relevantPaths',
|
|
30
|
+
'proposedTemplates',
|
|
31
|
+
'verificationCommandIds',
|
|
32
|
+
]);
|
|
33
|
+
export const markdownFrontmatterLooseExtractor = {
|
|
34
|
+
id: MARKDOWN_FRONTMATTER_LOOSE_EXTRACTOR_ID,
|
|
35
|
+
description: 'Any markdown file with YAML-shaped frontmatter. Use --field-map to remap keys.',
|
|
36
|
+
accepts(path) {
|
|
37
|
+
return path.endsWith('.md') || path.endsWith('.mdx');
|
|
38
|
+
},
|
|
39
|
+
extract(raw, ctx) {
|
|
40
|
+
const split = splitSpecMd(raw);
|
|
41
|
+
if (!split.ok) {
|
|
42
|
+
return err(new AppErrorImpl(ERROR_CODES.INVALID_INPUT, 'markdown-frontmatter-loose: file is missing `---` frontmatter delimiters', { cause: split.error }));
|
|
43
|
+
}
|
|
44
|
+
const fm = split.value.frontmatter.fields;
|
|
45
|
+
const fieldMap = ctx.fieldMap ?? {};
|
|
46
|
+
const resolved = applyFieldMap(fm, fieldMap);
|
|
47
|
+
const view = {
|
|
48
|
+
schema: EXTRACTED_PLAN_SCHEMA,
|
|
49
|
+
source: ctx.source,
|
|
50
|
+
extractorId: MARKDOWN_FRONTMATTER_LOOSE_EXTRACTOR_ID,
|
|
51
|
+
intent: asString(resolved.intent),
|
|
52
|
+
motivation: asString(resolved.motivation),
|
|
53
|
+
title: asString(resolved.title),
|
|
54
|
+
affectedFiles: readScalarArray(resolved.affectedFiles ?? resolved['affectedAreas.files']),
|
|
55
|
+
affectedPackages: readScalarArray(resolved.affectedPackages ?? resolved['affectedAreas.packages']),
|
|
56
|
+
acceptanceCriteria: readAcceptance(resolved.acceptanceCriteria),
|
|
57
|
+
relevantRules: readScalarArray(resolved.relevantRules),
|
|
58
|
+
relevantKnowledge: readScalarArray(resolved.relevantKnowledge),
|
|
59
|
+
relevantPaths: readScalarArray(resolved.relevantPaths),
|
|
60
|
+
proposedTemplates: readProposedTemplates(resolved.proposedTemplates),
|
|
61
|
+
verificationCommandIds: readScalarArray(resolved.verificationCommandIds),
|
|
62
|
+
raw: fm,
|
|
63
|
+
};
|
|
64
|
+
return ok(view);
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
function applyFieldMap(fm, fieldMap) {
|
|
68
|
+
if (Object.keys(fieldMap).length === 0) {
|
|
69
|
+
return { ...fm };
|
|
70
|
+
}
|
|
71
|
+
const out = { ...fm };
|
|
72
|
+
for (const [externalKey, canonicalKey] of Object.entries(fieldMap)) {
|
|
73
|
+
if (!CANONICAL_KEYS.has(canonicalKey))
|
|
74
|
+
continue;
|
|
75
|
+
const value = fm[externalKey];
|
|
76
|
+
if (value === undefined)
|
|
77
|
+
continue;
|
|
78
|
+
out[canonicalKey] = value;
|
|
79
|
+
}
|
|
80
|
+
return out;
|
|
81
|
+
}
|
|
82
|
+
function asString(v) {
|
|
83
|
+
if (typeof v === 'string')
|
|
84
|
+
return v.length > 0 ? v : undefined;
|
|
85
|
+
if (typeof v === 'number' || typeof v === 'boolean')
|
|
86
|
+
return String(v);
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
function readScalarArray(v) {
|
|
90
|
+
if (v === undefined || v === null)
|
|
91
|
+
return undefined;
|
|
92
|
+
if (Array.isArray(v)) {
|
|
93
|
+
const out = v
|
|
94
|
+
.map((x) => (typeof x === 'string' ? x : typeof x === 'number' || typeof x === 'boolean' ? String(x) : ''))
|
|
95
|
+
.filter((s) => s.length > 0);
|
|
96
|
+
return out.length > 0 ? out : undefined;
|
|
97
|
+
}
|
|
98
|
+
if (typeof v === 'string') {
|
|
99
|
+
const out = v
|
|
100
|
+
.split(',')
|
|
101
|
+
.map((s) => s.trim())
|
|
102
|
+
.filter((s) => s.length > 0);
|
|
103
|
+
return out.length > 0 ? out : undefined;
|
|
104
|
+
}
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
function readAcceptance(v) {
|
|
108
|
+
if (!Array.isArray(v))
|
|
109
|
+
return undefined;
|
|
110
|
+
const out = [];
|
|
111
|
+
for (const item of v) {
|
|
112
|
+
if (typeof item === 'string' && item.length > 0) {
|
|
113
|
+
out.push({ text: item });
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
if (item && typeof item === 'object') {
|
|
117
|
+
const obj = item;
|
|
118
|
+
const text = typeof obj['text'] === 'string' ? obj['text'] : undefined;
|
|
119
|
+
if (!text)
|
|
120
|
+
continue;
|
|
121
|
+
const id = typeof obj['id'] === 'string' ? obj['id'] : undefined;
|
|
122
|
+
const verifiedBy = readScalarArray(obj['verifiedBy']);
|
|
123
|
+
out.push({
|
|
124
|
+
...(id !== undefined ? { id } : {}),
|
|
125
|
+
text,
|
|
126
|
+
...(verifiedBy !== undefined ? { verifiedBy } : {}),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return out.length > 0 ? out : undefined;
|
|
131
|
+
}
|
|
132
|
+
function readProposedTemplates(v) {
|
|
133
|
+
if (!Array.isArray(v))
|
|
134
|
+
return undefined;
|
|
135
|
+
const out = [];
|
|
136
|
+
for (const item of v) {
|
|
137
|
+
if (typeof item === 'string' && item.length > 0) {
|
|
138
|
+
out.push({ templateId: item });
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (item && typeof item === 'object') {
|
|
142
|
+
const obj = item;
|
|
143
|
+
const templateId = typeof obj['templateId'] === 'string' ? obj['templateId'] : undefined;
|
|
144
|
+
if (!templateId)
|
|
145
|
+
continue;
|
|
146
|
+
const rawVars = obj['variables'];
|
|
147
|
+
const variables = {};
|
|
148
|
+
if (rawVars && typeof rawVars === 'object' && !Array.isArray(rawVars)) {
|
|
149
|
+
for (const [k, val] of Object.entries(rawVars)) {
|
|
150
|
+
variables[k] = typeof val === 'string' ? val : String(val ?? '');
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
out.push({
|
|
154
|
+
templateId,
|
|
155
|
+
...(Object.keys(variables).length > 0 ? { variables } : {}),
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return out.length > 0 ? out : undefined;
|
|
160
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `sharkcraft.spec/v1` extractor.
|
|
3
|
+
*
|
|
4
|
+
* Wraps the spec parser + derive pipeline and projects the result onto
|
|
5
|
+
* the canonical `IExtractedPlan` shape. This is the high-confidence
|
|
6
|
+
* path: when the team is already writing `sharkcraft.spec/v1` specs,
|
|
7
|
+
* no information is lost in translation.
|
|
8
|
+
*/
|
|
9
|
+
import type { IPlanExtractor } from '../extractor.js';
|
|
10
|
+
export declare const SHARKCRAFT_SPEC_V1_EXTRACTOR_ID = "sharkcraft.spec/v1";
|
|
11
|
+
export declare const sharkcraftSpecV1Extractor: IPlanExtractor;
|
|
12
|
+
//# sourceMappingURL=sharkcraft-spec-v1.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharkcraft-spec-v1.d.ts","sourceRoot":"","sources":["../../../src/grounding/extractors/sharkcraft-spec-v1.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEzE,eAAO,MAAM,+BAA+B,uBAAuB,CAAC;AAEpE,eAAO,MAAM,yBAAyB,EAAE,cAsCvC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `sharkcraft.spec/v1` extractor.
|
|
3
|
+
*
|
|
4
|
+
* Wraps the spec parser + derive pipeline and projects the result onto
|
|
5
|
+
* the canonical `IExtractedPlan` shape. This is the high-confidence
|
|
6
|
+
* path: when the team is already writing `sharkcraft.spec/v1` specs,
|
|
7
|
+
* no information is lost in translation.
|
|
8
|
+
*/
|
|
9
|
+
import { AppErrorImpl, ERROR_CODES, err, ok } from '@shrkcrft/core';
|
|
10
|
+
import { deriveSpecJson } from "../../spec/spec-derive.js";
|
|
11
|
+
import { splitSpecMd } from "../../spec/spec-frontmatter.js";
|
|
12
|
+
import { EXTRACTED_PLAN_SCHEMA } from "../extracted-plan.js";
|
|
13
|
+
export const SHARKCRAFT_SPEC_V1_EXTRACTOR_ID = 'sharkcraft.spec/v1';
|
|
14
|
+
export const sharkcraftSpecV1Extractor = {
|
|
15
|
+
id: SHARKCRAFT_SPEC_V1_EXTRACTOR_ID,
|
|
16
|
+
description: 'sharkcraft.spec/v1 format — wraps the spec.md parser.',
|
|
17
|
+
accepts(path) {
|
|
18
|
+
return path.endsWith('spec.md');
|
|
19
|
+
},
|
|
20
|
+
extract(raw, ctx) {
|
|
21
|
+
const split = splitSpecMd(raw);
|
|
22
|
+
if (!split.ok)
|
|
23
|
+
return err(split.error);
|
|
24
|
+
const derived = deriveSpecJson(split.value);
|
|
25
|
+
if (!derived.ok)
|
|
26
|
+
return err(derived.error);
|
|
27
|
+
const spec = derived.value;
|
|
28
|
+
const view = {
|
|
29
|
+
schema: EXTRACTED_PLAN_SCHEMA,
|
|
30
|
+
source: ctx.source,
|
|
31
|
+
extractorId: SHARKCRAFT_SPEC_V1_EXTRACTOR_ID,
|
|
32
|
+
intent: spec.intent || undefined,
|
|
33
|
+
motivation: spec.motivation || undefined,
|
|
34
|
+
title: spec.title || undefined,
|
|
35
|
+
affectedFiles: spec.affectedAreas.files,
|
|
36
|
+
affectedPackages: spec.affectedAreas.packages,
|
|
37
|
+
acceptanceCriteria: spec.acceptanceCriteria.map((ac) => ({
|
|
38
|
+
id: ac.id,
|
|
39
|
+
text: ac.text,
|
|
40
|
+
verifiedBy: ac.verifiedBy,
|
|
41
|
+
})),
|
|
42
|
+
relevantRules: spec.relevantRules,
|
|
43
|
+
relevantKnowledge: spec.relevantKnowledge,
|
|
44
|
+
relevantPaths: spec.relevantPaths,
|
|
45
|
+
proposedTemplates: spec.proposedTemplates.map((t) => ({
|
|
46
|
+
templateId: t.templateId,
|
|
47
|
+
variables: t.variables,
|
|
48
|
+
})),
|
|
49
|
+
verificationCommandIds: spec.verificationCommands.map((v) => v.id),
|
|
50
|
+
raw: spec,
|
|
51
|
+
};
|
|
52
|
+
return ok(view);
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
void AppErrorImpl;
|
|
56
|
+
void ERROR_CODES;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/grounding/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './generation-request.js';
|
|
2
|
+
export * from './generation-plan.js';
|
|
3
|
+
export * from './file-change.js';
|
|
4
|
+
export * from './generator-engine.js';
|
|
5
|
+
export * from './dry-run.js';
|
|
6
|
+
export * from './overwrite-strategy.js';
|
|
7
|
+
export * from './conflict-handler.js';
|
|
8
|
+
export * from './naming-strategy.js';
|
|
9
|
+
export * from './saved-plan.js';
|
|
10
|
+
export * from './plan-signing.js';
|
|
11
|
+
export * from './planned-change.js';
|
|
12
|
+
export * from './folder-safety.js';
|
|
13
|
+
export * from './folder-apply.js';
|
|
14
|
+
export * from './synthetic-plan.js';
|
|
15
|
+
export * from './spec/index.js';
|
|
16
|
+
export * from './grounding/index.js';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./generation-request.js";
|
|
2
|
+
export * from "./generation-plan.js";
|
|
3
|
+
export * from "./file-change.js";
|
|
4
|
+
export * from "./generator-engine.js";
|
|
5
|
+
export * from "./dry-run.js";
|
|
6
|
+
export * from "./overwrite-strategy.js";
|
|
7
|
+
export * from "./conflict-handler.js";
|
|
8
|
+
export * from "./naming-strategy.js";
|
|
9
|
+
export * from "./saved-plan.js";
|
|
10
|
+
export * from "./plan-signing.js";
|
|
11
|
+
export * from "./planned-change.js";
|
|
12
|
+
export * from "./folder-safety.js";
|
|
13
|
+
export * from "./folder-apply.js";
|
|
14
|
+
export * from "./synthetic-plan.js";
|
|
15
|
+
export * from "./spec/index.js";
|
|
16
|
+
export * from "./grounding/index.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NamingStrategy } from './overwrite-strategy.js';
|
|
2
|
+
import type { TemplateVariableValues } from '@shrkcrft/templates';
|
|
3
|
+
export declare function applyNaming(name: string, strategy: NamingStrategy): string;
|
|
4
|
+
export declare function buildNameVariables(name: string): TemplateVariableValues;
|
|
5
|
+
//# sourceMappingURL=naming-strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"naming-strategy.d.ts","sourceRoot":"","sources":["../src/naming-strategy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,MAAM,CAc1E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAUvE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { toCamelCase, toKebabCase, toPascalCase, toSnakeCase } from '@shrkcrft/core';
|
|
2
|
+
import { NamingStrategy } from "./overwrite-strategy.js";
|
|
3
|
+
export function applyNaming(name, strategy) {
|
|
4
|
+
switch (strategy) {
|
|
5
|
+
case NamingStrategy.Kebab:
|
|
6
|
+
return toKebabCase(name);
|
|
7
|
+
case NamingStrategy.Pascal:
|
|
8
|
+
return toPascalCase(name);
|
|
9
|
+
case NamingStrategy.Camel:
|
|
10
|
+
return toCamelCase(name);
|
|
11
|
+
case NamingStrategy.Snake:
|
|
12
|
+
return toSnakeCase(name);
|
|
13
|
+
case NamingStrategy.AsIs:
|
|
14
|
+
default:
|
|
15
|
+
return name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function buildNameVariables(name) {
|
|
19
|
+
return {
|
|
20
|
+
name: toKebabCase(name),
|
|
21
|
+
kebab: toKebabCase(name),
|
|
22
|
+
pascal: toPascalCase(name),
|
|
23
|
+
camel: toCamelCase(name),
|
|
24
|
+
snake: toSnakeCase(name),
|
|
25
|
+
className: toPascalCase(name),
|
|
26
|
+
fileName: toKebabCase(name),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum OverwriteStrategy {
|
|
2
|
+
Never = "never",
|
|
3
|
+
Ask = "ask",
|
|
4
|
+
Overwrite = "overwrite",
|
|
5
|
+
MergeLater = "merge-later"
|
|
6
|
+
}
|
|
7
|
+
export declare enum NamingStrategy {
|
|
8
|
+
AsIs = "as-is",
|
|
9
|
+
Kebab = "kebab",
|
|
10
|
+
Pascal = "pascal",
|
|
11
|
+
Camel = "camel",
|
|
12
|
+
Snake = "snake"
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=overwrite-strategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overwrite-strategy.d.ts","sourceRoot":"","sources":["../src/overwrite-strategy.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,SAAS,cAAc;IACvB,UAAU,gBAAgB;CAC3B;AAED,oBAAY,cAAc;IACxB,IAAI,UAAU;IACd,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export var OverwriteStrategy;
|
|
2
|
+
(function (OverwriteStrategy) {
|
|
3
|
+
OverwriteStrategy["Never"] = "never";
|
|
4
|
+
OverwriteStrategy["Ask"] = "ask";
|
|
5
|
+
OverwriteStrategy["Overwrite"] = "overwrite";
|
|
6
|
+
OverwriteStrategy["MergeLater"] = "merge-later";
|
|
7
|
+
})(OverwriteStrategy || (OverwriteStrategy = {}));
|
|
8
|
+
export var NamingStrategy;
|
|
9
|
+
(function (NamingStrategy) {
|
|
10
|
+
NamingStrategy["AsIs"] = "as-is";
|
|
11
|
+
NamingStrategy["Kebab"] = "kebab";
|
|
12
|
+
NamingStrategy["Pascal"] = "pascal";
|
|
13
|
+
NamingStrategy["Camel"] = "camel";
|
|
14
|
+
NamingStrategy["Snake"] = "snake";
|
|
15
|
+
})(NamingStrategy || (NamingStrategy = {}));
|