alchemymvc 1.1.7 → 1.2.0

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 (39) hide show
  1. package/lib/app/behaviour/sluggable_behaviour.js +2 -4
  2. package/lib/app/conduit/http_conduit.js +173 -192
  3. package/lib/app/conduit/loopback_conduit.js +0 -0
  4. package/lib/app/conduit/socket_conduit.js +620 -620
  5. package/lib/app/datasource/mongo_datasource.js +75 -10
  6. package/lib/app/element/time_ago.js +0 -0
  7. package/lib/app/helper/socket_helper.js +613 -613
  8. package/lib/app/helper_datasource/00-nosql_datasource.js +73 -19
  9. package/lib/app/helper_datasource/remote_datasource.js +0 -0
  10. package/lib/app/helper_field/05-string_field.js +0 -0
  11. package/lib/app/helper_field/schema_field.js +7 -2
  12. package/lib/app/helper_model/criteria.js +76 -18
  13. package/lib/app/helper_model/field_config.js +24 -5
  14. package/lib/app/helper_model/model.js +65 -7
  15. package/lib/app/model/alchemy_migration_model.js +33 -0
  16. package/lib/bootstrap.js +9 -0
  17. package/lib/class/conduit.js +2474 -2412
  18. package/lib/class/datasource.js +8 -8
  19. package/lib/class/field.js +7 -1
  20. package/lib/class/inode.js +62 -0
  21. package/lib/class/inode_dir.js +115 -0
  22. package/lib/class/inode_file.js +112 -111
  23. package/lib/class/migration.js +138 -0
  24. package/lib/class/model.js +1765 -1772
  25. package/lib/class/reciprocal.js +8 -2
  26. package/lib/class/router.js +0 -0
  27. package/lib/class/schema.js +14 -12
  28. package/lib/core/base.js +37 -10
  29. package/lib/core/client_base.js +1 -9
  30. package/lib/core/middleware.js +4 -8
  31. package/lib/core/socket.js +159 -159
  32. package/lib/init/alchemy.js +1779 -1779
  33. package/lib/init/devwatch.js +1 -1
  34. package/lib/init/functions.js +2 -56
  35. package/lib/init/load_functions.js +8 -2
  36. package/lib/init/requirements.js +101 -96
  37. package/lib/stages.js +12 -0
  38. package/package.json +74 -76
  39. package/CHANGELOG.md +0 -445
