@onexapis/cli 1.1.5 → 1.1.7
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/cli.js +60 -55
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +60 -55
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -16
- package/dist/index.mjs.map +1 -1
- package/dist/preview/preview-app.tsx +8 -1
- package/package.json +10 -11
- package/templates/default/esbuild.config.js +3 -3
package/dist/index.js
CHANGED
|
@@ -1308,7 +1308,7 @@ Add your theme-specific blocks here.
|
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
1310
|
function generateManifest(data) {
|
|
1311
|
-
return `import type { ThemeExport } from "@
|
|
1311
|
+
return `import type { ThemeExport } from "@onexapis/core";
|
|
1312
1312
|
|
|
1313
1313
|
/**
|
|
1314
1314
|
* ${data.displayName} Theme Manifest
|
|
@@ -1322,10 +1322,10 @@ export const manifest: ThemeExport = {
|
|
|
1322
1322
|
author: "${data.author}",
|
|
1323
1323
|
|
|
1324
1324
|
// Theme configuration
|
|
1325
|
-
config: () => import("./
|
|
1325
|
+
config: () => import("./config").then((m) => m.themeConfig),
|
|
1326
1326
|
|
|
1327
1327
|
// Theme layout (header/footer sections)
|
|
1328
|
-
layout: () => import("./
|
|
1328
|
+
layout: () => import("./layout").then((m) => m.themeLayout),
|
|
1329
1329
|
|
|
1330
1330
|
// Available sections in this theme
|
|
1331
1331
|
sections: {
|
|
@@ -1356,7 +1356,7 @@ export default manifest;
|
|
|
1356
1356
|
`;
|
|
1357
1357
|
}
|
|
1358
1358
|
function generateThemeConfig(data) {
|
|
1359
|
-
return `import type { ThemeConfig } from "@
|
|
1359
|
+
return `import type { ThemeConfig } from "@onexapis/core";
|
|
1360
1360
|
|
|
1361
1361
|
/**
|
|
1362
1362
|
* ${data.displayName} Theme Configuration
|
|
@@ -1457,7 +1457,7 @@ export const themeConfig: ThemeConfig = {
|
|
|
1457
1457
|
`;
|
|
1458
1458
|
}
|
|
1459
1459
|
function generateThemeLayout(data) {
|
|
1460
|
-
return `import type { ThemeLayoutConfig } from "@
|
|
1460
|
+
return `import type { ThemeLayoutConfig } from "@onexapis/core";
|
|
1461
1461
|
|
|
1462
1462
|
/**
|
|
1463
1463
|
* ${data.themeName} Theme Layout
|
|
@@ -1491,13 +1491,13 @@ function generateThemeIndex(data) {
|
|
|
1491
1491
|
* ${data.themeNamePascal} Theme
|
|
1492
1492
|
*/
|
|
1493
1493
|
|
|
1494
|
-
export { manifest as ${data.
|
|
1495
|
-
export { themeConfig as ${data.
|
|
1496
|
-
export { themeLayout as ${data.
|
|
1494
|
+
export { manifest as ${data.themeNamePascal}Manifest } from "./manifest";
|
|
1495
|
+
export { themeConfig as ${data.themeNamePascal}Config } from "./config";
|
|
1496
|
+
export { themeLayout as ${data.themeNamePascal}Layout } from "./layout";
|
|
1497
1497
|
`;
|
|
1498
1498
|
}
|
|
1499
1499
|
function generateHomePage(data) {
|
|
1500
|
-
return `import type { PageConfig } from "@
|
|
1500
|
+
return `import type { PageConfig } from "@onexapis/core";
|
|
1501
1501
|
|
|
1502
1502
|
/**
|
|
1503
1503
|
* Home Page Configuration
|
|
@@ -1648,7 +1648,7 @@ async function createSectionCommand(name, options) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
}
|
|
1650
1650
|
function generateSectionSchema(data) {
|
|
1651
|
-
return `import type { SectionSchema } from "@
|
|
1651
|
+
return `import type { SectionSchema } from "@onexapis/core";
|
|
1652
1652
|
|
|
1653
1653
|
/**
|
|
1654
1654
|
* ${data.displayName} Section Schema
|
|
@@ -1710,7 +1710,7 @@ export const ${data.sectionName}Schema: SectionSchema = {
|
|
|
1710
1710
|
}
|
|
1711
1711
|
function generateSectionTemplate(data) {
|
|
1712
1712
|
return `import React from "react";
|
|
1713
|
-
import type { SectionComponentProps } from "@
|
|
1713
|
+
import type { SectionComponentProps } from "@onexapis/core";
|
|
1714
1714
|
|
|
1715
1715
|
/**
|
|
1716
1716
|
* ${data.displayName} - Default Template
|
|
@@ -1894,7 +1894,7 @@ async function createBlockCommand(name, options) {
|
|
|
1894
1894
|
}
|
|
1895
1895
|
}
|
|
1896
1896
|
function generateBlockSchema(data) {
|
|
1897
|
-
return `import type { BlockDefinition } from "@
|
|
1897
|
+
return `import type { BlockDefinition } from "@onexapis/core";
|
|
1898
1898
|
|
|
1899
1899
|
/**
|
|
1900
1900
|
* ${data.displayName} Block Schema
|
|
@@ -1943,7 +1943,7 @@ export const ${data.blockName}Definition: BlockDefinition = {
|
|
|
1943
1943
|
}
|
|
1944
1944
|
function generateBlockComponent(data) {
|
|
1945
1945
|
return `import React from "react";
|
|
1946
|
-
import type { BlockComponentProps } from "@
|
|
1946
|
+
import type { BlockComponentProps } from "@onexapis/core";
|
|
1947
1947
|
|
|
1948
1948
|
/**
|
|
1949
1949
|
* ${data.displayName} Block Component
|
|
@@ -2096,7 +2096,7 @@ async function createComponentCommand(name, options) {
|
|
|
2096
2096
|
}
|
|
2097
2097
|
}
|
|
2098
2098
|
function generateComponentSchema(data) {
|
|
2099
|
-
return `import type { ComponentDefinition } from "@
|
|
2099
|
+
return `import type { ComponentDefinition } from "@onexapis/core";
|
|
2100
2100
|
|
|
2101
2101
|
/**
|
|
2102
2102
|
* ${data.displayName} Component Schema
|
|
@@ -2160,7 +2160,7 @@ export const ${data.componentName}Definition: ComponentDefinition = {
|
|
|
2160
2160
|
}
|
|
2161
2161
|
function generateComponent(data) {
|
|
2162
2162
|
return `import React from "react";
|
|
2163
|
-
import type { ComponentProps } from "@
|
|
2163
|
+
import type { ComponentProps } from "@onexapis/core";
|
|
2164
2164
|
|
|
2165
2165
|
/**
|
|
2166
2166
|
* ${data.displayName} Component
|
|
@@ -3212,7 +3212,9 @@ async function cloneCommand(themeName, options) {
|
|
|
3212
3212
|
console.log();
|
|
3213
3213
|
console.log(chalk4__default.default.cyan("Next steps:"));
|
|
3214
3214
|
console.log(chalk4__default.default.gray(` cd ${path7__default.default.relative(process.cwd(), outputDir)}`));
|
|
3215
|
-
console.log(
|
|
3215
|
+
console.log(
|
|
3216
|
+
chalk4__default.default.gray(" cp .env.example .env # then add your Company ID")
|
|
3217
|
+
);
|
|
3216
3218
|
if (options.install === false) {
|
|
3217
3219
|
console.log(chalk4__default.default.gray(" pnpm install"));
|
|
3218
3220
|
}
|