cloudcms-server 3.2.321 → 3.2.324

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.
Files changed (100) hide show
  1. package/README.md +1 -7
  2. package/index.js +0 -17
  3. package/middleware/authentication/authentication.js +0 -5
  4. package/middleware/authentication/providers/saml.js +8 -4
  5. package/middleware/config/adapter.js +0 -44
  6. package/middleware/deployment/deployment.js +0 -10
  7. package/middleware/registration/registration.js +0 -5
  8. package/middleware/stores/engines/empty.js +0 -4
  9. package/middleware/stores/engines/fs-caching-adapter.js +0 -5
  10. package/middleware/stores/engines/fs.js +0 -9
  11. package/middleware/stores/engines/s3.js +0 -5
  12. package/middleware/stores/engines/s3fs.js +0 -5
  13. package/middleware/stores/multistore.js +0 -29
  14. package/middleware/stores/store.js +0 -9
  15. package/middleware/virtual-config/virtual-config.js +127 -124
  16. package/old_package.json +119 -0
  17. package/package.json +44 -55
  18. package/server/index.js +42 -81
  19. package/server/standalone.js +0 -5
  20. package/util/util.js +12 -6
  21. package/duster/helpers/core/cloudcms/associations.js +0 -34
  22. package/duster/helpers/core/cloudcms/beta/markdown.js +0 -46
  23. package/duster/helpers/core/cloudcms/beta/nodeAttachmentText.js +0 -46
  24. package/duster/helpers/core/cloudcms/beta/params.js +0 -33
  25. package/duster/helpers/core/cloudcms/beta/processTemplate.js +0 -82
  26. package/duster/helpers/core/cloudcms/content.js +0 -34
  27. package/duster/helpers/core/cloudcms/expand.js +0 -38
  28. package/duster/helpers/core/cloudcms/form.js +0 -34
  29. package/duster/helpers/core/cloudcms/query.js +0 -34
  30. package/duster/helpers/core/cloudcms/queryOne.js +0 -34
  31. package/duster/helpers/core/cloudcms/relatives.js +0 -34
  32. package/duster/helpers/core/cloudcms/search.js +0 -34
  33. package/duster/helpers/core/cloudcms/searchOne.js +0 -34
  34. package/duster/helpers/core/cloudcms/wcm/dependency.js +0 -83
  35. package/duster/helpers/core/cloudcms/wcm/fragment.js +0 -34
  36. package/duster/helpers/core/dev/debug.js +0 -42
  37. package/duster/helpers/core/dom/block.js +0 -49
  38. package/duster/helpers/core/dom/include.js +0 -38
  39. package/duster/helpers/core/dom/layout.js +0 -49
  40. package/duster/helpers/core/dom/link.js +0 -81
  41. package/duster/helpers/core/dom/resource.js +0 -77
  42. package/duster/helpers/core/engine.js +0 -1580
  43. package/duster/helpers/core/ice/value.js +0 -65
  44. package/duster/helpers/core/index.js +0 -49
  45. package/duster/helpers/core/operators/if.js +0 -64
  46. package/duster/helpers/core/operators/iter.js +0 -45
  47. package/duster/helpers/core/operators/iterate.js +0 -129
  48. package/duster/helpers/sample/nyt.js +0 -114
  49. package/duster/index.js +0 -319
  50. package/duster/support.js +0 -436
  51. package/duster/tracker.js +0 -262
  52. package/middleware/authentication/providers/cas.js +0 -73
  53. package/middleware/authentication/providers/facebook.js +0 -120
  54. package/middleware/authentication/providers/github.js +0 -88
  55. package/middleware/authentication/providers/linkedin.js +0 -112
  56. package/middleware/authentication/providers/twitter.js +0 -120
  57. package/middleware/server-tags/server-tags.js +0 -113
  58. package/middleware/wcm/wcm.js +0 -1437
  59. package/temp/clusterlock/README.md +0 -6
  60. package/temp/clusterlock/index.js +0 -198
  61. package/temp/clusterlock/package.json +0 -24
  62. package/temp/passport-saml/LICENSE +0 -23
  63. package/temp/passport-saml/README.md +0 -406
  64. package/temp/passport-saml/lib/node-saml/algorithms.d.ts +0 -5
  65. package/temp/passport-saml/lib/node-saml/algorithms.js +0 -41
  66. package/temp/passport-saml/lib/node-saml/algorithms.js.map +0 -1
  67. package/temp/passport-saml/lib/node-saml/index.d.ts +0 -3
  68. package/temp/passport-saml/lib/node-saml/index.js +0 -6
  69. package/temp/passport-saml/lib/node-saml/index.js.map +0 -1
  70. package/temp/passport-saml/lib/node-saml/inmemory-cache-provider.d.ts +0 -45
  71. package/temp/passport-saml/lib/node-saml/inmemory-cache-provider.js +0 -86
  72. package/temp/passport-saml/lib/node-saml/inmemory-cache-provider.js.map +0 -1
  73. package/temp/passport-saml/lib/node-saml/saml-post-signing.d.ts +0 -3
  74. package/temp/passport-saml/lib/node-saml/saml-post-signing.js +0 -15
  75. package/temp/passport-saml/lib/node-saml/saml-post-signing.js.map +0 -1
  76. package/temp/passport-saml/lib/node-saml/saml.d.ts +0 -77
  77. package/temp/passport-saml/lib/node-saml/saml.js +0 -1170
  78. package/temp/passport-saml/lib/node-saml/saml.js.map +0 -1
  79. package/temp/passport-saml/lib/node-saml/types.d.ts +0 -95
  80. package/temp/passport-saml/lib/node-saml/types.js +0 -8
  81. package/temp/passport-saml/lib/node-saml/types.js.map +0 -1
  82. package/temp/passport-saml/lib/node-saml/utility.d.ts +0 -3
  83. package/temp/passport-saml/lib/node-saml/utility.js +0 -19
  84. package/temp/passport-saml/lib/node-saml/utility.js.map +0 -1
  85. package/temp/passport-saml/lib/node-saml/xml.d.ts +0 -21
  86. package/temp/passport-saml/lib/node-saml/xml.js +0 -140
  87. package/temp/passport-saml/lib/node-saml/xml.js.map +0 -1
  88. package/temp/passport-saml/lib/passport-saml/index.d.ts +0 -6
  89. package/temp/passport-saml/lib/passport-saml/index.js +0 -11
  90. package/temp/passport-saml/lib/passport-saml/index.js.map +0 -1
  91. package/temp/passport-saml/lib/passport-saml/multiSamlStrategy.d.ts +0 -13
  92. package/temp/passport-saml/lib/passport-saml/multiSamlStrategy.js +0 -63
  93. package/temp/passport-saml/lib/passport-saml/multiSamlStrategy.js.map +0 -1
  94. package/temp/passport-saml/lib/passport-saml/strategy.d.ts +0 -20
  95. package/temp/passport-saml/lib/passport-saml/strategy.js +0 -167
  96. package/temp/passport-saml/lib/passport-saml/strategy.js.map +0 -1
  97. package/temp/passport-saml/lib/passport-saml/types.d.ts +0 -51
  98. package/temp/passport-saml/lib/passport-saml/types.js +0 -11
  99. package/temp/passport-saml/lib/passport-saml/types.js.map +0 -1
  100. package/temp/passport-saml/package.json +0 -96