package/CHANGELOG.md DELETED
@@ -1,445 +0,0 @@
1
- ## 1.1.7 (2021-06-11)
2
-
3
- * Add `Alchemy.Criteria.FieldConfig#getDisplayValueIn(data)` method to get a simple string representation of a value
4
- * Check field class constructor in `Schema#addField()`
5
- * Allow RegExp values for String fields during a query
6
- * Requesting a route with the wrong method will now return a 405 error (Method Not Allowed) instead of a 404
7
- * Fix client `Model` classes not being able to perform a query when running on the server in loopback mode
8
- * Fix `time-ago` element refreshing every second when counting down to a date
9
- * Fix the `Loopback` conduit sometimes setting the wrong route method
10
-
11
- ## 1.1.6 (2021-04-29)
12
-
13
- * Switch from `uglify-es` to `terser` for minifying JavaScript files
14
- * Allow overriding any setting from the command line
15
- * Use `Branch` class for clearing model cache
16
-
17
- ## 1.1.5 (2021-01-21)
18
-
19
- * Fallback to the `ENV` environment variable to set the environment
20
- * Fix rendering of segments
21
- * Fix Loopback conduits not setting the correct data when only provided with a route name
22
- * Set the `Hawkejs.Renderer` language once we have a prefix
23
- * Automatically add the `hreflang` attribute to links created with the Router helper
24
- * Fix `Conduit#url` property having the wrong path set
25
- * Load `helper_datasource` and `helper_field` folders before main `helper` folder
26
- * Add `Alchemy#checksum(value)` method
27
- * Throw an error when a class instance is used as a criteria condition
28
- * Fix breadcrumbs for routes that contain objects
29
- * Apply active-link breadcrumb classes while creating the anchors
30
-
31
- ## 1.1.4 (2020-12-10)
32
-
33
- * Fix certain socket linkup packets not being json-dry encodes
34
- * Make `Alchemy#findImagePath()` return a promise
35
- * Make `FieldConfig` class more aware of paths
36
- * Fix `Validator#validateFieldValue()` throwing an error when a field contains multiple violations
37
- * Fix Schema fields not translating translatable fields
38
- * Fix `Validations` errors always having only max 1 field error
39
-
40
- ## 1.1.3 (2020-11-12)
41
-
42
- * Add `Schema#clone()` method
43
- * Add `Schema#field_count` property
44
- * Fix `Schema#addField()` throwing an error when adding a schema field on the browser side
45
- * Added `Criteria#page(page, page_size)`
46
- * `Conduit` classes have been moved into the `Conduit` namespace
47
- * `Conduit.Loopback` now correctly sets the method & body
48
- * Added `Criteria.FieldSet` and `Criteria.FieldConfig` classes
49
- * Object responses via `Conduit.Loopback#end()` will now first be cloned with the `toHawkejs` clone option
50
- * `Model#find()` will now reject when no `datasource` property is set
51
- * Add support for `fonts` asset folders
52
- * Add `CustomElement#getCurrentUrl()` method
53
-
54
- ## 1.1.2 (2020-10-08)
55
-
56
- * Fix Client class methods not being set on the server-side for classes defined in a plugin
57
- * Add `Criteria#isEmpty()` field check
58
- * Add `Linkup#demand()` method
59
- * Add `--socket` startup argument support
60
- * When the given socket path is a directory, create a socket in that directory with the current project name
61
- * Add `--url` startup argument, which will print the url in the console
62
- * Add `--preload` startup argument, which will load the homepage & the client file on startup
63
- * Allow opening redirects in a popup window
64
-
65
- ## 1.1.1 (2020-07-24)
66
-
67
- * Add `Base.mapEventToMethod()` to register simple emitted events names to methods per class
68
- * Add `Base#issueEvent(name, args, callback)` which will use the mapped event-to-method map to execute the method first & then emit the events
69
- * Implement the new event-and-method flow in Controller & Models
70
- * Already set the Hawkejs Renderer `is_for_client_side` property before calling the middleware
71
- * All the properties of the `parameters` property will be used in the Router directive
72
-
73
- ## 1.1.0 (2020-07-21)
74
-
75
- * Add `Schema#getDatasource()` which returns a pledge that resolves to the datasource
76
- * `Alchemy#requirePlugin(name, attempt)` will now attempt to load the plugin if it hasn't been done yet
77
- * Add `Criteria` class, which replaces the messy `DbQuery` class and is a query builder to boot.
78
- * The `Datasource` & `Field` class is now also available on the client side
79
- * Typedefs in routes can now contain fields, like `/{[Model._id]custom_id_name}/`
80
- * Add `Models#load_external_schema` boolean property
81
- * Add `second_format` option to Date & Datetime fields, allowing you to save Date as a timestamp
82
- * Add `Datasource#allows(name)` to see if read/create/remove/update is allowed
83
- * Add `Inode` namespace & `File` & `Directory` classes, as our way of dealing with files
84
- * Also set the `method` property on the client-side `Conduit` instance
85
- * Replace `Document.$main` object with save result
86
- * Add `Model#findByValues` and `Model#findAllByValues`
87
- * Add `Router#serveDependencyFile()` for when you want to serve a file from within a dependency
88
- * Decode path parameters using `RURL.decodeUriSegment()`
89
- * Add `$hold` property to Document class, which are also sent to the client
90
- * `Conduit#redirect()` now has a `hard_refresh` option, to force a non-ajax redirection
91
- * `DocumentList` can now be iterated over
92
- * Removing the cached client file will no longer cause 404 errors
93
- * Conduit responses can now be ended with a buffer
94
- * Sessions will emit the `removed` event when they're being removed
95
- * Websocket messages will no longer be resent upon reconnect
96
- * Add `populate` method to `DocumentList`
97
- * When adding an association to a model, an index will automatically be made
98
- * Uploaded files now use Alchemy's `Inode.File` class
99
- * The `Criteria` class can now be asynchronously iterated over
100
- * The `Fallback` datasource will now use the `read` method instead of `_read`
101
- * Add `Schema.isSchema()` method
102
- * `Enum` values will now also be serialized for the client-side config
103
- * The `Router` helper directive will now look for a `url_attribute` property on the target element
104
- * Add custom Error classes under the Classes.Alchemy.Error namespace
105
- * Re-added validation support with the `Validator` & `Violation` classes
106
- * Use `Blast.fetch()` in the `Alchemy#request()` method
107
- * Rename `Model#findById()` to `Model#findByPk()`
108
- * Add `Document#refreshValues()` to re-query the data from the database
109
- * Allow individual associations to be resolved by the datasource itself
110
- * Throw an error when trying to set a Document's data record to an invalid value
111
- * Fix getting the path of fields in a subschema
112
- * Add `Schema#getFieldChain(path)` and `Field#getFieldChain()`
113
- * Add `FieldValue` class and use it for the new `Field#getDocumentValues(document)` method
114
- * Add `Alchemy#getPrefixes()` to get the prefixes object on the server & client
115
- * The `Alchemy#pickTranslation()` method now also accepts a conduit as prefix choices
116
- * Add source-map support
117
-
118
- ## 1.0.8 (2019-01-12)
119
-
120
- * Fix for package.json dependency version error
121
-
122
- ## 1.0.7 (2019-01-12)
123
-
124
- * Setting `prefer: "client"` and `layout` property on a Route will let the client render the action once the base layout is loaded
125
- * Add default `Conduit#notAuthorized()` and `Conduit#forbidden()` method
126
- * Add support for some basic `policy` property on a Route
127
- * Make the `Scene#interceptOpenUrl` method set the internal `breadcrumb` variable
128
- * Add appcache support
129
- * The `offline_clients` setting needs to be truthy in order to send an appcache manifest
130
- * Fix `Schema#getField()` not looking in the subschema of a SchemaFieldType
131
- * Fix `Model#find('count')` returning wrong value when result is 0
132
- * Add `Alchemy#getMedHash()` function to get a simple, non-verification hash of a file
133
- * The `Conduit#body` property can now be overwritten
134
- * Allow json-dry data from logged-in users during a readDataSource request
135
- * Add `FieldType#datasource` property
136
- * Add `Datasource.setSupport(name, value)` and `Datasource.supports(name)`
137
- * Use `Datasource.supports('objectid')` to see if it understands ObjectID instances
138
- * Add `Alchemy#statPath(path, options)` function
139
- * Allow `Model.addField()` to override already existing fields
140
- * Add pledge support to `Alchemy#openUrl()`
141
- * `Alchemy#findPathToBinarySync()` will now also look in the `/bin/` directory
142
- * Deprecate `Alchemy#List()`
143
- * Add more unit tests
144
-
145
- ## 1.0.6 (2018-12-06)
146
-
147
- * Add `Document#is_new_record` property
148
- * Fix `Document#[Symbol(alike)]` method
149
- * Fix bug in SluggableBehaviour always assuming an existing record will be found
150
- * Work around adding document methods before parent model is ready
151
- * Make client-side Document classes inherit from correct parent
152
- * Allow querying for extraneous, out-of-schema fields by passing the `extraneous` option
153
- * Fix renderings of client-side Controller actions
154
- * Use aggregate `sortByPath` in client-side IndexedDB search
155
- * Add `Alchemy.Client.Document.getClassForUndry()` method
156
- * `Model#saveRecord()` will now throw an error when a regular object is passed instead of a Document instance
157
- * Add HTML field type
158
- * Convert raw datasource data back to app-readable data after a create or update
159
- * Add `Document#getLocalVersion()` and `Document#getLocalVersionIfNewer()` for in the browser
160
- * Convert document data using `toServerSaveRecord` method before sending to server
161
- * Set a reference to the current controller on the `conduit` instance
162
-
163
- ## 1.0.5 (2018-10-18)
164
-
165
- * Submitting data over a socket will now also be JSON-DRY'd
166
- * Allow the server to use the client-side only controller if no server-side controller is found
167
- * Add validator classes
168
- * Add `Document.isDocument(obj)` static method
169
- * Make the save methods use a `Document` instance instead of a simple object
170
- * Add `Alchemy#findPathToBinarySync()` for finding a path to a binary
171
- * Fix copying & moving files on mac os
172
- * `Schema#addAssociation()` will no longer add a localKey if it already exists
173
- * Allow passing options to `Document#addAssociatedData()` and make it return a pledge
174
- * Also clear the client-side model cache when clearing the server-side class cache
175
- * Add export/import functionality
176
- * Clone object with `toHawkejs` method before stringifying when calling `Conduit#end()`
177
- * Add `undefined` "from" property to postcss options to prevent annoying warning
178
-
179
- ## 1.0.4 (2018-08-27)
180
-
181
- * Don't create a `db` instance when the MongoDatasource fails to connect
182
- * Add `Document#$attributes` property, where non-database values can be stored in
183
- * Add `Document#hasChanged(name)` method, to check if values have changed
184
- * Add `Document#resetFields()` to reset a document to its initial state
185
- * Fix SluggableBehaviour
186
- * Add `Document#needsToBeSaved()`
187
- * Make `Document#hasChanged()` detect changes in object values
188
- * Don't pass undefined `version` argument to `indexedDB.open()`
189
- * Add `Document#[Blast.alikeSymbol]` method to check for likeness
190
- * Add `Conduit#supports(feature)` to check for supported features (only async/await for now)
191
- * Add `nodent-compiler` optional dependency for compiling async/await code for IE11
192
- * The `PATH_ROOT` constant can now take its value from an environment variable
193
- * Make `loadHelpers` recursively load in a directory of helpers
194
- * Add `Alchemy#isObjectId(obj)` to see if a string or object is an object id
195
- * `Model#findById(id)` will throw an error when an invalid object id is given
196
- * Document constructor code is now moved to `setDataRecord` method, so it can be shared with the client-side instance
197
- * Add default `saveRecord` action to the Controller class, for client-side record saving
198
- * Add `getModel()` method to the custom Element class
199
- * Fix Paginate component interpreting empty filters as a regex
200
- * Fix Paginate filter inputs not showing the filtered value
201
- * Add `filtering` and `sorting` boolean property to `Pagination#getConfig()` method result
202
- * Check if manual slug values are actually valid
203
- * Add `time-ago` custom HTML element
204
-
205
- ## 1.0.3 (2018-07-12)
206
-
207
- * Update alchemy info page
208
- * `Schema#addField(name, type, options)` now allows you to directly pass a `Schema` instance as a type
209
- * Fix `DocumentList#findNextBatch` looking for the `_options` property, when it should be `options`
210
- * Also pass the `model` instance when creating a new `DocumentList` instance
211
- * Fix `Document#remove` not finding the $model property
212
- * `DocumentList` instances can now be created without any arguments
213
- * Add `DocumentList#toSimpleArray()` which returns an array of simple objects with only the wanted fields
214
- * Add `DocumentList.unDry` static method to the server-side class, because static methods don't get added by default yet
215
- * Fix `Document#conduit` causing an infinite loop
216
- * Change `Model.cacheDuration` to `Model.cache_duration`
217
- * Make `Model#save()` and `Model#findById()` also return Pledges
218
- * Make `Model#remove()`, `Document#remove()`, `Model#ensureIds()` return Pledges
219
- * Make MongoDataSource use `findOneAndDelete` to remove a record
220
- * Switched from `slug` dependency to `mollusc`, which is a fork with several fixes
221
- * When the `port` setting is `null`, a random port will be tried. All other falsy values will still not start the server.
222
- * `Alchemy#usePlugin(name, options)` now accepts a `path_to_plugin` option
223
- * `Alchemy#usePath()` will no longer load `test` folders
224
- * Fix paths equaling a prefix not working as you expect them to
225
- * Don't start socket.io when `settings.websockets` is false
226
- * Fix `Alchemy#broadcast(type, data)` not working
227
- * Add `Model#getBehaviour(name)`, which gets an existing instance on the current model
228
- * Add `Document#revert(revisions)` to revert to an earlier version of the document
229
-
230
- ## 1.0.2 (2018-07-07)
231
-
232
- * Fix `DocumentList#available` always defaulting to the length of the current set
233
- * Correctly parse `x-forwarded-for` in case there are multiple ip addresses
234
-
235
- ## 1.0.1 (2018-07-04)
236
-
237
- * Fix `mongodb` dependency version
238
-
239
- ## 1.0.0 (2018-07-04)
240
-
241
- * Split up old `Document` into `DocumentList` and `Document` class
242
- * Add client-side `Document`, `Model` and `DocumentList` classes
243
- * Class-specific `title` and `type_name` properties are now statics instead of protos
244
- * Add simple HTTP `HEAD` method support
245
- * `DbQuery` is now also available on the client side
246
- * Added query matching code from nedb to `DbQuery`
247
- * Removed nedb dependency
248
- * Model & Controller are now their own namespace
249
- * Added a Base class for the Client side + client conduit & controller
250
- * Custom elements should inherit from `Alchemy.Element` from now on
251
- * Add `Base#getClientPath` and `Base#getClientPathAfter`
252
- * Add `Conduit#chooseBestLocale(locales)` in order to get the best locale for the connection
253
- * Also check `data-breadcrumbs` when activating links
254
- * Starting the server with `--debug-requirements` will print info about which files are loaded using `alchemy.use`
255
-
256
- ## 0.5.0 (2018-01-05)
257
-
258
- * Wait for `Blast` to load before starting the `startServer` stage
259
- * `usePath` will now always first load in files and THEN directories
260
- * Renamed the `Alchemy.Command` class to `Alchemy.Task`
261
- * Added `applyButton` to `Pagination` helper
262
- * You can now set multiple `Pagination` filters
263
- * Helpers are now under the Hawkejs namespace
264
- * Added `Model#eachRecord(options, task, callback)`, which returns a `Pledge`
265
- * Setting `store_units` option on a Date field will store its unit info along with it
266
- * Parse useragents using the `useragent#lookup` method, which caches strings
267
- * Calls to `Conduit#error` will now also be emitted as a `conduit_error` event on the main `alchemy` instance
268
- * A `Route`'s options will now be stored in the `options` property
269
- * `Route#generateUrl` can now also accept a regular options object instead of a `Conduit`
270
- * Don't use `let` in the `Alchemy.Base` class, since it's also used in the browser
271
- * If a minified cached asset (stylesheet or script) gets deleted, re-minify it instead of blocking the request
272
- * The session store is now stored under `alchemy.sessions`
273
- * Request URLs ending with only a prefix, and no slash, will now also work
274
- * `Route#match` will now use `decodeURIComponent` when extracting url parameters
275
- * The helper `Router#printRoute` can now be used to only print an opening anchor when used in combination with `Router#closeRoute`
276
- * Added `PostCSS` and `autoprefixer` package
277
- * `Alchemy#pickTranslation` will give correct results when given prefix is falsy
278
- * The `StringFieldType` will now pick a translation in case the database value was an object
279
- * Add "segments", view blocks that have a specific route
280
- * Make `Model.find` return a `Pledge`
281
- * Mark the `Model` class as being an abstract class
282
- * Add UglifyJS global_defs for `Blast.isNode` and `Blast.isBrowser`
283
-
284
- ## 0.4.3 (2017-09-07)
285
-
286
- * Fix: don't set gutter on `Janeway#print` output when Janeway is not active
287
- * Fix: Client-side `Alchemy#switchLanguage` will now work when there are get queries
288
- * Add `use_found_prefix` to model search options. This used to be hard-coded yes, but now it is false by default
289
- * Calculate etag using `Object.checksum`, as fowler has too many collisions
290
- * Set the current active prefix using `internal` and `expose` as 'active_prefix' (`Conduit#prefix` will not be set, because that is only used when it's in the path!)
291
- * If header `x-alchemy-default-prefix` is set, use that as *default* prefix. This differs from `x-alchemy-prefix`, as that is a hard override.
292
- * Fix `useragent` not having the `satisfies` method
293
- * Fix `socket.io.js` not being served
294
- * Only create a dgram socket when it is needed
295
- * `getResource` of the `Alchemy` helper will now always add the data object as the second argument (it used to do 2 different things on loopback or client)
296
- * Upgrade `protoblast` dependency to 0.3.10
297
-
298
- ## 0.4.2 (2017-08-27)
299
-
300
- * Remove quotes from `content-type`'s UTF-8
301
- * Add `Controller#safeSet`, which uses `encodeHTML` to set strings
302
- * The session cookie has `httpOnly` enabled
303
- * Add `Conduit#is_secure` property
304
- * Enable the `secure` option by default when setting a cookie on a secure connection
305
- * Fix path traversal security bug in `findAssetPath`
306
- * The `scene_start_` cookie will only live for 15s in stead of 10 minutes
307
-
308
- ## 0.4.1 (2017-08-11)
309
-
310
- * Setting `sort` to false will now actually disable sorting
311
- * Fallback translations `__` will now be picked
312
- * Send hawkejs templates using regular JSON, not JSON-dry
313
- * Fix urls not being generated properly when using prefixes
314
- * Add `Controller#renderDialogIn` so dialogs can be rendered from the server side, too
315
- * Let the Mongo datasource retry to reconnect a near infinite amount of times
316
- * `Alchemy#downloadFile` now uses `Blast#fetch`
317
- * Alchemy will now exit when the parent process does
318
- * Add languageSwitcher
319
- * Number fields with value null won't be cast to 0 anymore
320
- * `Conduit#redirect` now uses temporary (301) redirects by default
321
- * Disabling a find's `recursive` will now also apply to a subschema
322
- * Hidden files (starting with ".") or the "empty" file will no longer be loaded
323
- * You can now set parameters using `Conduit#param(name, value)`
324
- * `Conduit#param(name)` will now also look in the cookies
325
- * Add support for `assume_https` config and `x-forwarded-proto` header
326
- * Alchemy won't listen to multicast address by default
327
-
328
- ## 0.4.0 (2017-04-17)
329
-
330
- * Fixed router issue in the Alchemy helper
331
- * `PATH_*` globals are now constants
332
- * Removed `APP_ROOT`, `PATH_APP` has been available for years
333
- * The version of your app and alchemy itself are added to `process.versions`
334
- * The global `alchemy` object is now an instance of the `Alchemy` class
335
- * Added `Alchemy#makeNextRequireStrict()` which adds `use strict` to the next required module
336
- * Fixed adding indexes to nested fields
337
- * Automatically add 2dsphere index to Geopoint fields
338
- * Added `qs` dependency so nested GET parameters can be decoded properly
339
- * Add cache method to client-side `alchemy#fetch` method
340
- * A model's Document class will now inherit from that model's parent's document class
341
- * Self-referencing Schema fields are no longer queried for now, this causes deadlocks to occur
342
- * Add `alchemy.__` to client-side javascript
343
- * Also emit the full linkup packets as a 'linkup_packet' event
344
- * Base class fixes
345
- * Add hawkejs multiple-template serving middleware
346
-
347
- ## 0.3.3 (2017-01-21)
348
-
349
- * Fix $or grouping during normalization of `Query` conditions
350
- * Further split up the `Conduit` class
351
- * Fix some `Resource` issues in the alchemy helper
352
- * Add a `Document#toArray()` method
353
- * Put non-translated, orphaned, strings in a '__' prefix when fetched from server
354
- * Optimize `Model#ensureIds`
355
- * Add router section identifiers (for in selects, ...)
356
- * Add `conduit` property getter to `Document`
357
- * Fix new cookies being ignored on a redirect
358
- * Set option `set_updated` to false during saving so the `updated` field won't be changed
359
- * Add `of_group_name` static property to classes
360
- * Add `count` as find option
361
- * Add `Model#beforeSave` callback support
362
- * Pass query options to `Document`
363
- * Set `x-history-url` on internal redirect (and expose to hawkejs)
364
- * Change cache-control to cache for max 1 hour (in stead of 1 year)
365
- * Add options to the `Document#save` method
366
- * Find next batch of limited find results using `Document#findNextBatch`
367
- * No longer die when trying to use a "priviliged" port
368
- * Upgrade protoblast to version 0.4.0
369
- * Upgrade hawkejs to version 1.1.2
370
-
371
- ## 0.3.2 (2016-10-19)
372
-
373
- * Forgot to upgrade the Janeway package
374
-
375
- ## 0.3.1 (2016-10-19)
376
-
377
- * Upgraded NPM packages
378
- * Set terminal title using Janeway
379
- * Fixed inheritance issues
380
- * Janeway can now also be disabled by setting the DISABLE_JANEWAY env to 1
381
- * Setting `alchemy.settings.silent` to true will disable the custom `log` calls
382
-
383
- ## 0.3.0 (2016-10-04)
384
-
385
- * Added Base class in Alchemy namespace
386
- * `alchemy.classes` has been removed in favor of `Classes`
387
- * Added Command class
388
- * Associated record data will now also be saved
389
- * Sluggable behaviour has been fixed
390
- * Add `file_path` property to `useOnce` require errors
391
- * Bugfixes in the Router helper
392
- * Allow registering modules as null
393
- * Load mmmagic on-the-fly, don't preload bcrypt and chokidar
394
- * Add `alchemy.broadcast` which broadcasts to every connected websocket scene
395
-
396
- ## 0.2.2 (2016-07-02)
397
-
398
- * Update socket.io dependencies, fixing reconnection issues
399
- * Added `log.once(id, ...)` to log a specific message only once
400
- * Added `log.less(id, ...)` to log messages only once per second
401
- * Added `log.setLessConfig` if you want to set specific limit for log.less
402
-
403
- ## 0.2.1 (2016-06-27)
404
-
405
- * ClientSocket now has an `offset` and `latency` property plus `now()` timestamp method
406
- * SocketConduit now has an `ip` property
407
- * `ModelDocument` now has an `init` method that gets called on creation
408
-
409
- ## 0.2.0 (2016-06-26)
410
-
411
- * Switched to Hawkejs v1.0.0
412
- * Removed cruft (continuation, ...)
413
- * Removed old Nuclei-way of defining classes
414
- * Added new classes:
415
- - Conduit
416
- - Schema
417
- - Router
418
- - Route
419
- - FieldType
420
- - Datasource
421
-
422
- ## 0.1.0 (2014-09-10)
423
-
424
- * Remove mongoose & MongoDB eval code (still need to add validation support)
425
- * Added sluggable behaviour
426
- * Added Object.isEmpty method
427
- * Array.cast converts array-like objects to regular arrays (but not Strings),
428
- if the variable is undefined an empty array is returned
429
- * Add 'score' method to String prototype, to determine how similar strings are
430
- * Add 'alchemy.after' method, which will do something after the given event has
431
- been emitted, even if it has been emitted in the past
432
- * Add hasValue and getValueKey to Object, also works on arrays
433
- * When saving data you can pass the 'allowedIndexes' option, which should be an
434
- array of indexes allowed to be looked through for existing records.
435
- If it's an empty array, only the _id will be used. If it's false, every index
436
- is used.
437
- * Add 'divide' method to Object, which creates a new array where every key-value
438
- pair is a new object
439
- * Spin off prototype & inflections to new module: protoblast
440
- * Added publishable behaviour
441
-
442
- ## 0.0.1 (2014-04-04)
443
-
444
- * Finalise version 0.0.1 after a year of initial development,
445
- now we can start removing mongoose.