@onexapis/cli 1.1.4 → 1.1.6
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 +16 -11
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +16 -11
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +16 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -11
- package/dist/index.mjs.map +1 -1
- package/dist/preview/preview-app.tsx +8 -1
- package/package.json +10 -11
package/dist/index.mjs
CHANGED
|
@@ -1271,7 +1271,7 @@ Add your theme-specific blocks here.
|
|
|
1271
1271
|
}
|
|
1272
1272
|
}
|
|
1273
1273
|
function generateManifest(data) {
|
|
1274
|
-
return `import type { ThemeExport } from "@
|
|
1274
|
+
return `import type { ThemeExport } from "@onexapis/core";
|
|
1275
1275
|
|
|
1276
1276
|
/**
|
|
1277
1277
|
* ${data.displayName} Theme Manifest
|
|
@@ -1319,7 +1319,7 @@ export default manifest;
|
|
|
1319
1319
|
`;
|
|
1320
1320
|
}
|
|
1321
1321
|
function generateThemeConfig(data) {
|
|
1322
|
-
return `import type { ThemeConfig } from "@
|
|
1322
|
+
return `import type { ThemeConfig } from "@onexapis/core";
|
|
1323
1323
|
|
|
1324
1324
|
/**
|
|
1325
1325
|
* ${data.displayName} Theme Configuration
|
|
@@ -1420,7 +1420,7 @@ export const themeConfig: ThemeConfig = {
|
|
|
1420
1420
|
`;
|
|
1421
1421
|
}
|
|
1422
1422
|
function generateThemeLayout(data) {
|
|
1423
|
-
return `import type { ThemeLayoutConfig } from "@
|
|
1423
|
+
return `import type { ThemeLayoutConfig } from "@onexapis/core";
|
|
1424
1424
|
|
|
1425
1425
|
/**
|
|
1426
1426
|
* ${data.themeName} Theme Layout
|
|
@@ -1460,7 +1460,7 @@ export { themeLayout as ${data.themeName}Layout } from "./theme.layout";
|
|
|
1460
1460
|
`;
|
|
1461
1461
|
}
|
|
1462
1462
|
function generateHomePage(data) {
|
|
1463
|
-
return `import type { PageConfig } from "@
|
|
1463
|
+
return `import type { PageConfig } from "@onexapis/core";
|
|
1464
1464
|
|
|
1465
1465
|
/**
|
|
1466
1466
|
* Home Page Configuration
|
|
@@ -1611,7 +1611,7 @@ async function createSectionCommand(name, options) {
|
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
1613
|
function generateSectionSchema(data) {
|
|
1614
|
-
return `import type { SectionSchema } from "@
|
|
1614
|
+
return `import type { SectionSchema } from "@onexapis/core";
|
|
1615
1615
|
|
|
1616
1616
|
/**
|
|
1617
1617
|
* ${data.displayName} Section Schema
|
|
@@ -1673,7 +1673,7 @@ export const ${data.sectionName}Schema: SectionSchema = {
|
|
|
1673
1673
|
}
|
|
1674
1674
|
function generateSectionTemplate(data) {
|
|
1675
1675
|
return `import React from "react";
|
|
1676
|
-
import type { SectionComponentProps } from "@
|
|
1676
|
+
import type { SectionComponentProps } from "@onexapis/core";
|
|
1677
1677
|
|
|
1678
1678
|
/**
|
|
1679
1679
|
* ${data.displayName} - Default Template
|
|
@@ -1857,7 +1857,7 @@ async function createBlockCommand(name, options) {
|
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
1859
|
function generateBlockSchema(data) {
|
|
1860
|
-
return `import type { BlockDefinition } from "@
|
|
1860
|
+
return `import type { BlockDefinition } from "@onexapis/core";
|
|
1861
1861
|
|
|
1862
1862
|
/**
|
|
1863
1863
|
* ${data.displayName} Block Schema
|
|
@@ -1906,7 +1906,7 @@ export const ${data.blockName}Definition: BlockDefinition = {
|
|
|
1906
1906
|
}
|
|
1907
1907
|
function generateBlockComponent(data) {
|
|
1908
1908
|
return `import React from "react";
|
|
1909
|
-
import type { BlockComponentProps } from "@
|
|
1909
|
+
import type { BlockComponentProps } from "@onexapis/core";
|
|
1910
1910
|
|
|
1911
1911
|
/**
|
|
1912
1912
|
* ${data.displayName} Block Component
|
|
@@ -2059,7 +2059,7 @@ async function createComponentCommand(name, options) {
|
|
|
2059
2059
|
}
|
|
2060
2060
|
}
|
|
2061
2061
|
function generateComponentSchema(data) {
|
|
2062
|
-
return `import type { ComponentDefinition } from "@
|
|
2062
|
+
return `import type { ComponentDefinition } from "@onexapis/core";
|
|
2063
2063
|
|
|
2064
2064
|
/**
|
|
2065
2065
|
* ${data.displayName} Component Schema
|
|
@@ -2123,7 +2123,7 @@ export const ${data.componentName}Definition: ComponentDefinition = {
|
|
|
2123
2123
|
}
|
|
2124
2124
|
function generateComponent(data) {
|
|
2125
2125
|
return `import React from "react";
|
|
2126
|
-
import type { ComponentProps } from "@
|
|
2126
|
+
import type { ComponentProps } from "@onexapis/core";
|
|
2127
2127
|
|
|
2128
2128
|
/**
|
|
2129
2129
|
* ${data.displayName} Component
|
|
@@ -3020,6 +3020,9 @@ async function renameTheme(themeDir, oldName, newName) {
|
|
|
3020
3020
|
);
|
|
3021
3021
|
}
|
|
3022
3022
|
pkg.version = "1.0.0";
|
|
3023
|
+
if (pkg.devDependencies?.["@onexapis/cli"]) {
|
|
3024
|
+
delete pkg.devDependencies["@onexapis/cli"];
|
|
3025
|
+
}
|
|
3023
3026
|
await fs.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
3024
3027
|
}
|
|
3025
3028
|
const configPath = path7.join(themeDir, "theme.config.ts");
|
|
@@ -3172,7 +3175,9 @@ async function cloneCommand(themeName, options) {
|
|
|
3172
3175
|
console.log();
|
|
3173
3176
|
console.log(chalk4.cyan("Next steps:"));
|
|
3174
3177
|
console.log(chalk4.gray(` cd ${path7.relative(process.cwd(), outputDir)}`));
|
|
3175
|
-
console.log(
|
|
3178
|
+
console.log(
|
|
3179
|
+
chalk4.gray(" cp .env.example .env # then add your Company ID")
|
|
3180
|
+
);
|
|
3176
3181
|
if (options.install === false) {
|
|
3177
3182
|
console.log(chalk4.gray(" pnpm install"));
|
|
3178
3183
|
}
|