@codemarc/blt 1.4.8 → 1.5.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 +92 -1
- package/dist/blt +2 -0
- package/dist/blt.d.ts.map +1 -1
- package/dist/blt.js.map +1 -1
- package/dist/commands/template/init.d.ts +8 -0
- package/dist/commands/template/init.d.ts.map +1 -0
- package/dist/commands/template/init.js +20 -0
- package/dist/commands/template/init.js.map +1 -0
- package/dist/commands/template/inspect.d.ts +3 -0
- package/dist/commands/template/inspect.d.ts.map +1 -0
- package/dist/commands/template/inspect.js +20 -0
- package/dist/commands/template/inspect.js.map +1 -0
- package/dist/commands/template/list.d.ts +3 -0
- package/dist/commands/template/list.d.ts.map +1 -0
- package/dist/commands/template/list.js +13 -0
- package/dist/commands/template/list.js.map +1 -0
- package/dist/commands/template/render.d.ts +12 -0
- package/dist/commands/template/render.d.ts.map +1 -0
- package/dist/commands/template/render.js +49 -0
- package/dist/commands/template/render.js.map +1 -0
- package/dist/commands/template.d.ts +3 -0
- package/dist/commands/template.d.ts.map +1 -0
- package/dist/commands/template.js +92 -0
- package/dist/commands/template.js.map +1 -0
- package/dist/commands/wai/config-templates.d.ts +2 -2
- package/dist/commands/wai/config-templates.d.ts.map +1 -1
- package/dist/commands/wai/config-templates.js +4 -5
- package/dist/commands/wai/config-templates.js.map +1 -1
- package/dist/commands/wai/config.js +1 -1
- package/dist/commands/wai/config.js.map +1 -1
- package/dist/lib/template/data.d.ts +2 -0
- package/dist/lib/template/data.d.ts.map +1 -0
- package/dist/lib/template/data.js +14 -0
- package/dist/lib/template/data.js.map +1 -0
- package/dist/lib/template/engine.d.ts +4 -0
- package/dist/lib/template/engine.d.ts.map +1 -0
- package/dist/lib/template/engine.js +33 -0
- package/dist/lib/template/engine.js.map +1 -0
- package/dist/lib/template/files.d.ts +8 -0
- package/dist/lib/template/files.d.ts.map +1 -0
- package/dist/lib/template/files.js +24 -0
- package/dist/lib/template/files.js.map +1 -0
- package/dist/lib/template/manifest.d.ts +11 -0
- package/dist/lib/template/manifest.d.ts.map +1 -0
- package/dist/lib/template/manifest.js +15 -0
- package/dist/lib/template/manifest.js.map +1 -0
- package/dist/lib/template/registry.d.ts +5 -0
- package/dist/lib/template/registry.d.ts.map +1 -0
- package/dist/lib/template/registry.js +43 -0
- package/dist/lib/template/registry.js.map +1 -0
- package/dist/lib/template/types.d.ts +33 -0
- package/dist/lib/template/types.d.ts.map +1 -0
- package/dist/lib/template/types.js +2 -0
- package/dist/lib/template/types.js.map +1 -0
- package/dist/templates/index.d.ts +3 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +3 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/legal/nda/mutual.d.ts +3 -0
- package/dist/templates/legal/nda/mutual.d.ts.map +1 -0
- package/dist/templates/legal/nda/mutual.js +183 -0
- package/dist/templates/legal/nda/mutual.js.map +1 -0
- package/package.json +1 -1
- package/dist/commands/init/config-templates.d.ts +0 -18
- package/dist/commands/init/config-templates.d.ts.map +0 -1
- package/dist/commands/init/config-templates.js +0 -74
- package/dist/commands/init/config-templates.js.map +0 -1
- package/dist/commands/init/config.d.ts +0 -9
- package/dist/commands/init/config.d.ts.map +0 -1
- package/dist/commands/init/config.js +0 -92
- package/dist/commands/init/config.js.map +0 -1
- package/dist/commands/show/info.d.ts +0 -7
- package/dist/commands/show/info.d.ts.map +0 -1
- package/dist/commands/show/info.js +0 -52
- package/dist/commands/show/info.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/lib/template/files.ts"],"names":[],"mappings":"AAIA,KAAK,oBAAoB,GAAG;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEhE;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D;AAED,wBAAsB,aAAa,CACjC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,IAAI,CAAC,CASf"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { access, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { dirname } from "node:path";
|
|
3
|
+
import { constants } from "node:fs";
|
|
4
|
+
export async function readTextFile(path) {
|
|
5
|
+
return readFile(path, "utf8");
|
|
6
|
+
}
|
|
7
|
+
export async function pathExists(path) {
|
|
8
|
+
try {
|
|
9
|
+
await access(path, constants.F_OK);
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export async function writeTextFile(path, content, options = {}) {
|
|
17
|
+
const { overwrite = false } = options;
|
|
18
|
+
if (!overwrite && (await pathExists(path))) {
|
|
19
|
+
throw new Error(`Refusing to overwrite existing file: ${path}`);
|
|
20
|
+
}
|
|
21
|
+
await mkdir(dirname(path), { recursive: true });
|
|
22
|
+
await writeFile(path, content, "utf8");
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/lib/template/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMpC,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,OAAO,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAY;IAC3C,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,IAAY,EACZ,OAAe,EACf,UAAgC,EAAE;IAElC,MAAM,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;IAEtC,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CAAC,wCAAwC,IAAI,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,MAAM,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type PatternVariables = {
|
|
2
|
+
name?: string;
|
|
3
|
+
templateId?: string;
|
|
4
|
+
dataFileName?: string;
|
|
5
|
+
dataFileStem?: string;
|
|
6
|
+
templateFileName?: string;
|
|
7
|
+
templateFileStem?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function getFileStem(path: string): string;
|
|
10
|
+
export declare function renderOutputPattern(pattern: string, variables: PatternVariables): string;
|
|
11
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/lib/template/manifest.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,gBAAgB,GAC1B,MAAM,CAUR"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { basename, extname } from "node:path";
|
|
2
|
+
export function getFileStem(path) {
|
|
3
|
+
const extension = extname(path);
|
|
4
|
+
return basename(path, extension);
|
|
5
|
+
}
|
|
6
|
+
export function renderOutputPattern(pattern, variables) {
|
|
7
|
+
return pattern.replace(/\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g, (match, key) => {
|
|
8
|
+
const value = variables[key];
|
|
9
|
+
if (value == null || value === "") {
|
|
10
|
+
throw new Error(`Missing pattern variable "${key}" for output pattern "${pattern}"`);
|
|
11
|
+
}
|
|
12
|
+
return value;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/lib/template/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAW9C,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,OAAe,EACf,SAA2B;IAE3B,OAAO,OAAO,CAAC,OAAO,CAAC,gCAAgC,EAAE,CAAC,KAAK,EAAE,GAAW,EAAE,EAAE;QAC9E,MAAM,KAAK,GAAG,SAAS,CAAC,GAA6B,CAAC,CAAC;QAEvD,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,6BAA6B,GAAG,yBAAyB,OAAO,GAAG,CAAC,CAAC;QACvF,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ResolvedTemplate, TemplateManifest } from "./types";
|
|
2
|
+
export declare function listBuiltInTemplates(): TemplateManifest[];
|
|
3
|
+
export declare function getBuiltInTemplate(templateId: string): ResolvedTemplate;
|
|
4
|
+
export declare function resolveTemplateSource(source: string): Promise<ResolvedTemplate>;
|
|
5
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/lib/template/registry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAuB,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAMvF,wBAAgB,oBAAoB,IAAI,gBAAgB,EAAE,CAEzD;AAED,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAcvE;AAED,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAwBrF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { basename, extname } from "node:path";
|
|
2
|
+
import { builtInTemplates } from "../../templates";
|
|
3
|
+
import { readTextFile, pathExists } from "./files";
|
|
4
|
+
const builtInTemplateMap = new Map(builtInTemplates.map((templatePack) => [templatePack.manifest.id, templatePack]));
|
|
5
|
+
export function listBuiltInTemplates() {
|
|
6
|
+
return builtInTemplates.map((templatePack) => templatePack.manifest);
|
|
7
|
+
}
|
|
8
|
+
export function getBuiltInTemplate(templateId) {
|
|
9
|
+
const templatePack = builtInTemplateMap.get(templateId);
|
|
10
|
+
if (!templatePack) {
|
|
11
|
+
throw new Error(`Unknown template "${templateId}"`);
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
kind: "built-in",
|
|
15
|
+
id: templatePack.manifest.id,
|
|
16
|
+
manifest: templatePack.manifest,
|
|
17
|
+
templateContent: templatePack.template,
|
|
18
|
+
defaultsYaml: templatePack.defaultsYaml,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export async function resolveTemplateSource(source) {
|
|
22
|
+
if (builtInTemplateMap.has(source)) {
|
|
23
|
+
return getBuiltInTemplate(source);
|
|
24
|
+
}
|
|
25
|
+
if (!(await pathExists(source))) {
|
|
26
|
+
throw new Error(`Template "${source}" is neither a built-in template id nor a readable file path`);
|
|
27
|
+
}
|
|
28
|
+
const templateContent = await readTextFile(source);
|
|
29
|
+
const outputExtension = extname(source) || ".txt";
|
|
30
|
+
return {
|
|
31
|
+
kind: "file",
|
|
32
|
+
id: source,
|
|
33
|
+
manifest: {
|
|
34
|
+
id: source,
|
|
35
|
+
name: basename(source),
|
|
36
|
+
description: "Local template file",
|
|
37
|
+
outputExtension,
|
|
38
|
+
},
|
|
39
|
+
templateContent,
|
|
40
|
+
sourcePath: source,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/lib/template/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAGnD,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAChC,gBAAgB,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EA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AM,CAAC;YACtB,WAAW,EAAE,qBAAqB;YAClC,eAAe;SAChB;QACD,eAAe;QACf,UAAU,EAAE,MAAM;KACnB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type TemplateManifest = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
outputExtension?: string;
|
|
6
|
+
requiredTokens?: string[];
|
|
7
|
+
init?: {
|
|
8
|
+
outputPattern?: string;
|
|
9
|
+
};
|
|
10
|
+
render?: {
|
|
11
|
+
outputPattern?: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type BuiltInTemplatePack = {
|
|
15
|
+
manifest: TemplateManifest;
|
|
16
|
+
template: string;
|
|
17
|
+
defaultsYaml?: string;
|
|
18
|
+
};
|
|
19
|
+
export type ResolvedTemplate = {
|
|
20
|
+
kind: "built-in" | "file";
|
|
21
|
+
id: string;
|
|
22
|
+
manifest?: TemplateManifest;
|
|
23
|
+
templateContent: string;
|
|
24
|
+
defaultsYaml?: string;
|
|
25
|
+
sourcePath?: string;
|
|
26
|
+
};
|
|
27
|
+
export type RenderResult = {
|
|
28
|
+
content: string;
|
|
29
|
+
tokens: string[];
|
|
30
|
+
replacedTokens: string[];
|
|
31
|
+
missingTokens: string[];
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/template/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE;QACL,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,UAAU,GAAG,MAAM,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/template/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAGjE,eAAO,MAAM,gBAAgB,EAAE,mBAAmB,EAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,CAAC,MAAM,gBAAgB,GAA0B,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutual.d.ts","sourceRoot":"","sources":["../../../../src/templates/legal/nda/mutual.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAyJvE,eAAO,MAAM,iBAAiB,EAAE,mBAgC/B,CAAC"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
const template = `
|
|
2
|
+
<br/><center>NON-DISCLOSURE AGREEMENT (NDA)</center><br/>
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
I. **The Parties**. This Mutual Non-Disclosure Agreement, hereinafter referred to as the "Agreement," effective as of [[effective_date]], hereinafter referred to as the "Effective Date," is by and between:
|
|
6
|
+
|
|
7
|
+
**[[party_a]]**
|
|
8
|
+
described as the [[party_a_loc]] business entity known as [[party_a_name]]
|
|
9
|
+
("[[party_a]]")
|
|
10
|
+
|
|
11
|
+
AND
|
|
12
|
+
|
|
13
|
+
**[[party_b]]**
|
|
14
|
+
described as the [[party_b_loc]] business entity known as [[party_b_name]]
|
|
15
|
+
("[[party_b]]")
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
**II. Confidential Information**. The term "Confidential Information" includes, but is not limited to, all proprietary information owned by the Parties and not generally known to the public or in the relevant trade or industry that is communicated orally, written, printed, electronically or any other form or medium, or which was learned, discovered, developed, conceived, originated, or prepared by the
|
|
19
|
+
|
|
20
|
+
Parties in the scope and course of their relationship, relating directly or indirectly to business processes, technical data, trade secrets, know-how, advice, consultations, proprietary information, client lists, client instructions, assets, business operations, specifications, designs, plans, drawings, hardware, software, data, prototypes or other business and technical information belonging to any client of the
|
|
21
|
+
|
|
22
|
+
Parties, operational methods, economic and business analyses, models, strategies, and projections, promotion methods, trade show information and contacts, and other proprietary information relating to the business of the Parties and any and all other concepts, as such Confidential Information pertains personally to principals or other information that has independent economic value.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
**III. Non-Disclosure**. The Parties agree that they shall have the obligation to:
|
|
26
|
+
|
|
27
|
+
(a) hold the Confidential Information in the strictest of confidence;
|
|
28
|
+
|
|
29
|
+
(b) not use the Confidential Information for any personal gain or detrimentally to the other party;
|
|
30
|
+
|
|
31
|
+
(c) take all steps necessary to protect the Confidential Information from disclosure and to implement internal procedures to guard against such disclosure;
|
|
32
|
+
|
|
33
|
+
(d) not disclose the fact that the Confidential Information has been made available or that discussions and negotiations are taking place or have taken place or any of its terms, conditions or other facts with respect to the transaction; and
|
|
34
|
+
|
|
35
|
+
(e) not disclose or make available all or any part of the Confidential Information to any person, firm, corporation, association, or any other entity for any reason or purpose whatsoever, directly or indirectly, unless and until such Confidential Information becomes publicly available other than as a consequence of a breach by any of the Parties and their confidentiality obligations hereunder.
|
|
36
|
+
|
|
37
|
+
This Section shall survive and continue after any expiration or termination of this Agreement and shall bind the Parties, its employees, agents, representatives, successors, heirs and assigns.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
**IV. Exceptions to Confidential Information**. The Parties shall not be restricted from disclosing or using Confidential Information that:
|
|
41
|
+
|
|
42
|
+
(a) was freely available in the public domain at the time it was communicated between the Parties;
|
|
43
|
+
|
|
44
|
+
(b) subsequently came to the public domain through no fault of the Parties;
|
|
45
|
+
|
|
46
|
+
(c) is in either [[party_a]]'s or [[party_b]]'s possession free of any obligation of confidence at the time it was communicated;
|
|
47
|
+
|
|
48
|
+
(d) is independently developed by either [[party_a]] or [[party_b]] or its representatives without reference to any information communicated to or by the Parties;
|
|
49
|
+
|
|
50
|
+
(e) is provided by either [[party_a]] or [[party_b]] in response to a a valid order by a court or other governmental body, as otherwise required by law; or
|
|
51
|
+
|
|
52
|
+
(f) is approved for release by written authorization of an officer or representative of [[party_a]] or [[party_b]];
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
**V. Use or Disclosure of Confidential Information**. The Parties shall only use the Confidential Information as directed and not for its own purposes or the purposes of any other party. [[party_a]] and [[party_b]] shall disclose the Confidential Information received under this Agreement to persons within their organization only if such persons are on a "need to know" basis. The Parties shall advise each person to whom disclosure is permitted that such information is confidential and proprietary property and may not be disclosed to others or used for their own purpose. This Section shall survive and continue after any expiration or termination of this Agreement and shall bind the Parties, including but not limited to, their employees, agents, representatives, successors, heirs and assigns.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
**VI. Notice of Disclosure**. In the event that any of the Parties receive a request or is required (by deposition, interrogatory, request for documents, subpoena, civil investigative demand or similar process) to disclose all or any part of the Confidential Information, the Parties agree, if legally permissible, to (a) promptly notify the other Party of the existence, terms and circumstances surrounding such request or requirement, (b) consult with the other Party on the advisability of taking legally available steps to resist or narrow such request or requirement and (c) assist the other Party in seeking a protective order or other appropriate remedy; provided, however, that the disclosing Party shall not be required to take any action in violation of applicable laws.
|
|
59
|
+
|
|
60
|
+
In the event that such protective order or other remedy is not obtained or that one of the Parties waives compliance with the provisions hereof, the disclosing Party shall not be liable for such disclosure unless disclosure to any such tribunal was caused by or resulted from a previous disclosure by the disclosing party not permitted by this Agreement.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
**VII. Term**. This Agreement, with respect to Confidential Information, will remain in effect for perpetuity.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
**VIII**. Return of Confidential Information. Upon request from any of the Parties or upon the termination of negotiations and evaluations, both Parties will promptly deliver to each other all originals and copies of all documents, records, software programs, media and other materials containing any Confidential Information. Both Parties shall also return to each other all equipment, files, and other personal property belonging to one another. [[party_a]] and [[party_b]] shall not be permitted to make, retain, or distribute copies of any Confidential Information and shall not create any other documents, records, or materials in any form whatsoever that includes the Confidential Information.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
**IX. Indemnification**. The Parties agree to defend and indemnify each other at all times in respect of any and all claims, demands, losses, damages, liabilities, costs and/or expenses of any kind whatsoever incurred by an entity not mentioned in this Agreement except to the extent caused by the negligence or an unauthorized disclosure of Confidential Information by one of the Parties or their respective employees, agents, representatives, successors, heirs or assigns.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
**X. Notice**. Any notice provided in this Agreement must be in writing and must be either personally delivered, mailed by first class mail (postage prepaid and return receipt requested) or sent by reputable overnight courier service (charges prepaid) to the Parties at the addresses below indicated:
|
|
73
|
+
|
|
74
|
+
[[party_a]]'s Address: [[party_a_address]]
|
|
75
|
+
|
|
76
|
+
[[party_b]]'s Address: [[party_b_address]]
|
|
77
|
+
|
|
78
|
+
If the above-stated addresses should change the Parties shall specify by certified mail, with return receipt, to one another.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
**XI. Covenants**. The parties hereto agree that the covenants, agreements and restrictions (hereinafter "this covenant") contained herein are necessary to protect the business goodwill, business interests and proprietary rights of the Parties hereto and have independently discussed, reviewed and had the opportunity of legal counsel to consider this Agreement.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
**XII. Enforcement**. The Parties acknowledge and agree that due to the unique and sensitive nature of the Confidential Information, any breach of this Agreement would cause irreparable harm for which damages and or equitable relief may be sought. The violated Party shall be entitled to all remedies available at law.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
**XIII. Authority**. This Agreement sets forth the entire Agreement and understanding between the Parties and supersedes all prior oral or written agreements and understandings relating to the subject matter of this Agreement. This Agreement may not be modified or discharged, in whole or part, except by consent in writing signed by the Parties.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
**XIV. Assignment**. This Agreement may not be assigned or otherwise transferred by either party without the prior written consent of the non-transferring party.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
**XV. Binding Arrangement**. This Agreement will be binding upon and inure to the benefit of the parties hereto and each Party's respective successors and assigns.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
**XVI. Severability**. In the event that any provision of this Agreement is held by a court of competent jurisdiction to be unenforceable because it is invalid or in conflict with any law of any relevant jurisdiction, the validity of the remaining provisions shall not be affected, and the rights and obligations of the parties hereto shall be construed and enforced as if the Agreement did not contain the particular provision(s) held to be unenforceable.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
**XVII. Governing Law**. This Agreement shall be governed by and construed in accordance with the laws in the State of [[effective_state]].
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
**XVIII. Authority**. Each party hereto represents and warrants that it has the full power and authority to enter into and perform this Agreement, and each party knows of no law, rule, regulations, order, agreement, promise, undertaking or other fact or circumstance which would prevent its full execution and performance of this Agreement.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
**XIX. Counterparts**. This Agreement may be executed in any number of counterparts, each of which shall be an original, but all of which together shall constitute one and the same agreement.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
**XX. Execution**.
|
|
109
|
+
|
|
110
|
+
IN WITNESS WHEREOF, the Parties hereto have executed this Agreement on the undersigned date.
|
|
111
|
+
|
|
112
|
+
<br/>
|
|
113
|
+
|
|
114
|
+
**[[party_a_name]] ([[party_a]])**
|
|
115
|
+
|
|
116
|
+
#### Signature: <u>______________________________</u> Date: <u>[[sig_date]]</u><br/><br/>
|
|
117
|
+
|
|
118
|
+
#### Print Name: <u>[[party_a_person]]</u><br/><br/>
|
|
119
|
+
|
|
120
|
+
#### Title: <u>[[party_a_role]]</u><br/><br/>
|
|
121
|
+
<br/>
|
|
122
|
+
|
|
123
|
+
**[[party_b_name]] ([[party_b]])**
|
|
124
|
+
<br/>
|
|
125
|
+
|
|
126
|
+
#### Signature: <u>______________________________</u> Date: <u>[[sig_date]]</u><br/><br/>
|
|
127
|
+
|
|
128
|
+
#### Print Name: <u>[[party_b_person]]</u><br/><br/>
|
|
129
|
+
|
|
130
|
+
#### Title: <u>[[party_b_role]]</u><br/><br/>
|
|
131
|
+
`.trimStart();
|
|
132
|
+
const defaultsYaml = `effective_date: "month day,year"
|
|
133
|
+
effective_state: "Florida"
|
|
134
|
+
sig_date: "mm/dd/yyyy"
|
|
135
|
+
|
|
136
|
+
party_a: "BLT"
|
|
137
|
+
party_a_person: "Marc J, Greenberg"
|
|
138
|
+
party_a_role: "Managing Partner"
|
|
139
|
+
party_a_name: "Beyond Limited Thinking LLC"
|
|
140
|
+
party_a_loc: "Delray Beach, Florida"
|
|
141
|
+
party_a_address: "15969 Brier Creek Dr., Delray Beach, Florida, 33446"
|
|
142
|
+
|
|
143
|
+
party_b: ""
|
|
144
|
+
party_b_person: ""
|
|
145
|
+
party_b_role: ""
|
|
146
|
+
party_b_name: ""
|
|
147
|
+
party_b_loc: ""
|
|
148
|
+
party_b_address: ""
|
|
149
|
+
`;
|
|
150
|
+
export const mutualNdaTemplate = {
|
|
151
|
+
manifest: {
|
|
152
|
+
id: "legal/nda/mutual",
|
|
153
|
+
name: "Mutual NDA",
|
|
154
|
+
description: "Mutual non-disclosure agreement",
|
|
155
|
+
outputExtension: ".md",
|
|
156
|
+
requiredTokens: [
|
|
157
|
+
"effective_date",
|
|
158
|
+
"effective_state",
|
|
159
|
+
"sig_date",
|
|
160
|
+
"party_a",
|
|
161
|
+
"party_a_person",
|
|
162
|
+
"party_a_role",
|
|
163
|
+
"party_a_name",
|
|
164
|
+
"party_a_loc",
|
|
165
|
+
"party_a_address",
|
|
166
|
+
"party_b",
|
|
167
|
+
"party_b_person",
|
|
168
|
+
"party_b_role",
|
|
169
|
+
"party_b_name",
|
|
170
|
+
"party_b_loc",
|
|
171
|
+
"party_b_address",
|
|
172
|
+
],
|
|
173
|
+
init: {
|
|
174
|
+
outputPattern: "doc/nda/mutual-nda-blt-{{name}}.yaml",
|
|
175
|
+
},
|
|
176
|
+
render: {
|
|
177
|
+
outputPattern: "doc/generated/{{dataFileStem}}.md",
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
template,
|
|
181
|
+
defaultsYaml,
|
|
182
|
+
};
|
|
183
|
+
//# sourceMappingURL=mutual.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mutual.js","sourceRoot":"","sources":["../../../../src/templates/legal/nda/mutual.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIhB,CAAC,SAAS,EAAE,CAAC;AAEd,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;CAiBpB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAwB;IACpD,QAAQ,EAAE;QACR,EAAE,EAAE,kBAAkB;QACtB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,iCAAiC;QAC9C,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE;YACd,gBAAgB;YAChB,iBAAiB;YACjB,UAAU;YACV,SAAS;YACT,gBAAgB;YAChB,cAAc;YACd,cAAc;YACd,aAAa;YACb,iBAAiB;YACjB,SAAS;YACT,gBAAgB;YAChB,cAAc;YACd,cAAc;YACd,aAAa;YACb,iBAAiB;SAClB;QACD,IAAI,EAAE;YACJ,aAAa,EAAE,sCAAsC;SACtD;QACD,MAAM,EAAE;YACN,aAAa,EAAE,mCAAmC;SACnD;KACF;IACD,QAAQ;IACR,YAAY;CACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude Code–aligned config template registry.
|
|
3
|
-
* Templates are fetched from the bltcore-com/tools repo at runtime.
|
|
4
|
-
*/
|
|
5
|
-
export interface ConfigTypeDef {
|
|
6
|
-
filename: string;
|
|
7
|
-
sourceFile: string;
|
|
8
|
-
needsName: boolean;
|
|
9
|
-
description: string;
|
|
10
|
-
}
|
|
11
|
-
export declare const CONFIG_TYPES: Record<string, ConfigTypeDef>;
|
|
12
|
-
export declare function getTemplateUrl(type: string, branch: string, name?: string): string;
|
|
13
|
-
export declare function getOutputPath(type: string, cwd: string, options: {
|
|
14
|
-
output?: string;
|
|
15
|
-
claudeDir?: boolean;
|
|
16
|
-
}, name?: string): string;
|
|
17
|
-
export declare function fetchTemplate(url: string): Promise<string>;
|
|
18
|
-
//# sourceMappingURL=config-templates.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-templates.d.ts","sourceRoot":"","sources":["../../../src/commands/init/config-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CA+BtD,CAAC;AAEF,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAMR;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,EACjD,IAAI,CAAC,EAAE,MAAM,GACZ,MAAM,CAsBR;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Claude Code–aligned config template registry.
|
|
3
|
-
* Templates are fetched from the bltcore-com/tools repo at runtime.
|
|
4
|
-
*/
|
|
5
|
-
const TOOLS_REPO = "bltcore-com/tools";
|
|
6
|
-
const TEMPLATE_BASE = "cli/.trailz";
|
|
7
|
-
export const CONFIG_TYPES = {
|
|
8
|
-
claude: {
|
|
9
|
-
filename: "CLAUDE.md",
|
|
10
|
-
sourceFile: "CLAUDE.md",
|
|
11
|
-
needsName: false,
|
|
12
|
-
description: "Primary project memory (loaded every session)",
|
|
13
|
-
},
|
|
14
|
-
agents: {
|
|
15
|
-
filename: "AGENTS.md",
|
|
16
|
-
sourceFile: "AGENTS.md",
|
|
17
|
-
needsName: false,
|
|
18
|
-
description: "Open standard for AI agent config",
|
|
19
|
-
},
|
|
20
|
-
"claude-local": {
|
|
21
|
-
filename: "CLAUDE.local.md",
|
|
22
|
-
sourceFile: "CLAUDE.local.md",
|
|
23
|
-
needsName: false,
|
|
24
|
-
description: "Local-only instructions (add to .gitignore)",
|
|
25
|
-
},
|
|
26
|
-
skill: {
|
|
27
|
-
filename: "SKILL.md",
|
|
28
|
-
sourceFile: "SKILL.md",
|
|
29
|
-
needsName: true,
|
|
30
|
-
description: "Reusable workflow in .claude/skills/<name>/SKILL.md",
|
|
31
|
-
},
|
|
32
|
-
rule: {
|
|
33
|
-
filename: "<name>.md",
|
|
34
|
-
sourceFile: "rule-template.md",
|
|
35
|
-
needsName: true,
|
|
36
|
-
description: "Scoped instructions in .claude/rules/<name>.md",
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
export function getTemplateUrl(type, branch, name) {
|
|
40
|
-
const def = CONFIG_TYPES[type];
|
|
41
|
-
if (!def)
|
|
42
|
-
throw new Error(`Unknown config type: ${type}`);
|
|
43
|
-
const sourceFile = def.sourceFile;
|
|
44
|
-
return `https://raw.githubusercontent.com/${TOOLS_REPO}/${branch}/${TEMPLATE_BASE}/${sourceFile}`;
|
|
45
|
-
}
|
|
46
|
-
export function getOutputPath(type, cwd, options, name) {
|
|
47
|
-
if (options.output) {
|
|
48
|
-
return options.output.startsWith("/")
|
|
49
|
-
? options.output
|
|
50
|
-
: `${cwd}/${options.output}`.replace(/\/+/g, "/");
|
|
51
|
-
}
|
|
52
|
-
const def = CONFIG_TYPES[type];
|
|
53
|
-
if (!def)
|
|
54
|
-
throw new Error(`Unknown config type: ${type}`);
|
|
55
|
-
// skill and rule always live under .claude/
|
|
56
|
-
if (def.needsName && name) {
|
|
57
|
-
if (type === "skill") {
|
|
58
|
-
return `${cwd}/.claude/skills/${name}/SKILL.md`.replace(/\/+/g, "/");
|
|
59
|
-
}
|
|
60
|
-
if (type === "rule") {
|
|
61
|
-
return `${cwd}/.claude/rules/${name}.md`.replace(/\/+/g, "/");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
const base = options.claudeDir ? ".claude" : ".";
|
|
65
|
-
return `${cwd}/${base}/${def.filename}`.replace(/\/+/g, "/");
|
|
66
|
-
}
|
|
67
|
-
export async function fetchTemplate(url) {
|
|
68
|
-
const res = await fetch(url);
|
|
69
|
-
if (!res.ok) {
|
|
70
|
-
throw new Error(`Failed to fetch template (${res.status}): ${url}\n${await res.text().catch(() => "")}`);
|
|
71
|
-
}
|
|
72
|
-
return res.text();
|
|
73
|
-
}
|
|
74
|
-
//# sourceMappingURL=config-templates.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-templates.js","sourceRoot":"","sources":["../../../src/commands/init/config-templates.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,GAAG,mBAAmB,CAAC;AACvC,MAAM,aAAa,GAAG,aAAa,CAAC;AASpC,MAAM,CAAC,MAAM,YAAY,GAAkC;IACzD,MAAM,EAAE;QACN,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,WAAW;QACvB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,+CAA+C;KAC7D;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,WAAW;QACvB,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,mCAAmC;KACjD;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,iBAAiB;QAC3B,UAAU,EAAE,iBAAiB;QAC7B,SAAS,EAAE,KAAK;QAChB,WAAW,EAAE,6CAA6C;KAC3D;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,UAAU,EAAE,UAAU;QACtB,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,qDAAqD;KACnE;IACD,IAAI,EAA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AAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAED,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;IACjD,OAAO,GAAG,GAAG,IAAI,IAAI,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,GAAW;IAC7C,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,6BAA6B,GAAG,CAAC,MAAM,MAAM,GAAG,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CACxF,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Logger } from "@caporal/core";
|
|
2
|
-
export interface InitConfigOptions {
|
|
3
|
-
overwrite: boolean;
|
|
4
|
-
branch: string;
|
|
5
|
-
output?: string;
|
|
6
|
-
claudeDir: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function initConfig(type: string, name: string | undefined, options: InitConfigOptions, logger: Logger): Promise<void>;
|
|
9
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/init/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AA2D5C,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC,CA+Cf"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { existsSync, mkdirSync } from "node:fs";
|
|
2
|
-
import { dirname } from "node:path";
|
|
3
|
-
import { CONFIG_TYPES, fetchTemplate, getOutputPath, getTemplateUrl, } from "./config-templates";
|
|
4
|
-
const DEFAULT_BRANCH = "main";
|
|
5
|
-
/** Fallback templates when GitHub fetch fails (e.g. before push, offline) */
|
|
6
|
-
const FALLBACK_TEMPLATES = {
|
|
7
|
-
"CLAUDE.md": `# Project Memory (CLAUDE.md)
|
|
8
|
-
|
|
9
|
-
Primary project context loaded at the start of every session.
|
|
10
|
-
|
|
11
|
-
## About This Project
|
|
12
|
-
|
|
13
|
-
## Build & Run
|
|
14
|
-
|
|
15
|
-
## Architecture
|
|
16
|
-
|
|
17
|
-
## Coding Standards
|
|
18
|
-
`,
|
|
19
|
-
"AGENTS.md": `# AGENTS.md
|
|
20
|
-
|
|
21
|
-
Open standard for AI agent configuration.
|
|
22
|
-
|
|
23
|
-
## Project Context
|
|
24
|
-
|
|
25
|
-
## Conventions
|
|
26
|
-
|
|
27
|
-
## Key Commands
|
|
28
|
-
`,
|
|
29
|
-
"CLAUDE.local.md": `# CLAUDE.local.md
|
|
30
|
-
|
|
31
|
-
Local-only instructions. Add to .gitignore. Do not commit.
|
|
32
|
-
`,
|
|
33
|
-
"SKILL.md": `---
|
|
34
|
-
name: Skill Name
|
|
35
|
-
description: What this skill does
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
# Skill
|
|
39
|
-
|
|
40
|
-
Reusable multi-step workflow. Add steps and notes below.
|
|
41
|
-
`,
|
|
42
|
-
"rule-template.md": `# Rule
|
|
43
|
-
|
|
44
|
-
Scoped instructions for specific file types or paths.
|
|
45
|
-
|
|
46
|
-
## Applies To
|
|
47
|
-
|
|
48
|
-
## Instructions
|
|
49
|
-
`,
|
|
50
|
-
};
|
|
51
|
-
export async function initConfig(type, name, options, logger) {
|
|
52
|
-
const def = CONFIG_TYPES[type];
|
|
53
|
-
if (!def) {
|
|
54
|
-
logger.error(`Unknown config type: '${type}'. Valid: ${Object.keys(CONFIG_TYPES).join(", ")}`);
|
|
55
|
-
process.exit(1);
|
|
56
|
-
}
|
|
57
|
-
if (def.needsName && !name?.trim()) {
|
|
58
|
-
logger.error(`Type '${type}' requires a name. Example: blt init config ${type} my-name`);
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
const cwd = process.cwd();
|
|
62
|
-
const targetPath = getOutputPath(type, cwd, options, name);
|
|
63
|
-
if (existsSync(targetPath) && !options.overwrite) {
|
|
64
|
-
logger.warn(`File already exists: ${targetPath}`);
|
|
65
|
-
logger.warn("Use --overwrite to replace it.");
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const branch = options.branch || DEFAULT_BRANCH;
|
|
69
|
-
const sourceFile = def.sourceFile;
|
|
70
|
-
let content;
|
|
71
|
-
try {
|
|
72
|
-
const url = getTemplateUrl(type, branch, name);
|
|
73
|
-
content = await fetchTemplate(url);
|
|
74
|
-
}
|
|
75
|
-
catch (err) {
|
|
76
|
-
const fallback = FALLBACK_TEMPLATES[sourceFile];
|
|
77
|
-
if (fallback) {
|
|
78
|
-
logger.warn("Could not fetch from GitHub, using built-in template. Push templates to the tools repo for the latest versions.");
|
|
79
|
-
content = fallback;
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
83
|
-
logger.error(`Failed to fetch template: ${msg}`);
|
|
84
|
-
process.exit(1);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
const dir = dirname(targetPath);
|
|
88
|
-
mkdirSync(dir, { recursive: true });
|
|
89
|
-
await Bun.write(targetPath, content);
|
|
90
|
-
logger.info(`Created: ${targetPath}`);
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/commands/init/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,MAAM,cAAc,GAAG,MAAM,CAAC;AAE9B,6EAA6E;AAC7E,MAAM,kBAAkB,GAA2B;IACjD,WAAW,EAAE;;;;;;;;;;;CAWd;IACC,WAAW,EAAE;;;;;;;;;CASd;IACC,iBAAiB,EAAE;;;CAGpB;IACC,UAAU,EAAE;;;;;;;;CAQb;IACC,kBAAkB,EAAE;;;;;;;CAOrB;CACA,CAAC;AASF,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,IAAY,EACZ,IAAwB,EACxB,OAA0B,EAC1B,MAAc;IAEd,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,CAAC,KAAK,CAAC,yBAAyB,IAAI,aAAa,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC/F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,IAAI,GAAG,CAAC,SAAS,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC;QACnC,MAAM,CAAC,KAAK,CAAC,SAAS,IAAI,+CAA+C,IAAI,UAAU,CAAC,CAAC;QACzF,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AC,CAAC;IAChC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEpC,MAAM,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACrC,MAAM,CAAC,IAAI,CAAC,YAAY,UAAU,EAAE,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Logger } from "@caporal/core";
|
|
2
|
-
/**
|
|
3
|
-
* Fetch and display pos/data version strings for an environment (same format as login footer).
|
|
4
|
-
* Calls the info API at BLT_INFO_API_URL.
|
|
5
|
-
*/
|
|
6
|
-
export declare function showInfo(name: string, logger: Logger): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=info.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../src/commands/show/info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAU5C;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C1E"}
|