Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

citizen

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

citizen - npm Package Versions

1
13

0.7.3

Diff

Changelog

Source

0.7.3

  • BREAKING CHANGES (These were intended for 0.7.0, but were lost in the merge and I missed it. Sorry for the breakage in a point release.):
    • All config options can now be overwritten at app startup, including config settings in your own namespaces. This breaks the HTTP and HTTPS overwrite options that were available previously.
    • By default, app.start() starts an HTTP server. To start an HTTPS server, you must enable it manually inline or via a config file and provide key/cert/pfx files. You can disable HTTP entirely via config as well. Consult the readme for details.
    • HTTPS key/cert/pfx files should now be passed as a string representing the path to the file, not the contents of the files themselves. citizen reads these files itself now.
jaysylvester
published 0.7.2 •

Changelog

Source

0.7.2

  • Removed errant console.log() from the server module
jaysylvester
published 0.7.1 •

Changelog

Source

0.7.1

  • Fixed a bug in the cache module that caused an error when attempting to clear the file cache
jaysylvester
published 0.7.0 •

Changelog

Source

0.7.0

  • Cache methods have been renamed and moved to their own namespace (app.cache). The old calls and their new equivalents are:
    • app.cache() -> app.cache.set()
    • app.retrieve() -> app.cache.get()
    • app.exists() -> app.cache.exists()
    • app.clear() -> app.cache.clear()
  • Fixe a bug in cache.get() that returned the parent of the specified scope rather than the scope itself when requesting an entire scope. This will break existing calls to cache.get({ scope: 'myScopeName' })
  • Cache lifespan should now be specified in minutes instead of milliseconds -> app.cache.set({ key: 'myKey', lifespan: 15 })
  • Config settings for sessionTimeout and requestTimeout should now be specified in minutes instead of milliseconds -> sessionTimeout: 20
  • Cookie expiration should now be specified in minutes instead of milliseconds
  • Added global cache setting to enable/disable cache in any mode
  • Added layout pattern setting to the config, which allows you to specify a default controller/view pairing as a layout controller and skip the handoff directive in the requested controller
  • Added per-controller form settings in the config, which breaks the previous form config method.
  • Added individual settings for application and static asset error and status logging. For example, you can now log application error messages in production mode without also logging static errors (404) or the typically verbose framework status messages.
  • listen() now accepts a single argument consisting of an object containing functions (flow and callback are optional)
  • Added ability to end a specific user session based on a session property key/value pair using app.session.end('key', 'value')
  • Specifying { view: false } in a controller's emitter during a handoff skips rendering of that controller's default view
  • All citizen-scoped cookie and session variables (starting with "ctzn") have been changed to "ctzn_camelCase" format (ctznReferer is now ctzn_referer).
  • dashes(), isInteger(), and isFloat() have been removed from helpers. There are libraries better suited for this.
jaysylvester
published 0.6.9 •

Changelog

Source

0.6.9

  • Added listen() skip and end events to the readme.
  • Methods skipped in listen() by a previous method throwing an error now have their statuses correctly set to "skipped" in output.listen.status
jaysylvester
published 0.6.8 •

Changelog

Source

0.6.8

  • The listen() error event has been returned to its previous behavior of throwing its own error. Without this, debugging is pretty much impossible. citizen's behavior remains the same, however (errors are not allowed to bubble up to the node process, so the app doesn't crash). You should still be using listen.success and listen.status to handle errors properly though.
  • BREAKING CHANGE: All URL parameters are now cast as strings, including numeric values. There are too many complicating factors in JavaScript's handling of numbers (floats, large integers) for citizen to make assumptions regarding the desired type. For example, "0123" is numeric and would have been stored as "123" under the previous convention; if your app was expecting the leading zero to remain intact, that would be bad. New convenience functions have been added (isInteger and isFloat) to assist in dealing with numbers.
  • The dashes() helper has been deprecated. It's still there, but will be gone in version 0.7.0. There are much more fully-featured URL slug packages available, and since citizen doesn't use this helper internally, there's no sense in keeping it.
jaysylvester
published 0.6.7 •

Changelog

Source

0.6.7

  • Further stabilization of the error API.
jaysylvester
published 0.6.6 •

Changelog

Source

0.6.6

  • Error handling has been further improved. See "Handling Errors" in the readme. Changes include:
    • Error response formats now match the requested route format (HTML, JSON, or JSONP), which is potentially a breaking change depending on how you've been handling errors up to this point.
    • The listen() error and timeout events no longer throw errors themselves, which is potentially a breaking change if you were relying on these thrown errors previously. You should now use the listen() status output (output.listen) for dealing with the results of these events.
jaysylvester
published 0.6.5 •

Changelog

Source

0.6.5

  • Added an error event to the listen() emitter. Any methods that rely on emitters (including your controllers) can now emit errors with HTTP status codes and error messages. See "Controllers" and "listen()" in the readme.
  • listen() now reports status in its output (output.listen) for individual methods. Combine this with the emitter's error event to help track and recover from errors in asynchronous function calls. See "listen()" in the readme.
  • The redirect directive now accepts a URL string as shorthand for a temporary redirect using the Location header
jaysylvester
published 0.6.4 •

Changelog

Source

0.6.4

  • BREAKING CHANGE: The JSON/JSONP output parameter can now return nodes more than one level deep. See "JSON" in the readme for details. The breakage occurs due to how the JSON is returned; if you specify only the first top-level node, just the value of that node is returned within an envelope. Previously, the envelope contained a single key (the top-level node name) containing the value of the node.
  • JSON/JSONP output is now pretty by default. Remove whitespace by setting "pretty" to false in the config.
  • Fixed PUT/PATCH/DELETE methods to process payloads consisting of JSON or form data
  • Controller includes can now be specified via a "route" option, making it possible to call includes with different parameters than the parent controller. See "Including Controllers" in the readme.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc