bsmnt 0.4.2 → 0.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/dist/application/add-integration/index.d.ts +24 -6
- package/dist/application/add-integration/index.d.ts.map +1 -1
- package/dist/application/add-integration/index.js +130 -82
- package/dist/application/add-integration/index.js.map +1 -1
- package/dist/application/create-project/map-selection-to-registry.js +1 -1
- package/dist/application/create-project/map-selection-to-registry.js.map +1 -1
- package/dist/application/shared/project-detection.d.ts +2 -2
- package/dist/application/shared/project-detection.d.ts.map +1 -1
- package/dist/application/shared/project-detection.js +2 -2
- package/dist/application/shared/project-detection.js.map +1 -1
- package/dist/core/create/internal-ids.d.ts +4 -1
- package/dist/core/create/internal-ids.d.ts.map +1 -1
- package/dist/core/create/internal-ids.js +6 -1
- package/dist/core/create/internal-ids.js.map +1 -1
- package/dist/domain/cms.d.ts +0 -7
- package/dist/domain/cms.d.ts.map +1 -1
- package/dist/domain/cms.js.map +1 -1
- package/dist/domain/forms.d.ts +17 -0
- package/dist/domain/forms.d.ts.map +1 -0
- package/dist/domain/forms.js +13 -0
- package/dist/domain/forms.js.map +1 -0
- package/dist/domain/integration.d.ts +30 -0
- package/dist/domain/integration.d.ts.map +1 -0
- package/dist/domain/integration.js +12 -0
- package/dist/domain/integration.js.map +1 -0
- package/dist/domain/skills.d.ts +32 -0
- package/dist/domain/skills.d.ts.map +1 -1
- package/dist/domain/skills.js +39 -0
- package/dist/domain/skills.js.map +1 -1
- package/dist/index.js +95 -37
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/agents/register-sanity-mcp.js +9 -6
- package/dist/infrastructure/agents/register-sanity-mcp.js.map +1 -1
- package/dist/infrastructure/create/apply-package-json.d.ts.map +1 -1
- package/dist/infrastructure/create/apply-package-json.js +19 -0
- package/dist/infrastructure/create/apply-package-json.js.map +1 -1
- package/dist/infrastructure/create/install-dependencies.d.ts.map +1 -1
- package/dist/infrastructure/create/install-dependencies.js +4 -0
- package/dist/infrastructure/create/install-dependencies.js.map +1 -1
- package/dist/infrastructure/create/merge-registry.d.ts.map +1 -1
- package/dist/infrastructure/create/merge-registry.js +8 -0
- package/dist/infrastructure/create/merge-registry.js.map +1 -1
- package/dist/infrastructure/create/setup-agent.d.ts.map +1 -1
- package/dist/infrastructure/create/setup-agent.js +29 -6
- package/dist/infrastructure/create/setup-agent.js.map +1 -1
- package/dist/infrastructure/create/setup-sanity.d.ts.map +1 -1
- package/dist/infrastructure/create/setup-sanity.js +3 -0
- package/dist/infrastructure/create/setup-sanity.js.map +1 -1
- package/dist/infrastructure/integrations/inject-integration.d.ts +3 -3
- package/dist/infrastructure/integrations/inject-integration.d.ts.map +1 -1
- package/dist/infrastructure/integrations/inject-integration.js +81 -37
- package/dist/infrastructure/integrations/inject-integration.js.map +1 -1
- package/dist/modules/features/cms/sanity/config.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/config.js +11 -5
- package/dist/modules/features/cms/sanity/config.js.map +1 -1
- package/dist/modules/features/cms/sanity/index.js +8 -2
- package/dist/modules/features/cms/sanity/index.js.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/ci-workflow.d.ts +13 -0
- package/dist/modules/features/cms/sanity/mergers/ci-workflow.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/ci-workflow.js +38 -0
- package/dist/modules/features/cms/sanity/mergers/ci-workflow.js.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/knip.d.ts +12 -0
- package/dist/modules/features/cms/sanity/mergers/knip.d.ts.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/knip.js +38 -0
- package/dist/modules/features/cms/sanity/mergers/knip.js.map +1 -0
- package/dist/modules/features/cms/sanity/mergers/layout.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/layout.js +7 -3
- package/dist/modules/features/cms/sanity/mergers/layout.js.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/sitemap.d.ts +3 -3
- package/dist/modules/features/cms/sanity/mergers/sitemap.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity/mergers/sitemap.js +48 -62
- package/dist/modules/features/cms/sanity/mergers/sitemap.js.map +1 -1
- package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts.map +1 -1
- package/dist/modules/features/cms/sanity-pagebuilder/config.js +8 -5
- package/dist/modules/features/cms/sanity-pagebuilder/config.js.map +1 -1
- package/dist/modules/features/cms/sanity-pagebuilder/index.js +2 -2
- package/dist/modules/features/cms/sanity-pagebuilder/index.js.map +1 -1
- package/dist/modules/features/forms/hubspot/config.d.ts +31 -0
- package/dist/modules/features/forms/hubspot/config.d.ts.map +1 -0
- package/dist/modules/features/forms/hubspot/config.js +25 -0
- package/dist/modules/features/forms/hubspot/config.js.map +1 -0
- package/dist/paths.d.ts +8 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +8 -0
- package/dist/paths.js.map +1 -1
- package/index.js +2 -2
- package/package.json +17 -9
- package/src/assets/check-node-version.mjs +22 -0
- package/src/modules/features/cms/sanity/files/app/blog/page.tsx +54 -0
- package/src/modules/features/cms/sanity/files/app/feed.xml/route.ts +36 -0
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/components/disable-draft-mode.tsx +3 -3
- package/src/modules/features/cms/sanity/files/lib/integrations/sanity/schemas/article.ts +7 -7
- package/src/modules/features/cms/sanity/files/lib/scripts/setup-ci-secrets.ts +117 -0
- package/src/modules/features/cms/sanity/files/lib/utils/rss.ts +96 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/.knip.json +8 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/app/api/[[...slug]]/route.ts +100 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/app/api/draft-mode/disable/route.ts +7 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/app/api/draft-mode/enable/route.ts +20 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/app/api/revalidate/route.ts +126 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/app/feed.xml/route.ts +40 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/app/sitemap.md/route.ts +124 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/app/studio/[[...tool]]/page.tsx +8 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/components/sanity/draft-mode-toggle.tsx +27 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/components/sanity/rich-text.tsx +87 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/components/sanity/visual-editing.tsx +28 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/components/ui/sanity-image/index.tsx +41 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/check-integration.ts +5 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/client.ts +27 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/disable-draft-mode.tsx +23 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/page-builder-input.tsx +39 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/page-category-input.tsx +50 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/slug-field.tsx +18 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/slug-input.tsx +14 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/confirm-publish-action.ts +40 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/env.ts +34 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/fetchers/layout.ts +48 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/fetchers/redirects.ts +17 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/icons.ts +62 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/live/index.tsx +88 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/markdown-proxy.config.ts +50 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/page-builder-config.ts +130 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/page-category.ts +28 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/page-tree-pane.tsx +420 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/pinned-pages.ts +54 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/presentation.ts +119 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/queries.ts +385 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/sanity.cli.ts +29 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/sanity.config.ts +113 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/index.ts +4 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/reusable/blog-content.ts +89 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/reusable/description.ts +29 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/reusable/hero.ts +28 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/singleton/content-collection.ts +45 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/content/author.ts +70 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/content/blog-category.ts +55 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/index.ts +96 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/layout/company-data.ts +62 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/layout/footer.ts +79 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/layout/navbar.ts +75 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/layout/redirect.ts +120 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/link.ts +125 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/logo-field.ts +9 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/metadata.ts +68 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/nav-objects.ts +192 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/page-builder.ts +39 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/page-folder.ts +124 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/page.ts +242 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/richText.ts +63 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/singletons.ts +39 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/structure.ts +330 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/utils/image.ts +8 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/utils/link.ts +140 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/utils/page-builder-markdown.ts +81 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/scripts/sanity-typegen.ts +45 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/utils/check-redirect.ts +30 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/utils/json-ld.tsx +212 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/utils/metadata.ts +167 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/utils/rss.ts +96 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/lib/utils/sitemap.ts +40 -0
- package/src/modules/features/cms/sanity-pagebuilder/files/proxy.ts +81 -0
- package/src/templates/next-default/.github/workflows/ci.yml +62 -0
- package/src/templates/next-default/README.md +22 -0
- package/src/templates/next-default/knip.json +14 -0
- package/src/templates/next-default/lefthook.yml +5 -0
- package/src/templates/next-default/package.json +8 -4
- package/src/templates/next-experiments/.github/workflows/ci.yml +62 -0
- package/src/templates/next-experiments/README.md +22 -0
- package/src/templates/next-experiments/knip.json +14 -0
- package/src/templates/next-experiments/lefthook.yml +30 -0
- package/src/templates/next-experiments/package.json +10 -2
- package/src/templates/next-pagebuilder/.github/workflows/ci.yml +70 -0
- package/src/templates/next-pagebuilder/README.md +34 -0
- package/src/templates/next-pagebuilder/app/(content)/[[...slug]]/page.tsx +6 -1
- package/src/templates/next-pagebuilder/app/(content)/layout.tsx +3 -12
- package/src/templates/next-pagebuilder/components/layout/footer/index.tsx +11 -10
- package/src/templates/next-pagebuilder/components/layout/header/index.tsx +5 -3
- package/src/templates/next-pagebuilder/components/layout/json-ld/index.tsx +9 -10
- package/src/templates/next-pagebuilder/components/layout/wrapper/index.tsx +3 -11
- package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/index.tsx +1 -1
- package/src/templates/next-pagebuilder/knip.json +27 -0
- package/src/templates/next-pagebuilder/lefthook.yml +5 -0
- package/src/templates/next-pagebuilder/lib/scripts/setup-ci-secrets.ts +117 -0
- package/src/templates/next-pagebuilder/package.json +9 -3
- package/src/templates/next-webgl/.github/workflows/ci.yml +62 -0
- package/src/templates/next-webgl/README.md +22 -0
- package/src/templates/next-webgl/knip.json +13 -0
- package/src/templates/next-webgl/lefthook.yml +5 -0
- package/src/templates/next-webgl/package.json +8 -4
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IntegrationId } from "../../domain/integration.js";
|
|
2
2
|
interface AddIntegrationOptions {
|
|
3
|
-
|
|
3
|
+
integrations?: IntegrationId | IntegrationId[];
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Inject and configure a single integration into an already-validated
|
|
7
|
+
* Next.js project: copies files, merges dependencies, runs any
|
|
8
|
+
* integration-specific setup, and prints next steps.
|
|
7
9
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
10
|
+
* Reused by the `integrate` command (looped over the selected integrations)
|
|
11
|
+
* and by the create flow (run after scaffolding).
|
|
12
|
+
*/
|
|
13
|
+
export declare function installIntegration(integration: IntegrationId, targetDir: string, usesSrcPrefix: boolean, options?: {
|
|
14
|
+
silent?: boolean;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Integration-specific follow-up actions, returned as plain lines so callers can
|
|
18
|
+
* render them in their own "Next steps" block (the `integrate` command, or the
|
|
19
|
+
* create flow's single aggregated block).
|
|
20
|
+
*/
|
|
21
|
+
export declare function getIntegrationNextSteps(integration: IntegrationId, opts?: {
|
|
22
|
+
sanitySetupDone?: boolean;
|
|
23
|
+
}): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Adds one or more integrations to the current working directory project.
|
|
26
|
+
*
|
|
27
|
+
* Validates the project, resolves the integration list (from flags or an
|
|
28
|
+
* interactive multi-select), then injects and configures each selected one.
|
|
11
29
|
*/
|
|
12
30
|
export declare function addIntegration(options?: AddIntegrationOptions): Promise<void>;
|
|
13
31
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/application/add-integration/index.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/application/add-integration/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAGN,KAAK,aAAa,EAClB,MAAM,6BAA6B,CAAC;AAmBrC,UAAU,qBAAqB;IAC9B,YAAY,CAAC,EAAE,aAAa,GAAG,aAAa,EAAE,CAAC;CAC/C;AAwDD;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACvC,WAAW,EAAE,aAAa,EAC1B,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,OAAO,EACtB,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,OAAO,CAAC,IAAI,CAAC,CAmLf;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACtC,WAAW,EAAE,aAAa,EAC1B,IAAI,GAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAA;CAAO,GACtC,MAAM,EAAE,CAqBV;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CACnC,OAAO,GAAE,qBAA0B,GACjC,OAAO,CAAC,IAAI,CAAC,CA+Df"}
|
|
@@ -5,24 +5,26 @@ import ora from "ora";
|
|
|
5
5
|
import pc from "picocolors";
|
|
6
6
|
import prompts from "prompts";
|
|
7
7
|
import { AGENT_CATALOG } from "../../domain/agents.js";
|
|
8
|
-
import {
|
|
8
|
+
import { getIntegration, INTEGRATION_CATALOG, } from "../../domain/integration.js";
|
|
9
9
|
import { buildSkillInstallCommand, getSkillInstallDefinition, } from "../../domain/skills.js";
|
|
10
10
|
import { getSanityMcpManualInstruction, registerSanityMcp, } from "../../infrastructure/agents/register-sanity-mcp.js";
|
|
11
11
|
import { setupSanity } from "../../infrastructure/create/setup-sanity.js";
|
|
12
12
|
import { injectIntegration } from "../../infrastructure/integrations/inject-integration.js";
|
|
13
13
|
import { sanityConfig } from "../../modules/features/cms/sanity/config.js";
|
|
14
|
+
import { hubspotConfig } from "../../modules/features/forms/hubspot/config.js";
|
|
14
15
|
import { checkExistingIntegration, validateNextProject, } from "../shared/project-detection.js";
|
|
15
16
|
import { formatMergeResults } from "./format-results.js";
|
|
16
17
|
/**
|
|
17
|
-
* Add
|
|
18
|
+
* Add integration dependencies to package.json from config manifests.
|
|
18
19
|
*/
|
|
19
20
|
async function addDependencies(targetDir, integration) {
|
|
20
21
|
const pkgPath = path.join(targetDir, "package.json");
|
|
21
22
|
const pkg = (await fs.readJson(pkgPath));
|
|
22
|
-
const
|
|
23
|
+
const integrationConfigs = {
|
|
23
24
|
sanity: sanityConfig,
|
|
25
|
+
hubspot: hubspotConfig,
|
|
24
26
|
};
|
|
25
|
-
const config =
|
|
27
|
+
const config = integrationConfigs[integration];
|
|
26
28
|
if (config) {
|
|
27
29
|
pkg.dependencies = {
|
|
28
30
|
...pkg.dependencies,
|
|
@@ -45,45 +47,16 @@ async function addDependencies(targetDir, integration) {
|
|
|
45
47
|
await fs.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
46
48
|
}
|
|
47
49
|
/**
|
|
48
|
-
*
|
|
50
|
+
* Inject and configure a single integration into an already-validated
|
|
51
|
+
* Next.js project: copies files, merges dependencies, runs any
|
|
52
|
+
* integration-specific setup, and prints next steps.
|
|
49
53
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* up Sanity project configuration.
|
|
54
|
+
* Reused by the `integrate` command (looped over the selected integrations)
|
|
55
|
+
* and by the create flow (run after scaffolding).
|
|
53
56
|
*/
|
|
54
|
-
export async function
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const validationSpinner = ora("Validating project...").start();
|
|
58
|
-
const validation = await validateNextProject(targetDir);
|
|
59
|
-
if (!validation.valid) {
|
|
60
|
-
validationSpinner.fail(pc.red(validation.error));
|
|
61
|
-
console.log(pc.yellow("\nMake sure you're in a Next.js App Router project directory.\n"));
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
const projectStructure = validation.usesSrcPrefix ? "src/" : "root";
|
|
65
|
-
validationSpinner.succeed(pc.green(`Found Next.js project: ${pc.cyan(validation.pkg.name ?? "unnamed")} (${projectStructure} structure)`));
|
|
66
|
-
// 2. Select integration (or use flag)
|
|
67
|
-
let integration = options.cms;
|
|
68
|
-
if (!integration) {
|
|
69
|
-
const { selectedIntegration } = (await prompts({
|
|
70
|
-
type: "select",
|
|
71
|
-
name: "selectedIntegration",
|
|
72
|
-
message: "Which integration would you like to add?",
|
|
73
|
-
choices: CMS_CATALOG.map((cms) => ({
|
|
74
|
-
title: cms.label,
|
|
75
|
-
description: cms.description,
|
|
76
|
-
value: cms.id,
|
|
77
|
-
})),
|
|
78
|
-
}));
|
|
79
|
-
if (!selectedIntegration) {
|
|
80
|
-
console.log(pc.yellow("\nOperation cancelled.\n"));
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
integration = selectedIntegration;
|
|
84
|
-
}
|
|
85
|
-
// 3. Check if integration already exists
|
|
86
|
-
const alreadyExists = await checkExistingIntegration(targetDir, integration, validation.usesSrcPrefix);
|
|
57
|
+
export async function installIntegration(integration, targetDir, usesSrcPrefix, options = {}) {
|
|
58
|
+
// Check if integration already exists
|
|
59
|
+
const alreadyExists = await checkExistingIntegration(targetDir, integration, usesSrcPrefix);
|
|
87
60
|
if (alreadyExists) {
|
|
88
61
|
const { overwrite } = (await prompts({
|
|
89
62
|
type: "confirm",
|
|
@@ -92,11 +65,11 @@ export async function addIntegration(options = {}) {
|
|
|
92
65
|
initial: false,
|
|
93
66
|
}));
|
|
94
67
|
if (!overwrite) {
|
|
95
|
-
console.log(pc.yellow(
|
|
68
|
+
console.log(pc.yellow(`Skipped ${integration}.`));
|
|
96
69
|
return;
|
|
97
70
|
}
|
|
98
71
|
}
|
|
99
|
-
//
|
|
72
|
+
// Inject integration files using the merge orchestrator
|
|
100
73
|
const integrationSpinner = ora(`Adding ${pc.cyan(integration)} integration...`).start();
|
|
101
74
|
try {
|
|
102
75
|
const results = await injectIntegration(targetDir, integration, integrationSpinner);
|
|
@@ -108,7 +81,6 @@ export async function addIntegration(options = {}) {
|
|
|
108
81
|
else {
|
|
109
82
|
integrationSpinner.succeed(pc.green(`${integration} integration added:`));
|
|
110
83
|
}
|
|
111
|
-
// Display detailed results
|
|
112
84
|
for (const line of resultLines) {
|
|
113
85
|
console.log(pc.dim(line));
|
|
114
86
|
}
|
|
@@ -118,7 +90,7 @@ export async function addIntegration(options = {}) {
|
|
|
118
90
|
integrationSpinner.fail(pc.red(`Failed to inject ${integration} integration: ${message}`));
|
|
119
91
|
return;
|
|
120
92
|
}
|
|
121
|
-
//
|
|
93
|
+
// Add dependencies to package.json
|
|
122
94
|
const depsSpinner = ora("Adding dependencies to package.json...").start();
|
|
123
95
|
try {
|
|
124
96
|
await addDependencies(targetDir, integration);
|
|
@@ -128,7 +100,7 @@ export async function addIntegration(options = {}) {
|
|
|
128
100
|
const message = e instanceof Error ? e.message : String(e);
|
|
129
101
|
depsSpinner.warn(pc.yellow(`Failed to update package.json: ${message}`));
|
|
130
102
|
}
|
|
131
|
-
//
|
|
103
|
+
// Sanity-only: optional MCP server registration
|
|
132
104
|
if (integration === "sanity") {
|
|
133
105
|
const detectedMcpAgents = AGENT_CATALOG.filter((agent) => fs.existsSync(path.join(targetDir, agent.folder)));
|
|
134
106
|
if (detectedMcpAgents.length > 0) {
|
|
@@ -161,33 +133,38 @@ export async function addIntegration(options = {}) {
|
|
|
161
133
|
}
|
|
162
134
|
}
|
|
163
135
|
}
|
|
164
|
-
|
|
136
|
+
}
|
|
137
|
+
// Install the integration's recommended agent skills into detected agents.
|
|
138
|
+
const skillIds = getIntegration(integration).skills;
|
|
139
|
+
if (skillIds.length > 0) {
|
|
165
140
|
const detectedAgents = AGENT_CATALOG.filter((agent) => fs.existsSync(path.join(targetDir, agent.folder))).map((agent) => agent.cliArg);
|
|
166
141
|
if (detectedAgents.length > 0) {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
142
|
+
for (const skillId of skillIds) {
|
|
143
|
+
const skillsSpinner = ora(`Installing ${skillId} skill...`).start();
|
|
144
|
+
let installed = false;
|
|
145
|
+
const install = getSkillInstallDefinition(skillId);
|
|
146
|
+
for (const agentArg of detectedAgents) {
|
|
147
|
+
try {
|
|
148
|
+
execSync(buildSkillInstallCommand(skillId, { agentArg }), {
|
|
149
|
+
cwd: targetDir,
|
|
150
|
+
stdio: "ignore",
|
|
151
|
+
});
|
|
152
|
+
installed = true;
|
|
153
|
+
}
|
|
154
|
+
catch {
|
|
155
|
+
// Non-fatal per agent
|
|
156
|
+
}
|
|
177
157
|
}
|
|
178
|
-
|
|
179
|
-
|
|
158
|
+
if (installed) {
|
|
159
|
+
skillsSpinner.succeed(pc.green(`${skillId} skill installed.`));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
skillsSpinner.warn(pc.yellow(`Could not install ${skillId}. Add manually: bunx skills add ${install.source}`));
|
|
180
163
|
}
|
|
181
|
-
}
|
|
182
|
-
if (installed) {
|
|
183
|
-
skillsSpinner.succeed(pc.green("Sanity agent toolkit installed."));
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
186
|
-
skillsSpinner.warn(pc.yellow(`Could not install Sanity agent toolkit. Add manually: bunx skills add ${install.source}`));
|
|
187
164
|
}
|
|
188
165
|
}
|
|
189
166
|
}
|
|
190
|
-
//
|
|
167
|
+
// Automated Sanity project setup
|
|
191
168
|
let sanitySetupDone = false;
|
|
192
169
|
if (integration === "sanity") {
|
|
193
170
|
try {
|
|
@@ -199,25 +176,96 @@ export async function addIntegration(options = {}) {
|
|
|
199
176
|
console.log(pc.dim(" You can set up Sanity manually later.\n"));
|
|
200
177
|
}
|
|
201
178
|
}
|
|
202
|
-
//
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
179
|
+
// Next steps. Suppressed when another flow (e.g. create) aggregates them into
|
|
180
|
+
// a single block.
|
|
181
|
+
if (!options.silent) {
|
|
182
|
+
console.log(`\n${pc.bold(pc.green("Success!"))} ${pc.cyan(integration)} integration added to your project.`);
|
|
183
|
+
console.log(`\n${pc.bold("Next steps:")}`);
|
|
184
|
+
console.log(pc.cyan(" - Run: bun install"));
|
|
185
|
+
for (const step of getIntegrationNextSteps(integration, {
|
|
186
|
+
sanitySetupDone,
|
|
187
|
+
})) {
|
|
188
|
+
console.log(pc.cyan(` - ${step}`));
|
|
189
|
+
}
|
|
190
|
+
console.log();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Integration-specific follow-up actions, returned as plain lines so callers can
|
|
195
|
+
* render them in their own "Next steps" block (the `integrate` command, or the
|
|
196
|
+
* create flow's single aggregated block).
|
|
197
|
+
*/
|
|
198
|
+
export function getIntegrationNextSteps(integration, opts = {}) {
|
|
206
199
|
if (integration === "sanity") {
|
|
207
|
-
if (sanitySetupDone) {
|
|
208
|
-
|
|
209
|
-
console.log(pc.cyan(" 3. Access Sanity Studio at: /studio"));
|
|
200
|
+
if (opts.sanitySetupDone) {
|
|
201
|
+
return ["Run: bun sanity:typegen", "Access Sanity Studio at: /studio"];
|
|
210
202
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
203
|
+
return [
|
|
204
|
+
"Create a Sanity project at https://sanity.io/manage and add credentials to .env.local (NEXT_PUBLIC_SANITY_PROJECT_ID, NEXT_PUBLIC_SANITY_DATASET, SANITY_API_READ_TOKEN)",
|
|
205
|
+
"Run: bun sanity:typegen",
|
|
206
|
+
"Access Sanity Studio at: /studio",
|
|
207
|
+
];
|
|
208
|
+
}
|
|
209
|
+
if (integration === "hubspot") {
|
|
210
|
+
return [
|
|
211
|
+
"Create a HubSpot private app with the 'forms' and 'account-info.security.read' scopes",
|
|
212
|
+
"Add HUBSPOT_ACCESS_TOKEN to .env.local",
|
|
213
|
+
"Render <HubSpotForm /> from @/lib/integrations/hubspot/form (see its README)",
|
|
214
|
+
];
|
|
215
|
+
}
|
|
216
|
+
return [];
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Adds one or more integrations to the current working directory project.
|
|
220
|
+
*
|
|
221
|
+
* Validates the project, resolves the integration list (from flags or an
|
|
222
|
+
* interactive multi-select), then injects and configures each selected one.
|
|
223
|
+
*/
|
|
224
|
+
export async function addIntegration(options = {}) {
|
|
225
|
+
const targetDir = process.cwd();
|
|
226
|
+
// 1. Validate current directory is a Next.js project
|
|
227
|
+
const validationSpinner = ora("Validating project...").start();
|
|
228
|
+
const validation = await validateNextProject(targetDir);
|
|
229
|
+
if (!validation.valid) {
|
|
230
|
+
validationSpinner.fail(pc.red(validation.error));
|
|
231
|
+
console.log(pc.yellow("\nMake sure you're in a Next.js App Router project directory.\n"));
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const projectStructure = validation.usesSrcPrefix ? "src/" : "root";
|
|
235
|
+
validationSpinner.succeed(pc.green(`Found Next.js project: ${pc.cyan(validation.pkg.name ?? "unnamed")} (${projectStructure} structure)`));
|
|
236
|
+
// 2. Resolve the integration list from flags or a multi-select prompt
|
|
237
|
+
const requested = options.integrations
|
|
238
|
+
? Array.isArray(options.integrations)
|
|
239
|
+
? options.integrations
|
|
240
|
+
: [options.integrations]
|
|
241
|
+
: undefined;
|
|
242
|
+
let selection;
|
|
243
|
+
if (requested && requested.length > 0) {
|
|
244
|
+
selection = requested;
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
const { selected } = (await prompts({
|
|
248
|
+
type: "multiselect",
|
|
249
|
+
name: "selected",
|
|
250
|
+
message: "Which integrations would you like to add?",
|
|
251
|
+
choices: INTEGRATION_CATALOG.map((entry) => ({
|
|
252
|
+
title: entry.label,
|
|
253
|
+
description: entry.description,
|
|
254
|
+
value: entry.id,
|
|
255
|
+
})),
|
|
256
|
+
hint: "Space to select, Enter to confirm",
|
|
257
|
+
}));
|
|
258
|
+
if (!selected || selected.length === 0) {
|
|
259
|
+
console.log(pc.yellow("\nOperation cancelled.\n"));
|
|
260
|
+
return;
|
|
219
261
|
}
|
|
262
|
+
selection = selected;
|
|
263
|
+
}
|
|
264
|
+
// 3. Install in catalog order (CMS before forms) so Sanity lands before the
|
|
265
|
+
// HubSpot Sanity adapter, which is only copied when Sanity is already present.
|
|
266
|
+
const ordered = INTEGRATION_CATALOG.map((entry) => entry.id).filter((id) => selection.includes(id));
|
|
267
|
+
for (const integration of ordered) {
|
|
268
|
+
await installIntegration(integration, targetDir, validation.usesSrcPrefix);
|
|
220
269
|
}
|
|
221
|
-
console.log();
|
|
222
270
|
}
|
|
223
271
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/application/add-integration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAgB,MAAM,wBAAwB,CAAC;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/application/add-integration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAgB,MAAM,wBAAwB,CAAC;AACrE,OAAO,EACN,cAAc,EACd,mBAAmB,GAEnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,wBAAwB,EACxB,yBAAyB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,6BAA6B,EAC7B,iBAAiB,GACjB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,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AC,CAAmC,CAAC;QAEtC,IAAI,CAAC,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACxC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC,CAAC;YACnD,OAAO;QACR,CAAC;QACD,SAAS,GAAG,QAAQ,CAAC;IACtB,CAAC;IAED,4EAA4E;IAC5E,+EAA+E;IAC/E,MAAM,OAAO,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAC1E,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CACtB,CAAC;IAEF,KAAK,MAAM,WAAW,IAAI,OAAO,EAAE,CAAC;QACnC,MAAM,kBAAkB,CAAC,WAAW,EAAE,SAAS,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;IAC5E,CAAC;AACF,CAAC"}
|
|
@@ -14,7 +14,7 @@ export function mapSelectionToRegistry(selection) {
|
|
|
14
14
|
function mapCmsToFeatureId(cms) {
|
|
15
15
|
if (cms === null)
|
|
16
16
|
return null;
|
|
17
|
-
return CMS_FEATURE_MODULE_IDS[cms];
|
|
17
|
+
return CMS_FEATURE_MODULE_IDS[cms] ?? null;
|
|
18
18
|
}
|
|
19
19
|
function mapAnimationToFeatureId(animation) {
|
|
20
20
|
if (animation === null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"map-selection-to-registry.js","sourceRoot":"","sources":["../../../src/application/create-project/map-selection-to-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,GACjB,MAAM,mCAAmC,CAAC;AAO3C,MAAM,UAAU,sBAAsB,CACrC,SAA0B;IAE1B,MAAM,UAAU,GAAG;QAClB,iBAAiB,CAAC,SAAS,CAAC,GAAG,CAAC;QAChC,uBAAuB,CAAC,SAAS,CAAC,SAAS,CAAC;QAC5C,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAC5C,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC;KAC1C,CAAC,MAAM,CAAC,CAAC,SAAS,EAAgC,EAAE,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;IAE1E,OAAO;QACN,QAAQ,EAAE,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC/C,UAAU;KACV,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CACzB,GAA2B;IAE3B,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC9B,OAAO,sBAAsB,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"map-selection-to-registry.js","sourceRoot":"","sources":["../../../src/application/create-project/map-selection-to-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,wBAAwB,EACxB,4BAA4B,EAC5B,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,GACjB,MAAM,mCAAmC,CAAC;AAO3C,MAAM,UAAU,sBAAsB,CACrC,SAA0B;IAE1B,MAAM,UAAU,GAAG;QAClB,iBAAiB,CAAC,SAAS,CAAC,GAAG,CAAC;QAChC,uBAAuB,CAAC,SAAS,CAAC,SAAS,CAAC;QAC5C,GAAG,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAC5C,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC;KAC1C,CAAC,MAAM,CAAC,CAAC,SAAS,EAAgC,EAAE,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC;IAE1E,OAAO;QACN,QAAQ,EAAE,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC;QAC/C,UAAU;KACV,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CACzB,GAA2B;IAE3B,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC9B,OAAO,sBAAsB,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;AAC5C,CAAC;AAED,SAAS,uBAAuB,CAC/B,SAAuC;IAEvC,IAAI,SAAS,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACpC,OAAO,4BAA4B,CAAC,SAAS,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,mBAAmB,CAC3B,KAAwC;IAExC,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC;AACxC,CAAC;AAED,SAAS,kBAAkB,CAC1B,IAAsC;IAEtC,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IntegrationId } from "../../domain/integration.js";
|
|
2
2
|
interface PackageJson {
|
|
3
3
|
name?: string;
|
|
4
4
|
dependencies?: Record<string, string>;
|
|
@@ -26,7 +26,7 @@ export declare function validateNextProject(targetDir: string): Promise<ProjectV
|
|
|
26
26
|
* Check whether an integration is already installed in the target project.
|
|
27
27
|
* Respects the project's `src/` layout when resolving the conventional path.
|
|
28
28
|
*/
|
|
29
|
-
export declare function checkExistingIntegration(targetDir: string, integration:
|
|
29
|
+
export declare function checkExistingIntegration(targetDir: string, integration: IntegrationId, usesSrcPrefix: boolean): Promise<boolean>;
|
|
30
30
|
/** Return `"src/"` when the project uses `src/app`, otherwise `""`. */
|
|
31
31
|
export declare function detectSrcPrefix(targetDir: string): Promise<string>;
|
|
32
32
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-detection.d.ts","sourceRoot":"","sources":["../../../src/application/shared/project-detection.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"project-detection.d.ts","sourceRoot":"","sources":["../../../src/application/shared/project-detection.ts"],"names":[],"mappings":"AAEA,OAAO,EAEN,KAAK,aAAa,EAClB,MAAM,6BAA6B,CAAC;AAErC,UAAU,WAAW;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,MAAM,WAAW,wBAAwB;IACxC,KAAK,EAAE,IAAI,CAAC;IACZ,GAAG,EAAE,WAAW,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,wBAAwB;IACxC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,iBAAiB,GAC1B,wBAAwB,GACxB,wBAAwB,CAAC;AAE5B;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACxC,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,iBAAiB,CAAC,CAoC5B;AAED;;;GAGG;AACH,wBAAsB,wBAAwB,CAC7C,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,aAAa,EAC1B,aAAa,EAAE,OAAO,GACpB,OAAO,CAAC,OAAO,CAAC,CAKlB;AAED,uEAAuE;AACvE,wBAAsB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import fs from "fs-extra";
|
|
3
|
-
import {
|
|
3
|
+
import { getIntegration, } from "../../domain/integration.js";
|
|
4
4
|
/**
|
|
5
5
|
* Validate that the given directory is a Next.js App Router project.
|
|
6
6
|
*
|
|
@@ -40,7 +40,7 @@ export async function validateNextProject(targetDir) {
|
|
|
40
40
|
* Respects the project's `src/` layout when resolving the conventional path.
|
|
41
41
|
*/
|
|
42
42
|
export async function checkExistingIntegration(targetDir, integration, usesSrcPrefix) {
|
|
43
|
-
const basePath =
|
|
43
|
+
const basePath = getIntegration(integration).integrationPath;
|
|
44
44
|
const prefix = usesSrcPrefix ? "src/" : "";
|
|
45
45
|
const integrationPath = path.join(targetDir, prefix + basePath);
|
|
46
46
|
return fs.existsSync(integrationPath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-detection.js","sourceRoot":"","sources":["../../../src/application/shared/project-detection.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"project-detection.js","sourceRoot":"","sources":["../../../src/application/shared/project-detection.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EACN,cAAc,GAEd,MAAM,6BAA6B,CAAC;AAwBrC;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,SAAiB;IAEjB,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAE7D,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACrC,OAAO;YACN,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,4CAA4C;SACnD,CAAC;IACH,CAAC;IAED,MAAM,GAAG,GAAgB,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAgB,CAAC;IAE7E,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,EAAE,IAAI,IAAI,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC;IACpE,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO;YACN,KAAK,EAAE,KAAK;YACZ,KAAK,EACJ,8EAA8E;SAC/E,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,IAAI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|
|
12
12
|
readonly sanityLayout: "sanity:layout";
|
|
13
13
|
readonly sanitySitemap: "sanity:sitemap";
|
|
14
14
|
readonly sanityCheckIntegration: "sanity:check-integration";
|
|
15
|
+
readonly sanityCiWorkflow: "sanity:ci-workflow";
|
|
16
|
+
readonly sanityKnip: "sanity:knip";
|
|
15
17
|
};
|
|
16
18
|
export type CreateMergerId = (typeof CREATE_MERGER_IDS)[keyof typeof CREATE_MERGER_IDS];
|
|
17
19
|
export declare const PRESET_MODULE_IDS: Record<TemplateId, string>;
|
|
18
|
-
export declare const
|
|
20
|
+
export declare const SANITY_FEATURE_MODULE_ID = "feature:cms-sanity";
|
|
21
|
+
export declare const CMS_FEATURE_MODULE_IDS: Partial<Record<CmsId, string>>;
|
|
19
22
|
export declare const SANITY_PAGEBUILDER_FEATURE_MODULE_ID = "feature:cms-sanity-pagebuilder";
|
|
20
23
|
export declare const ANIMATION_FEATURE_MODULE_IDS: Record<AnimationId, string>;
|
|
21
24
|
export declare const AGENT_FEATURE_MODULE_IDS: Record<AgentId, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-ids.d.ts","sourceRoot":"","sources":["../../../src/core/create/internal-ids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,eAAO,MAAM,yBAAyB;;;CAG5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAChC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"internal-ids.d.ts","sourceRoot":"","sources":["../../../src/core/create/internal-ids.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,eAAO,MAAM,yBAAyB;;;CAG5B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAChC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,iBAAiB;;;;;;CAMpB,CAAC;AAEX,MAAM,MAAM,cAAc,GACzB,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAKxD,CAAC;AAEF,eAAO,MAAM,wBAAwB,uBAAuB,CAAC;AAI7D,eAAO,MAAM,sBAAsB,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAEjE,CAAC;AAEF,eAAO,MAAM,oCAAoC,mCAChB,CAAC;AAElC,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAGpE,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAM5D,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAI1D,CAAC"}
|
|
@@ -6,6 +6,8 @@ export const CREATE_MERGER_IDS = {
|
|
|
6
6
|
sanityLayout: "sanity:layout",
|
|
7
7
|
sanitySitemap: "sanity:sitemap",
|
|
8
8
|
sanityCheckIntegration: "sanity:check-integration",
|
|
9
|
+
sanityCiWorkflow: "sanity:ci-workflow",
|
|
10
|
+
sanityKnip: "sanity:knip",
|
|
9
11
|
};
|
|
10
12
|
export const PRESET_MODULE_IDS = {
|
|
11
13
|
"next-default": "preset:next-default",
|
|
@@ -13,8 +15,11 @@ export const PRESET_MODULE_IDS = {
|
|
|
13
15
|
"next-webgl": "preset:next-webgl",
|
|
14
16
|
"next-experiments": "preset:next-experiments",
|
|
15
17
|
};
|
|
18
|
+
export const SANITY_FEATURE_MODULE_ID = "feature:cms-sanity";
|
|
19
|
+
// Only CMSs that participate in the create pipeline have a feature module.
|
|
20
|
+
// Integrate-only integrations (e.g. hubspot) are intentionally absent.
|
|
16
21
|
export const CMS_FEATURE_MODULE_IDS = {
|
|
17
|
-
sanity:
|
|
22
|
+
sanity: SANITY_FEATURE_MODULE_ID,
|
|
18
23
|
};
|
|
19
24
|
export const SANITY_PAGEBUILDER_FEATURE_MODULE_ID = "feature:cms-sanity-pagebuilder";
|
|
20
25
|
export const ANIMATION_FEATURE_MODULE_IDS = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-ids.js","sourceRoot":"","sources":["../../../src/core/create/internal-ids.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,UAAU,EAAE,aAAa;IACzB,kBAAkB,EAAE,sBAAsB;CACjC,CAAC;AAKX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,YAAY,EAAE,eAAe;IAC7B,aAAa,EAAE,gBAAgB;IAC/B,sBAAsB,EAAE,0BAA0B;
|
|
1
|
+
{"version":3,"file":"internal-ids.js","sourceRoot":"","sources":["../../../src/core/create/internal-ids.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,UAAU,EAAE,aAAa;IACzB,kBAAkB,EAAE,sBAAsB;CACjC,CAAC;AAKX,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,YAAY,EAAE,eAAe;IAC7B,aAAa,EAAE,gBAAgB;IAC/B,sBAAsB,EAAE,0BAA0B;IAClD,gBAAgB,EAAE,oBAAoB;IACtC,UAAU,EAAE,aAAa;CAChB,CAAC;AAKX,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC5D,cAAc,EAAE,qBAAqB;IACrC,kBAAkB,EAAE,yBAAyB;IAC7C,YAAY,EAAE,mBAAmB;IACjC,kBAAkB,EAAE,yBAAyB;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAE7D,2EAA2E;AAC3E,uEAAuE;AACvE,MAAM,CAAC,MAAM,sBAAsB,GAAmC;IACrE,MAAM,EAAE,wBAAwB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAChD,gCAAgC,CAAC;AAElC,MAAM,CAAC,MAAM,4BAA4B,GAAgC;IACxE,IAAI,EAAE,wBAAwB;IAC9B,MAAM,EAAE,0BAA0B;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAA4B;IAChE,MAAM,EAAE,sBAAsB;IAC9B,QAAQ,EAAE,wBAAwB;IAClC,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,qBAAqB;IAC5B,MAAM,EAAE,sBAAsB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAA2B;IAC9D,aAAa,EAAE,0BAA0B;IACzC,iBAAiB,EAAE,8BAA8B;IACjD,2BAA2B,EAAE,wCAAwC;CACrE,CAAC"}
|
package/dist/domain/cms.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import type { SkillId } from "./skills.js";
|
|
2
|
-
export interface CmsDefinition {
|
|
3
|
-
label: string;
|
|
4
|
-
description: string;
|
|
5
|
-
integrationPath: string;
|
|
6
|
-
skills: readonly SkillId[];
|
|
7
|
-
}
|
|
8
1
|
export declare const CMS: {
|
|
9
2
|
readonly sanity: {
|
|
10
3
|
readonly label: "Sanity CMS";
|
package/dist/domain/cms.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms.d.ts","sourceRoot":"","sources":["../../src/domain/cms.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cms.d.ts","sourceRoot":"","sources":["../../src/domain/cms.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,GAAG;;;;;;;CAO0C,CAAC;AAE3D,MAAM,MAAM,KAAK,GAAG,MAAM,OAAO,GAAG,CAAC;AAErC,eAAO,MAAM,WAAW;;;;;QACb,KAAK;GAEb,CAAC"}
|
package/dist/domain/cms.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cms.js","sourceRoot":"","sources":["../../src/domain/cms.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cms.js","sourceRoot":"","sources":["../../src/domain/cms.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,GAAG,GAAG;IAClB,MAAM,EAAE;QACP,KAAK,EAAE,YAAY;QACnB,WAAW,EAAE,2CAA2C;QACxD,eAAe,EAAE,yBAAyB;QAC1C,MAAM,EAAE,CAAC,sBAAsB,CAAC;KAChC;CACwD,CAAC;AAI3D,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IAClE,EAAE,EAAE,EAAW;IACf,GAAG,GAAG;CACN,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const FORMS: {
|
|
2
|
+
readonly hubspot: {
|
|
3
|
+
readonly label: "HubSpot Forms";
|
|
4
|
+
readonly description: "Embed HubSpot forms, styled and CMS-agnostic";
|
|
5
|
+
readonly integrationPath: "lib/integrations/hubspot";
|
|
6
|
+
readonly skills: readonly ["hubspot-pagebuilder-block"];
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export type FormId = keyof typeof FORMS;
|
|
10
|
+
export declare const FORMS_CATALOG: {
|
|
11
|
+
label: "HubSpot Forms";
|
|
12
|
+
description: "Embed HubSpot forms, styled and CMS-agnostic";
|
|
13
|
+
integrationPath: "lib/integrations/hubspot";
|
|
14
|
+
skills: readonly ["hubspot-pagebuilder-block"];
|
|
15
|
+
id: FormId;
|
|
16
|
+
}[];
|
|
17
|
+
//# sourceMappingURL=forms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms.d.ts","sourceRoot":"","sources":["../../src/domain/forms.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;CAOwC,CAAC;AAE3D,MAAM,MAAM,MAAM,GAAG,MAAM,OAAO,KAAK,CAAC;AAExC,eAAO,MAAM,aAAa;;;;;QACf,MAAM;GAEd,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const FORMS = {
|
|
2
|
+
hubspot: {
|
|
3
|
+
label: "HubSpot Forms",
|
|
4
|
+
description: "Embed HubSpot forms, styled and CMS-agnostic",
|
|
5
|
+
integrationPath: "lib/integrations/hubspot",
|
|
6
|
+
skills: ["hubspot-pagebuilder-block"],
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
export const FORMS_CATALOG = Object.entries(FORMS).map(([id, form]) => ({
|
|
10
|
+
id: id,
|
|
11
|
+
...form,
|
|
12
|
+
}));
|
|
13
|
+
//# sourceMappingURL=forms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../src/domain/forms.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAG;IACpB,OAAO,EAAE;QACR,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,8CAA8C;QAC3D,eAAe,EAAE,0BAA0B;QAC3C,MAAM,EAAE,CAAC,2BAA2B,CAAC;KACrC;CACwD,CAAC;AAI3D,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IACvE,EAAE,EAAE,EAAY;IAChB,GAAG,IAAI;CACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type CmsId } from "./cms.js";
|
|
2
|
+
import { type FormId } from "./forms.js";
|
|
3
|
+
import type { SkillId } from "./skills.js";
|
|
4
|
+
/**
|
|
5
|
+
* Shared shape for every integration the CLI can inject (CMS or forms).
|
|
6
|
+
*/
|
|
7
|
+
export interface IntegrationDefinition {
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
integrationPath: string;
|
|
11
|
+
skills: readonly SkillId[];
|
|
12
|
+
}
|
|
13
|
+
/** Any injectable integration — a CMS (`CmsId`) or a forms provider (`FormId`). */
|
|
14
|
+
export type IntegrationId = CmsId | FormId;
|
|
15
|
+
/** Combined catalog used by the interactive integrate/create prompts. */
|
|
16
|
+
export declare const INTEGRATION_CATALOG: ({
|
|
17
|
+
label: "Sanity CMS";
|
|
18
|
+
description: "Headless CMS with real-time collaboration";
|
|
19
|
+
integrationPath: "lib/integrations/sanity";
|
|
20
|
+
skills: readonly ["sanity-agent-toolkit"];
|
|
21
|
+
id: CmsId;
|
|
22
|
+
} | {
|
|
23
|
+
label: "HubSpot Forms";
|
|
24
|
+
description: "Embed HubSpot forms, styled and CMS-agnostic";
|
|
25
|
+
integrationPath: "lib/integrations/hubspot";
|
|
26
|
+
skills: readonly ["hubspot-pagebuilder-block"];
|
|
27
|
+
id: FormId;
|
|
28
|
+
})[];
|
|
29
|
+
export declare function getIntegration(id: IntegrationId): IntegrationDefinition;
|
|
30
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../src/domain/integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,KAAK,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,SAAS,OAAO,EAAE,CAAC;CAC3B;AAED,mFAAmF;AACnF,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,MAAM,CAAC;AAO3C,yEAAyE;AACzE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;IAAqC,CAAC;AAEtE,wBAAgB,cAAc,CAAC,EAAE,EAAE,aAAa,GAAG,qBAAqB,CAEvE"}
|