contentbit 1.0.0-rc.2 → 2.0.0-next.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 +24 -93
- package/dist/bin.js +23268 -10576
- package/dist/cli-format.d.ts +11 -3
- package/dist/cli-format.d.ts.map +1 -1
- package/dist/command-config.d.ts +7 -2
- package/dist/command-config.d.ts.map +1 -1
- package/dist/commands/adopt-routes.d.ts +47 -0
- package/dist/commands/adopt-routes.d.ts.map +1 -0
- package/dist/commands/adopt.d.ts +2 -2
- package/dist/commands/adopt.d.ts.map +1 -1
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/check.d.ts +14 -0
- package/dist/commands/check.d.ts.map +1 -0
- package/dist/commands/context.d.ts +11 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/find-markdown.d.ts +13 -0
- package/dist/commands/find-markdown.d.ts.map +1 -0
- package/dist/commands/init-blocks.d.ts +38 -0
- package/dist/commands/init-blocks.d.ts.map +1 -0
- package/dist/commands/init-ci.d.ts +16 -0
- package/dist/commands/init-ci.d.ts.map +1 -0
- package/dist/commands/init-site.d.ts +16 -0
- package/dist/commands/init-site.d.ts.map +1 -0
- package/dist/commands/init-targets.d.ts +6 -1
- package/dist/commands/init-targets.d.ts.map +1 -1
- package/dist/commands/init.d.ts +5 -4
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/package-manager.d.ts +22 -0
- package/dist/commands/package-manager.d.ts.map +1 -0
- package/dist/commands/skill-drift.d.ts +7 -0
- package/dist/commands/skill-drift.d.ts.map +1 -0
- package/dist/commands/studio.d.ts +3 -2
- package/dist/commands/studio.d.ts.map +1 -1
- package/dist/content-project.d.ts +1 -6
- package/dist/content-project.d.ts.map +1 -1
- package/dist/load-site.d.ts +20 -0
- package/dist/load-site.d.ts.map +1 -0
- package/dist/project-config.d.ts +4 -1
- package/dist/project-config.d.ts.map +1 -1
- package/dist/run.d.ts +2 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +23256 -10575
- package/dist/write-file.d.ts +7 -0
- package/dist/write-file.d.ts.map +1 -0
- package/package.json +17 -10
- package/dist/commands/brief.d.ts +0 -12
- package/dist/commands/brief.d.ts.map +0 -1
- package/dist/commands/doctor.d.ts +0 -16
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/links.d.ts +0 -9
- package/dist/commands/links.d.ts.map +0 -1
- package/dist/commands/snapshot.d.ts +0 -12
- package/dist/commands/snapshot.d.ts.map +0 -1
- package/dist/commands/stats.d.ts +0 -9
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/links-io.d.ts +0 -3
- package/dist/links-io.d.ts.map +0 -1
package/dist/cli-format.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { Diagnostic, Severity } from '@contentbit/core';
|
|
1
|
+
import type { ContentProjectFinding, Diagnostic, Severity } from '@contentbit/core';
|
|
2
|
+
import { displayPath } from '@contentbit/project';
|
|
3
|
+
export { displayPath };
|
|
2
4
|
type Tone = 'error' | 'warning' | 'info' | 'success' | 'muted';
|
|
3
5
|
interface Row {
|
|
4
6
|
label: string;
|
|
@@ -6,12 +8,18 @@ interface Row {
|
|
|
6
8
|
tone?: Tone;
|
|
7
9
|
}
|
|
8
10
|
export declare function color(text: string, tone: Tone | 'bold'): string;
|
|
11
|
+
/**
|
|
12
|
+
* A report as JSON, with every path in the project or its build relative to the project root, in
|
|
13
|
+
* forward slashes, so it reads the same on any machine.
|
|
14
|
+
*/
|
|
15
|
+
export declare function reportJson(value: unknown, root: string, build?: string): string;
|
|
9
16
|
export declare function section(title: string): string;
|
|
10
17
|
export declare function formatRows(rows: Row[]): string[];
|
|
11
18
|
export declare function formatCommandList(commands: string[]): string[];
|
|
12
19
|
export declare function formatDiagnosticForCli(diagnostic: Diagnostic, file: string): string;
|
|
13
|
-
export declare function
|
|
20
|
+
export declare function formatFinding(index: number, finding: Omit<ContentProjectFinding, 'source'> & {
|
|
21
|
+
source: string;
|
|
22
|
+
}): string[];
|
|
14
23
|
export declare function severityLabel(severity: Severity): string;
|
|
15
24
|
export declare function severityTone(severity: Severity): Tone;
|
|
16
|
-
export {};
|
|
17
25
|
//# sourceMappingURL=cli-format.d.ts.map
|
package/dist/cli-format.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-format.d.ts","sourceRoot":"","sources":["../src/cli-format.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-format.d.ts","sourceRoot":"","sources":["../src/cli-format.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEjD,OAAO,EAAE,WAAW,EAAE,CAAA;AAEtB,KAAK,IAAI,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;AAW9D,UAAU,GAAG;IACX,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAI/D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAY/E;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,EAAE,CAQhD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAE9D;AAED,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQnF;AAED,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClE,MAAM,EAAE,CAYV;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAExD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAIrD"}
|
package/dist/command-config.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { LinkResolverOptions } from '@contentbit/core';
|
|
2
|
+
import type { CheckSettings, SiteSettings } from '@contentbit/project';
|
|
2
3
|
import { type LinkOptionValues } from './link-options.js';
|
|
3
4
|
import { type LoadedSeoConfig } from './seo-config.js';
|
|
4
|
-
type ContentCommand = 'validate' | '
|
|
5
|
+
type ContentCommand = 'validate' | 'studio' | 'check' | 'context' | 'adopt';
|
|
5
6
|
export interface ContentCommandOptions extends LinkOptionValues {
|
|
6
7
|
globs: string[];
|
|
7
8
|
registry?: string;
|
|
@@ -14,8 +15,12 @@ export interface ResolvedContentCommandConfig {
|
|
|
14
15
|
cwd?: string;
|
|
15
16
|
registry?: string;
|
|
16
17
|
includeGenericBlocks: boolean;
|
|
18
|
+
/** Whether the project defines blocks: its config names a registry or sets genericBlocks: true. */
|
|
19
|
+
blocks: boolean;
|
|
20
|
+
site?: SiteSettings;
|
|
21
|
+
check?: CheckSettings;
|
|
17
22
|
resolveLinkOptions(): LinkResolverOptions;
|
|
18
|
-
loadSeo()
|
|
23
|
+
loadSeo: () => Promise<LoadedSeoConfig>;
|
|
19
24
|
}
|
|
20
25
|
/** Resolve invocation flags over Contentbit config or package-script defaults.
|
|
21
26
|
* Link validation and SEO imports remain on demand so commands keep their
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-config.d.ts","sourceRoot":"","sources":["../src/command-config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"command-config.d.ts","sourceRoot":"","sources":["../src/command-config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEtE,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAE9E,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAkBrE,KAAK,cAAc,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;AAE3E,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,mGAAmG;IACnG,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,kBAAkB,IAAI,mBAAmB,CAAA;IACzC,OAAO,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAA;CACxC;AAED;;wEAEwE;AACxE,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,cAAc,EACvB,KAAK,EAAE,qBAAqB,EAC5B,QAAQ,SAAgB,GACvB,OAAO,CAAC,4BAA4B,CAAC,CAiCvC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { type ContentPageFacts, type LinkResolveMode } from '@contentbit/core';
|
|
2
|
+
import { type BuiltSite } from '@contentbit/built-site';
|
|
3
|
+
export interface RouteFile {
|
|
4
|
+
/** Absolute path. */
|
|
5
|
+
file: string;
|
|
6
|
+
facts: ContentPageFacts;
|
|
7
|
+
}
|
|
8
|
+
export interface ProposedRoute {
|
|
9
|
+
/** The directory as `links.routes` writes it, relative to the root. */
|
|
10
|
+
dir: string;
|
|
11
|
+
pattern: string;
|
|
12
|
+
attached: number;
|
|
13
|
+
unattached: number;
|
|
14
|
+
/** Up to three of the files it does not attach, relative to the root. */
|
|
15
|
+
examples: string[];
|
|
16
|
+
}
|
|
17
|
+
export interface PageRouteProposal {
|
|
18
|
+
defaultLocale?: string;
|
|
19
|
+
prefixDefaultLocale?: false;
|
|
20
|
+
routes: ProposedRoute[];
|
|
21
|
+
/** The highest directories none of whose files attaches to a built page, and each directory
|
|
22
|
+
* none of whose own files attaches while files in its subdirectories do. */
|
|
23
|
+
unmatched: Array<{
|
|
24
|
+
dir: string;
|
|
25
|
+
files: number;
|
|
26
|
+
}>;
|
|
27
|
+
files: number;
|
|
28
|
+
attached: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Candidates are scored through contentPageUrlResolver and siteSources so a proposal attaches
|
|
32
|
+
* files the way `check` will. Unlike check, a file on a page whose `<html lang>` is another
|
|
33
|
+
* language does not count.
|
|
34
|
+
*/
|
|
35
|
+
export declare function proposePageRoutes(site: BuiltSite, files: RouteFile[], { root, defaultLocale }: {
|
|
36
|
+
root: string;
|
|
37
|
+
defaultLocale?: string;
|
|
38
|
+
}): PageRouteProposal;
|
|
39
|
+
export declare function linksConfig({ resolve, defaultLocale, prefixDefaultLocale, routes, }: {
|
|
40
|
+
resolve?: LinkResolveMode;
|
|
41
|
+
} & Pick<PageRouteProposal, 'defaultLocale' | 'prefixDefaultLocale' | 'routes'>): string[];
|
|
42
|
+
export declare function siteBuildConfig(build: string): string[];
|
|
43
|
+
export declare function contentConfig(globs: string[]): string[];
|
|
44
|
+
/** A contentbit.config.ts that needs no package at run time: its one import is a type. */
|
|
45
|
+
export declare function configFile(fields: string[]): string;
|
|
46
|
+
export declare function singleQuoted(value: string): string;
|
|
47
|
+
//# sourceMappingURL=adopt-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adopt-routes.d.ts","sourceRoot":"","sources":["../../src/commands/adopt-routes.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAErB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAe,KAAK,SAAS,EAAiB,MAAM,wBAAwB,CAAA;AAEnF,MAAM,WAAW,SAAS;IACxB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,gBAAgB,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,yEAAyE;IACzE,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,mBAAmB,CAAC,EAAE,KAAK,CAAA;IAC3B,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB;gFAC4E;IAC5E,SAAS,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAChD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB;AA6BD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,SAAS,EAAE,EAClB,EAAE,IAAI,EAAE,aAAa,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAChE,iBAAiB,CAqBnB;AAqBD,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,aAAa,EACb,mBAAmB,EACnB,MAAM,GACP,EAAE;IAAE,OAAO,CAAC,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,CACrC,iBAAiB,EACjB,eAAe,GAAG,qBAAqB,GAAG,QAAQ,CACnD,GAAG,MAAM,EAAE,CAiBX;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEvD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAKvD;AAED,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAOnD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD"}
|
package/dist/commands/adopt.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Io } from '../run.js';
|
|
2
2
|
export interface AdoptCommandInput {
|
|
3
3
|
globs: string[];
|
|
4
|
+
build?: string;
|
|
4
5
|
registry?: string;
|
|
5
6
|
noGenericBlocks?: boolean;
|
|
6
|
-
dryRun?: boolean;
|
|
7
7
|
json?: boolean;
|
|
8
8
|
}
|
|
9
9
|
/** Inspect an existing Markdown library and print reviewable setup proposals.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/commands/adopt.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,WAAW,CAAA;AAyB7C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAuCD;;4EAE4E;AAC5E,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA2EpF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/commands/agents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAqRnC,MAAM,WAAW,YAAY;IAC3B,8EAA8E;IAC9E,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,+EAA+E;AAC/E,wBAAsB,uBAAuB,CAC3C,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,YAAY,EACrB,EAAE,EAAE,EAAE,GACL,OAAO,CAAC,IAAI,CAAC,CAiCf;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AAED,wBAAsB,aAAa,CAAC,KAAK,EAAE,kBAAkB,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAUtF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Io } from '../run.js';
|
|
2
|
+
import type { LinkOptionValues } from '../link-options.js';
|
|
3
|
+
export interface CheckCommandInput extends LinkOptionValues {
|
|
4
|
+
target?: string;
|
|
5
|
+
json?: boolean;
|
|
6
|
+
strict?: boolean;
|
|
7
|
+
strictSeo?: boolean;
|
|
8
|
+
watch?: boolean;
|
|
9
|
+
origin?: string;
|
|
10
|
+
seoConfig?: string;
|
|
11
|
+
noSeo?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function checkCommand(input: CheckCommandInput, io: Io): Promise<number>;
|
|
14
|
+
//# sourceMappingURL=check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,WAAW,CAAA;AAW7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAI1D,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAgBD,wBAAsB,YAAY,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBpF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type Io } from '../run.js';
|
|
2
|
+
export interface ContextCommandInput {
|
|
3
|
+
target?: string;
|
|
4
|
+
build?: string;
|
|
5
|
+
origin?: string;
|
|
6
|
+
seoConfig?: string;
|
|
7
|
+
noSeo?: boolean;
|
|
8
|
+
json?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function contextCommand(input: ContextCommandInput, io: Io): Promise<number>;
|
|
11
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,WAAW,CAAA;AAE7C,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAID,wBAAsB,cAAc,CAAC,KAAK,EAAE,mBAAmB,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA+CxF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface FoundMarkdown {
|
|
2
|
+
/** Content globs for contentbit.config.ts, relative to the root. */
|
|
3
|
+
globs: string[];
|
|
4
|
+
/** Absolute paths. */
|
|
5
|
+
files: string[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The site's Markdown wherever it lives, outside dependencies, build folders and dot folders.
|
|
9
|
+
* Each top-level folder gets one glob, one level deeper under src/, and a file at the root is
|
|
10
|
+
* named on its own.
|
|
11
|
+
*/
|
|
12
|
+
export declare function findMarkdown(root: string): Promise<FoundMarkdown>;
|
|
13
|
+
//# sourceMappingURL=find-markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-markdown.d.ts","sourceRoot":"","sources":["../../src/commands/find-markdown.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,aAAa;IAC5B,oEAAoE;IACpE,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,sBAAsB;IACtB,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAsBvE"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Io } from '../run.js';
|
|
2
|
+
import type { PackageManager } from './init-ci.js';
|
|
3
|
+
import { type Md, type Target } from './init-targets.js';
|
|
4
|
+
export interface BlocksFlags {
|
|
5
|
+
target?: string;
|
|
6
|
+
md?: string;
|
|
7
|
+
yes?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const EXAMPLE_CONTENT_GLOB = "content/**/*.{md,mdx}";
|
|
10
|
+
export declare const BLOCKS_CONFIG: string[];
|
|
11
|
+
export interface Blocks {
|
|
12
|
+
target: Target;
|
|
13
|
+
md: Md;
|
|
14
|
+
runtime: string[];
|
|
15
|
+
dev: string[];
|
|
16
|
+
}
|
|
17
|
+
/** Pick the render target and Markdown library, and the packages typed blocks need. Returns an
|
|
18
|
+
* exit code when it cannot go on. */
|
|
19
|
+
export declare function prepareBlocks(input: BlocksFlags, cwd: string, deps: Record<string, string>, io: Io): Promise<Blocks | number>;
|
|
20
|
+
export interface BlocksFiles {
|
|
21
|
+
files: Array<[path: string, content: string]>;
|
|
22
|
+
render: string[];
|
|
23
|
+
extras: string[];
|
|
24
|
+
}
|
|
25
|
+
/** The registry, the render target's files, and example content when the site has no Markdown
|
|
26
|
+
* of its own. */
|
|
27
|
+
export declare function blocksFiles(blocks: Blocks, { cwd, deps, examples, noPage, noStyled, noInstall, pm, }: {
|
|
28
|
+
cwd: string;
|
|
29
|
+
deps: Record<string, string>;
|
|
30
|
+
examples: boolean;
|
|
31
|
+
noPage: boolean;
|
|
32
|
+
noStyled: boolean;
|
|
33
|
+
noInstall: boolean;
|
|
34
|
+
pm: PackageManager;
|
|
35
|
+
}, io: Io): Promise<BlocksFiles>;
|
|
36
|
+
/** Generate the block guide from the registry, unless the project has one. */
|
|
37
|
+
export declare function writeBlockGuide(cwd: string, io: Io): Promise<void>;
|
|
38
|
+
//# sourceMappingURL=init-blocks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-blocks.d.ts","sourceRoot":"","sources":["../../src/commands/init-blocks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAInC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,OAAO,EAA0C,KAAK,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAEhG,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,OAAO,CAAA;CACd;AAgCD,eAAO,MAAM,oBAAoB,0BAA0B,CAAA;AA+D3D,eAAO,MAAM,aAAa,UAAoE,CAAA;AAE9F,MAAM,WAAW,MAAM;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,EAAE,EAAE,EAAE,CAAA;IACN,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,GAAG,EAAE,MAAM,EAAE,CAAA;CACd;AAED;qCACqC;AACrC,wBAAsB,aAAa,CACjC,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,EAAE,EAAE,EAAE,GACL,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAsE1B;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;IAC7C,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;iBACiB;AACjB,wBAAsB,WAAW,CAC/B,MAAM,EAAE,MAAM,EACd,EACE,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,EAAE,GACH,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,EAAE,EAAE,cAAc,CAAA;CACnB,EACD,EAAE,EAAE,EAAE,GACL,OAAO,CAAC,WAAW,CAAC,CAyBtB;AAED,8EAA8E;AAC9E,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAcxE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Io } from '../run.js';
|
|
2
|
+
import { type PackageManagerSetup } from './package-manager.js';
|
|
3
|
+
export type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
|
|
4
|
+
export declare const WORKFLOW_PATH = ".github/workflows/contentbit.yml";
|
|
5
|
+
export interface CheckJob {
|
|
6
|
+
pm: PackageManagerSetup;
|
|
7
|
+
hasBuildScript: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface WrittenWorkflow {
|
|
10
|
+
/** The workflow file, from the project folder. */
|
|
11
|
+
path: string;
|
|
12
|
+
branch: string;
|
|
13
|
+
}
|
|
14
|
+
/** Write the workflow at the repository root, where GitHub reads it, running in the project's folder. */
|
|
15
|
+
export declare function writeGithubWorkflow(cwd: string, job: CheckJob, io: Io): Promise<WrittenWorkflow | undefined>;
|
|
16
|
+
//# sourceMappingURL=init-ci.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-ci.d.ts","sourceRoot":"","sources":["../../src/commands/init-ci.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAGnC,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAE/E,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;AAE5D,eAAO,MAAM,aAAa,qCAAqC,CAAA;AAgB/D,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,mBAAmB,CAAA;IACvB,cAAc,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AA2ED,yGAAyG;AACzG,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,QAAQ,EACb,EAAE,EAAE,EAAE,GACL,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAsBtC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Framework } from '@contentbit/project';
|
|
2
|
+
import { type PageRouteProposal } from './adopt-routes.js';
|
|
3
|
+
export interface SiteSetup {
|
|
4
|
+
framework?: Framework;
|
|
5
|
+
/** Why the framework's build writes no static HTML, and the fix. */
|
|
6
|
+
serverRendered?: string;
|
|
7
|
+
/** The build folder, from the root, when init knows where the build writes. */
|
|
8
|
+
siteBuild?: string;
|
|
9
|
+
foundBuild?: {
|
|
10
|
+
path: string;
|
|
11
|
+
pages: number;
|
|
12
|
+
};
|
|
13
|
+
proposal?: PageRouteProposal;
|
|
14
|
+
}
|
|
15
|
+
export declare function setUpSite(root: string, markdown: string[]): Promise<SiteSetup>;
|
|
16
|
+
//# sourceMappingURL=init-site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-site.d.ts","sourceRoot":"","sources":["../../src/commands/init-site.ts"],"names":[],"mappings":"AAKA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EAAqB,KAAK,iBAAiB,EAAkB,MAAM,mBAAmB,CAAA;AAE7F,MAAM,WAAW,SAAS;IACxB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5C,QAAQ,CAAC,EAAE,iBAAiB,CAAA;CAC7B;AAED,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAoBpF"}
|
|
@@ -4,18 +4,23 @@ export declare const TARGETS: Target[];
|
|
|
4
4
|
type ScaffoldFile = [path: string, content: string];
|
|
5
5
|
export interface InitTargetPlan {
|
|
6
6
|
files: ScaffoldFile[];
|
|
7
|
-
|
|
7
|
+
render: string[];
|
|
8
|
+
extras: string[];
|
|
8
9
|
}
|
|
9
10
|
interface InitTargetContext {
|
|
10
11
|
cwd: string;
|
|
11
12
|
deps: Record<string, string>;
|
|
12
13
|
md: Md;
|
|
14
|
+
examples: boolean;
|
|
13
15
|
noPage: boolean;
|
|
14
16
|
noStyled: boolean;
|
|
17
|
+
/** The project's package runner, such as `pnpm dlx` or `npx`. */
|
|
18
|
+
dlx: string;
|
|
15
19
|
installStyledPack: (pack: string) => Promise<boolean>;
|
|
16
20
|
}
|
|
17
21
|
interface InitTargetAdapter {
|
|
18
22
|
markdownChoices: Md[];
|
|
23
|
+
/** The packages the target renders with, on top of the ones every typed-block project needs. */
|
|
19
24
|
runtimeDependencies(md: Md): string[];
|
|
20
25
|
createPlan(ctx: InitTargetContext): Promise<InitTargetPlan>;
|
|
21
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-targets.d.ts","sourceRoot":"","sources":["../../src/commands/init-targets.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAA;AACnD,MAAM,MAAM,EAAE,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAE1C,eAAO,MAAM,OAAO,EAAE,MAAM,EAAmC,CAAA;AAE/D,KAAK,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAEnD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,
|
|
1
|
+
{"version":3,"file":"init-targets.d.ts","sourceRoot":"","sources":["../../src/commands/init-targets.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,CAAA;AACnD,MAAM,MAAM,EAAE,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAE1C,eAAO,MAAM,OAAO,EAAE,MAAM,EAAmC,CAAA;AAE/D,KAAK,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;AAEnD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;AAED,UAAU,iBAAiB;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,EAAE,EAAE,EAAE,CAAA;IACN,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAA;IACX,iBAAiB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACtD;AAED,UAAU,iBAAiB;IACzB,eAAe,EAAE,EAAE,EAAE,CAAA;IACrB,gGAAgG;IAChG,mBAAmB,CAAC,EAAE,EAAE,EAAE,GAAG,MAAM,EAAE,CAAA;IACrC,UAAU,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;CAC5D;AA8QD,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAwB7D,CAAA;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAIjE"}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { Io } from '../run.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
yes?: boolean;
|
|
2
|
+
import { type BlocksFlags } from './init-blocks.js';
|
|
3
|
+
export interface InitCommandInput extends BlocksFlags {
|
|
4
|
+
blocks?: boolean;
|
|
6
5
|
cwd?: string;
|
|
7
6
|
noInstall?: boolean;
|
|
8
7
|
noPage?: boolean;
|
|
9
8
|
noStyled?: boolean;
|
|
10
9
|
noAgents?: boolean;
|
|
10
|
+
claude?: boolean;
|
|
11
11
|
seo?: boolean;
|
|
12
|
+
ci?: 'github';
|
|
12
13
|
}
|
|
13
14
|
export declare function initCommand(input: InitCommandInput, io: Io): Promise<number>;
|
|
14
15
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AASnC,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAA;AA4EzB,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,EAAE,CAAC,EAAE,QAAQ,CAAA;CACd;AAQD,wBAAsB,WAAW,CAAC,KAAK,EAAE,gBAAgB,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA2LlF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { PackageManager } from './init-ci.js';
|
|
2
|
+
export interface PackageManagerSetup {
|
|
3
|
+
name: PackageManager;
|
|
4
|
+
/** The lockfile's absolute path. A workspace keeps it at its root, above the project. */
|
|
5
|
+
lockfile?: string;
|
|
6
|
+
/** The package.json whose `packageManager` or `devEngines.packageManager` pins this package manager. */
|
|
7
|
+
pinnedBy?: string;
|
|
8
|
+
/** Yarn 2 or later, which CI runs through corepack. */
|
|
9
|
+
berry: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** The package manager the project installs with. */
|
|
12
|
+
export declare function detectPackageManager(cwd: string): PackageManager;
|
|
13
|
+
/**
|
|
14
|
+
* The package manager the project installs with: its lockfile's, found by walking up to the
|
|
15
|
+
* repository root, then the one package.json pins, then the one that started the CLI, then npm.
|
|
16
|
+
*/
|
|
17
|
+
export declare function packageManagerSetup(cwd: string): PackageManagerSetup;
|
|
18
|
+
/** The repository root: the nearest folder above dir, or dir itself, that holds .git. */
|
|
19
|
+
export declare function repositoryRoot(dir: string): string | undefined;
|
|
20
|
+
export declare function addCommand(pm: PackageManager, packages: string[], dev: boolean): string[];
|
|
21
|
+
export declare function runInstall(bin: string, args: string[], cwd: string): Promise<number>;
|
|
22
|
+
//# sourceMappingURL=package-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-manager.d.ts","sourceRoot":"","sources":["../../src/commands/package-manager.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAElD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,cAAc,CAAA;IACpB,yFAAyF;IACzF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,wGAAwG;IACxG,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uDAAuD;IACvD,KAAK,EAAE,OAAO,CAAA;CACf;AAmBD,qDAAqD;AACrD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAEhE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAqBpE;AAED,yFAAyF;AACzF,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAK9D;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,GAAG,MAAM,EAAE,CAEzF;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMpF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AgentGuidanceSource } from '@contentbit/built-site';
|
|
2
|
+
import type { ContentProjectFinding } from '@contentbit/core';
|
|
3
|
+
export interface SkillDriftFinding extends Omit<ContentProjectFinding, 'source'> {
|
|
4
|
+
source: AgentGuidanceSource;
|
|
5
|
+
}
|
|
6
|
+
export declare function skillDriftFindings(files: string[]): Promise<SkillDriftFinding[]>;
|
|
7
|
+
//# sourceMappingURL=skill-drift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-drift.d.ts","sourceRoot":"","sources":["../../src/commands/skill-drift.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAA;AAK7D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CAAC;IAC9E,MAAM,EAAE,mBAAmB,CAAA;CAC5B;AAOD,wBAAsB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA4BtF"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Io } from '../run.js';
|
|
2
2
|
import type { LinkOptionValues } from '../link-options.js';
|
|
3
3
|
export interface StudioCommandInput extends LinkOptionValues {
|
|
4
4
|
globs: string[];
|
|
5
|
+
build?: string;
|
|
6
|
+
origin?: string;
|
|
5
7
|
registry?: string;
|
|
6
8
|
port?: string;
|
|
7
9
|
host?: string;
|
|
8
10
|
noOpen?: boolean;
|
|
9
11
|
noGenericBlocks?: boolean;
|
|
10
|
-
minSectionWords?: string;
|
|
11
12
|
seoConfig?: string;
|
|
12
13
|
noSeo?: boolean;
|
|
13
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../src/commands/studio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"studio.d.ts","sourceRoot":"","sources":["../../src/commands/studio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,EAAE,EAAE,MAAM,WAAW,CAAA;AAa7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAI1D,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,wBAAsB,aAAa,CAAC,KAAK,EAAE,kBAAkB,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAmFtF"}
|
|
@@ -5,11 +5,6 @@ export type { LoadedContentProject, LoadContentProjectInput };
|
|
|
5
5
|
export declare function resolveContentFiles(positionals: string[], cmd: string, options?: ResolveContentFilesOptions): Promise<string[]>;
|
|
6
6
|
/** Load generic blocks plus the registry module. Throws CliError (exit 2) when it is missing. */
|
|
7
7
|
export declare function loadRegistry(registryPath?: string, options?: LoadRegistryOptions): Promise<BlockRegistry>;
|
|
8
|
-
/**
|
|
9
|
-
* The "loaded content project" seam: turns (positional globs, flags) into a
|
|
10
|
-
* ready-to-use project — resolved files, loaded registry, read sources, and the
|
|
11
|
-
* produced content project scan. The single input path shared by the `validate`,
|
|
12
|
-
* `doctor`, and `stats` read-commands. Throws CliError on input failures.
|
|
13
|
-
*/
|
|
14
8
|
export declare function loadContentProject(input: LoadContentProjectInput): Promise<LoadedContentProject>;
|
|
9
|
+
export declare function withCliErrors<T>(load: () => Promise<T>): Promise<T>;
|
|
15
10
|
//# sourceMappingURL=content-project.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-project.d.ts","sourceRoot":"","sources":["../src/content-project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAA;AAI5B,YAAY,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA;AAE7D,iFAAiF;AACjF,
|
|
1
|
+
{"version":3,"file":"content-project.d.ts","sourceRoot":"","sources":["../src/content-project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAA;AAI5B,YAAY,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAA;AAE7D,iFAAiF;AACjF,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EAAE,EACrB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,MAAM,EAAE,CAAC,CAEnB;AAED,iGAAiG;AACjG,wBAAgB,YAAY,CAC1B,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,aAAa,CAAC,CAExB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAEhG;AAED,wBAAsB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAOzE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type HttpOrigin, type SiteOrigin } from '@contentbit/built-site';
|
|
2
|
+
import { type LoadedSite } from '@contentbit/project';
|
|
3
|
+
import { type ResolvedContentCommandConfig } from './command-config.js';
|
|
4
|
+
import type { LinkOptionValues } from './link-options.js';
|
|
5
|
+
export type SiteCommand = 'check' | 'context' | 'studio';
|
|
6
|
+
export interface LoadSiteInput extends LinkOptionValues {
|
|
7
|
+
build?: string;
|
|
8
|
+
origin?: string;
|
|
9
|
+
seoConfig?: string;
|
|
10
|
+
noSeo?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface SiteFlags {
|
|
13
|
+
build?: string;
|
|
14
|
+
origin?: HttpOrigin;
|
|
15
|
+
}
|
|
16
|
+
export declare const ORIGIN_SOURCES: Record<SiteOrigin['source'], string>;
|
|
17
|
+
export declare function loadSite(command: SiteCommand, input: LoadSiteInput, startDir: string): Promise<LoadedSite>;
|
|
18
|
+
export declare function loadConfiguredSite(command: SiteCommand, config: ResolvedContentCommandConfig, flags: SiteFlags, startDir: string): Promise<LoadedSite>;
|
|
19
|
+
export declare function parseFlagOrigin(command: SiteCommand, value: string): HttpOrigin;
|
|
20
|
+
//# sourceMappingURL=load-site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load-site.d.ts","sourceRoot":"","sources":["../src/load-site.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACrF,OAAO,EAA+B,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAElF,OAAO,EAA+B,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AAEpG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAIzD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;AAExD,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,UAAU,CAAA;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,CAI/D,CAAA;AAED,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CAIrB;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,4BAA4B,EACpC,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CAkBrB;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAS/E"}
|
package/dist/project-config.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ContentbitConfig } from '@contentbit/core';
|
|
2
|
+
import { type CheckSettings } from '@contentbit/project';
|
|
2
3
|
export interface LoadedContentbitConfig {
|
|
3
4
|
config: ContentbitConfig;
|
|
5
|
+
/** The config's check settings, read from config.check. */
|
|
6
|
+
check?: CheckSettings;
|
|
4
7
|
cwd: string;
|
|
5
8
|
path: string;
|
|
6
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-config.d.ts","sourceRoot":"","sources":["../src/project-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-config.d.ts","sourceRoot":"","sources":["../src/project-config.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,gBAAgB,EAGtB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAarE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,gBAAgB,CAAA;IACxB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAsB,oBAAoB,CACxC,QAAQ,SAAgB,EACxB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC,CAuB7C;AAED;gFACgF;AAChF,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,MAAM,EAAE,sBAAsB,GAAG,SAAS,GACzC,MAAM,GAAG,SAAS,CAIpB"}
|
package/dist/run.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { ContentbitConfigInput, SeoConfigInput } from '@contentbit/core';
|
|
1
2
|
export interface Io {
|
|
2
3
|
stdout(line: string): void;
|
|
3
4
|
stderr(line: string): void;
|
|
@@ -12,6 +13,6 @@ export declare class CliError extends Error {
|
|
|
12
13
|
readonly exitCode: number;
|
|
13
14
|
constructor(exitCode: number, message: string);
|
|
14
15
|
}
|
|
15
|
-
export declare const USAGE = "contentbit\n\nUsage:\n contentbit <command> [options]\n\nCommands:\n init
|
|
16
|
+
export declare const USAGE = "contentbit\n\nUsage:\n contentbit <command> [options]\n\nCommands:\n init set a project up for check and context\n adopt propose page routes and review the Markdown, changing no file\n check report SEO and link problems on built pages and Markdown\n context print what a built page or the site serves, says and links\n validate check typed blocks and frontmatter links in Markdown\n studio browse built pages and Markdown locally\n render render one file to plain Markdown\n instructions print typed-block authoring instructions for an LLM\n docs print typed-block docs for people\n agents install coding-agent guidance\n\nSetup:\n init [-y] [--ci github] [--seo] [--claude] [--no-install] [--no-agents] [--blocks [-t react|markdown|astro] [--md ...] [--no-page] [--no-styled]]\n adopt [globs...] [--build <folder>] [--registry <module.ts>] [--no-generic-blocks] [--json]\n agents [--claude] [--check|--dry-run] [--no-agents-md]\n\nCommon:\n check [folder] [--origin <url>] [--watch] [--strict] [--strict-seo] [--json] [--seo-config <module.ts>] [--no-seo]\n context [target] [--build <folder>] [--origin <url>] [--seo-config <module.ts>] [--no-seo] [--json]\n validate [globs...] [--registry <module.ts>] [--no-generic-blocks] [--strict-warnings] [--link-resolve <mode>]\n studio [globs...] [--build <folder>] [--origin <url>] [--registry <module.ts>] [--port <n>] [--host <host>] [--no-open] [--no-generic-blocks] [--seo-config <module.ts>] [--no-seo]\n render <file> [--target markdown] [--registry <module.ts>] [--no-generic-blocks] [--out <file>]\n instructions [--audience llm|human] [--no-examples] [--registry <module.ts>] [--no-generic-blocks] [--out <file>]\n docs [--registry <module.ts>] [--no-generic-blocks] [--out <file>]";
|
|
16
17
|
export declare function run(argv: string[], io: Io): Promise<number>;
|
|
17
18
|
//# sourceMappingURL=run.d.ts.map
|
package/dist/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,EAAE;IACjB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD;AAED;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAE/B,QAAQ,CAAC,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM,EACzB,OAAO,EAAE,MAAM;CAKlB;AAED,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAE7E,MAAM,WAAW,EAAE;IACjB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACxD;AAED;;;;GAIG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAE/B,QAAQ,CAAC,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM,EACzB,OAAO,EAAE,MAAM;CAKlB;AAED,eAAO,MAAM,KAAK,qyDA6BmD,CAAA;AAsBrE,wBAAsB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA+CjE"}
|