mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
27eae209fd
* rename dir * no need to install website or docs from npm At some point, would also be nice to be able to exclude assets/ as well, and to only install a pre-built version of Fleet's frontend code * Bring in fleetdm.com website From https://github.com/fleetdm/fleetdm.com as of https://github.com/fleetdm/fleetdm.com/releases/tag/v0.0.21 * add procfile for heroku Using https://github.com/timanovsky/subdir-heroku-buildpack * avoid getting anybody's hopes up * Create deploy-fleet-website.yml (#82) * Create deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * update pjs with SPDX-like license expressions. also fix repo URL and remove package lock * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * remove dummy uri * Dissect deploy script * Update deploy-fleet-website.yml * workaround for eslintrc nesting issue * lint fixes * forgot the .js * add per-commit git config * Update deploy-fleet-website.yml * might as well remove that * cleanup * connect w/ heroku app and have it actually push * fix bug I introduced in 578a1a01ffb8404aae869e05005e30a6ba2b2a95 * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * the beauty, the glory, of javascript * GH actions don't like "\n" * Update deploy-fleet-website.yml * restore \n chars from 0d45e568f693efba7d7072085bc98d72a482d9ae hoping I was wrong in 0d45e568f693efba7d7072085bc98d72a482d9ae but see also https://github.community/t/what-is-the-correct-character-escaping-for-workflow-command-values-e-g-echo-xxxx/118465/5 * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * Update deploy-fleet-website.yml * rename script to prevent duplicate building * Configure the real website * clean up * a test of the deploy workflow * add handbook to npmignore * I guess you could call this fixing a typo * point workflow at master branch * now clearly bogus: this completely unused version string
125 lines
6.6 KiB
JavaScript
125 lines
6.6 KiB
JavaScript
/**
|
|
* Default model settings
|
|
* (sails.config.models)
|
|
*
|
|
* Your default, project-wide model settings. Can also be overridden on a
|
|
* per-model basis by setting a top-level properties in the model definition.
|
|
*
|
|
* For details about all available model settings, see:
|
|
* https://sailsjs.com/config/models
|
|
*
|
|
* For more general background on Sails model settings, and how to configure
|
|
* them on a project-wide or per-model basis, see:
|
|
* https://sailsjs.com/docs/concepts/models-and-orm/model-settings
|
|
*/
|
|
|
|
module.exports.models = {
|
|
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* Whether model methods like `.create()` and `.update()` should ignore *
|
|
* (and refuse to persist) unrecognized data-- i.e. properties other than *
|
|
* those explicitly defined by attributes in the model definition. *
|
|
* *
|
|
* To ease future maintenance of your code base, it is usually a good idea *
|
|
* to set this to `true`. *
|
|
* *
|
|
* > Note that `schema: false` is not supported by every database. *
|
|
* > For example, if you are using a SQL database, then relevant models *
|
|
* > are always effectively `schema: true`. And if no `schema` setting is *
|
|
* > provided whatsoever, the behavior is left up to the database adapter. *
|
|
* > *
|
|
* > For more info, see: *
|
|
* > https://sailsjs.com/docs/concepts/orm/model-settings#?schema *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
schema: true,
|
|
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* How and whether Sails will attempt to automatically rebuild the *
|
|
* tables/collections/etc. in your schema. *
|
|
* *
|
|
* > Note that, when running in a production environment, this will be *
|
|
* > automatically set to `migrate: 'safe'`, no matter what you configure *
|
|
* > here. This is a failsafe to prevent Sails from accidentally running *
|
|
* > auto-migrations on your production database. *
|
|
* > *
|
|
* > For more info, see: *
|
|
* > https://sailsjs.com/docs/concepts/orm/model-settings#?migrate *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
migrate: 'alter',
|
|
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* Base attributes that are included in all of your models by default. *
|
|
* By convention, this is your primary key attribute (`id`), as well as two *
|
|
* other timestamp attributes for tracking when records were last created *
|
|
* or updated. *
|
|
* *
|
|
* > For more info, see: *
|
|
* > https://sailsjs.com/docs/concepts/orm/model-settings#?attributes *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
attributes: {
|
|
createdAt: { type: 'number', autoCreatedAt: true, },
|
|
updatedAt: { type: 'number', autoUpdatedAt: true, },
|
|
id: { type: 'number', autoIncrement: true, },
|
|
//--------------------------------------------------------------------------
|
|
// /\ Using MongoDB?
|
|
// || Replace `id` above with this instead:
|
|
//
|
|
// ```
|
|
// id: { type: 'string', columnName: '_id' },
|
|
// ```
|
|
//
|
|
// Plus, don't forget to configure MongoDB as your default datastore:
|
|
// https://sailsjs.com/docs/tutorials/using-mongo-db
|
|
//--------------------------------------------------------------------------
|
|
},
|
|
|
|
|
|
/******************************************************************************
|
|
* *
|
|
* The set of DEKs (data encryption keys) for at-rest encryption. *
|
|
* i.e. when encrypting/decrypting data for attributes with `encrypt: true`. *
|
|
* *
|
|
* > The `default` DEK is used for all new encryptions, but multiple DEKs *
|
|
* > can be configured to allow for key rotation. In production, be sure to *
|
|
* > manage these keys like you would any other sensitive credential. *
|
|
* *
|
|
* > For more info, see: *
|
|
* > https://sailsjs.com/docs/concepts/orm/model-settings#?dataEncryptionKeys *
|
|
* *
|
|
******************************************************************************/
|
|
|
|
dataEncryptionKeys: {
|
|
default: 'aGHLfq8AUMixstY0XA5R2ifEMVOUmSAAuLdJWsY9MEs='
|
|
},
|
|
|
|
|
|
/***************************************************************************
|
|
* *
|
|
* Whether or not implicit records for associations should be cleaned up *
|
|
* automatically using the built-in polyfill. This is especially useful *
|
|
* during development with sails-disk. *
|
|
* *
|
|
* Depending on which databases you're using, you may want to disable this *
|
|
* polyfill in your production environment. *
|
|
* *
|
|
* (For production configuration, see `config/env/production.js`.) *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
cascadeOnDestroy: true
|
|
|
|
|
|
};
|