@getcoherent/core 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -1
- package/dist/index.js +19 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2148,6 +2148,7 @@ declare const DesignSystemConfigSchema: z.ZodObject<{
|
|
|
2148
2148
|
};
|
|
2149
2149
|
}>;
|
|
2150
2150
|
settings: z.ZodObject<{
|
|
2151
|
+
initialized: z.ZodDefault<z.ZodBoolean>;
|
|
2151
2152
|
appType: z.ZodDefault<z.ZodEnum<["multi-page", "spa"]>>;
|
|
2152
2153
|
framework: z.ZodDefault<z.ZodEnum<["next", "react-spa"]>>;
|
|
2153
2154
|
router: z.ZodOptional<z.ZodEnum<["react-router", "tanstack-router"]>>;
|
|
@@ -2156,6 +2157,7 @@ declare const DesignSystemConfigSchema: z.ZodObject<{
|
|
|
2156
2157
|
deployTarget: z.ZodOptional<z.ZodEnum<["vercel", "netlify", "cloudflare", "self-hosted"]>>;
|
|
2157
2158
|
autoScaffold: z.ZodDefault<z.ZodBoolean>;
|
|
2158
2159
|
}, "strip", z.ZodTypeAny, {
|
|
2160
|
+
initialized: boolean;
|
|
2159
2161
|
appType: "multi-page" | "spa";
|
|
2160
2162
|
framework: "next" | "react-spa";
|
|
2161
2163
|
typescript: boolean;
|
|
@@ -2164,6 +2166,7 @@ declare const DesignSystemConfigSchema: z.ZodObject<{
|
|
|
2164
2166
|
router?: "react-router" | "tanstack-router" | undefined;
|
|
2165
2167
|
deployTarget?: "vercel" | "netlify" | "cloudflare" | "self-hosted" | undefined;
|
|
2166
2168
|
}, {
|
|
2169
|
+
initialized?: boolean | undefined;
|
|
2167
2170
|
appType?: "multi-page" | "spa" | undefined;
|
|
2168
2171
|
framework?: "next" | "react-spa" | undefined;
|
|
2169
2172
|
router?: "react-router" | "tanstack-router" | undefined;
|
|
@@ -2357,6 +2360,7 @@ declare const DesignSystemConfigSchema: z.ZodObject<{
|
|
|
2357
2360
|
};
|
|
2358
2361
|
};
|
|
2359
2362
|
settings: {
|
|
2363
|
+
initialized: boolean;
|
|
2360
2364
|
appType: "multi-page" | "spa";
|
|
2361
2365
|
framework: "next" | "react-spa";
|
|
2362
2366
|
typescript: boolean;
|
|
@@ -2545,6 +2549,7 @@ declare const DesignSystemConfigSchema: z.ZodObject<{
|
|
|
2545
2549
|
};
|
|
2546
2550
|
};
|
|
2547
2551
|
settings: {
|
|
2552
|
+
initialized?: boolean | undefined;
|
|
2548
2553
|
appType?: "multi-page" | "spa" | undefined;
|
|
2549
2554
|
framework?: "next" | "react-spa" | undefined;
|
|
2550
2555
|
router?: "react-router" | "tanstack-router" | undefined;
|
|
@@ -4210,7 +4215,7 @@ declare const FRAMEWORK_VERSIONS: {
|
|
|
4210
4215
|
readonly eslint: "9.17.0";
|
|
4211
4216
|
readonly 'eslint-config-next': "15.2.4";
|
|
4212
4217
|
};
|
|
4213
|
-
declare const CLI_VERSION
|
|
4218
|
+
declare const CLI_VERSION: string;
|
|
4214
4219
|
|
|
4215
4220
|
/**
|
|
4216
4221
|
* Build CSS variables string for :root and .dark (design tokens).
|
package/dist/index.js
CHANGED
|
@@ -275,6 +275,7 @@ var DesignSystemConfigSchema = z.object({
|
|
|
275
275
|
features: FeaturesSchema,
|
|
276
276
|
// Global settings
|
|
277
277
|
settings: z.object({
|
|
278
|
+
initialized: z.boolean().default(true),
|
|
278
279
|
// Application type
|
|
279
280
|
appType: z.enum(["multi-page", "spa"]).default("multi-page"),
|
|
280
281
|
// Framework
|
|
@@ -408,6 +409,7 @@ var EXAMPLE_MULTIPAGE_CONFIG = {
|
|
|
408
409
|
stateManagement: { enabled: false, provider: "zustand" }
|
|
409
410
|
},
|
|
410
411
|
settings: {
|
|
412
|
+
initialized: true,
|
|
411
413
|
appType: "multi-page",
|
|
412
414
|
framework: "next",
|
|
413
415
|
typescript: true,
|
|
@@ -422,6 +424,7 @@ var EXAMPLE_SPA_CONFIG = {
|
|
|
422
424
|
name: "My SPA",
|
|
423
425
|
description: "A beautiful single-page application",
|
|
424
426
|
settings: {
|
|
427
|
+
initialized: true,
|
|
425
428
|
appType: "spa",
|
|
426
429
|
framework: "react-spa",
|
|
427
430
|
router: "react-router",
|
|
@@ -6765,6 +6768,9 @@ async function integrateSharedLayoutIntoRootLayout(projectRoot) {
|
|
|
6765
6768
|
}
|
|
6766
6769
|
|
|
6767
6770
|
// src/versions.ts
|
|
6771
|
+
import { readFileSync } from "fs";
|
|
6772
|
+
import { resolve, dirname as dirname3 } from "path";
|
|
6773
|
+
import { fileURLToPath } from "url";
|
|
6768
6774
|
var FRAMEWORK_VERSIONS = {
|
|
6769
6775
|
next: "15.2.4",
|
|
6770
6776
|
react: "18.3.1",
|
|
@@ -6779,11 +6785,21 @@ var FRAMEWORK_VERSIONS = {
|
|
|
6779
6785
|
eslint: "9.17.0",
|
|
6780
6786
|
"eslint-config-next": "15.2.4"
|
|
6781
6787
|
};
|
|
6782
|
-
var
|
|
6788
|
+
var __cdm_dirname = dirname3(fileURLToPath(import.meta.url));
|
|
6789
|
+
function readCliVersion() {
|
|
6790
|
+
try {
|
|
6791
|
+
const pkgPath = resolve(__cdm_dirname, "..", "package.json");
|
|
6792
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
6793
|
+
return pkg.version || "0.0.0";
|
|
6794
|
+
} catch {
|
|
6795
|
+
return "0.0.0";
|
|
6796
|
+
}
|
|
6797
|
+
}
|
|
6798
|
+
var CLI_VERSION = readCliVersion();
|
|
6783
6799
|
|
|
6784
6800
|
// src/generators/ProjectScaffolder.ts
|
|
6785
6801
|
import { writeFile as fsWriteFile, mkdir as mkdir3 } from "fs/promises";
|
|
6786
|
-
import { dirname as
|
|
6802
|
+
import { dirname as dirname4, join as join4 } from "path";
|
|
6787
6803
|
import { existsSync as existsSync3, rmSync } from "fs";
|
|
6788
6804
|
var ProjectScaffolder = class _ProjectScaffolder {
|
|
6789
6805
|
config;
|
|
@@ -7598,7 +7614,7 @@ Recommendations are added here when you use \`coherent chat\` and the AI suggest
|
|
|
7598
7614
|
*/
|
|
7599
7615
|
async writeFile(relativePath, content) {
|
|
7600
7616
|
const fullPath = join4(this.projectRoot, relativePath);
|
|
7601
|
-
const dir =
|
|
7617
|
+
const dir = dirname4(fullPath);
|
|
7602
7618
|
if (!existsSync3(dir)) {
|
|
7603
7619
|
await mkdir3(dir, { recursive: true });
|
|
7604
7620
|
}
|