alchemymvc 1.3.21 → 1.4.0-alpha.1

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 (155) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -3
  3. package/lib/app/behaviour/publishable_behaviour.js +5 -5
  4. package/lib/app/behaviour/revision_behaviour.js +10 -10
  5. package/lib/app/behaviour/sluggable_behaviour.js +14 -14
  6. package/lib/app/conduit/electron_conduit.js +9 -9
  7. package/lib/app/conduit/http_conduit.js +13 -13
  8. package/lib/app/conduit/loopback_conduit.js +15 -15
  9. package/lib/app/conduit/socket_conduit.js +43 -43
  10. package/lib/app/config/routes.js +26 -0
  11. package/lib/app/controller/00-default_app_controller.js +21 -0
  12. package/lib/app/controller/alchemy_info_controller.js +12 -12
  13. package/lib/app/datasource/mongo_datasource.js +16 -16
  14. package/lib/app/element/00-default_app_element.js +19 -0
  15. package/lib/app/element/time_ago.js +5 -5
  16. package/lib/app/helper/00-default_app_helper.js +11 -0
  17. package/lib/app/helper/alchemy_helper.js +22 -22
  18. package/lib/app/helper/backed_map.js +1 -1
  19. package/lib/app/helper/breadcrumb.js +10 -10
  20. package/lib/app/helper/client_collection.js +3 -3
  21. package/lib/app/helper/cron.js +29 -29
  22. package/lib/app/helper/enum_values.js +6 -6
  23. package/lib/app/helper/pagination_helper.js +36 -36
  24. package/lib/app/helper/router_helper.js +35 -35
  25. package/lib/app/helper/socket_helper.js +57 -57
  26. package/lib/app/helper/syncable.js +84 -59
  27. package/lib/app/helper_component/paginate_component.js +9 -9
  28. package/lib/app/helper_controller/component.js +1 -1
  29. package/lib/app/helper_controller/conduit.js +31 -31
  30. package/lib/app/helper_controller/controller.js +54 -39
  31. package/lib/app/helper_datasource/00-nosql_datasource.js +624 -70
  32. package/lib/app/helper_datasource/05-fallback_datasource.js +10 -10
  33. package/lib/app/helper_datasource/idb_datasource.js +6 -6
  34. package/lib/app/helper_datasource/indexed_db.js +22 -22
  35. package/lib/app/helper_datasource/remote_datasource.js +5 -5
  36. package/lib/app/helper_error/http_error.js +4 -4
  37. package/lib/app/helper_error/model_error.js +2 -2
  38. package/lib/app/helper_error/validation_error.js +12 -12
  39. package/lib/app/helper_field/00-objectid_field.js +7 -7
  40. package/lib/app/helper_field/05-string_field.js +16 -12
  41. package/lib/app/helper_field/06-text_field.js +2 -4
  42. package/lib/app/helper_field/10-number_field.js +9 -12
  43. package/lib/app/helper_field/11-date_field.js +15 -15
  44. package/lib/app/helper_field/15-local_temporal_field.js +10 -10
  45. package/lib/app/helper_field/20-decimal_field.js +8 -9
  46. package/lib/app/helper_field/belongsto_field.js +1 -1
  47. package/lib/app/helper_field/big_int_field.js +8 -8
  48. package/lib/app/helper_field/boolean_field.js +9 -11
  49. package/lib/app/helper_field/datetime_field.js +3 -3
  50. package/lib/app/helper_field/enum_field.js +13 -8
  51. package/lib/app/helper_field/fixed_decimal_field.js +6 -7
  52. package/lib/app/helper_field/geopoint_field.js +9 -10
  53. package/lib/app/helper_field/habtm_field.js +3 -3
  54. package/lib/app/helper_field/hasoneparent_field.js +1 -1
  55. package/lib/app/helper_field/html_field.js +2 -4
  56. package/lib/app/helper_field/integer_field.js +8 -11
  57. package/lib/app/helper_field/local_date_field.js +5 -5
  58. package/lib/app/helper_field/local_date_time_field.js +5 -5
  59. package/lib/app/helper_field/local_time_field.js +5 -5
  60. package/lib/app/helper_field/mixed_field.js +5 -5
  61. package/lib/app/helper_field/object_field.js +8 -8
  62. package/lib/app/helper_field/password_field.js +3 -3
  63. package/lib/app/helper_field/regexp_field.js +7 -9
  64. package/lib/app/helper_field/schema_field.js +91 -88
  65. package/lib/app/helper_field/settings_field.js +92 -0
  66. package/lib/app/helper_field/time_field.js +6 -6
  67. package/lib/app/helper_field/url_field.js +2 -4
  68. package/lib/app/helper_model/00-base_criteria.js +662 -0
  69. package/lib/app/helper_model/05-criteria_expressions.js +605 -0
  70. package/lib/app/helper_model/10-model_criteria.js +1182 -0
  71. package/lib/app/helper_model/data_provider.js +2 -2
  72. package/lib/app/helper_model/document.js +103 -92
  73. package/lib/app/helper_model/document_list.js +14 -14
  74. package/lib/app/helper_model/field_config.js +11 -11
  75. package/lib/app/helper_model/field_set.js +17 -17
  76. package/lib/app/helper_model/model.js +203 -124
  77. package/lib/app/helper_model/remote_data_provider.js +2 -2
  78. package/lib/app/helper_validator/00_validator.js +16 -16
  79. package/lib/app/helper_validator/not_empty_validator.js +9 -9
  80. package/lib/app/model/00-default_app_model.js +18 -0
  81. package/lib/app/model/05-system_model.js +27 -0
  82. package/lib/app/model/{alchemy_migration_model.js → system_migration_model.js} +4 -4
  83. package/lib/app/model/system_setting_model.js +154 -0
  84. package/lib/app/model/{alchemy_task_history_model.js → system_task_history_model.js} +7 -7
  85. package/lib/app/model/{alchemy_task_model.js → system_task_model.js} +11 -11
  86. package/lib/bootstrap.js +22 -312
  87. package/lib/class/accumulator.js +5 -5
  88. package/lib/class/behaviour.js +5 -5
  89. package/lib/class/component.js +3 -3
  90. package/lib/class/conduit.js +203 -163
  91. package/lib/class/controller.js +42 -42
  92. package/lib/class/datasource.js +74 -79
  93. package/lib/class/document.js +74 -95
  94. package/lib/class/document_list.js +5 -5
  95. package/lib/class/element.js +17 -17
  96. package/lib/class/error.js +3 -3
  97. package/lib/class/field.js +169 -91
  98. package/lib/class/field_value.js +6 -6
  99. package/lib/class/helper.js +3 -3
  100. package/lib/class/inode.js +17 -17
  101. package/lib/class/inode_dir.js +12 -12
  102. package/lib/class/inode_file.js +50 -25
  103. package/lib/class/inode_list.js +4 -4
  104. package/lib/class/migration.js +4 -4
  105. package/lib/class/model.js +182 -168
  106. package/lib/class/path_definition.js +22 -22
  107. package/lib/class/path_evaluator.js +5 -5
  108. package/lib/class/path_param_definition.js +7 -7
  109. package/lib/class/plugin.js +312 -0
  110. package/lib/class/postponement.js +29 -29
  111. package/lib/class/reciprocal.js +8 -8
  112. package/lib/class/route.js +33 -33
  113. package/lib/class/router.js +73 -73
  114. package/lib/class/schema.js +21 -21
  115. package/lib/class/schema_client.js +73 -67
  116. package/lib/class/session.js +63 -29
  117. package/lib/class/session_scene.js +4 -4
  118. package/lib/class/sitemap.js +16 -16
  119. package/lib/class/task.js +39 -39
  120. package/lib/class/task_service.js +43 -47
  121. package/lib/{init → core}/alchemy.js +413 -374
  122. package/lib/{init/functions.js → core/alchemy_functions.js} +171 -108
  123. package/lib/core/alchemy_load_functions.js +715 -0
  124. package/lib/core/base.js +50 -62
  125. package/lib/core/client_alchemy.js +144 -152
  126. package/lib/core/client_base.js +39 -52
  127. package/lib/core/discovery.js +16 -18
  128. package/lib/core/middleware.js +54 -43
  129. package/lib/core/{routing.js → prefix.js} +14 -16
  130. package/lib/core/setting.js +1684 -0
  131. package/lib/core/stage.js +758 -0
  132. package/lib/scripts/create_constants.js +119 -0
  133. package/lib/{init/languages.js → scripts/create_languages.js} +5 -5
  134. package/lib/scripts/create_settings.js +449 -0
  135. package/lib/scripts/create_shared_constants.js +95 -0
  136. package/lib/scripts/create_stages.js +55 -0
  137. package/lib/scripts/init_alchemy.js +51 -0
  138. package/lib/{init/requirements.js → scripts/preload_modules.js} +15 -2
  139. package/lib/scripts/setup_devwatch.js +238 -0
  140. package/lib/stages/00-load_core.js +342 -0
  141. package/lib/stages/05-load_app.js +57 -0
  142. package/lib/stages/10-datasource.js +61 -0
  143. package/lib/stages/15-tasks.js +27 -0
  144. package/lib/stages/20-settings.js +68 -0
  145. package/lib/stages/50-routes.js +218 -0
  146. package/lib/stages/90-server.js +347 -0
  147. package/package.json +5 -7
  148. package/lib/app/helper_model/criteria.js +0 -2294
  149. package/lib/app/helper_model/db_query.js +0 -1488
  150. package/lib/app/routes.js +0 -11
  151. package/lib/core/socket.js +0 -171
  152. package/lib/init/constants.js +0 -158
  153. package/lib/init/devwatch.js +0 -238
  154. package/lib/init/load_functions.js +0 -973
  155. package/lib/stages.js +0 -513