@@ -1,82 +0,0 @@
1
- /**
2
- * @processTemplate
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../../engine")(app, dust);
11
-
12
- var map = engine.map;
13
- var end = engine.end;
14
-
15
- dust.helpers.processTemplate = function(chunk, context, bodies, params)
16
- {
17
- params = params || {};
18
-
19
- var nodeId = context.resolve(params.node);
20
- var attachmentId = context.resolve(params.attachment);
21
- if (!attachmentId)
22
- {
23
- attachmentId = "default";
24
- }
25
- var propertyId = context.resolve(params.property);
26
- var locale = context.resolve(params.locale);
27
-
28
- return map(chunk, function(chunk) {
29
-
30
- if (locale)
31
- {
32
- var gitana = context.get("gitana");
33
- gitana.getDriver().setLocale(locale);
34
- }
35
-
36
- if (propertyId)
37
- {
38
- var req = context.get("req");
39
- req.branch(function(err, branch) {
40
-
41
- if (err) {
42
- return end(chunk, context);
43
- }
44
-
45
- branch.readNode(nodeId).then(function() {
46
-
47
- resolveVariables([this[propertyId]], context, function (err, resolutions) {
48
-
49
- chunk.write(resolutions[0]);
50
-
51
- end(chunk, context);
52
-
53
- });
54
- });
55
- });
56
- }
57
- else
58
- {
59
- var req = context.get("req");
60
- req.branch(function(err, branch) {
61
-
62
- if (err) {
63
- return end(chunk, context);
64
- }
65
-
66
- branch.readNode(nodeId).attachment(attachmentId).download(function (text) {
67
-
68
- resolveVariables([text], context, function (err, resolutions) {
69
-
70
- chunk.write(resolutions[0]);
71
-
72
- end(chunk, context);
73
-
74
- });
75
- });
76
- });
77
- }
78
- });
79
- };
80
-
81
- callback();
82
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * @content
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
-
12
- /**
13
- * CONTENT
14
- *
15
- * Selects a single content item.
16
- *
17
- * Syntax:
18
- *
19
- * {@content id="GUID" path="/a/b/c" as=""}
20
- * {+templateIdentifier/}
21
- * {/content}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.content = function(chunk, context, bodies, params)
29
- {
30
- return engine.handleContent(chunk, context, bodies, params);
31
- };
32
-
33
- callback();
34
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * @expand
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
-
12
- /**
13
- * EXPAND
14
- *
15
- * Query for a list of nodes by their id (._doc).
16
- * The list of id values can be supplied as an array of id values in
17
- * the 'list' arg or as an array of node records in the 'list' arg
18
- * along with a the name of a common key within each node that holds
19
- * the id.
20
- *
21
- * Syntax:
22
- * ex. 1
23
- * {@expand list="components" key="editorialpage.components" as="components"}
24
- * {+templateIdentifier/}
25
- * {/expand}
26
- *
27
- * @param chunk
28
- * @param context
29
- * @param bodies
30
- * @param params
31
- */
32
- dust.helpers.expand = function(chunk, context, bodies, params)
33
- {
34
- return engine.handleExpand(chunk, context, bodies, params);
35
- };
36
-
37
- callback();
38
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * @form
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
-
12
- /**
13
- * FORM
14
- *
15
- * Renders a form.
16
- *
17
- * Syntax:
18
- *
19
- * {@form definition="custom:type" form="formKey" list="listKeyOrId" successUrl="" errorUrl=""}
20
- * {+templateIdentifier/}
21
- * {/form}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.form = function(chunk, context, bodies, params)
29
- {
30
- return engine.handleForm(chunk, context, bodies, params);
31
- };
32
-
33
- callback();
34
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * @query
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
-
12
- /**
13
- * QUERY
14
- *
15
- * Queries for content from the content repository and renders.
16
- *
17
- * Syntax:
18
- *
19
- * {@query sort="title" scope="page" type="custom:type" limit="" skip="" as=""}
20
- * {+templateIdentifier/}
21
- * {/query}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.query = function(chunk, context, bodies, params)
29
- {
30
- return engine.handleQuery(chunk, context, bodies, params, false);
31
- };
32
-
33
- callback();
34
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * @queryOne
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
-
12
- /**
13
- * QUERY AND KEEP ONE
14
- *
15
- * Queries for content from the content repository and renders.
16
- *
17
- * Syntax:
18
- *
19
- * {@queryOne sort="title" scope="page" type="custom:type" limit="" skip="" as=""}
20
- * {+templateIdentifier/}
21
- * {/queryOne}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.queryOne = function(chunk, context, bodies, params)
29
- {
30
- return engine.handleQuery(chunk, context, bodies, params, true);
31
- };
32
-
33
- callback();
34
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * @relatives
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
-
12
- /**
13
- * RELATIVES
14
- *
15
- * Finds relatives around a node.
16
- *
17
- * Syntax:
18
- *
19
- * {@relatives node="<nodeId>" associationType="<association_type>" limit="" skip="" as=""}
20
- * {+templateIdentifier/}
21
- * {/relatives}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.relatives = function(chunk, context, bodies, params)
29
- {
30
- return engine.handleRelatives(chunk, context, bodies, params);
31
- };
32
-
33
- callback();
34
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * @search
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
-
12
- /**
13
- * SEARCH
14
- *
15
- * Runs a search and passes the rows to a rendering template.
16
- *
17
- * Syntax:
18
- *
19
- * {@search sort="title" scope="page" text="something" limit="" skip="" as=""}
20
- * {+templateIdentifier/}
21
- * {/search}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.search = function(chunk, context, bodies, params)
29
- {
30
- return engine.handleSearch(chunk, context, bodies, params, false);
31
- };
32
-
33
- callback();
34
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * @searchOne
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
-
12
- /**
13
- * SEARCH
14
- *
15
- * Runs a search and keeps one of the result items. Passes the result to the rendering template.
16
- *
17
- * Syntax:
18
- *
19
- * {@searchOne sort="title" scope="page" text="something" limit="" skip="" as=""}
20
- * {+templateIdentifier/}
21
- * {/searchOne}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.searchOne = function(chunk, context, bodies, params)
29
- {
30
- return engine.handleSearch(chunk, context, bodies, params, true);
31
- };
32
-
33
- callback();
34
- };
@@ -1,83 +0,0 @@
1
- var tracker = require("../../../../tracker");
2
-
3
- /**
4
- * @dependency
5
- *
6
- * @param app
7
- * @param dust
8
- * @param callback
9
- */
10
- module.exports = function(app, dust, callback)
11
- {
12
- var support = require("../../../../support")(dust);
13
- var map = support.map;
14
- var end = support.end;
15
-
16
- /**
17
- * Flags a dependency for a page.
18
- *
19
- * There are two types of dependencies - "produces" and "requires".
20
- *
21
- * "Produces" means that the HTML output of the page contains data from one or more dependencies. These dependencies
22
- * are identified by IDs and are usually Node IDs. If the page shows an attachment from a Node, it should be flagged
23
- * as having a "produces" dependency with that Node's ID. If it shows article text in any way, the article's Node
24
- * ID should be marked as a "produces" dependency.
25
- *
26
- * "Requires" means that the cached HTML can only be served if the requirement is met. The "requires" dependencies
27
- * may only consist of request-time state that is known *before* the Dust processor begins to run. That way, the
28
- * Dust processor can elect to use the cache state instead of executing the page. The "requires" dependencies
29
- * are usually request information (url, parameters, locale) or user information (user's name, id) but may also
30
- * consist of information that is acquired by Express middleware that runs ahead of WCM (which usually runs toward
31
- * the end).
32
- *
33
- * If "type" is not specified, it is assumed to be "produces".
34
- *
35
- * Syntax:
36
- *
37
- * {@dependency type="produces" key="{key}" value="{value}"}
38
- * {+templateIdentifier/}
39
- * {/dependency}
40
- *
41
- * {@dependency type="requires" key="{key}" value="{value}"}
42
- * {+templateIdentifier/}
43
- * {/dependency}
44
- *
45
- * @param chunk
46
- * @param context
47
- * @param bodies
48
- * @param params
49
- */
50
- dust.helpers.dependency = function(chunk, context, bodies, params)
51
- {
52
- var type = context.resolve(params.type);
53
- var key = context.resolve(params.key);
54
- var value = context.resolve(params.value);
55
-
56
- return map(chunk, function(chunk2) {
57
-
58
- // TRACKER: START
59
- tracker.start(context);
60
-
61
- if (!type || type === "produces" || type === "produce" || type === "p") {
62
-
63
- // TRACKER - PRODUCES "key" = "value"
64
- tracker.produces(context, key, value);
65
-
66
- }
67
- else if (type === "requires" || type === "require" || type === "r") {
68
-
69
- // TRACKER - REQUIRES "key" = "value"
70
- tracker.requires(context, key, value);
71
-
72
- }
73
- else {
74
- console.log("Unknown type for @dependency tag: " + type);
75
- }
76
-
77
- // render whatever is inside the tag and keep going
78
- return chunk2.render( bodies.block, context );
79
- });
80
- };
81
-
82
- callback();
83
- };
@@ -1,34 +0,0 @@
1
- /**
2
- * @fragment
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../../engine")(app, dust);
11
-
12
- /**
13
- * FRAGMENT
14
- *
15
- * Declares a cacheable fragment.
16
- *
17
- * Syntax:
18
- *
19
- * {@fragment}
20
- * ...inner body
21
- * {/fragment}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.fragment = function(chunk, context, bodies, params)
29
- {
30
- return engine.handleFragment(chunk, context, bodies, params);
31
- };
32
-
33
- callback();
34
- };
@@ -1,42 +0,0 @@
1
- /**
2
- * @debug
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
- var map = engine.map;
12
- var end = engine.end;
13
-
14
- /**
15
- * Shows debug information about the current context
16
- *
17
- * Syntax:
18
- *
19
- * {@debug/}
20
- *
21
- * @param chunk
22
- * @param context
23
- * @param bodies
24
- * @param params
25
- */
26
- dust.helpers.debug = function(chunk, context, bodies, params)
27
- {
28
- //params = params || {};
29
-
30
- return map(chunk, function(chunk) {
31
-
32
- var json = JSON.stringify(context.stack.head, null, " ");
33
- var html = "<textarea>" + json + "</textarea>";
34
- chunk.write(html);
35
-
36
- end(chunk, context);
37
- });
38
- };
39
-
40
-
41
- callback();
42
- };
@@ -1,49 +0,0 @@
1
- var path = require("path");
2
-
3
- /**
4
- * @layout
5
- *
6
- * @param app
7
- * @param dust
8
- * @param callback
9
- */
10
- module.exports = function(app, dust, callback)
11
- {
12
- var engine = require("../engine")(app, dust);
13
- var map = engine.map;
14
- var end = engine.end;
15
-
16
- /**
17
- * INCLUDE BLOCK
18
- *
19
- * Includes a block dust template into this one and passes any context forward.
20
- *
21
- * Syntax:
22
- *
23
- * {@block path="path" ...args/}
24
- *
25
- * @param chunk
26
- * @param context
27
- * @param bodies
28
- * @param params
29
- */
30
- dust.helpers.block = function(chunk, context, bodies, params)
31
- {
32
- params = params || {};
33
-
34
- var targetPath = context.resolve(params.path);
35
-
36
- if (targetPath.indexOf("/blocks") === 0)
37
- {
38
- // we're ok
39
- }
40
- else
41
- {
42
- targetPath = path.join("/blocks", targetPath);
43
- }
44
-
45
- return engine.handleInclude(chunk, context, bodies, params, targetPath);
46
- };
47
-
48
- callback();
49
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * @include
3
- *
4
- * @param app
5
- * @param dust
6
- * @param callback
7
- */
8
- module.exports = function(app, dust, callback)
9
- {
10
- var engine = require("../engine")(app, dust);
11
- var map = engine.map;
12
- var end = engine.end;
13
-
14
- /**
15
- * INCLUDE
16
- *
17
- * Includes another dust template into this one and passes any context forward.
18
- *
19
- * Syntax:
20
- *
21
- * {@include path="../template.html" ...args/}
22
- *
23
- * @param chunk
24
- * @param context
25
- * @param bodies
26
- * @param params
27
- */
28
- dust.helpers.include = function(chunk, context, bodies, params)
29
- {
30
- params = params || {};
31
-
32
- var targetPath = context.resolve(params.path);
33
-
34
- return engine.handleInclude(chunk, context, bodies, params, targetPath);
35
- };
36
-
37
- callback();
38
- };
@@ -1,49 +0,0 @@
1
- var path = require("path");
2
-
3
- /**
4
- * @layout
5
- *
6
- * @param app
7
- * @param dust
8
- * @param callback
9
- */
10
- module.exports = function(app, dust, callback)
11
- {
12
- var engine = require("../engine")(app, dust);
13
- var map = engine.map;
14
- var end = engine.end;
15
-
16
- /**
17
- * INCLUDE LAYOUT
18
- *
19
- * Includes a layout dust template into this one and passes any context forward.
20
- *
21
- * Syntax:
22
- *
23
- * {@layout path="path" ...args/}
24
- *
25
- * @param chunk
26
- * @param context
27
- * @param bodies
28
- * @param params
29
- */
30
- dust.helpers.layout = function(chunk, context, bodies, params)
31
- {
32
- params = params || {};
33
-
34
- var targetPath = context.resolve(params.path);
35
-
36
- if (targetPath.indexOf("/layouts") === 0)
37
- {
38
- // we're ok
39
- }
40
- else
41
- {
42
- targetPath = path.join("/layouts", targetPath);
43
- }
44
-
45
- return engine.handleInclude(chunk, context, bodies, params, targetPath);
46
- };
47
-
48
- callback();
49
- };