Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.

Commit 80536f2

Browse files
committed
Changes for release 0.1.2
1 parent 011cd89 commit 80536f2

6 files changed

Lines changed: 23 additions & 7 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ The supported WCM types are:
122122
- Text Component
123123
- Rich Text Component
124124
- Presentation Template
125+
- File Component (with trial option enabled)
125126

126127
Other Component types, Authoring Templates, and Content Items are not supported.
127128

@@ -131,6 +132,7 @@ There are some options that can be set to control some of the behavior when down
131132
"includeMeta": false,
132133
"filterComponentId": true,
133134
"pullParallel": true,
135+
"trial":true,
134136
"include":[
135137
"PresentationTemplate",
136138
"LibraryStyleSheetComponent",
@@ -141,4 +143,5 @@ There are some options that can be set to control some of the behavior when down
141143
- includeMeta: If set to true, each component will have a corresponding <name>-md.json file containing all the metadata from WCM.
142144
- filterComponentId: If set to true, any Component tags in the downloaded data will include the ID of the referenced Component. By default these IDs are are removed, and the "name" attribute is used to identify the referenced Component.
143145
- pullParallel: If set to true, requests to the server for components are done in parallel wich can speed up the download of large libraries. By default components are synced sequentially.
146+
- trial: if set any new features that have been added but not fully testes are added
144147
- include: This is an array of item types that allows you to limit the types of items that will be included in the pushed/pull actions for this library, this list will only support types that are handled by default. It allows you to limit the types to a subset of the supported types. i.e. Some one that only works on icons could limit it to "LibraryImageComponent"

dashboard.tar.gz

-9 Bytes
Binary file not shown.

digexp-wcm-design/lib/utils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,20 @@ setSettings = function(cwd, settings) {
5656
}
5757
},
5858
getMergerdOptions = function(options, settings){
59+
var trial = process.env.DIGEXP_TRIAL || '';
60+
if(trial != '')
61+
options.trial = true;
5962
if(settings.options != undefined){
6063
if(settings.options.includeMeta != undefined)
6164
options.includeMeta = settings.options.includeMeta;
6265
if(settings.options.pullParallel != undefined)
6366
options.pullParallel = settings.options.pullParallel;
6467
if(settings.options.include != undefined)
6568
options.include = settings.options.include;
66-
if(settings.options.filterComponentId != undefined)
69+
if(settings.options.filterComponentId != undefined)
6770
options.filterComponentId = settings.options.filterComponentId;
71+
if(settings.options.trial != undefined)
72+
options.trial = settings.options.trial;
6873
};
6974
return options;
7075
};

digexp-wcm-design/wcmHelper.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ init = function(host, port, contentPath, user, password, secure, wcmDir) {
169169
totalCount += count;
170170

171171
eventEmitter.emit("pullingType", libTitle, wcmRequests.wcmTypes.fileComponent);
172-
pullType(options, wcmRequests.wcmTypes.fileComponent, libTitle, ".stff", map).then(function(count) {
172+
pullType(options, wcmRequests.wcmTypes.fileComponent, libTitle, "", map).then(function(count) {
173173
totalCount += count;
174174

175175
eventEmitter.emit("pullingType", libTitle, wcmRequests.wcmTypes.richTextComponent);
@@ -306,8 +306,8 @@ init = function(host, port, contentPath, user, password, secure, wcmDir) {
306306
// skip metadata files which end with md-jsom
307307
if(file.indexOf(metadataSuffix) == -1)
308308
itemType = wcmRequests.wcmTypes.fileComponent;
309-
}
310-
else
309+
} // only do file components if the user turns on trial code
310+
else if(options.trial && options.trial == true)
311311
itemType = wcmRequests.wcmTypes.fileComponent;
312312
if (itemType != null && '.settings' != name && includeOption(options, itemType)) {
313313
var pushedItem = {
@@ -411,7 +411,11 @@ function pullType(options, type, libTitle, extension, map) {
411411
function pullTypeParallel(options, type, libTitle, extension, map) {
412412
debugLogger.trace('pullType::optioins ' + options + ' type::' + type + ' libTitle::' + libTitle + ' extension::' + extension);
413413
var deferred = Q.defer();
414-
if (includeOption(options, type)) {
414+
if((options.trial == undefined || options.trial == false) && type == wcmRequests.wcmTypes.fileComponent)
415+
{
416+
deferred.resolve(0);
417+
}
418+
else if (includeOption(options, type)) {
415419
wcmRequests.getWcmItemsOfType(type, libTitle).then(function(entries) {
416420
var promises = [];
417421
progGoal += entries.length;
@@ -454,7 +458,11 @@ function pullTypeParallel(options, type, libTitle, extension, map) {
454458
function pullTypeSequential(options, type, libTitle, extension, map) {
455459
debugLogger.trace('pullType::optioins ' + options + ' type::' + type + ' libTitle::' + libTitle + ' extension::' + extension);
456460
var deferred = Q.defer();
457-
if (includeOption(options, type)) {
461+
if((options.trial == undefined || options.trial == false) && type == wcmRequests.wcmTypes.fileComponent)
462+
{
463+
deferred.resolve(0);
464+
}
465+
else if (includeOption(options, type)) {
458466
wcmRequests.getWcmItemsOfType(type, libTitle).then(function(entries) {
459467
progGoal += entries.length;
460468
if (entries.length == 0) {
@@ -508,7 +516,7 @@ function updateLocalFile(options, libTitle, data, extension, map){
508516
if(cData.resourceUri && cData.resourceUri.value){
509517
var extStart = cData.resourceUri.value.lastIndexOf('.');
510518
var extEnd = cData.resourceUri.value.lastIndexOf('?');
511-
if(extStart != -1)
519+
if(extStart != -1 && (extEnd-extStart != 1))
512520
extension = cData.resourceUri.value.substring(extStart,extEnd);
513521
}
514522
fs.writeFileSync(path + extension, cData.value, "binary");

release/digexp-toolkit.zip

1.45 KB
Binary file not shown.

wcm-design.tar.gz

145 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)