cloudcms-server 3.3.1-beta.9 → 4.0.0-beta.2

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 (108) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/broadcast/broadcast.js +6 -3
  4. package/broadcast/providers/redis.js +24 -49
  5. package/clients/nrp.js +117 -0
  6. package/clients/redis.js +64 -0
  7. package/d1/index.js +629 -0
  8. package/d1/index.js.works +203 -0
  9. package/d1/package.json +86 -0
  10. package/d1/package.json.works +14 -0
  11. package/duster/helpers/sample/nyt.js +2 -1
  12. package/framework/controllers.js +4 -4
  13. package/index.js +21 -14
  14. package/insight/insight.js +1 -1
  15. package/launchpad/index.js +203 -11
  16. package/launchpad/launchers/cluster.js +103 -110
  17. package/launchpad/launchers/redis.js +70 -0
  18. package/launchpad/launchers/single.js +36 -22
  19. package/locks/locks.js +63 -9
  20. package/locks/providers/cluster.js +3 -1
  21. package/locks/providers/memory.js +10 -7
  22. package/locks/providers/redis.js +62 -82
  23. package/middleware/admin/admin.js +3 -3
  24. package/middleware/authentication/adapters/session.js +11 -8
  25. package/middleware/authentication/authentication.js +28 -16
  26. package/middleware/authentication/authenticators/default.js +5 -2
  27. package/middleware/authentication/authenticators/session.js +5 -2
  28. package/middleware/authentication/providers/saml.js +1 -1
  29. package/middleware/authorization/authorization.js +11 -8
  30. package/middleware/awareness/awareness.js +55 -31
  31. package/middleware/awareness/plugins/editorial.js +4 -4
  32. package/middleware/awareness/providers/abstract-async.js +107 -84
  33. package/middleware/awareness/providers/abstract.js +1 -1
  34. package/middleware/awareness/providers/memory.js +0 -14
  35. package/middleware/awareness/providers/redis.js +186 -279
  36. package/middleware/cache/cache.js +4 -2
  37. package/middleware/cache/providers/redis.js +127 -89
  38. package/middleware/cache/providers/shared-memory.js +3 -3
  39. package/middleware/cloudcms/cloudcms.js +22 -16
  40. package/middleware/form/form.js +3 -3
  41. package/middleware/modules/modules.js +6 -3
  42. package/middleware/proxy/proxy.js +8 -21
  43. package/middleware/stores/stores.js +2 -2
  44. package/middleware/virtual-config/virtual-config.js +11 -8
  45. package/middleware/wcm/wcm.js +4 -4
  46. package/notifications/notifications.js +2 -2
  47. package/package.json +29 -25
  48. package/server/index.js +504 -415
  49. package/server/standalone.js +9 -0
  50. package/temp/clusterlock/index.js +3 -3
  51. package/temp/clusterlock/package.json +1 -1
  52. package/temp/passport-saml/LICENSE +23 -0
  53. package/temp/passport-saml/README.md +406 -0
  54. package/temp/passport-saml/lib/node-saml/algorithms.d.ts +5 -0
  55. package/temp/passport-saml/lib/node-saml/algorithms.js +41 -0
  56. package/temp/passport-saml/lib/node-saml/algorithms.js.map +1 -0
  57. package/temp/passport-saml/lib/node-saml/index.d.ts +3 -0
  58. package/temp/passport-saml/lib/node-saml/index.js +6 -0
  59. package/temp/passport-saml/lib/node-saml/index.js.map +1 -0
  60. package/temp/passport-saml/lib/node-saml/inmemory-cache-provider.d.ts +45 -0
  61. package/temp/passport-saml/lib/node-saml/inmemory-cache-provider.js +86 -0
  62. package/temp/passport-saml/lib/node-saml/inmemory-cache-provider.js.map +1 -0
  63. package/temp/passport-saml/lib/node-saml/saml-post-signing.d.ts +3 -0
  64. package/temp/passport-saml/lib/node-saml/saml-post-signing.js +15 -0
  65. package/temp/passport-saml/lib/node-saml/saml-post-signing.js.map +1 -0
  66. package/temp/passport-saml/lib/node-saml/saml.d.ts +77 -0
  67. package/temp/passport-saml/lib/node-saml/saml.js +1170 -0
  68. package/temp/passport-saml/lib/node-saml/saml.js.map +1 -0
  69. package/temp/passport-saml/lib/node-saml/types.d.ts +95 -0
  70. package/temp/passport-saml/lib/node-saml/types.js +8 -0
  71. package/temp/passport-saml/lib/node-saml/types.js.map +1 -0
  72. package/temp/passport-saml/lib/node-saml/utility.d.ts +3 -0
  73. package/temp/passport-saml/lib/node-saml/utility.js +19 -0
  74. package/temp/passport-saml/lib/node-saml/utility.js.map +1 -0
  75. package/temp/passport-saml/lib/node-saml/xml.d.ts +21 -0
  76. package/temp/passport-saml/lib/node-saml/xml.js +140 -0
  77. package/temp/passport-saml/lib/node-saml/xml.js.map +1 -0
  78. package/temp/passport-saml/lib/passport-saml/index.d.ts +6 -0
  79. package/temp/passport-saml/lib/passport-saml/index.js +11 -0
  80. package/temp/passport-saml/lib/passport-saml/index.js.map +1 -0
  81. package/temp/passport-saml/lib/passport-saml/multiSamlStrategy.d.ts +13 -0
  82. package/temp/passport-saml/lib/passport-saml/multiSamlStrategy.js +63 -0
  83. package/temp/passport-saml/lib/passport-saml/multiSamlStrategy.js.map +1 -0
  84. package/temp/passport-saml/lib/passport-saml/strategy.d.ts +20 -0
  85. package/temp/passport-saml/lib/passport-saml/strategy.js +167 -0
  86. package/temp/passport-saml/lib/passport-saml/strategy.js.map +1 -0
  87. package/temp/passport-saml/lib/passport-saml/types.d.ts +51 -0
  88. package/temp/passport-saml/lib/passport-saml/types.js +11 -0
  89. package/temp/passport-saml/lib/passport-saml/types.js.map +1 -0
  90. package/temp/passport-saml/package.json +96 -0
  91. package/util/auth.js +6 -6
  92. package/util/cloudcms.js +106 -118
  93. package/util/proxy-factory.js +159 -268
  94. package/util/redis.js +113 -0
  95. package/util/renditions.js +12 -6
  96. package/util/request.js +12 -6
  97. package/util/util.js +16 -2
  98. package/launchpad/launchers/sticky-cluster.js +0 -43
  99. package/temp/memored/.jshintrc +0 -4
  100. package/temp/memored/README.md +0 -240
  101. package/temp/memored/demo/demo1.js +0 -37
  102. package/temp/memored/demo/demo2.js +0 -32
  103. package/temp/memored/gulpfile.js +0 -8
  104. package/temp/memored/index.js +0 -343
  105. package/temp/memored/package.json +0 -54
  106. package/temp/memored/spec/memored.spec.js +0 -265
  107. package/web/cms/ice.js +0 -109
  108. package/web/cms/preview.js +0 -106
