@deneb-ui/cli 2.0.81 → 2.0.83
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/bin/index.js +12 -3
- package/package.json +2 -2
package/bin/index.js
CHANGED
|
@@ -6,7 +6,7 @@ const { spawnSync } = require('node:child_process');
|
|
|
6
6
|
const readline = require('node:readline');
|
|
7
7
|
const crypto = require('node:crypto');
|
|
8
8
|
|
|
9
|
-
// SHA-256 hash of default key
|
|
9
|
+
// SHA-256 hash of default key — prevents plain text exposure in repository
|
|
10
10
|
const DENEB_AI_DEFAULT_KEY_HASH = '6f791210e05b535d0e48e260273b3ddb511aefb63ad2a2a35b838a80a6127588';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -572,7 +572,7 @@ function getDefaultSiteData(projectName, pages) {
|
|
|
572
572
|
};
|
|
573
573
|
}
|
|
574
574
|
|
|
575
|
-
function getComponentRegistry(importPkg) {
|
|
575
|
+
function getComponentRegistry(importPkg = '@deneb-ui/ui') {
|
|
576
576
|
return {
|
|
577
577
|
'button': {
|
|
578
578
|
file: 'Button.tsx',
|
|
@@ -1054,6 +1054,15 @@ async function initProject(targetInput, options = {}) {
|
|
|
1054
1054
|
}
|
|
1055
1055
|
}
|
|
1056
1056
|
|
|
1057
|
+
let importPkg = '@deneb-ui/ui';
|
|
1058
|
+
if (pkg.dependencies?.['@deneb-ui/ui'] || pkg.devDependencies?.['@deneb-ui/ui']) {
|
|
1059
|
+
importPkg = '@deneb-ui/ui';
|
|
1060
|
+
} else if (pkg.dependencies?.['@deneb/ui'] || pkg.devDependencies?.['@deneb/ui']) {
|
|
1061
|
+
importPkg = '@deneb/ui';
|
|
1062
|
+
} else if (pkg.dependencies?.['@fivora/editable-components'] || pkg.devDependencies?.['@fivora/editable-components']) {
|
|
1063
|
+
importPkg = '@fivora/editable-components';
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1057
1066
|
// 4.6. Ensure Root Layout instruments SiteDataProvider
|
|
1058
1067
|
const appLayoutCandidates = [
|
|
1059
1068
|
path.join(targetDir, 'src', 'app', 'layout.tsx'),
|
|
@@ -1068,7 +1077,7 @@ async function initProject(targetInput, options = {}) {
|
|
|
1068
1077
|
const hasProvider = /SiteDataProvider|DenebDataProvider|<Providers\b/.test(layoutContent);
|
|
1069
1078
|
if (!hasProvider) {
|
|
1070
1079
|
const { instrumentLayoutSource } = require('../src/arc/transformer.cjs');
|
|
1071
|
-
const instrumented = instrumentLayoutSource(layoutContent, '@/data/site-data.json',
|
|
1080
|
+
const instrumented = instrumentLayoutSource(layoutContent, '@/data/site-data.json', importPkg);
|
|
1072
1081
|
if (instrumented.updated && instrumented.code !== layoutContent) {
|
|
1073
1082
|
fs.writeFileSync(targetLayoutFile, instrumented.code, 'utf8');
|
|
1074
1083
|
console.log(`\x1b[32m✔ Instrumented\x1b[0m ${path.relative(targetDir, targetLayoutFile)} with <SiteDataProvider>`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deneb-ui/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.83",
|
|
4
4
|
"description": "Official DENEB CLI — scaffold, convert, validate, and package Fivora-ready storefront templates.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"deneb": "bin/index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/parser": "^7.28.0",
|
|
52
|
-
"@deneb-ui/core": "^2.0.
|
|
52
|
+
"@deneb-ui/core": "^2.0.83",
|
|
53
53
|
"@octokit/rest": "^22.0.1",
|
|
54
54
|
"adm-zip": "^0.6.0",
|
|
55
55
|
"dotenv": "^17.4.2",
|