@@ -10,7 +10,7 @@ var Url = alchemy.use('url'),
10
10
  /**
11
11
  * The Router Singleton
12
12
  *
13
- * @author Jelle De Loecker <jelle@develry.be>
13
+ * @author Jelle De Loecker <jelle@elevenways.be>
14
14
  * @since 0.2.0
15
15
  * @version 1.2.5
16
16
  */
@@ -61,7 +61,7 @@ var RouterClass = Function.inherits('Alchemy.Base', function Router(name, mount,
61
61
  /**
62
62
  * Default route settings
63
63
  *
64
- * @author Jelle De Loecker <jelle@develry.be>
64
+ * @author Jelle De Loecker <jelle@elevenways.be>
65
65
  * @since 0.3.0
66
66
  * @version 0.3.0
67
67
  */
@@ -73,11 +73,11 @@ RouterClass.setProperty('default_route_settings', {
73
73
  /**
74
74
  * Add a required permission
75
75
  *
76
- * @author Jelle De Loecker <jelle@elevenways.be>
76
+ * @author Jelle De Loecker <jelle@elevenways.be>
77
77
  * @since 1.2.5
78
78
  * @version 1.2.5
79
79
  *
80
- * @param {String|String[]} permission
80
+ * @param {string|string[]} permission
81
81
  */
82
82
  RouterClass.setMethod(function requirePermission(permission) {
83
83
 
@@ -95,13 +95,13 @@ RouterClass.setMethod(function requirePermission(permission) {
95
95
  /**
96
96
  * Check the permission
97
97
  *
98
- * @author Jelle De Loecker <jelle@elevenways.be>
98
+ * @author Jelle De Loecker <jelle@elevenways.be>
99
99
  * @since 1.2.5
100
100
  * @version 1.2.5
101
101
  *
102
102
  * @param {Conduit} conduit
103
103
  *
104
- * @return {Boolean}
104
+ * @return {boolean}
105
105
  */
106
106
  RouterClass.setMethod(function checkPermission(conduit) {
107
107
 
@@ -133,7 +133,7 @@ RouterClass.setMethod(function checkPermission(conduit) {
133
133
  /**
134
134
  * Get the complete section identifier
135
135
  *
136
- * @author Jelle De Loecker <jelle@develry.be>
136
+ * @author Jelle De Loecker <jelle@elevenways.be>
137
137
  * @since 0.3.3
138
138
  * @version 0.3.3
139
139
  */
@@ -160,7 +160,7 @@ RouterClass.setMethod(function generateSectionIdentifier() {
160
160
  /**
161
161
  * Get and/or create a section
162
162
  *
163
- * @author Jelle De Loecker <jelle@develry.be>
163
+ * @author Jelle De Loecker <jelle@elevenways.be>
164
164
  * @since 0.2.0
165
165
  * @version 0.2.0
166
166
  */
@@ -187,7 +187,7 @@ RouterClass.setMethod(function section(name, mount) {
187
187
  /**
188
188
  * Capture vhost requests in the header with the given prefix
189
189
  *
190
- * @author Jelle De Loecker <jelle@develry.be>
190
+ * @author Jelle De Loecker <jelle@elevenways.be>
191
191
  * @since 0.2.0
192
192
  * @version 0.2.0
193
193
  */
@@ -198,7 +198,7 @@ RouterClass.setMethod(function headerBypass(prefix) {
198
198
  /**
199
199
  * Get the full mount path of this router
200
200
  *
201
- * @author Jelle De Loecker <jelle@develry.be>
201
+ * @author Jelle De Loecker <jelle@elevenways.be>
202
202
  * @since 0.3.0
203
203
  * @version 0.3.0
204
204
  */
@@ -221,7 +221,7 @@ RouterClass.setMethod(function getFullMount() {
221
221
  /**
222
222
  * Get the prefix (locale)
223
223
  *
224
- * @author Jelle De Loecker <jelle@develry.be>
224
+ * @author Jelle De Loecker <jelle@elevenways.be>
225
225
  * @since 0.2.0
226
226
  * @version 0.2.0
227
227
  */
@@ -247,11 +247,11 @@ RouterClass.setMethod(function getPrefix(path) {
247
247
  /**
248
248
  * Get the section of the path
249
249
  *
250
- * @author Jelle De Loecker <jelle@develry.be>
250
+ * @author Jelle De Loecker <jelle@elevenways.be>
251
251
  * @since 0.2.0
252
252
  * @version 1.0.0
253
253
  *
254
- * @param {String} path The path without prefix
254
+ * @param {string} path The path without prefix
255
255
  *
256
256
  * @return {Router}
257
257
  */
@@ -281,11 +281,11 @@ RouterClass.setMethod(function getPathSection(path) {
281
281
  /**
282
282
  * Get a route by breadcrumb pattern
283
283
  *
284
- * @author Jelle De Loecker <jelle@develry.be>
284
+ * @author Jelle De Loecker <jelle@elevenways.be>
285
285
  * @since 0.3.0
286
286
  * @version 0.3.0
287
287
  *
288
- * @param {String} breadcrumb_pattern
288
+ * @param {string} breadcrumb_pattern
289
289
  *
290
290
  * @return {Alchemy.Route}
291
291
  */
@@ -319,11 +319,11 @@ RouterClass.setMethod(function getRouteByBreadcrumb(breadcrumb_pattern) {
319
319
  /**
320
320
  * Get breadcrumb info by pattern
321
321
  *
322
- * @author Jelle De Loecker <jelle@develry.be>
322
+ * @author Jelle De Loecker <jelle@elevenways.be>
323
323
  * @since 0.3.0
324
324
  * @version 0.3.0
325
325
  *
326
- * @param {String} breadcrumb_pattern
326
+ * @param {string} breadcrumb_pattern
327
327
  *
328
328
  * @return {Object}
329
329
  */
@@ -351,13 +351,13 @@ RouterClass.setMethod(function lookupBreadcrumbPath(breadcrumb_pattern) {
351
351
  /**
352
352
  * Get a route based on information inside the request
353
353
  *
354
- * @author Jelle De Loecker <jelle@develry.be>
354
+ * @author Jelle De Loecker <jelle@elevenways.be>
355
355
  * @since 1.1.0
356
356
  * @version 1.1.0
357
357
  *
358
358
  * @param {Conduit} conduit
359
- * @param {String} path The path without prefix (but WITH possible router mount)
360
- * @param {String} method
359
+ * @param {string} path The path without prefix (but WITH possible router mount)
360
+ * @param {string} method
361
361
  *
362
362
  * @return {Object}
363
363
  */
@@ -371,15 +371,15 @@ RouterClass.setMethod(function getRouteByPath(conduit, path, method) {
371
371
  /**
372
372
  * Get a route based on information inside the request
373
373
  *
374
- * @author Jelle De Loecker <jelle@develry.be>
374
+ * @author Jelle De Loecker <jelle@elevenways.be>
375
375
  * @since 0.2.0
376
376
  * @version 1.1.7
377
377
  *
378
378
  * @param {Conduit} conduit
379
- * @param {String|Array} methods
379
+ * @param {string|Array} methods
380
380
  * @param {Router} section
381
- * @param {String} path The path without prefix (but WITH possible router mount)
382
- * @param {String} prefix
381
+ * @param {string} path The path without prefix (but WITH possible router mount)
382
+ * @param {string} prefix
383
383
  * @param {Route} last_match If this is a rematch, skip everything before this
384
384
  *
385
385
  * @return {Object}
@@ -441,11 +441,11 @@ RouterClass.setMethod(async function getRouteBySectionPath(conduit, methods, sec
441
441
  /**
442
442
  * Return the route by the requested name
443
443
  *
444
- * @author Jelle De Loecker <jelle@develry.be>
444
+ * @author Jelle De Loecker <jelle@elevenways.be>
445
445
  * @since 0.2.0
446
446
  * @version 0.3.0
447
447
  *
448
- * @param {String} name The name of the route to get
448
+ * @param {string} name The name of the route to get
449
449
  *
450
450
  * @result {Route} The Route instance, or false
451
451
  */
@@ -485,14 +485,14 @@ RouterClass.setMethod(function getRouteByName(name) {
485
485
  /**
486
486
  * Get middleware routes
487
487
  *
488
- * @author Jelle De Loecker <jelle@develry.be>
488
+ * @author Jelle De Loecker <jelle@elevenways.be>
489
489
  * @since 0.2.0
490
490
  * @version 1.2.5
491
491
  *
492
492
  * @param {Conduit} conduit
493
493
  * @param {Router} section
494
- * @param {String} path The full requested path
495
- * @param {String} prefix
494
+ * @param {string} path The full requested path
495
+ * @param {string} prefix
496
496
  *
497
497
  * @return {Array}
498
498
  */
@@ -571,7 +571,7 @@ RouterClass.setMethod(async function getMiddleware(conduit, section, path, prefi
571
571
  /**
572
572
  * Resolve a request
573
573
  *
574
- * @author Jelle De Loecker <jelle@develry.be>
574
+ * @author Jelle De Loecker <jelle@elevenways.be>
575
575
  * @since 0.2.0
576
576
  * @version 1.1.3
577
577
  */
@@ -582,7 +582,7 @@ RouterClass.setMethod(function resolve(req, res) {
582
582
  /**
583
583
  * Resolve a request inside an electron app
584
584
  *
585
- * @author Jelle De Loecker <jelle@develry.be>
585
+ * @author Jelle De Loecker <jelle@elevenways.be>
586
586
  * @since 0.2.0
587
587
  * @version 1.1.3
588
588
  */
@@ -593,7 +593,7 @@ RouterClass.setMethod(function resolveElectron(request, callback) {
593
593
  /**
594
594
  * Add breadcrumb information
595
595
  *
596
- * @author Jelle De Loecker <jelle@develry.be>
596
+ * @author Jelle De Loecker <jelle@elevenways.be>
597
597
  * @since 0.3.0
598
598
  * @version 0.3.0
599
599
  */
@@ -627,11 +627,11 @@ RouterClass.setMethod(function addBreadcrumb(pattern, options) {
627
627
  /**
628
628
  * Add middleware
629
629
  *
630
- * @author Jelle De Loecker <jelle@develry.be>
630
+ * @author Jelle De Loecker <jelle@elevenways.be>
631
631
  * @since 0.2.0
632
632
  * @version 1.0.0
633
633
  *
634
- * @param {String} paths Optional path
634
+ * @param {string} paths Optional path
635
635
  * @param {Function} fnc The actual middleware function
636
636
  * @param {Object} options
637
637
  */
@@ -699,11 +699,11 @@ RouterClass.setMethod(function use(_paths, _fnc, _options) {
699
699
  /**
700
700
  * Serve the file of a dependency
701
701
  *
702
- * @author Jelle De Loecker <jelle@develry.be>
702
+ * @author Jelle De Loecker <jelle@elevenways.be>
703
703
  * @since 1.1.0
704
704
  * @version 1.3.0
705
705
  *
706
- * @param {String} module_name The name of the dependency
706
+ * @param {string} module_name The name of the dependency
707
707
  * @param {Object} options The options or single string
708
708
  */
709
709
  RouterClass.setMethod(function serveDependencyFile(module_name, options) {
@@ -751,11 +751,11 @@ RouterClass.setMethod(function serveDependencyFile(module_name, options) {
751
751
  /**
752
752
  * Set a custom option
753
753
  *
754
- * @author Jelle De Loecker <jelle@develry.be>
754
+ * @author Jelle De Loecker <jelle@elevenways.be>
755
755
  * @since 1.1.0
756
756
  * @version 1.1.0
757
757
  *
758
- * @param {String} key
758
+ * @param {string} key
759
759
  * @param {Mixed} value
760
760
  */
761
761
  RouterClass.setMethod(function setOption(name, value) {
@@ -765,17 +765,17 @@ RouterClass.setMethod(function setOption(name, value) {
765
765
  /**
766
766
  * Add a route
767
767
  *
768
- * @author Jelle De Loecker <jelle@elevenways.be>
768
+ * @author Jelle De Loecker <jelle@elevenways.be>
769
769
  * @since 0.2.0
770
770
  * @version 1.3.21
771
771
  *
772
772
  * @param {Object} args
773
- * @param {String} args.name Optional route name
773
+ * @param {string} args.name Optional route name
774
774
  * @param {Array} args.methods Supported HTTP methods
775
- * @param {Number} args.weight Importance of this route
776
- * @param {String} args.breadcrumb String used for breadcrumb
777
- * @param {String|Function} args.handler Route handler
778
- * @param {String|Object} args.paths The paths of this route
775
+ * @param {number} args.weight Importance of this route
776
+ * @param {string} args.breadcrumb String used for breadcrumb
777
+ * @param {string|Function} args.handler Route handler
778
+ * @param {string|Object} args.paths The paths of this route
779
779
  *
780
780
  * @return {Route}
781
781
  */
@@ -873,13 +873,13 @@ RouterClass.setMethod(function add(args) {
873
873
  /**
874
874
  * Add a route
875
875
  *
876
- * @author Jelle De Loecker <jelle@develry.be>
876
+ * @author Jelle De Loecker <jelle@elevenways.be>
877
877
  * @since 0.2.0
878
878
  * @version 0.3.0
879
879
  *
880
880
  * @param {Array} methods The methods to listen to (all)
881
- * @param {String} name The name of the path (timestamp)
882
- * @param {String|Object} paths Path to listen to
881
+ * @param {string} name The name of the path (timestamp)
882
+ * @param {string|Object} paths Path to listen to
883
883
  * @param {Function} fnc Optional function to handle route
884
884
  * @param {Object} options
885
885
  */
@@ -947,12 +947,12 @@ RouterClass.setMethod(function _add(_methods, _name, _paths, _fnc, _options) {
947
947
  /**
948
948
  * Add a get route
949
949
  *
950
- * @author Jelle De Loecker <jelle@develry.be>
950
+ * @author Jelle De Loecker <jelle@elevenways.be>
951
951
  * @since 0.2.0
952
952
  * @version 0.2.0
953
953
  *
954
- * @param {String} name The name of the path (timestamp)
955
- * @param {String|Object} paths Path to listen to
954
+ * @param {string} name The name of the path (timestamp)
955
+ * @param {string|Object} paths Path to listen to
956
956
  * @param {Function} fnc Optional function to handle route
957
957
  * @param {Object} options
958
958
  */
@@ -963,12 +963,12 @@ RouterClass.setMethod(function get(name, paths, fnc, options) {
963
963
  /**
964
964
  * Add a post route
965
965
  *
966
- * @author Jelle De Loecker <jelle@develry.be>
966
+ * @author Jelle De Loecker <jelle@elevenways.be>
967
967
  * @since 0.2.0
968
968
  * @version 0.2.0
969
969
  *
970
- * @param {String} name The name of the path (timestamp)
971
- * @param {String|Object} paths Path to listen to
970
+ * @param {string} name The name of the path (timestamp)
971
+ * @param {string|Object} paths Path to listen to
972
972
  * @param {Function} fnc Optional function to handle route
973
973
  * @param {Object} options
974
974
  */
@@ -979,12 +979,12 @@ RouterClass.setMethod(function post(name, paths, fnc, options) {
979
979
  /**
980
980
  * Add a put route
981
981
  *
982
- * @author Jelle De Loecker <jelle@develry.be>
982
+ * @author Jelle De Loecker <jelle@elevenways.be>
983
983
  * @since 0.2.0
984
984
  * @version 0.2.0
985
985
  *
986
- * @param {String} name The name of the path (timestamp)
987
- * @param {String|Object} paths Path to listen to
986
+ * @param {string} name The name of the path (timestamp)
987
+ * @param {string|Object} paths Path to listen to
988
988
  * @param {Function} fnc Optional function to handle route
989
989
  * @param {Object} options
990
990
  */
@@ -995,11 +995,11 @@ RouterClass.setMethod(function put(name, paths, fnc, options) {
995
995
  /**
996
996
  * Add a socket route
997
997
  *
998
- * @author Jelle De Loecker <jelle@develry.be>
998
+ * @author Jelle De Loecker <jelle@elevenways.be>
999
999
  * @since 0.2.0
1000
1000
  * @version 0.2.0
1001
1001
  *
1002
- * @param {String} name The name of the socket event
1002
+ * @param {string} name The name of the socket event
1003
1003
  * @param {Function} action The action, as a string or function
1004
1004
  */
1005
1005
  RouterClass.setMethod(function socket(name, action) {
@@ -1018,12 +1018,12 @@ RouterClass.setMethod(function socket(name, action) {
1018
1018
  /**
1019
1019
  * Add a socket linkup route
1020
1020
  *
1021
- * @author Jelle De Loecker <jelle@develry.be>
1021
+ * @author Jelle De Loecker <jelle@elevenways.be>
1022
1022
  * @since 0.2.0
1023
1023
  * @version 0.2.0
1024
1024
  *
1025
- * @param {String} name The name of the path (timestamp)
1026
- * @param {String} type The message type (name)
1025
+ * @param {string} name The name of the path (timestamp)
1026
+ * @param {string} type The message type (name)
1027
1027
  * @param {Function} fnc Optional function to handle route
1028
1028
  */
1029
1029
  RouterClass.setMethod(function linkup(name, eventname, fnc) {
@@ -1033,12 +1033,12 @@ RouterClass.setMethod(function linkup(name, eventname, fnc) {
1033
1033
  /**
1034
1034
  * Add a delete route
1035
1035
  *
1036
- * @author Jelle De Loecker <jelle@develry.be>
1036
+ * @author Jelle De Loecker <jelle@elevenways.be>
1037
1037
  * @since 0.2.0
1038
1038
  * @version 0.2.0
1039
1039
  *
1040
- * @param {String} name The name of the path (timestamp)
1041
- * @param {String|Object} paths Path to listen to
1040
+ * @param {string} name The name of the path (timestamp)
1041
+ * @param {string|Object} paths Path to listen to
1042
1042
  * @param {Function} fnc Optional function to handle route
1043
1043
  * @param {Object} options
1044
1044
  */
@@ -1049,7 +1049,7 @@ RouterClass.setMethod('delete', function _delete(name, paths, fnc, options) {
1049
1049
  /**
1050
1050
  * Get an object of all the routes in this router and its children
1051
1051
  *
1052
- * @author Jelle De Loecker <jelle@develry.be>
1052
+ * @author Jelle De Loecker <jelle@elevenways.be>
1053
1053
  * @since 0.2.0
1054
1054
  * @version 0.2.0
1055
1055
  */
@@ -1071,7 +1071,7 @@ RouterClass.setMethod(function getFullMount() {
1071
1071
  /**
1072
1072
  * Get the full route object, for internal use
1073
1073
  *
1074
- * @author Jelle De Loecker <jelle@develry.be>
1074
+ * @author Jelle De Loecker <jelle@elevenways.be>
1075
1075
  * @since 0.5.0
1076
1076
  * @version 0.5.0
1077
1077
  *
@@ -1135,7 +1135,7 @@ RouterClass.setMethod(function getFullRoutes(result) {
1135
1135
  /**
1136
1136
  * Get an object of all the options in this router and its children
1137
1137
  *
1138
- * @author Jelle De Loecker <jelle@elevenways.be>
1138
+ * @author Jelle De Loecker <jelle@elevenways.be>
1139
1139
  * @since 1.1.0
1140
1140
  * @version 1.1.0
1141
1141
  *
@@ -1166,7 +1166,7 @@ RouterClass.setMethod(function getOptions(result) {
1166
1166
  /**
1167
1167
  * Get an object of all the routes in this router and its children
1168
1168
  *
1169
- * @author Jelle De Loecker <jelle@elevenways.be>
1169
+ * @author Jelle De Loecker <jelle@elevenways.be>
1170
1170
  * @since 0.2.0
1171
1171
  * @version 1.3.21
1172
1172
  *
@@ -1249,7 +1249,7 @@ RouterClass.setMethod(function getRoutes(result) {
1249
1249
  /**
1250
1250
  * Get an object of all the socket routes in this router and its children
1251
1251
  *
1252
- * @author Jelle De Loecker <jelle@develry.be>
1252
+ * @author Jelle De Loecker <jelle@elevenways.be>
1253
1253
  * @since 0.2.0
1254
1254
  * @version 0.2.0
1255
1255
  *
@@ -1295,7 +1295,7 @@ RouterClass.setMethod(function getSocketRoutes(result) {
1295
1295
  /**
1296
1296
  * Get an object of all the breadcrumbs
1297
1297
  *
1298
- * @author Jelle De Loecker <jelle@develry.be>
1298
+ * @author Jelle De Loecker <jelle@elevenways.be>
1299
1299
  * @since 0.3.0
1300
1300
  * @version 0.3.0
1301
1301
  *
@@ -1324,15 +1324,15 @@ RouterClass.setMethod(function getBreadcrumbInfo(result) {
1324
1324
  /**
1325
1325
  * Create a route url outside of a view
1326
1326
  *
1327
- * @author Jelle De Loecker <jelle@develry.be>
1327
+ * @author Jelle De Loecker <jelle@elevenways.be>
1328
1328
  * @since 0.4.1
1329
1329
  * @version 1.0.0
1330
1330
  *
1331
- * @param {String} name
1331
+ * @param {string} name
1332
1332
  * @param {Object} parameters
1333
1333
  * @param {Object} options
1334
1334
  *
1335
- * @return {String}
1335
+ * @return {string}
1336
1336
  */
1337
1337
  RouterClass.setMethod(function getUrl(name, parameters, options) {
1338
1338
 
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @constructor
5
5
  *
6
- * @author Jelle De Loecker <jelle@develry.be>
6
+ * @author Jelle De Loecker <jelle@elevenways.be>
7
7
  * @since 0.2.0
8
8
  * @version 1.1.0
9
9
  *
@@ -38,11 +38,11 @@ var Schema = Function.inherits(['Deck', 'Alchemy.Base'], function Schema(parent)
38
38
  /**
39
39
  * Add a relation creator method
40
40
  *
41
- * @author Jelle De Loecker <jelle@elevenways.be>
41
+ * @author Jelle De Loecker <jelle@elevenways.be>
42
42
  * @since 1.3.4
43
43
  * @version 1.3.4
44
44
  *
45
- * @param {String} relation_type
45
+ * @param {string} relation_type
46
46
  */
47
47
  Schema.setStatic(function addRelationCreator(relation_type, relation_config) {
48
48
 
@@ -58,7 +58,7 @@ Schema.setStatic(function addRelationCreator(relation_type, relation_config) {
58
58
  *
59
59
  * @TODO: Make Client.Schema & Schema use the same implementation
60
60
  *
61
- * @author Jelle De Loecker <jelle@elevenways.be>
61
+ * @author Jelle De Loecker <jelle@elevenways.be>
62
62
  * @since 1.1.3
63
63
  * @version 1.1.3
64
64
  *
@@ -90,11 +90,11 @@ Schema.setStatic(function unDry(value) {
90
90
  /**
91
91
  * Add a behaviour to this schema
92
92
  *
93
- * @author Jelle De Loecker <jelle@develry.be>
93
+ * @author Jelle De Loecker <jelle@elevenways.be>
94
94
  * @since 0.2.0
95
95
  * @version 1.3.0
96
96
  *
97
- * @param {String} behaviour_name
97
+ * @param {string} behaviour_name
98
98
  * @param {Object} options
99
99
  */
100
100
  Schema.setMethod(function addBehaviour(behaviour_name, options) {
@@ -138,12 +138,12 @@ Schema.setMethod(function addBehaviour(behaviour_name, options) {
138
138
  /**
139
139
  * Get all indexes to check for the given record
140
140
  *
141
- * @author Jelle De Loecker <jelle@develry.be>
141
+ * @author Jelle De Loecker <jelle@elevenways.be>
142
142
  * @since 0.2.0
143
143
  * @version 1.3.0
144
144
  *
145
145
  * @param {Object} data
146
- * @param {String} hasType Get indexes with this type only
146
+ * @param {string} hasType Get indexes with this type only
147
147
  *
148
148
  * @return {Object}
149
149
  */
@@ -174,7 +174,7 @@ Schema.setMethod(function getRecordIndexes(data, hasType) {
174
174
  /**
175
175
  * Convenience method for iterating over indexes of a given record
176
176
  *
177
- * @author Jelle De Loecker <jelle@develry.be>
177
+ * @author Jelle De Loecker <jelle@elevenways.be>
178
178
  * @since 0.2.0
179
179
  * @version 0.2.0
180
180
  *
@@ -187,7 +187,7 @@ Schema.setMethod(function eachRecordIndex(data, fnc) {
187
187
  /**
188
188
  * Convenience method for iterating over alternate indexes of a given record
189
189
  *
190
- * @author Jelle De Loecker <jelle@develry.be>
190
+ * @author Jelle De Loecker <jelle@elevenways.be>
191
191
  * @since 0.2.0
192
192
  * @version 0.2.0
193
193
  *
@@ -200,9 +200,9 @@ Schema.setMethod(function eachAlternateIndex(data, fnc) {
200
200
  /**
201
201
  * Get the datasource for this schema
202
202
  *
203
- * @author Jelle De Loecker <jelle@develry.be>
203
+ * @author Jelle De Loecker <jelle@elevenways.be>
204
204
  * @since 1.1.0
205
- * @version 1.2.0
205
+ * @version 1.4.0
206
206
  *
207
207
  * @return {Pledge}
208
208
  */
@@ -214,7 +214,7 @@ Schema.setMethod(function getDatasource() {
214
214
  that.afterOnce('has_model_class', next);
215
215
  }, function waitForDatasources(next) {
216
216
 
217
- alchemy.sputnik.after('datasources', function afterDs() {
217
+ STAGES.afterStages('datasource', function afterDs() {
218
218
 
219
219
  let datasource;
220
220
 
@@ -245,13 +245,13 @@ Schema.setMethod(function getDatasource() {
245
245
  /**
246
246
  * Add an association
247
247
  *
248
- * @author Jelle De Loecker <jelle@develry.be>
248
+ * @author Jelle De Loecker <jelle@elevenways.be>
249
249
  * @since 0.2.0
250
250
  * @version 1.3.4
251
251
  *
252
- * @param {String} alias
252
+ * @param {string} alias
253
253
  * @param {Object} relation_config
254
- * @param {String} modelname
254
+ * @param {string} modelname
255
255
  * @param {Object} options
256
256
  *
257
257
  * @return {Object}
@@ -280,7 +280,7 @@ Schema.setMethod(function addAssociation(type, relation_config, alias, modelName
280
280
  modelName = args.modelName;
281
281
  options = args.options;
282
282
  options.singular = is_singular;
283
- className = this.model_name;
283
+ className = this.model_class_name;
284
284
 
285
285
  if (this.namespace) {
286
286
  path = this.namespace + '.' + className;
@@ -343,11 +343,11 @@ Schema.setMethod(function addAssociation(type, relation_config, alias, modelName
343
343
  * Add enum values.
344
344
  * Modifications to the `values` object will have no effect later.
345
345
  *
346
- * @author Jelle De Loecker <jelle@develry.be>
346
+ * @author Jelle De Loecker <jelle@elevenways.be>
347
347
  * @since 0.2.0
348
348
  * @version 1.3.0
349
349
  *
350
- * @param {String} name
350
+ * @param {string} name
351
351
  * @param {Object} values
352
352
  */
353
353
  Schema.setMethod(function addEnumValues(name, values) {
@@ -363,11 +363,11 @@ Schema.setMethod(function addEnumValues(name, values) {
363
363
  * Set (overwrite) enum values.
364
364
  * The given `values` object will be used by reference.
365
365
  *
366
- * @author Jelle De Loecker <jelle@develry.be>
366
+ * @author Jelle De Loecker <jelle@elevenways.be>
367
367
  * @since 0.2.0
368
368
  * @version 1.3.0
369
369
  *
370
- * @param {String} name
370
+ * @param {string} name
371
371
  * @param {Object} values
372
372
  */
373
373
  Schema.setMethod(function setEnumValues(name, values) {