package/web/cms/ice.js DELETED
@@ -1,109 +0,0 @@
1
- /*
2
- $(document).ready(function() {
3
-
4
- // bring up in-context menu with SHIFT, SHIFT, SHIFT combination
5
- var SHIFT = 16;
6
- var sequence = [ SHIFT, SHIFT, SHIFT ];
7
- var sequenceIndex = 0;
8
- $(document).keyup(function(event)
9
- {
10
- if (event.keyCode == sequence[sequenceIndex]) {
11
- sequenceIndex++;
12
-
13
- if (sequenceIndex == sequence.length) {
14
- sequenceIndex = 0;
15
-
16
- popupAuthorDialog();
17
- return true;
18
- }
19
-
20
- } else {
21
- sequenceIndex = 0;
22
- }
23
-
24
- return false;
25
- });
26
-
27
- var popupAuthorDialog = function()
28
- {
29
- var authorDialog = $("#authorDialog");
30
-
31
- if ($(authorDialog).length == 0)
32
- {
33
- var html = '<div data-role="dialog" id="authorDialog" > \
34
- <div data-role="header"><h3>What would you like to do?</h3></div> \
35
- <div data-role="content"> \
36
- <ul data-role="listview" data-inset="true" style="min-width:210px;" data-theme="a"> \
37
- <li><a href="#" class="invalidate-cache" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Invalidate Cache</a></li> \
38
- <li><a href="#" class="edit-mobile-project" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Edit Mobile Project</a></li> \
39
- <li><a href="#" class="edit-page" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Edit this Page</a></li> \
40
- <li><a href="#" class="switch-branch" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Switch Branches</a></li> \
41
- </ul> \
42
- </div> \
43
- </div> \
44
- ';
45
-
46
- authorDialog = $(html);
47
-
48
- $(authorDialog).find(".invalidate-cache").click(function() {
49
- $(authorDialog).dialog('close');
50
- var location = window.location.href;
51
- var x = location.indexOf("#");
52
- if (x > -1 && location.indexOf("?invalidate") == -1)
53
- {
54
- location = location.substring(0, x) + "?invalidate=true" + location.substring(x);
55
- }
56
- var y = location.indexOf("&ui-state=dialog");
57
- if (y > -1)
58
- {
59
- location = location.substring(0, y) + location.substring(y + 16);
60
- }
61
- window.location.href = location;
62
- });
63
- $(authorDialog).find(".edit-page").click(function() {
64
- $(authorDialog).dialog('close');
65
- });
66
- $(authorDialog).find(".switch-branch").click(function() {
67
- $(authorDialog).dialog('close');
68
- popupBranchSelectionDialog();
69
- });
70
- $(authorDialog).find(".edit-mobile-project").click(function() {
71
- $(authorDialog).dialog('close');
72
- window.open("http://demo.cloudcms.net/console/#/repositories/d2039858cca205b23b7b/branches/b1dbc57b64c2426da244/folders/821c40ab613d9b5bcbbc656b62229301");
73
- });
74
-
75
- $(authorDialog).appendTo($.mobile.pageContainer);
76
- }
77
-
78
- $.mobile.changePage(authorDialog,{'transition':'pop'});
79
- };
80
-
81
- var popupBranchSelectionDialog = function()
82
- {
83
- var branchSelectionDialog = $("#branchSelectionDialog");
84
-
85
- if ($(branchSelectionDialog).length == 0)
86
- {
87
- var html = ' \
88
- <div data-role="dialog" id="branchSelectionDialog" > \
89
- <div data-role="header"><h3>Select a Branch</h3></div> \
90
- <div data-role="content"> \
91
- <ul data-role="listview" data-inset="true" style="min-width:210px;" data-theme="a"> \
92
- <li><a href="#" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Master</a></li> \
93
- <li><a href="#" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Sandbox 1</a></li> \
94
- <li><a href="#" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Test Branch</a></li> \
95
- </ul> \
96
- </div> \
97
- </div> \
98
- ';
99
-
100
- branchSelectionDialog = $(html);
101
-
102
- $(branchSelectionDialog).appendTo($.mobile.pageContainer);
103
- }
104
-
105
- $.mobile.changePage(branchSelectionDialog,{'transition':'pop'});
106
- };
107
-
108
- });
109
- */
@@ -1,106 +0,0 @@
1
- if (typeof($) !== "undefined")
2
- {
3
- // only do this code injection if we're running in a preview frame
4
- if (parent.cmsPostMessage)
5
- {
6
- (function() {
7
-
8
- var collectFields = function(el, array)
9
- {
10
- // look for any elements with special markup
11
- $(el).find("[data-field-id]").each(function() {
12
-
13
- var contentFieldId = $(this).attr("data-field-id");
14
-
15
- // content type
16
- var contentFieldType = $(this).attr("data-field-type");
17
- if (!contentFieldType) {
18
- contentFieldType = "string";
19
- }
20
-
21
- var contentField = {
22
- "id": contentFieldId,
23
- "type": contentFieldType
24
- };
25
-
26
- // value
27
- var contentFieldValue = $(this).attr("data-field-value");
28
- if (!contentFieldValue) {
29
- // pull html value for certain tags
30
- if (["p", "div", "span", "textarea"].indexOf($(this)[0].nodeName.toLowerCase()) > -1) {
31
- contentFieldValue = $(this).html();
32
- }
33
- // pull value for form tags
34
- if (["input"].indexOf($(this)[0].nodeName.toLowerCase()) > -1) {
35
- contentFieldValue = $(this).val();
36
- }
37
- }
38
- if (contentFieldValue) {
39
- if (typeof(contentFieldValue) == "string") {
40
- contentFieldValue = $.trim(contentFieldValue);
41
- }
42
- contentField.value = contentFieldValue;
43
- }
44
-
45
- // title
46
- var contentFieldTitle = $(this).attr("data-field-title");
47
- if (contentFieldTitle) {
48
- contentField.title = contentFieldTitle;
49
- }
50
-
51
- array.push(contentField);
52
- });
53
- };
54
-
55
- var handle = function(allElement, currentElement)
56
- {
57
- var payload = {
58
- "type": "fields",
59
- "data": {
60
- "pathname": window.location.pathname,
61
- "hash": window.location.hash,
62
- "search": window.location.search,
63
- "href": window.location.href,
64
- "allFields": [],
65
- "currentFields": []
66
- }
67
- };
68
-
69
- // collect all + current fields
70
- collectFields(allElement, payload.data.allFields);
71
- collectFields(currentElement, payload.data.currentFields);
72
-
73
- // send field information to preview server
74
- parent.cmsPostMessage(payload);
75
- };
76
-
77
- // if we're running in jQuery mobile, we attach to the "pageshow" method
78
- if ($.mobile)
79
- {
80
- // tell jquery mobile to update preview location whenever the page changes
81
- $(document).bind('pageshow', function(event) {
82
-
83
- // the whole body
84
- var allElement = $(document.body);
85
-
86
- // the current element
87
- // the "page show" event yields the selected dom element (for single page 'multi-page' apps)
88
- var currentElement = $(event.target);
89
- handle(allElement, currentElement);
90
- });
91
- }
92
- else
93
- {
94
- // bind to document ready
95
- $(document).ready(function() {
96
-
97
- // we use the document body for both
98
- var allElement = $(document.body);
99
- handle(allElement, allElement);
100
-
101
- });
102
- }
103
-
104
- })();
105
- }
106
- }