@noir-ai/create 1.19.0 → 1.19.1
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.ts +32 -1
- package/dist/index.js +297 -265
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,37 @@ declare function readAncestors(root: string): Record<string, string>;
|
|
|
14
14
|
* leaves ancestors.json untouched (no mtime/git churn). */
|
|
15
15
|
declare function writeAncestors(root: string, map: Record<string, string>): void;
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Emit a host's lifecycle-hook config on demand — the write-once `mergeJson`
|
|
19
|
+
* hook the scaffold deliberately does NOT re-emit on `noir init --upgrade` or
|
|
20
|
+
* `noir sync`. This is the explicit restore path (`noir hooks sync`): it runs
|
|
21
|
+
* the same `adapter.emitHooks` seam the scaffold uses and dispatches each entry
|
|
22
|
+
* to the writer its mode names (`regenerate` for cursor, `mergeJson` for
|
|
23
|
+
* claude/gemini). With `force`, an existing Noir-owned hook entry (one whose
|
|
24
|
+
* command carries the dedup marker) is refreshed to the currently resolved
|
|
25
|
+
* command instead of being left as-is; the user's other keys and non-Noir hooks
|
|
26
|
+
* are never touched.
|
|
27
|
+
*
|
|
28
|
+
* Pure filesystem work — no daemon, no store, no prompt. A host with no hook
|
|
29
|
+
* surface (agents-md, opencode) returns an empty outcome list.
|
|
30
|
+
*/
|
|
31
|
+
/** One host hook-config write performed by {@link emitHooksToFile}. */
|
|
32
|
+
interface HookEmitOutcome {
|
|
33
|
+
/** Repo-relative path of the host's hook config file. */
|
|
34
|
+
path: string;
|
|
35
|
+
/** `mergeJson` = merged into a user-owned file; `regenerate` = rewritten. */
|
|
36
|
+
mode: 'mergeJson' | 'regenerate';
|
|
37
|
+
/** True when the bytes on disk changed (a write happened). */
|
|
38
|
+
written: boolean;
|
|
39
|
+
}
|
|
40
|
+
interface EmitHooksResult {
|
|
41
|
+
host: HostId;
|
|
42
|
+
outcomes: HookEmitOutcome[];
|
|
43
|
+
}
|
|
44
|
+
declare function emitHooksToFile(root: string, host: HostId, opts?: {
|
|
45
|
+
force?: boolean;
|
|
46
|
+
}): EmitHooksResult;
|
|
47
|
+
|
|
17
48
|
/**
|
|
18
49
|
* READ-ONLY stack detection. Probes for well-known marker files under `root`
|
|
19
50
|
* and reports ONLY what is present — never assumes. The result feeds path
|
|
@@ -939,4 +970,4 @@ declare function loadTemplate(name: string): string;
|
|
|
939
970
|
/** Resolve a template name to its absolute path (for diagnostics + tests). */
|
|
940
971
|
declare function templatesDir(): string;
|
|
941
972
|
|
|
942
|
-
export { BRIEF_BLOCK, type BuildHostArtifactsContext, type BuildManifestContext, CURRENT_SCAFFOLD_VERSION, type ConflictContext, type ConflictRecord, type ConflictResolution, type ConflictResolverReturn, type DiffLine, type EnvMode, type HostTag, MANIFEST_PATH_PARITY, MIGRATIONS, type ManifestEntry, type MergeResult, type MigrationContext, type MigrationResult, type MigrationScript, SEED_TEMPLATE_HISTORY, type ScaffoldMode, type ScaffoldOptions, type ScaffoldResult, type SeedTemplateHistoryEntry, type StackInfo, type WriteMode, type WriteOutcome, ancestorsPath, applyInlineConflict, applyWithConflict, assertSafeRoot, buildHostArtifacts, buildManifest, buildRegion, detectStack, isStaleSeed, lineDiff, loadTemplate, managedBlock, mergeThreeWay, readAncestors, readScaffoldVersion, regenerate, render, runMigrations, scaffold, scaffoldVersionPath, skipIfExists, templatesDir, writeAncestors, writeScaffoldVersion, zdiff3Region };
|
|
973
|
+
export { BRIEF_BLOCK, type BuildHostArtifactsContext, type BuildManifestContext, CURRENT_SCAFFOLD_VERSION, type ConflictContext, type ConflictRecord, type ConflictResolution, type ConflictResolverReturn, type DiffLine, type EmitHooksResult, type EnvMode, type HookEmitOutcome, type HostTag, MANIFEST_PATH_PARITY, MIGRATIONS, type ManifestEntry, type MergeResult, type MigrationContext, type MigrationResult, type MigrationScript, SEED_TEMPLATE_HISTORY, type ScaffoldMode, type ScaffoldOptions, type ScaffoldResult, type SeedTemplateHistoryEntry, type StackInfo, type WriteMode, type WriteOutcome, ancestorsPath, applyInlineConflict, applyWithConflict, assertSafeRoot, buildHostArtifacts, buildManifest, buildRegion, detectStack, emitHooksToFile, isStaleSeed, lineDiff, loadTemplate, managedBlock, mergeThreeWay, readAncestors, readScaffoldVersion, regenerate, render, runMigrations, scaffold, scaffoldVersionPath, skipIfExists, templatesDir, writeAncestors, writeScaffoldVersion, zdiff3Region };
|