@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.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
|
|
@@ -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
|
|
@@ -1497,7 +1497,7 @@ export { themeLayout as ${data.themeName}Layout } from "./theme.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
|
|
@@ -3057,6 +3057,9 @@ async function renameTheme(themeDir, oldName, newName) {
|
|
|
3057
3057
|
);
|
|
3058
3058
|
}
|
|
3059
3059
|
pkg.version = "1.0.0";
|
|
3060
|
+
if (pkg.devDependencies?.["@onexapis/cli"]) {
|
|
3061
|
+
delete pkg.devDependencies["@onexapis/cli"];
|
|
3062
|
+
}
|
|
3060
3063
|
await fs__default.default.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
3061
3064
|
}
|
|
3062
3065
|
const configPath = path7__default.default.join(themeDir, "theme.config.ts");
|
|
@@ -3209,7 +3212,9 @@ async function cloneCommand(themeName, options) {
|
|
|
3209
3212
|
console.log();
|
|
3210
3213
|
console.log(chalk4__default.default.cyan("Next steps:"));
|
|
3211
3214
|
console.log(chalk4__default.default.gray(` cd ${path7__default.default.relative(process.cwd(), outputDir)}`));
|
|
3212
|
-
console.log(
|
|
3215
|
+
console.log(
|
|
3216
|
+
chalk4__default.default.gray(" cp .env.example .env # then add your Company ID")
|
|
3217
|
+
);
|
|
3213
3218
|
if (options.install === false) {
|
|
3214
3219
|
console.log(chalk4__default.default.gray(" pnpm install"));
|
|
3215
3220
|
}
|