Skip to content

Commit a4feb94

Browse files
committed
Updated to 23.7.1.
1 parent 19b65b8 commit a4feb94

20 files changed

+1180
-130
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ Templates and resources for development platforms.
1515
[react-starter-sites](react-starter-sites/) – A quick way to get started with React site development.
1616

1717

18+
# New in Release 23.7.1
19+
20+
**Added**
21+
- `cec transfer-category-property` - Transfers category properties of a taxonomy from one OCM server to another
22+
23+
**Updated**
24+
- `cec control-site` - Now supports publishing of detail page assets
25+
- `cec create-template` - Now has option to exclude content types
26+
27+
1828
# New in Release 23.6.2
1929

2030
**Updated**

sites/bin/cec/cec.js

Lines changed: 125 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ var getTaxonomyStatus = function () {
286286
return names;
287287
};
288288

289+
var getTaxonomyCategoryStatus = function () {
290+
var names = ['promoted', 'draft'];
291+
return names;
292+
};
293+
294+
var getCategoryPropertyNames = function () {
295+
var names = ['keywords', 'synonyms', 'relatedCategories', 'customProperties'];
296+
return names;
297+
};
298+
289299
var getTaxonomyActions = function () {
290300
const actions = ['promote', 'publish', 'unpublish'];
291301
return actions;
@@ -628,6 +638,7 @@ const createTemplate = {
628638
['cec create-template Temp1 -s Site1 -p', 'Create template Temp1 based on site Site1 on OCM server and include only the published assets'],
629639
['cec create-template Temp1 -s Site1 -n', 'Create template Temp1 based on site Site1 on OCM server and include only the assets added to the site\'s pages'],
630640
['cec create-template Temp1 -s Site1 -x', 'Create template Temp1 based on site Site1 on OCM server and exclude the content in the site'],
641+
['cec create-template Temp1 -s Site1 -x -t', 'Create template Temp1 based on site Site1 on OCM server and exclude both content and content types in the site'],
631642
['cec create-template Temp1 -s Site1 -c', 'Create template Temp1 based on site Site1 on OCM server and exclude the components used in the site'],
632643
['cec create-template Temp1 -s Site1 -d site:content', 'Create template Temp1 based on site Site1 on OCM server and exclude the content folder of the site'],
633644
['cec create-template Temp1 -s Site1 -r SampleServer1', 'Create template Temp1 based on site Site1 on the registered server SampleServer1'],
@@ -1351,6 +1362,25 @@ const uploadTaxonomy = {
13511362
]
13521363
};
13531364

1365+
const transferCategoryProperty = {
1366+
command: 'transfer-category-property <name>',
1367+
alias: 'tcp',
1368+
name: 'transfer-category-property',
1369+
usage: {
1370+
'short': 'Transfers category properties from one OCM server to another.',
1371+
'long': (function () {
1372+
let desc = 'Transfers category properties of a taxonomy from one OCM server to another. Optionally specify the taxonomy id with -i <id> if another taxonomy has the same name. ';
1373+
desc += os.EOL + 'The taxonomy on the two servers should be in sync before use this command. And only the following properties will be updated on the destination server' + os.EOL + os.EOL;
1374+
desc = getCategoryPropertyNames().reduce((acc, item) => acc + ' ' + item + '\n', desc);
1375+
return desc;
1376+
})()
1377+
},
1378+
example: [
1379+
['cec transfer-category-property Taxonomy1 -s SampleServer -d SampleServer1', 'The promoted taxonomy categories will be transferred'],
1380+
['cec transfer-category-property Taxonomy1 -i 6A6DC736572C468B90F2A1C17B7CE5E4 -s SampleServer -d SampleServer']
1381+
]
1382+
};
1383+
13541384
const updateTaxonomy = {
13551385
command: 'update-taxonomy <name>',
13561386
alias: 'utx',
@@ -1717,7 +1747,7 @@ const controlSite = {
17171747
['cec control-site publish -s Site1 -i seo,rssFeeds ', 'Only publish Sitemap, Robots and RSS Feed files of site Site1'],
17181748
['cec control-site publish -s Site1 -a 100,200 ', 'Only publish page 100 and 200 of site Site1'],
17191749
['cec control-site publish -s Site1 -a 100 -b ', 'Only publish page 100 and its sub pages of site Site1'],
1720-
// ['cec control-site publish -s Site1 -l 150:GUID1,GUID2 ', 'Only publish assets GUID1 and GUID2 on detail page 150 of site Site1'],
1750+
['cec control-site publish -s Site1 -l 150:GUID1,GUID2 ', 'Only publish assets GUID1 and GUID2 on detail page 150 of site Site1'],
17211751
['cec control-site publish -s Site1 -r SampleServer1', 'Publish site Site1 on the registered server SampleServer1'],
17221752
['cec control-site unpublish -s Site1 -r SampleServer1', 'Unpublish site Site1 on the registered server SampleServer1'],
17231753
['cec control-site bring-online -s Site1 -r SampleServer1', 'Bring site Site1 online on the registered server SampleServer1'],
@@ -4492,6 +4522,7 @@ _usage = _usage + os.EOL + 'Recommendations' + os.EOL +
44924522

44934523
_usage = _usage + os.EOL + 'Taxonomies' + os.EOL +
44944524
_getCmdHelp(downloadTaxonomy) + os.EOL +
4525+
_getCmdHelp(transferCategoryProperty) + os.EOL +
44954526
_getCmdHelp(uploadTaxonomy) + os.EOL +
44964527
_getCmdHelp(controlTaxonomy) + os.EOL +
44974528
_getCmdHelp(updateTaxonomy) + os.EOL +
@@ -4838,6 +4869,10 @@ const argv = yargs.usage(_usage)
48384869
alias: 'x',
48394870
description: 'Exclude content'
48404871
})
4872+
.option('excludetype', {
4873+
alias: 't',
4874+
description: 'Exclude content types'
4875+
})
48414876
.option('excludecomponents', {
48424877
alias: 'c',
48434878
description: 'Exclude components'
@@ -4854,6 +4889,11 @@ const argv = yargs.usage(_usage)
48544889
alias: 'r',
48554890
description: 'The registered OCM server'
48564891
})
4892+
.option('sourcefiles', {
4893+
alias: 'l',
4894+
description: 'Attempt to download files from this source file location',
4895+
hidden: true
4896+
})
48574897
.check((argv) => {
48584898
if (argv.from && !getTemplateSources().includes(argv.from)) {
48594899
throw new Error(`${argv.from} is not a valid value for <source>`);
@@ -4874,6 +4914,7 @@ const argv = yargs.usage(_usage)
48744914
.example(...createTemplate.example[8])
48754915
.example(...createTemplate.example[9])
48764916
.example(...createTemplate.example[10])
4917+
.example(...createTemplate.example[11])
48774918
.help(false)
48784919
.version(false)
48794920
.usage(`Usage: cec ${createTemplate.command}\n\n${createTemplate.usage.long}`);
@@ -6024,6 +6065,31 @@ const argv = yargs.usage(_usage)
60246065
.version(false)
60256066
.usage(`Usage: cec ${uploadTaxonomy.command}\n\n${uploadTaxonomy.usage.long}`);
60266067
})
6068+
.command([transferCategoryProperty.command, transferCategoryProperty.alias], false,
6069+
(yargs) => {
6070+
yargs.option('server', {
6071+
alias: 's',
6072+
description: 'The registered OCM server the category properties are from',
6073+
demandOption: true
6074+
})
6075+
.option('destination', {
6076+
alias: 'd',
6077+
description: 'The registered OCM server to transfer the category properties',
6078+
demandOption: true
6079+
})
6080+
.option('id', {
6081+
alias: 'i',
6082+
description: 'Taxonomy Id'
6083+
})
6084+
.check((argv) => {
6085+
return true;
6086+
})
6087+
.example(...transferCategoryProperty.example[0])
6088+
.example(...transferCategoryProperty.example[1])
6089+
.help(false)
6090+
.version(false)
6091+
.usage(`Usage: cec ${transferCategoryProperty.command}\n\n${transferCategoryProperty.usage.long}`);
6092+
})
60276093
.command([controlTaxonomy.command, controlTaxonomy.alias], false,
60286094
(yargs) => {
60296095
yargs
@@ -6760,6 +6826,18 @@ const argv = yargs.usage(_usage)
67606826
if (argv.settingsfiles && typeof argv.settingsfiles === 'boolean') {
67616827
throw new Error(os.EOL + 'Please specify valid site settings files');
67626828
}
6829+
if (argv.pages && typeof argv.pages === 'boolean') {
6830+
throw new Error(os.EOL + 'Please specify valid site pages');
6831+
}
6832+
if (argv.detailpageassets && typeof argv.detailpageassets === 'boolean') {
6833+
throw new Error(os.EOL + 'Please specify valid detail page and assets');
6834+
}
6835+
if (argv.detailpageassets) {
6836+
let parts = argv.detailpageassets.toString().split(':');
6837+
if (parts.length !== 2) {
6838+
throw new Error(os.EOL + 'Please specify valid detail page and assets in format of <pageid>:<GUID1>,<GUID2>');
6839+
}
6840+
}
67636841
if (argv.settingsfiles && argv.action !== 'publish' && argv.action !== 'publish-internal') {
67646842
throw new Error(os.EOL + '<settingsfiles> is only for action publish');
67656843
}
@@ -6769,6 +6847,9 @@ const argv = yargs.usage(_usage)
67696847
if (argv.detailpageassets && argv.action !== 'publish' && argv.action !== 'publish-internal') {
67706848
throw new Error(os.EOL + '<detailpageassets> is only for action publish');
67716849
}
6850+
if (argv.staticincremental && !argv.staticonly) {
6851+
throw new Error(os.EOL + '<staticincremental> is only available if <staticonly> also specified');
6852+
}
67726853
if (argv.settingsfiles) {
67736854
let files = argv.settingsfiles.split(',');
67746855
for (let i = 0; i < files.length; i++) {
@@ -6797,6 +6878,10 @@ const argv = yargs.usage(_usage)
67976878
alias: 't',
67986879
description: 'Only publish site static files'
67996880
})
6881+
.option('staticincremental', {
6882+
alias: 'm',
6883+
description: 'Add to the already published static files'
6884+
})
68006885
.option('compileonly', {
68016886
alias: 'p',
68026887
description: 'Only compile and publish the static files without publishing the site'
@@ -6823,8 +6908,7 @@ const argv = yargs.usage(_usage)
68236908
})
68246909
.option('detailpageassets', {
68256910
alias: 'l',
6826-
description: 'The detail page ID and their asset IDs',
6827-
hidden: true
6911+
description: 'The detail page ID and their asset IDs'
68286912
})
68296913
.option('theme', {
68306914
alias: 'e',
@@ -6844,7 +6928,7 @@ const argv = yargs.usage(_usage)
68446928
})
68456929
.option('server', {
68466930
alias: 'r',
6847-
description: '<server> The registered OCM server'
6931+
description: 'The registered OCM server'
68486932
})
68496933
.example(...controlSite.example[0])
68506934
.example(...controlSite.example[1])
@@ -6863,6 +6947,7 @@ const argv = yargs.usage(_usage)
68636947
.example(...controlSite.example[14])
68646948
.example(...controlSite.example[15])
68656949
.example(...controlSite.example[16])
6950+
.example(...controlSite.example[17])
68666951
.help(false)
68676952
.version(false)
68686953
.usage(`Usage: cec ${controlSite.command}\n\n${controlSite.usage.long}`);
@@ -10449,11 +10534,12 @@ if (fs.existsSync(path.join(appRoot, 'package.json'))) {
1044910534

1045010535
// Display command and its params
1045110536
// console.log(argv);
10452-
var _displayCommand = function (cmdName) {
10537+
var _displayCommand = function (cmdName, obscureParams) {
1045310538
var cmdStr = 'cec ' + (cmdName || argv._[0]);
1045410539
var paramStr = '';
1045510540
var requiredParamStr = '';
1045610541
var found0 = false;
10542+
var toObscure = obscureParams || [];
1045710543
Object.keys(argv).forEach(function (name) {
1045810544
if (name === '$0') {
1045910545
found0 = true;
@@ -10470,6 +10556,9 @@ var _displayCommand = function (cmdName) {
1047010556
// ignore
1047110557
}
1047210558
}
10559+
if (toObscure.includes(name)) {
10560+
value = 'xxxxxx';
10561+
}
1047310562
if (!found0) {
1047410563
paramStr = paramStr + ' ' + '--' + name + ' ' + value;
1047510564
} else {
@@ -10781,6 +10870,9 @@ if (argv._[0] === createComponent.name || argv._[0] == createComponent.alias) {
1078110870
if (argv.excludecontent) {
1078210871
createTemplateArgs.push(...['--excludecontent', argv.excludecontent]);
1078310872
}
10873+
if (argv.excludetype) {
10874+
createTemplateArgs.push(...['--excludetype', argv.excludetype]);
10875+
}
1078410876
if (argv.excludecomponents) {
1078510877
createTemplateArgs.push(...['--excludecomponents', argv.excludecomponents]);
1078610878
}
@@ -10793,6 +10885,9 @@ if (argv._[0] === createComponent.name || argv._[0] == createComponent.alias) {
1079310885
if (argv.server && typeof argv.server !== 'boolean') {
1079410886
createTemplateArgs.push(...['--server', argv.server]);
1079510887
}
10888+
if (argv.sourcefiles) {
10889+
createTemplateArgs.push(...['--sourcefiles', argv.sourcefiles]);
10890+
}
1079610891
createTemplateArgs.push(...['--name', argv.name]);
1079710892
spawnCmd = childProcess.spawnSync(npmCmd, createTemplateArgs, {
1079810893
cwd,
@@ -11634,6 +11729,23 @@ if (argv._[0] === createComponent.name || argv._[0] == createComponent.alias) {
1163411729
stdio: 'inherit'
1163511730
});
1163611731

11732+
} else if (argv._[0] === transferCategoryProperty.name || argv._[0] === transferCategoryProperty.alias) {
11733+
_displayCommand(transferCategoryProperty.name);
11734+
let transferCategoryPropertiesArgs = ['run', '-s', transferCategoryProperty.name, '--prefix', appRoot,
11735+
'--',
11736+
'--projectDir', cwd,
11737+
'--name', argv.name,
11738+
'--server', argv.server,
11739+
'--destination', argv.destination
11740+
];
11741+
if (argv.id) {
11742+
transferCategoryPropertiesArgs.push(...['--id', argv.id]);
11743+
}
11744+
spawnCmd = childProcess.spawnSync(npmCmd, transferCategoryPropertiesArgs, {
11745+
cwd,
11746+
stdio: 'inherit'
11747+
});
11748+
1163711749
} else if (argv._[0] === controlTaxonomy.name || argv._[0] === controlTaxonomy.alias) {
1163811750
_displayCommand(controlTaxonomy.name);
1163911751
let controlTaxonomyArgs = ['run', '-s', controlTaxonomy.name, '--prefix', appRoot,
@@ -12329,6 +12441,9 @@ if (argv._[0] === createComponent.name || argv._[0] == createComponent.alias) {
1232912441
if (argv.staticonly) {
1233012442
controlSiteArgs.push(...['--staticonly', argv.staticonly]);
1233112443
}
12444+
if (argv.staticincremental) {
12445+
controlSiteArgs.push(...['--staticincremental', argv.staticincremental]);
12446+
}
1233212447
if (argv.compileonly) {
1233312448
controlSiteArgs.push(...['--compileonly', argv.compileonly]);
1233412449
}
@@ -14534,7 +14649,7 @@ else if (argv._[0] === uploadType.name || argv._[0] === uploadType.alias) {
1453414649
});
1453514650

1453614651
} else if (argv._[0] === registerServer.name || argv._[0] === registerServer.alias) {
14537-
_displayCommand(registerServer.name);
14652+
_displayCommand(registerServer.name, ['password']);
1453814653
let registerServerArgs = ['run', '-s', registerServer.name, '--prefix', appRoot,
1453914654
'--',
1454014655
'--projectDir', cwd,
@@ -14935,8 +15050,10 @@ if (!process.shim) {
1493515050
console.log('Elapsed time: ' + seconds + 's');
1493615051

1493715052
// see if need to show deprecation warning
14938-
_checkVersion();
14939-
15053+
let runCheckVersion = process.env.CEC_LCM_DOCKER === undefined || process.env.CEC_LCM_DOCKER !== 'true';
15054+
if (runCheckVersion) {
15055+
_checkVersion();
15056+
}
1494015057

1494115058
// console.log(spawnCmd);
1494215059
process.exit(spawnCmd ? spawnCmd.status : 0);

sites/bin/cec/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cec",
3-
"version": "23.6.2",
3+
"version": "23.7.1",
44
"description": "CLI for cec",
55
"license": "UPL-1.0",
66
"main": "cec.js",

sites/bin/compiler/components/component-registration.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@
592592
'fontColorHover': '#2222DD',
593593
'fontFamily': '\'Helvetica Neue\', Helvetica, Arial, sans-serif',
594594
'fontSize': 14,
595+
'constraints': [],
595596
'height': 0,
596597
'linkType': 'scs-link-no-link',
597598
'marginBottom': 5,
@@ -614,6 +615,7 @@
614615
'borderRadius',
615616
'borderStyle',
616617
'borderWidth',
618+
'constraints',
617619
'fontColor',
618620
'fontColorHover',
619621
'fontFamily',

0 commit comments

Comments
 (0)