@directus/app 9.15.1 → 9.16.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.
- package/dist/assets/accounts.2e114db8.js +1 -0
- package/dist/assets/{active-line.ac98eb80.js → active-line.f9fd8e29.js} +1 -1
- package/dist/assets/activity-log.86a173c5.js +1 -0
- package/dist/assets/activity.5589dea9.js +80 -0
- package/dist/assets/af-ZA.2bf28c7c.js +1 -0
- package/dist/assets/{apl.c701f3ad.js → apl.8dd45420.js} +1 -1
- package/dist/assets/ar-SA.a723a027.js +1 -0
- package/dist/assets/{architecture.a1dad632.js → architecture.d16e36b1.js} +1 -1
- package/dist/assets/{asciiarmor.13c53f8b.js → asciiarmor.3d35c700.js} +1 -1
- package/dist/assets/{asn.1.37bc407d.js → asn.1.f669a398.js} +1 -1
- package/dist/assets/{asterisk.a0939334.js → asterisk.cdd7b5c4.js} +1 -1
- package/dist/assets/authentication.ee6465fd.js +73 -0
- package/dist/assets/{autorefresh.f528afbe.js → autorefresh.51463d39.js} +1 -1
- package/dist/assets/avatar-placeholder.446bf113.svg +6 -0
- package/dist/assets/aws.8fa603ce.js +1 -0
- package/dist/assets/backing-directus.450274bb.js +1 -0
- package/dist/assets/bg-BG.6ccbe392.js +1 -0
- package/dist/assets/br-FR.cfebb858.js +1 -0
- package/dist/assets/{brainfuck.e5abbb42.js → brainfuck.4ca7301f.js} +1 -1
- package/dist/assets/ca-ES.4c8abcd5.js +1 -0
- package/dist/assets/ckb-IR.51f9d580.js +1 -0
- package/dist/assets/cli.495194f0.js +19 -0
- package/dist/assets/{cli.acbc6a21.js → cli.f4f23732.js} +4 -4
- package/dist/assets/{clike.8ac88bf2.js → clike.517e6aa3.js} +1 -1
- package/dist/assets/{clojure.80a76546.js → clojure.57990b91.js} +1 -1
- package/dist/assets/cloudron.aa3368a8.js +1 -0
- package/dist/assets/{cmake.ec5917fe.js → cmake.ed8f2dfc.js} +1 -1
- package/dist/assets/{cobol.ef7a4b09.js → cobol.de7e6ac3.js} +1 -1
- package/dist/assets/codebase-overview.cf29e0f6.js +1 -0
- package/dist/assets/{coffeescript.6f9481f3.js → coffeescript.f395c11c.js} +1 -1
- package/dist/assets/collections.74218877.js +2 -0
- package/dist/assets/collections.7776a374.js +2 -0
- package/dist/assets/collections.9e3af468.js +106 -0
- package/dist/assets/{commonlisp.afc36432.js → commonlisp.a0911f52.js} +1 -1
- package/dist/assets/conditions.1d6c9ac3.js +1 -0
- package/dist/assets/config-options.3845d956.js +138 -0
- package/dist/assets/content.84d14f92.js +1 -0
- package/dist/assets/{creating-extensions.028151bd.js → creating-extensions.50afb69b.js} +3 -3
- package/dist/assets/{crystal.19a410f7.js → crystal.1e7cf250.js} +1 -1
- package/dist/assets/cs-CZ.3f25becd.js +1 -0
- package/dist/assets/{css.79beeecf.js → css.ed8d4773.js} +1 -1
- package/dist/assets/{cypher.20e965cd.js → cypher.863b9fa8.js} +1 -1
- package/dist/assets/{d.c6bda58b.js → d.66d0201b.js} +1 -1
- package/dist/assets/da-DK.3460bab1.js +1 -0
- package/dist/assets/{dart.efdc21ef.js → dart.878fcc86.js} +1 -1
- package/dist/assets/data-model.ef4eedaf.js +45 -0
- package/dist/assets/de-DE.980a9df8.js +1 -0
- package/dist/assets/{diff.1cedea79.js → diff.7a4d3ebd.js} +1 -1
- package/dist/assets/{digitalocean-app-platform.542bac85.js → digitalocean-app-platform.5dd9a78b.js} +2 -2
- package/dist/assets/display-templates.6412d9bf.js +1 -0
- package/dist/assets/display.c9e4c238.js +1 -0
- package/dist/assets/{displays.027c9ffc.js → displays.c3b9934b.js} +4 -4
- package/dist/assets/{django.255ac486.js → django.2a570d10.js} +1 -1
- package/dist/assets/{docker.ce60011d.js → docker.2130afa6.js} +3 -3
- package/dist/assets/{dockerfile.00ff56e0.js → dockerfile.25c17dd8.js} +1 -1
- package/dist/assets/{documentation.d5124166.js → documentation.e232fdb2.js} +1 -1
- package/dist/assets/{dtd.12790411.js → dtd.eefd1fda.js} +1 -1
- package/dist/assets/{dylan.b1ceee9c.js → dylan.c614fa02.js} +1 -1
- package/dist/assets/{ebnf.24aa229e.js → ebnf.e9066ab9.js} +1 -1
- package/dist/assets/{ecl.76031112.js → ecl.fe452b04.js} +1 -1
- package/dist/assets/{eiffel.ab81ecdd.js → eiffel.a0877698.js} +1 -1
- package/dist/assets/{el-GR.60ea8245.js → el-GR.99b9567f.js} +1 -1
- package/dist/assets/{elm.e9bedfdd.js → elm.d26a7aa8.js} +1 -1
- package/dist/assets/email-templates.0aa59541.js +2 -0
- package/dist/assets/en-CA.25c4512b.js +1 -0
- package/dist/assets/en-GB.24d2e667.js +1 -0
- package/dist/assets/{endpoints.0f025685.js → endpoints.b664ef10.js} +1 -1
- package/dist/assets/{erlang.fc3774cc.js → erlang.92a68ba6.js} +1 -1
- package/dist/assets/es-419.b77b2103.js +1 -0
- package/dist/assets/es-CL.e5af69da.js +1 -0
- package/dist/assets/es-ES.7fd65f45.js +1 -0
- package/dist/assets/es-MX.84fb11f1.js +1 -0
- package/dist/assets/et-EE.e10031cf.js +3 -0
- package/dist/assets/extensions.e511fc6d.js +12 -0
- package/dist/assets/fa-IR.3c0a7985.js +1 -0
- package/dist/assets/{factor.a73b32af.js → factor.b5f382bf.js} +1 -1
- package/dist/assets/faq.cc159e10.js +2 -0
- package/dist/assets/{fcl.05022ce6.js → fcl.752a4039.js} +1 -1
- package/dist/assets/fi-FI.f2ba369a.js +1 -0
- package/dist/assets/field-types.129a2c41.js +1 -0
- package/dist/assets/field.3061af3d.js +1 -0
- package/dist/assets/fields.1a3f05d2.js +1 -0
- package/dist/assets/fields.9e13d3e0.js +135 -0
- package/dist/assets/file-library.531c267c.js +1 -0
- package/dist/assets/files.af2c1a43.js +189 -0
- package/dist/assets/{filter-rules.f7296d23.js → filter-rules.454352d1.js} +17 -8
- package/dist/assets/filters.57f37ec6.js +1 -0
- package/dist/assets/flows.4d2856ca.js +172 -0
- package/dist/assets/flows.c21cd837.js +16 -0
- package/dist/assets/folders.10accc4b.js +132 -0
- package/dist/assets/{forth.9f7f8152.js → forth.68cc3f00.js} +1 -1
- package/dist/assets/{fortran.52232d25.js → fortran.af849fdf.js} +1 -1
- package/dist/assets/fr-CA.bd73b96f.js +1 -0
- package/dist/assets/fr-FR.f86a9f41.js +1 -0
- package/dist/assets/{gas.be5a1084.js → gas.f1613e84.js} +1 -1
- package/dist/assets/{gcp.8ca78211.js → gcp.c7937b1a.js} +6 -6
- package/dist/assets/{gfm.5d303cf2.js → gfm.ea5bcf5f.js} +1 -1
- package/dist/assets/{gherkin.9ee4b7a0.js → gherkin.255070ab.js} +1 -1
- package/dist/assets/{github-ci.40c9d16d.js → github-ci.f7ee57b8.js} +2 -2
- package/dist/assets/glossary.80e53e05.js +1 -0
- package/dist/assets/glossary.c84cb559.js +1 -0
- package/dist/assets/{go.6e4d34e0.js → go.b34c32f3.js} +1 -1
- package/dist/assets/{groovy.bff23487.js → groovy.145f8cf7.js} +1 -1
- package/dist/assets/{haml.6815814f.js → haml.8116bfb2.js} +1 -1
- package/dist/assets/{handlebars.66d3addf.js → handlebars.8d60b385.js} +1 -1
- package/dist/assets/{haskell-literate.ac28a705.js → haskell-literate.169e6c59.js} +1 -1
- package/dist/assets/{haskell.c79f2f68.js → haskell.d4d4d77a.js} +1 -1
- package/dist/assets/{haxe.dff1069b.js → haxe.b95e20de.js} +1 -1
- package/dist/assets/{hooks.5488f34d.js → hooks.d1b00fc1.js} +2 -2
- package/dist/assets/hr-HR.649970ba.js +1 -0
- package/dist/assets/{htmlembedded.0b866530.js → htmlembedded.953ff7c2.js} +1 -1
- package/dist/assets/{htmlmixed.51a1a55b.js → htmlmixed.5ce6f41a.js} +1 -1
- package/dist/assets/{http.ccc0b7c5.js → http.9d3315fb.js} +1 -1
- package/dist/assets/{hu-HU.3c8e2cdc.js → hu-HU.2407b23f.js} +1 -1
- package/dist/assets/id-ID.46c8c32a.js +1 -0
- package/dist/assets/{idl.6480e5fb.js → idl.51f94c61.js} +1 -1
- package/dist/assets/{iis.9e682df0.js → iis.2b991a80.js} +1 -1
- package/dist/assets/import-export.74a08d53.js +2 -0
- package/dist/assets/index.19a1e6a6.css +1 -0
- package/dist/assets/index.4894f51e.js +1 -0
- package/dist/assets/{index.0ce698aa.entry.js → index.69857a47.entry.js} +189 -186
- package/dist/assets/index.cd90c757.js +1 -0
- package/dist/assets/{index.af7bac4f.js → index.cdc5693b.js} +1 -1
- package/dist/assets/{input-rich-text-html.9197018e.js → input-rich-text-html.c5691bb5.js} +42 -42
- package/dist/assets/{input-rich-text-html.49906812.css → input-rich-text-html.c883b2df.css} +1 -1
- package/dist/assets/insights.0f2b188e.js +2 -0
- package/dist/assets/installation.131e828a.js +1 -0
- package/dist/assets/interface.aa4f61a0.js +1 -0
- package/dist/assets/{interfaces.38099de0.js → interfaces.fc4c7384.js} +3 -3
- package/dist/assets/introduction.0f06a30b.js +1 -0
- package/dist/assets/introduction.24acabd2.js +90 -0
- package/dist/assets/{introduction.e6dc6284.js → introduction.b1da78a4.js} +2 -2
- package/dist/assets/introduction.e8ce5583.js +1 -0
- package/dist/assets/it-IT.922112b6.js +1 -0
- package/dist/assets/items.b5bb1efd.js +1 -0
- package/dist/assets/items.cc5ed80d.js +136 -0
- package/dist/assets/{ja-JP.bfb2f81a.js → ja-JP.01e593ca.js} +1 -1
- package/dist/assets/{javascript-hint.c017b3f8.js → javascript-hint.e20aef95.js} +1 -1
- package/dist/assets/{javascript.f86e0b2b.js → javascript.5fd57163.js} +1 -1
- package/dist/assets/{jinja2.e82d5cfa.js → jinja2.50fcfe88.js} +1 -1
- package/dist/assets/{jsx.41979cc2.js → jsx.105d1c38.js} +1 -1
- package/dist/assets/{julia.446093ae.js → julia.35f5ca7a.js} +1 -1
- package/dist/assets/kmr-TR.2c6e59b8.js +1 -0
- package/dist/assets/layouts.1b59a4c4.js +1 -0
- package/dist/assets/{layouts.f9cfede4.js → layouts.2759613b.js} +4 -4
- package/dist/assets/{livescript.abc7a76e.js → livescript.c93edb54.js} +1 -1
- package/dist/assets/localization.854fe2a6.js +1 -0
- package/dist/assets/lt-LT.18f09ae6.js +1 -0
- package/dist/assets/{lua.f54ca0a1.js → lua.9658c21a.js} +1 -1
- package/dist/assets/{manual.cc05cff9.js → manual.e19c207e.js} +5 -5
- package/dist/assets/{mark-selection.e16eb3ef.js → mark-selection.53594d16.js} +1 -1
- package/dist/assets/{match-highlighter.924de9a0.js → match-highlighter.102bdbf5.js} +1 -1
- package/dist/assets/{mathematica.2dba3058.js → mathematica.9aa31b5e.js} +1 -1
- package/dist/assets/{mbox.1356b4dc.js → mbox.29766fd2.js} +1 -1
- package/dist/assets/migrations.70984e94.js +19 -0
- package/dist/assets/{mirc.8c3e6323.js → mirc.7257ab91.js} +1 -1
- package/dist/assets/{mllike.b0c31f4d.js → mllike.e8d0e664.js} +1 -1
- package/dist/assets/{modelica.2dcd76d8.js → modelica.18fae917.js} +1 -1
- package/dist/assets/{modules.aed8795b.js → modules.368e658d.js} +3 -3
- package/dist/assets/{mscgen.a45be4f7.js → mscgen.ee9aeb3b.js} +1 -1
- package/dist/assets/{multiplex.5e22391c.js → multiplex.5014c33e.js} +1 -1
- package/dist/assets/{mumps.aa28a392.js → mumps.98967a5d.js} +1 -1
- package/dist/assets/{nginx.de5bffd7.js → nginx.35db5339.js} +1 -1
- package/dist/assets/nl-NL.57220fbc.js +1 -0
- package/dist/assets/{no-NO.59f9d425.js → no-NO.3bb25fb7.js} +1 -1
- package/dist/assets/notifications.71793dcb.js +153 -0
- package/dist/assets/{nsis.7db5c156.js → nsis.5c925820.js} +1 -1
- package/dist/assets/{ntriples.18820234.js → ntriples.ebc8952a.js} +1 -1
- package/dist/assets/{octave.74e0d0bd.js → octave.2541b86b.js} +1 -1
- package/dist/assets/operations.3a53915d.js +169 -0
- package/dist/assets/{operations.a263ba49.js → operations.687b2da1.js} +1 -1
- package/dist/assets/operations.845da620.js +1 -0
- package/dist/assets/{overlay.2760550e.js → overlay.834b2264.js} +1 -1
- package/dist/assets/overview.2aef2737.js +1 -0
- package/dist/assets/overview.42c9bc71.js +1 -0
- package/dist/assets/{overview.21a42c2e.js → overview.77c84906.js} +0 -0
- package/dist/assets/{oz.aff08f07.js → oz.dfebfbd1.js} +1 -1
- package/dist/assets/{panels.d307c197.js → panels.1c9e59a5.js} +3 -3
- package/dist/assets/{pascal.c766c910.js → pascal.fcb326dc.js} +1 -1
- package/dist/assets/{pegjs.e1938455.js → pegjs.68efc658.js} +1 -1
- package/dist/assets/{perl.15db43a0.js → perl.950af130.js} +1 -1
- package/dist/assets/permissions.7c6e7d90.js +178 -0
- package/dist/assets/{php.246be7cf.js → php.fef53679.js} +1 -1
- package/dist/assets/{pig.bcb2fd00.js → pig.e61066dd.js} +1 -1
- package/dist/assets/pl-PL.dfc1a032.js +1 -0
- package/dist/assets/plesk.09c47961.js +27 -0
- package/dist/assets/{powershell.692ea617.js → powershell.a3647979.js} +1 -1
- package/dist/assets/{presets-bookmarks.668779cf.js → presets-bookmarks.3d6f189f.js} +1 -1
- package/dist/assets/presets.a6220515.js +164 -0
- package/dist/assets/project-settings.5ba0a483.js +1 -0
- package/dist/assets/projects.7b210ac2.js +1 -0
- package/dist/assets/{properties.e3248646.js → properties.1ee62841.js} +1 -1
- package/dist/assets/{protobuf.8550becd.js → protobuf.7eaf6123.js} +1 -1
- package/dist/assets/pt-BR.a8e95f48.js +1 -0
- package/dist/assets/pt-PT.2233fb43.js +1 -0
- package/dist/assets/{pug.74a05078.js → pug.7a05af3b.js} +1 -1
- package/dist/assets/{puppet.49359d8c.js → puppet.34c73ce6.js} +1 -1
- package/dist/assets/{python.b36f6a12.js → python.bc5a01c1.js} +1 -1
- package/dist/assets/{q.79121f75.js → q.4f51bed7.js} +1 -1
- package/dist/assets/query.b72e23c9.js +152 -0
- package/dist/assets/quickstart.0e152d2a.js +20 -0
- package/dist/assets/quickstart.1d485356.js +9 -0
- package/dist/assets/{r.6faf9cab.js → r.1d0a2eab.js} +1 -1
- package/dist/assets/readme.a5652282.js +1 -0
- package/dist/assets/relations.804b318b.js +115 -0
- package/dist/assets/relationship.040a5095.js +1 -0
- package/dist/assets/relationships.ff02a9ff.js +82 -0
- package/dist/assets/resources.efe9810e.js +1 -0
- package/dist/assets/revisions.121cb7de.js +40 -0
- package/dist/assets/ro-RO.52012f13.js +1 -0
- package/dist/assets/roles.680acff2.js +171 -0
- package/dist/assets/{rpm.bbceabdd.js → rpm.b6eaecab.js} +1 -1
- package/dist/assets/{rst.018d994c.js → rst.90bc2b24.js} +1 -1
- package/dist/assets/ru-RU.9f19c25d.js +1 -0
- package/dist/assets/{ruby.fdcf25d5.js → ruby.0761eec1.js} +1 -1
- package/dist/assets/running-locally.4b4aa0d8.js +27 -0
- package/dist/assets/{rust.a67dfd6b.js → rust.9c0ae2fb.js} +1 -1
- package/dist/assets/{sas.fd12a184.js → sas.863c1ff7.js} +1 -1
- package/dist/assets/{sass.65a7e88b.js → sass.a062b8a1.js} +1 -1
- package/dist/assets/schema.5f5eb18e.js +1 -0
- package/dist/assets/{scheme.e1e3e8ef.js → scheme.cbfc233a.js} +1 -1
- package/dist/assets/{sdk.ea5b0946.js → sdk.84d76266.js} +76 -70
- package/dist/assets/security.6a8942ba.js +1 -0
- package/dist/assets/server.b24a421b.js +114 -0
- package/dist/assets/settings.d3a9b46c.js +58 -0
- package/dist/assets/settings.d91e399d.js +1 -0
- package/dist/assets/shares.6bb87993.js +1 -0
- package/dist/assets/{shell.9a98567b.js → shell.22e0ee45.js} +1 -1
- package/dist/assets/{show-hint.98eb1b17.js → show-hint.7c35da9b.js} +1 -1
- package/dist/assets/{sieve.2d3535ad.js → sieve.459825cf.js} +1 -1
- package/dist/assets/sl-SI.8f397c20.js +2 -0
- package/dist/assets/{slim.4f6f559e.js → slim.0ba3b5ea.js} +1 -1
- package/dist/assets/{smalltalk.5a5c92f8.js → smalltalk.8b748238.js} +1 -1
- package/dist/assets/{smarty.e51d2da0.js → smarty.6b0aef9c.js} +1 -1
- package/dist/assets/{solr.b7b7b09c.js → solr.a707fb59.js} +1 -1
- package/dist/assets/{soy.31202fc9.js → soy.666256c0.js} +1 -1
- package/dist/assets/{sparql.20d7ceed.js → sparql.a1d891c8.js} +1 -1
- package/dist/assets/{spreadsheet.ec393ccb.js → spreadsheet.ed5c9b6c.js} +1 -1
- package/dist/assets/{sql.614b6588.js → sql.b86b7772.js} +1 -1
- package/dist/assets/sr-CS.8082fb81.js +1 -0
- package/dist/assets/sr-SP.3f95d056.js +1 -0
- package/dist/assets/{sso-examples.ad647c9c.js → sso-examples.eb8e7423.js} +2 -2
- package/dist/assets/{sso.cf805e38.js → sso.c929d07f.js} +3 -3
- package/dist/assets/{stex.f20dd750.js → stex.2ceacc2d.js} +1 -1
- package/dist/assets/{stylus.e8784ce8.js → stylus.97e043fb.js} +1 -1
- package/dist/assets/support.09b549ef.js +1 -0
- package/dist/assets/sv-SE.08585432.js +1 -0
- package/dist/assets/{swift.f97e9bb9.js → swift.ed9964e6.js} +1 -1
- package/dist/assets/{tcl.148d5060.js → tcl.d774e733.js} +1 -1
- package/dist/assets/teams.ab67345b.js +1 -0
- package/dist/assets/{textile.e048968b.js → textile.6a476b5a.js} +1 -1
- package/dist/assets/th-TH.8a058ef9.js +2 -0
- package/dist/assets/{themes.3d802c3b.js → themes.078e9124.js} +2 -2
- package/dist/assets/{tiddlywiki.4958dcc7.js → tiddlywiki.23adee6a.js} +1 -1
- package/dist/assets/{tiki.380c7e34.js → tiki.6c9bc5e7.js} +1 -1
- package/dist/assets/{toml.ae74cfd0.js → toml.0465b4ce.js} +1 -1
- package/dist/assets/{tornado.dd336ee6.js → tornado.4f8ab710.js} +1 -1
- package/dist/assets/tr-TR.039a12a9.js +1 -0
- package/dist/assets/translation-strings.2e3ee87a.js +1 -0
- package/dist/assets/translations.36a34606.js +1 -0
- package/dist/assets/translations.fb062afb.js +1 -0
- package/dist/assets/triggers.44226865.js +1 -0
- package/dist/assets/{troff.cf9dad81.js → troff.bf1b0dc8.js} +1 -1
- package/dist/assets/{ttcn-cfg.c7077b78.js → ttcn-cfg.a9d94352.js} +1 -1
- package/dist/assets/{ttcn.0aa9c107.js → ttcn.fc69e878.js} +1 -1
- package/dist/assets/{turtle.894859db.js → turtle.a9f8b816.js} +1 -1
- package/dist/assets/{twig.35c17063.js → twig.a7fff583.js} +1 -1
- package/dist/assets/ubuntu.79ece84b.js +11 -0
- package/dist/assets/uk-UA.e0916a2f.js +1 -0
- package/dist/assets/upgrades-migrations.ea8bea7b.js +1 -0
- package/dist/assets/user-directory.bac5f2ee.js +1 -0
- package/dist/assets/users-roles-permissions.e36d0bc8.js +1 -0
- package/dist/assets/users.a9ad4dd9.js +252 -0
- package/dist/assets/utilities.00432834.js +74 -0
- package/dist/assets/validation.2c0c5444.js +1 -0
- package/dist/assets/{vb.7ed1702a.js → vb.c822cd8d.js} +1 -1
- package/dist/assets/{vbscript.789ccb6b.js → vbscript.9a894a18.js} +1 -1
- package/dist/assets/{velocity.d0772b29.js → velocity.f68873d7.js} +1 -1
- package/dist/assets/{verilog.74dc61b6.js → verilog.3f3cea00.js} +1 -1
- package/dist/assets/{vhdl.2600943e.js → vhdl.a06af28e.js} +1 -1
- package/dist/assets/vi-VN.fff05bda.js +1 -0
- package/dist/assets/{vue.ea70bc55.js → vue.bd77f77c.js} +1 -1
- package/dist/assets/{wast.cc084e5f.js → wast.905c63d5.js} +1 -1
- package/dist/assets/webhooks.e7e122b7.js +147 -0
- package/dist/assets/webhooks.f0dfc270.js +1 -0
- package/dist/assets/{webidl.5f0116bf.js → webidl.b78b974a.js} +1 -1
- package/dist/assets/{xquery.49d15210.js → xquery.394e95a0.js} +1 -1
- package/dist/assets/{yacas.1c1146d4.js → yacas.8149da65.js} +1 -1
- package/dist/assets/{yaml-frontmatter.47804237.js → yaml-frontmatter.2ae5fca2.js} +1 -1
- package/dist/assets/{yaml.5a944a62.js → yaml.d43d21a8.js} +1 -1
- package/dist/assets/{z80.593af108.js → z80.f545b7bf.js} +1 -1
- package/dist/assets/zh-CN.e03e0e56.js +1 -0
- package/dist/assets/zh-TW.453f1e60.js +1 -0
- package/dist/index.html +2 -2
- package/package.json +3 -3
- package/dist/assets/accounts.8fbf8699.js +0 -1
- package/dist/assets/activity-log.edaa174f.js +0 -1
- package/dist/assets/activity.f03e4c50.js +0 -80
- package/dist/assets/af-ZA.c9c94fcd.js +0 -1
- package/dist/assets/app-overview.6445a201.svg +0 -86
- package/dist/assets/ar-SA.52ee85f9.js +0 -1
- package/dist/assets/authentication.a37290ac.js +0 -73
- package/dist/assets/aws.81dde688.js +0 -1
- package/dist/assets/backing-directus.877781ff.js +0 -1
- package/dist/assets/bg-BG.8d8c105a.js +0 -1
- package/dist/assets/br-FR.d3564938.js +0 -1
- package/dist/assets/ca-ES.f3dfdef6.js +0 -1
- package/dist/assets/cli.e9c97474.js +0 -19
- package/dist/assets/cloudron.ccb9f60b.js +0 -1
- package/dist/assets/codebase-overview.2867468d.js +0 -1
- package/dist/assets/collections.09fe8eef.js +0 -106
- package/dist/assets/collections.d440e2c1.js +0 -2
- package/dist/assets/config-options.592aab17.js +0 -138
- package/dist/assets/content.d6024fae.js +0 -1
- package/dist/assets/cs-CZ.ba778ad2.js +0 -1
- package/dist/assets/da-DK.38409d46.js +0 -1
- package/dist/assets/data-model.b806a25a.js +0 -1
- package/dist/assets/de-DE.e96978bc.js +0 -1
- package/dist/assets/display-templates.af38b75d.js +0 -1
- package/dist/assets/email-templates.cf7de2aa.js +0 -2
- package/dist/assets/en-CA.9ad3a3ab.js +0 -1
- package/dist/assets/en-GB.61c87be5.js +0 -1
- package/dist/assets/es-419.ca94d216.js +0 -1
- package/dist/assets/es-CL.ae584c00.js +0 -1
- package/dist/assets/es-ES.3ff9088e.js +0 -1
- package/dist/assets/es-MX.059cc750.js +0 -1
- package/dist/assets/et-EE.fb46a361.js +0 -3
- package/dist/assets/extensions.27ee4742.js +0 -12
- package/dist/assets/fa-IR.b864f77c.js +0 -1
- package/dist/assets/faq.633c25f1.js +0 -2
- package/dist/assets/fi-FI.14f31cb4.js +0 -1
- package/dist/assets/fields.47aabeca.js +0 -135
- package/dist/assets/file-library.82e96a16.js +0 -1
- package/dist/assets/files.97dd14f6.js +0 -189
- package/dist/assets/filters.b1397c95.js +0 -1
- package/dist/assets/flows.0173f6d4.js +0 -172
- package/dist/assets/flows.7116f535.js +0 -15
- package/dist/assets/folders.0622ae98.js +0 -132
- package/dist/assets/fr-CA.87857f82.js +0 -1
- package/dist/assets/fr-FR.43594476.js +0 -1
- package/dist/assets/glossary.38068d72.js +0 -1
- package/dist/assets/glossary.ecc8e7cf.js +0 -1
- package/dist/assets/hr-HR.076348b6.js +0 -1
- package/dist/assets/id-ID.8089647c.js +0 -1
- package/dist/assets/import-export.2114c732.js +0 -2
- package/dist/assets/index.40baf28f.css +0 -1
- package/dist/assets/index.8627ddb4.js +0 -1
- package/dist/assets/insights.7988716a.js +0 -2
- package/dist/assets/installation.5215ce07.js +0 -1
- package/dist/assets/introduction.807bce52.js +0 -1
- package/dist/assets/introduction.a173e7ad.js +0 -90
- package/dist/assets/introduction.a6b2c1f0.js +0 -1
- package/dist/assets/it-IT.d77d71da.js +0 -1
- package/dist/assets/items.02ad4f11.js +0 -1
- package/dist/assets/items.ba1efbf4.js +0 -136
- package/dist/assets/layouts.dded37a5.js +0 -1
- package/dist/assets/localization.f384f316.js +0 -1
- package/dist/assets/lt-LT.f2d719ff.js +0 -1
- package/dist/assets/migrations.fa20b23d.js +0 -19
- package/dist/assets/nl-NL.e613d40a.js +0 -1
- package/dist/assets/notifications.5186ee54.js +0 -153
- package/dist/assets/operations.51c06345.js +0 -1
- package/dist/assets/operations.eaacfa1d.js +0 -169
- package/dist/assets/overview.0fe284a4.js +0 -1
- package/dist/assets/overview.a1598534.js +0 -1
- package/dist/assets/permissions.355cb88d.js +0 -178
- package/dist/assets/pl-PL.91a0c1e6.js +0 -1
- package/dist/assets/plesk-screenshot.00f26a33.png +0 -0
- package/dist/assets/plesk.c1379970.js +0 -27
- package/dist/assets/presets.0d5dc9c6.js +0 -164
- package/dist/assets/project-settings.2a64f071.js +0 -1
- package/dist/assets/projects.f82931e8.js +0 -1
- package/dist/assets/pt-BR.ce1fdc59.js +0 -1
- package/dist/assets/pt-PT.f5bc9b8e.js +0 -1
- package/dist/assets/query.8fb6cf04.js +0 -152
- package/dist/assets/quickstart.c0e4b8bd.js +0 -20
- package/dist/assets/quickstart.f2432960.js +0 -9
- package/dist/assets/relations.2dfa7993.js +0 -115
- package/dist/assets/relationships.eb7e340c.js +0 -55
- package/dist/assets/resources.b4808e35.js +0 -1
- package/dist/assets/revisions.cf799486.js +0 -40
- package/dist/assets/ro-RO.a1adfb6a.js +0 -1
- package/dist/assets/roles.b0107422.js +0 -171
- package/dist/assets/ru-RU.74ac881b.js +0 -1
- package/dist/assets/running-locally.a3ec7567.js +0 -27
- package/dist/assets/security.b7fcc1c2.js +0 -1
- package/dist/assets/server.22f6f2c1.js +0 -114
- package/dist/assets/settings.509b7560.js +0 -1
- package/dist/assets/settings.c4a634ae.js +0 -51
- package/dist/assets/shares.4d7659d8.js +0 -1
- package/dist/assets/sl-SI.632899f8.js +0 -2
- package/dist/assets/sr-CS.2e5b18be.js +0 -1
- package/dist/assets/sr-SP.f91eaaca.js +0 -1
- package/dist/assets/support.6594facf.js +0 -1
- package/dist/assets/sv-SE.d485ddd3.js +0 -1
- package/dist/assets/teams.f575332d.js +0 -1
- package/dist/assets/th-TH.1e9ab13f.js +0 -2
- package/dist/assets/tr-TR.feb24957.js +0 -1
- package/dist/assets/translation-strings.fe88793b.js +0 -1
- package/dist/assets/translations.4be9ec77.js +0 -1
- package/dist/assets/triggers.c34177a3.js +0 -1
- package/dist/assets/ubuntu.cc908491.js +0 -11
- package/dist/assets/uk-UA.0e92f9a4.js +0 -1
- package/dist/assets/upgrades-migrations.a57ef987.js +0 -1
- package/dist/assets/user-directory.7b875602.js +0 -1
- package/dist/assets/users-roles-permissions.00ffdc25.js +0 -1
- package/dist/assets/users.0638ab5f.js +0 -252
- package/dist/assets/utilities.b2f15bfd.js +0 -74
- package/dist/assets/vi-VN.3e9c985f.js +0 -1
- package/dist/assets/webhooks.1f89f80a.js +0 -147
- package/dist/assets/webhooks.3d6334e9.js +0 -1
- package/dist/assets/zh-CN.5f89875e.js +0 -1
- package/dist/assets/zh-TW.2ac2bb07.js +0 -1
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import{a as u,o as r,b as i,w as n,g as l,e as o,B as e}from"./runtime-core.esm-bundler.e3d5f5b7.js";const c={class:"markdown-body"},h=l("blockquote",null,[l("p",null,"Environment variables are used for all configuration within a Directus project. These variables can be defined in a number of ways, which we cover below.")],-1),_=l("h2",{id:"configuration-files",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#configuration-files"},"#"),e(" Configuration Files")],-1),p=l("p",null,[e("By default, Directus will read the "),l("code",null,".env"),e(" file located next to your project\u2019s "),l("code",null,"package.json"),e(" (typically in the root folder of your project) for its configuration. You can change this path and filename by setting the "),l("code",null,"CONFIG_PATH"),e(" environment variable before starting Directus. For example:")],-1),f=l("pre",null,[l("code",{class:"language-bash"},[e("CONFIG_PATH="),l("span",{class:"hljs-string"},'"/path/to/config.js"'),e(` npx directus start
|
|
2
|
+
`)])],-1),m=l("p",null,[e("In case you prefer using a configuration file instead of environment variables, you can also use the "),l("code",null,"CONFIG_PATH"),e(" environment variable to instruct Directus to use a local configuration file instead of environment variables. The config file can be one of the following formats:")],-1),E=l("ul",null,[l("li",null,[l("a",{href:"#env"},".env")]),l("li",null,[l("a",{href:"#config-json"},"config.json")]),l("li",null,[l("a",{href:"#config-yaml"},"config.yaml")]),l("li",null,[l("a",{href:"#config-js"},"config.js")])],-1),g=l("h3",{id:".env",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#.env"},"#"),e(" .env")],-1),A=l("p",null,"If the config path has no file extension, or a file extension that\u2019s not one of the other supported formats, Directus will try reading the file config path as environment variables. This has the following structure:",-1),b=l("pre",null,[l("code",null,`HOST="0.0.0.0"
|
|
3
|
+
PORT=8055
|
|
4
|
+
|
|
5
|
+
DB_CLIENT="pg"
|
|
6
|
+
DB_HOST="localhost"
|
|
7
|
+
DB_PORT=5432
|
|
8
|
+
|
|
9
|
+
etc
|
|
10
|
+
`)],-1),T=l("h3",{id:"config.json",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#config.json"},"#"),e(" config.json")],-1),R=l("p",null,"If you prefer a single JSON file for your configuration, create a JSON file with the environment variables as keys, for example:",-1),O=l("pre",null,[l("code",null,`CONFIG_PATH="/path/to/config.json"
|
|
11
|
+
`)],-1),S=l("pre",null,[l("code",{class:"language-json"},[l("span",{class:"hljs-punctuation"},"{"),e(`
|
|
12
|
+
`),l("span",{class:"hljs-attr"},'"HOST"'),l("span",{class:"hljs-punctuation"},":"),e(),l("span",{class:"hljs-string"},'"0.0.0.0"'),l("span",{class:"hljs-punctuation"},","),e(`
|
|
13
|
+
`),l("span",{class:"hljs-attr"},'"PORT"'),l("span",{class:"hljs-punctuation"},":"),e(),l("span",{class:"hljs-number"},"8055"),l("span",{class:"hljs-punctuation"},","),e(`
|
|
14
|
+
|
|
15
|
+
`),l("span",{class:"hljs-attr"},'"DB_CLIENT"'),l("span",{class:"hljs-punctuation"},":"),e(),l("span",{class:"hljs-string"},'"pg"'),l("span",{class:"hljs-punctuation"},","),e(`
|
|
16
|
+
`),l("span",{class:"hljs-attr"},'"DB_HOST"'),l("span",{class:"hljs-punctuation"},":"),e(),l("span",{class:"hljs-string"},'"localhost"'),l("span",{class:"hljs-punctuation"},","),e(`
|
|
17
|
+
`),l("span",{class:"hljs-attr"},'"DB_PORT"'),l("span",{class:"hljs-punctuation"},":"),e(),l("span",{class:"hljs-number"},"5432"),e(`
|
|
18
|
+
|
|
19
|
+
`),l("span",{class:"hljs-comment"},"// etc"),e(`
|
|
20
|
+
`),l("span",{class:"hljs-punctuation"},"}"),e(`
|
|
21
|
+
`)])],-1),I=l("h3",{id:"config.yaml",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#config.yaml"},"#"),e(" config.yaml")],-1),y=l("p",null,[e("Similar to JSON, you can use a "),l("code",null,".yaml"),e(" (or "),l("code",null,".yml"),e(") file for your config:")],-1),D=l("pre",null,[l("code",null,`CONFIG_PATH="/path/to/config.yaml"
|
|
22
|
+
`)],-1),C=l("pre",null,[l("code",{class:"language-yaml"},[l("span",{class:"hljs-attr"},"HOST:"),e(),l("span",{class:"hljs-number"},"0.0"),l("span",{class:"hljs-number"},".0"),l("span",{class:"hljs-number"},".0"),e(`
|
|
23
|
+
`),l("span",{class:"hljs-attr"},"PORT:"),e(),l("span",{class:"hljs-number"},"8055"),e(`
|
|
24
|
+
|
|
25
|
+
`),l("span",{class:"hljs-attr"},"DB_CLIENT:"),e(),l("span",{class:"hljs-string"},"pg"),e(`
|
|
26
|
+
`),l("span",{class:"hljs-attr"},"DB_HOST:"),e(),l("span",{class:"hljs-string"},"localhost"),e(`
|
|
27
|
+
`),l("span",{class:"hljs-attr"},"DB_PORT:"),e(),l("span",{class:"hljs-number"},"5432"),e(`
|
|
28
|
+
`),l("span",{class:"hljs-comment"},"#"),e(`
|
|
29
|
+
`),l("span",{class:"hljs-comment"},"# etc"),e(`
|
|
30
|
+
`)])],-1),v=l("h3",{id:"config.js",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#config.js"},"#"),e(" config.js")],-1),L=l("p",null,[e("Using a JavaScript file for your config allows you to dynamically generate the configuration of the project during startup. The JavaScript configuration supports two different formats, either an "),l("strong",null,"Object Structure"),e(" where the key is the environment variable name:")],-1),w=l("pre",null,[l("code",{class:"language-js"},[l("span",{class:"hljs-comment"},"// Object Syntax"),e(`
|
|
31
|
+
|
|
32
|
+
`),l("span",{class:"hljs-variable language_"},"module"),e("."),l("span",{class:"hljs-property"},"exports"),e(` = {
|
|
33
|
+
`),l("span",{class:"hljs-attr"},"HOST"),e(": "),l("span",{class:"hljs-string"},"'0.0.0.0'"),e(`,
|
|
34
|
+
`),l("span",{class:"hljs-attr"},"PORT"),e(": "),l("span",{class:"hljs-number"},"8055"),e(`,
|
|
35
|
+
|
|
36
|
+
`),l("span",{class:"hljs-attr"},"DB_CLIENT"),e(": "),l("span",{class:"hljs-string"},"'pg'"),e(`,
|
|
37
|
+
`),l("span",{class:"hljs-attr"},"DB_HOST"),e(": "),l("span",{class:"hljs-string"},"'localhost'"),e(`,
|
|
38
|
+
`),l("span",{class:"hljs-attr"},"DB_PORT"),e(": "),l("span",{class:"hljs-number"},"5432"),e(`,
|
|
39
|
+
|
|
40
|
+
`),l("span",{class:"hljs-comment"},"// etc"),e(`
|
|
41
|
+
};
|
|
42
|
+
`)])],-1),U=l("p",null,[e("Or a "),l("strong",null,"Function Structure"),e(" that "),l("em",null,"returns"),e(" the same object format as above. The function gets "),l("code",null,"process.env"),e(" as its parameter.")],-1),H=l("pre",null,[l("code",{class:"language-js"},[l("span",{class:"hljs-comment"},"// Function Syntax"),e(`
|
|
43
|
+
|
|
44
|
+
`),l("span",{class:"hljs-variable language_"},"module"),e("."),l("span",{class:"hljs-property"},"exports"),e(" = "),l("span",{class:"hljs-keyword"},"function"),e(" ("),l("span",{class:"hljs-params"},"env"),e(`) {
|
|
45
|
+
`),l("span",{class:"hljs-keyword"},"return"),e(` {
|
|
46
|
+
`),l("span",{class:"hljs-attr"},"HOST"),e(": "),l("span",{class:"hljs-string"},"'0.0.0.0'"),e(`,
|
|
47
|
+
`),l("span",{class:"hljs-attr"},"PORT"),e(": "),l("span",{class:"hljs-number"},"8055"),e(`,
|
|
48
|
+
|
|
49
|
+
`),l("span",{class:"hljs-attr"},"DB_CLIENT"),e(": "),l("span",{class:"hljs-string"},"'pg'"),e(`,
|
|
50
|
+
`),l("span",{class:"hljs-attr"},"DB_HOST"),e(": "),l("span",{class:"hljs-string"},"'localhost'"),e(`,
|
|
51
|
+
`),l("span",{class:"hljs-attr"},"DB_PORT"),e(": "),l("span",{class:"hljs-number"},"5432"),e(`,
|
|
52
|
+
|
|
53
|
+
`),l("span",{class:"hljs-comment"},"// etc"),e(`
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
`)])],-1),N=l("h2",{id:"environment-variable-files",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#environment-variable-files"},"#"),e(" Environment Variable Files")],-1),P=l("p",null,[e("Any of the environment variable values can be imported from a file, by appending "),l("code",null,"_FILE"),e(" to the environment variable name. This is especially useful when used in conjunction with Docker Secrets, so you can keep sensitive data out of your compose files. For example:")],-1),x=l("pre",null,[l("code",null,`DB_PASSWORD_FILE="/run/secrets/db_password"
|
|
57
|
+
`)],-1),V=l("h2",{id:"type-casting-and-nesting",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#type-casting-and-nesting"},"#"),e(" Type Casting and Nesting")],-1),M=l("p",null,"Environment variables are automatically type cast based on the structure of the variable, for example:",-1),j=l("pre",null,[l("code",null,`PUBLIC_URL="https://example.com"
|
|
58
|
+
// "https://example.com"
|
|
59
|
+
|
|
60
|
+
DB_HOST="3306"
|
|
61
|
+
// 3306
|
|
62
|
+
|
|
63
|
+
CORS_ENABLED="false"
|
|
64
|
+
// false
|
|
65
|
+
|
|
66
|
+
STORAGE_LOCATIONS="s3,local,example"
|
|
67
|
+
// ["s3", "local", "example"]
|
|
68
|
+
`)],-1),k=l("p",null,[e("In cases where the environment variables are converted to a configuration object for third party library use, like in "),l("code",null,"DB_*"),e(" or "),l("code",null,"RATE_LIMITER_REDIS_*"),e(", the environment variable will be converted to camelCase. You can use a double underscore ("),l("code",null,"__"),e(") for nested objects:")],-1),B=l("pre",null,[l("code",null,`DB_CLIENT="pg"
|
|
69
|
+
DB_CONNECTION_STRING="postgresql://postgres:example@127.0.0.1"
|
|
70
|
+
DB_SSL__REJECT_UNAUTHORIZED="false"
|
|
71
|
+
|
|
72
|
+
{
|
|
73
|
+
client: "pg",
|
|
74
|
+
connectionString: "postgresql://postgres:example@127.0.0.1",
|
|
75
|
+
ssl: {
|
|
76
|
+
rejectUnauthorized: false
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
`)],-1),G=l("h2",{id:"environment-syntax-prefix",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#environment-syntax-prefix"},"#"),e(" Environment Syntax Prefix")],-1),F=l("p",null,[e("Directus will attempt to "),l("a",{href:"#type-casting-and-nesting"},"automatically type cast environment variables"),e(" based on context clues. If you have a specific need for a given type, you can tell Directus what type to use for the given value by prefixing the value with "),l("code",null,"{type}:"),e(". The following types are available:")],-1),W=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Syntax Prefix"),l("th",null,"Example"),l("th",null,"Output")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"string")]),l("td",null,[l("code",null,"string:value")]),l("td",null,[l("code",null,'"value"')])]),l("tr",null,[l("td",null,[l("code",null,"number")]),l("td",null,[l("code",null,"number:3306")]),l("td",null,[l("code",null,"3306")])]),l("tr",null,[l("td",null,[l("code",null,"regex")]),l("td",null,[l("code",null,"regex:\\.example\\.com$")]),l("td",null,[l("code",null,"/\\.example\\.com$/")])]),l("tr",null,[l("td",null,[l("code",null,"array")]),l("td",null,[l("code",null,"array:https://example.com,https://example2.com"),e(),l("br"),e(),l("code",null,"array:string:https://example.com,regex:\\.example3\\.com$")]),l("td",null,[l("code",null,'["https://example.com", "https://example2.com"]'),e(),l("br"),e(),l("code",null,'["https://example.com", "https://example2.com", /\\.example3\\.com$/]')])])])],-1),q=l("hr",null,null,-1),Y=l("h2",{id:"general",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#general"},"#"),e(" General")],-1),K=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CONFIG_PATH")]),l("td",null,[e("Where your config file is located. See "),l("a",{href:"#configuration-files"},"Configuration Files")]),l("td",null,[l("code",null,".env")])]),l("tr",null,[l("td",null,[l("code",null,"HOST")]),l("td",null,"IP or host the API listens on."),l("td",null,[l("code",null,"0.0.0.0")])]),l("tr",null,[l("td",null,[l("code",null,"PORT")]),l("td",null,"What port to run the API under."),l("td",null,[l("code",null,"8055")])]),l("tr",null,[l("td",null,[l("code",null,"PUBLIC_URL"),l("sup",null,"[1]")]),l("td",null,"URL where your API can be reached on the web."),l("td",null,[l("code",null,"/")])]),l("tr",null,[l("td",null,[l("code",null,"LOG_LEVEL")]),l("td",null,[e("What level of detail to log. One of "),l("code",null,"fatal"),e(", "),l("code",null,"error"),e(", "),l("code",null,"warn"),e(", "),l("code",null,"info"),e(", "),l("code",null,"debug"),e(", "),l("code",null,"trace"),e(" or "),l("code",null,"silent"),e(".")]),l("td",null,[l("code",null,"info")])]),l("tr",null,[l("td",null,[l("code",null,"LOG_STYLE")]),l("td",null,[e("Render the logs human readable (pretty) or as JSON. One of "),l("code",null,"pretty"),e(", "),l("code",null,"raw"),e(".")]),l("td",null,[l("code",null,"pretty")])]),l("tr",null,[l("td",null,[l("code",null,"MAX_PAYLOAD_SIZE")]),l("td",null,"Controls the maximum request body size. Accepts number of bytes, or human readable string."),l("td",null,[l("code",null,"100kb")])]),l("tr",null,[l("td",null,[l("code",null,"ROOT_REDIRECT")]),l("td",null,[e("Where to redirect to when navigating to "),l("code",null,"/"),e(". Accepts a relative path, absolute URL, or "),l("code",null,"false"),e(" to disable.")]),l("td",null,[l("code",null,"./admin")])]),l("tr",null,[l("td",null,[l("code",null,"SERVE_APP")]),l("td",null,[e("Whether or not to serve the Admin App under "),l("code",null,"/admin"),e(".")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"GRAPHQL_INTROSPECTION")]),l("td",null,"Whether or not to enable GraphQL Introspection"),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"MAX_RELATIONAL_DEPTH")]),l("td",null,[e("The maximum depth when filtering / querying relational fields, with a minimum value of "),l("code",null,"2"),e(".")]),l("td",null,[l("code",null,"10")])])])],-1),z=l("sup",null,"[1]",-1),X=e(" The PUBLIC_URL value is used for things like OAuth redirects, forgot-password emails, and logos that needs to be publicly available on the internet. "),Z=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Additional Logger Variables"),l("p",null,[e("All "),l("code",null,"LOGGER_*"),e(" environment variables are passed to the "),l("code",null,"options"),e(" configuration of a "),l("a",{href:"https://github.com/pinojs/pino/blob/master/docs/api.md#options",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"Pino"),e(" instance")]),e(". All "),l("code",null,"LOGGER_HTTP*"),e(" environment variables are passed to the "),l("code",null,"options"),e(" configuration of a "),l("a",{href:"https://github.com/pinojs/pino-http#api",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"Pino-http"),e(" instance")]),e(". Based on your project\u2019s needs, you can extend the "),l("code",null,"LOGGER_*"),e(" environment variables with any config you need to pass to the logger instance. If a LOGGER_LEVELS key is added, these values will be passed to the logger frontmatter, as described "),l("a",{href:"https://github.com/pinojs/pino/blob/master/docs/help.md#mapping-pino-log-levels-to-google-cloud-logging-stackdriver-severity-levels",target:"_blank",rel:"noopener noreferrer"},"here"),e(" for example. The format for adding LEVELS values is: "),l("code",null,'LOGGER_LEVELS="trace:DEBUG,debug:DEBUG,info:INFO,warn:WARNING,error:ERROR,fatal:CRITICAL"')])],-1),J=l("h2",{id:"server",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#server"},"#"),e(" Server")],-1),Q=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"SERVER_KEEP_ALIVE_TIMEOUT")]),l("td",null,"Timeout in milliseconds for socket to be destroyed"),l("td",null,[l("a",{href:"https://github.com/nodejs/node/blob/master/doc/api/http.md#serverkeepalivetimeout",target:"_blank",rel:"noopener noreferrer"},"server.keepAliveTimeout")])]),l("tr",null,[l("td",null,[l("code",null,"SERVER_HEADERS_TIMEOUT")]),l("td",null,"Timeout in milliseconds to parse HTTP headers"),l("td",null,[l("a",{href:"https://github.com/nodejs/node/blob/master/doc/api/http.md#serverheaderstimeout",target:"_blank",rel:"noopener noreferrer"},"server.headersTimeout")])])])],-1),$=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Additional Server Variables"),l("p",null,[e("All "),l("code",null,"SERVER_*"),e(" environment variables are merged with "),l("code",null,"server"),e(" instance properties created from "),l("a",{href:"https://github.com/nodejs/node/blob/master/doc/api/http.md#class-httpserver",target:"_blank",rel:"noopener noreferrer"},"http.Server"),e(". This allows to configure server behind a proxy, a load balancer, etc. Be careful to not override methods of this instance otherwise you may incur into unexpected behaviors.")])],-1),ll=l("h2",{id:"database",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#database"},"#"),e(" Database")],-1),el=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"DB_CLIENT")]),l("td",null,[l("strong",null,"Required"),e(". What database client to use. One of "),l("code",null,"pg"),e(" or "),l("code",null,"postgres"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", "),l("code",null,"mssql"),e(", "),l("code",null,"sqlite3"),e(", "),l("code",null,"cockroachdb"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_HOST")]),l("td",null,[e("Database host. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_PORT")]),l("td",null,[e("Database port. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_DATABASE")]),l("td",null,[e("Database name. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_USER")]),l("td",null,[e("Database user. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_PASSWORD")]),l("td",null,[e("Database user\u2019s password. "),l("strong",null,"Required"),e(" when using "),l("code",null,"pg"),e(", "),l("code",null,"mysql"),e(", "),l("code",null,"oracledb"),e(", or "),l("code",null,"mssql"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_FILENAME")]),l("td",null,[e("Where to read/write the SQLite database. "),l("strong",null,"Required"),e(" when using "),l("code",null,"sqlite3"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_CONNECTION_STRING")]),l("td",null,[e("When using "),l("code",null,"pg"),e(", you can submit a connection string instead of individual properties. Using this will ignore any of the other connection settings.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_POOL__*")]),l("td",null,[e("Pooling settings. Passed on to "),l("a",{href:"https://github.com/vincit/tarn.js#usage",target:"_blank",rel:"noopener noreferrer"},[e("the "),l("code",null,"tarn.js")]),e(" library.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"DB_EXCLUDE_TABLES")]),l("td",null,"CSV of tables you want Directus to ignore completely"),l("td",null,[l("code",null,"spatial_ref_sys,sysdiagrams")])]),l("tr",null,[l("td",null,[l("code",null,"DB_CHARSET")]),l("td",null,"Charset/collation to use in the connection to MySQL/MariaDB"),l("td",null,[l("code",null,"UTF8_GENERAL_CI")])]),l("tr",null,[l("td",null,[l("code",null,"DB_VERSION")]),l("td",null,"Database version, in case you use the PostgreSQL adapter to connect a non-standard database. Not normally required."),l("td",null,"\u2013")])])],-1),nl=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Additional Database Variables"),l("p",null,[e("All "),l("code",null,"DB_*"),e(" environment variables are passed to the "),l("code",null,"connection"),e(" configuration of a "),l("a",{href:"http://knexjs.org",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"Knex"),e(" instance")]),e(". Based on your project\u2019s needs, you can extend the "),l("code",null,"DB_*"),e(" environment variables with any config you need to pass to the database instance.")])],-1),tl=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Pooling"),l("p",null,[e("All the "),l("code",null,"DB_POOL__"),e(" prefixed options are passed to "),l("a",{href:"https://github.com/vincit/tarn.js#usage",target:"_blank",rel:"noopener noreferrer"},[l("code",null,"tarn.js")]),e(" through "),l("a",{href:"http://knexjs.org#Installation-pooling",target:"_blank",rel:"noopener noreferrer"},"Knex")])],-1),ol=l("h2",{id:"security",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#security"},"#"),e(" Security")],-1),sl=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),ul=l("tr",null,[l("td",null,[l("code",null,"KEY")]),l("td",null,"Unique identifier for the project."),l("td",null,"\u2013")],-1),al=l("tr",null,[l("td",null,[l("code",null,"SECRET")]),l("td",null,"Secret string for the project."),l("td",null,"\u2013")],-1),dl=l("tr",null,[l("td",null,[l("code",null,"ACCESS_TOKEN_TTL")]),l("td",null,"The duration that the access token is valid."),l("td",null,[l("code",null,"15m")])],-1),rl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_TTL")]),l("td",null,"The duration that the refresh token is valid, and also how long users stay logged-in to the App."),l("td",null,[l("code",null,"7d")])],-1),il=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_DOMAIN")]),l("td",null,"Which domain to use for the refresh cookie. Useful for development mode."),l("td",null,"\u2013")],-1),cl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_SECURE")]),l("td",null,"Whether or not to use a secure cookie for the refresh token in cookie mode."),l("td",null,[l("code",null,"false")])],-1),hl=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_SAME_SITE")]),l("td",null,[e("Value for "),l("code",null,"sameSite"),e(" in the refresh token cookie when in cookie mode.")]),l("td",null,[l("code",null,"lax")])],-1),_l=l("tr",null,[l("td",null,[l("code",null,"REFRESH_TOKEN_COOKIE_NAME")]),l("td",null,"Name of refresh token cookie ."),l("td",null,[l("code",null,"directus_refresh_token")])],-1),pl=l("td",null,[l("code",null,"PASSWORD_RESET_URL_ALLOW_LIST")],-1),fl=e("List of URLs that can be used "),ml=e("as "),El=l("code",null,"reset_url",-1),gl=e(" in /password/request"),Al=l("td",null,"\u2013",-1),bl=l("td",null,[l("code",null,"USER_INVITE_URL_ALLOW_LIST")],-1),Tl=e("List of URLs that can be used "),Rl=e("as "),Ol=l("code",null,"invite_url",-1),Sl=e(" in /users/invite"),Il=l("td",null,"\u2013",-1),yl=l("tr",null,[l("td",null,[l("code",null,"IP_TRUST_PROXY")]),l("td",null,[e("Settings for "),l("a",{href:"https://expressjs.com/en/guide/behind-proxies.html",target:"_blank",rel:"noopener noreferrer"},"express\u2019 trust proxy setting")]),l("td",null,"true")],-1),Dl=l("tr",null,[l("td",null,[l("code",null,"IP_CUSTOM_HEADER")]),l("td",null,"What custom request header to use for the IP address"),l("td",null,"false")],-1),Cl=l("tr",null,[l("td",null,[l("code",null,"ASSETS_CONTENT_SECURITY_POLICY")]),l("td",null,[e("Custom overrides for the Content-Security-Policy header for the /assets endpoint. See "),l("a",{href:"https://helmetjs.github.io",target:"_blank",rel:"noopener noreferrer"},"helmet\u2019s documentation"),e(" for more information.")]),l("td",null,"\u2013")],-1),vl=l("tr",null,[l("td",null,[l("code",null,"IMPORT_IP_DENY_LIST")]),l("td",null,[e("Deny importing files from these IP addresses. Use "),l("code",null,"0.0.0.0"),e(" for any local IP address")]),l("td",null,[l("code",null,"0.0.0.0")])],-1),Ll=l("tr",null,[l("td",null,[l("code",null,"CONTENT_SECURITY_POLICY_*")]),l("td",null,[e("Custom overrides for the Content-Security-Policy header. See "),l("a",{href:"https://helmetjs.github.io",target:"_blank",rel:"noopener noreferrer"},"helmet\u2019s documentation"),e(" for more information.")]),l("td",null,"\u2013")],-1),wl=l("tr",null,[l("td",null,[l("code",null,"HSTS_ENABLED")]),l("td",null,"Enable the Strict-Transport-Security policy header."),l("td",null,[l("code",null,"false")])],-1),Ul=l("tr",null,[l("td",null,[l("code",null,"HSTS_*")]),l("td",null,[e("Custom overrides for the Strict-Transport-Security header. See "),l("a",{href:"https://helmetjs.github.io",target:"_blank",rel:"noopener noreferrer"},"helmet\u2019s documentation"),e(" for more information.")]),l("td",null,"\u2013")],-1),Hl=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Cookie Strictness"),l("p",null,[e("Browser are pretty strict when it comes to third-party cookies. If you\u2019re running into unexpected problems when running your project and API on different domains, make sure to verify your configuration for "),l("code",null,"REFRESH_TOKEN_COOKIE_NAME"),e(", "),l("code",null,"REFRESH_TOKEN_COOKIE_SECURE"),e(" and "),l("code",null,"REFRESH_TOKEN_COOKIE_SAME_SITE"),e(".")])],-1),Nl=l("h3",{id:"hashing",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#hashing"},"#"),e(" Hashing")],-1),Pl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"HASH_MEMORY_COST")]),l("td",null,"How much memory to use when generating hashes, in KiB."),l("td",null,[l("code",null,"4096"),e(" (4 MiB)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_LENGTH")]),l("td",null,"The length of the hash function output in bytes."),l("td",null,[l("code",null,"32")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_TIME_COST")]),l("td",null,"The amount of passes (iterations) used by the hash function. It increases hash strength at the cost of time required to compute."),l("td",null,[l("code",null,"3")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_PARALLELISM")]),l("td",null,[e("The amount of threads to compute the hash on. Each thread has a memory pool with "),l("code",null,"HASH_MEMORY_COST"),e(" size.")]),l("td",null,[l("code",null,"1"),e(" (single thread)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_TYPE")]),l("td",null,[e("The variant of the hash function ("),l("code",null,"0"),e(": argon2d, "),l("code",null,"1"),e(": argon2i, or "),l("code",null,"2"),e(": argon2id).")]),l("td",null,[l("code",null,"1"),e(" (argon2i)")])]),l("tr",null,[l("td",null,[l("code",null,"HASH_ASSOCIATED_DATA")]),l("td",null,"An extra and optional non-secret value. The value will be included Base64 encoded in the parameters portion of the digest."),l("td",null,"\u2013")])])],-1),xl=e("Argon2\u2019s hashing function is used by Directus for three purposes: 1) hashing user passwords, 2) generating hashes for the "),Vl=l("code",null,"Hash",-1),Ml=e(" field type in collections, and 3) the "),jl=e("generate a hash API endpoint"),kl=e("."),Bl=l("p",null,[e("All "),l("code",null,"HASH_*"),e(" environment variable parameters are passed to the "),l("code",null,"argon2.hash"),e(" function. See the "),l("a",{href:"https://github.com/ranisalt/node-argon2/wiki/Options",target:"_blank",rel:"noopener noreferrer"},"node-argon2 library options page"),e(" for reference.")],-1),Gl=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Memory Usage"),l("p",null,[e("Modifying "),l("code",null,"HASH_MEMORY_COST"),e(" and/or "),l("code",null,"HASH_PARALLELISM"),e(" will affect the amount of memory directus uses when computing hashes; each thread gets "),l("code",null,"HASH_MEMORY_COST"),e(" amount of memory, so the total additional memory will be these two values multiplied. This may cause out of memory errors, especially when running in containerized environments.")])],-1),Fl=l("h2",{id:"cors",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#cors"},"#"),e(" CORS")],-1),Wl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CORS_ENABLED")]),l("td",null,"Whether or not to enable the CORS headers."),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_ORIGIN")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Origin"),e(" header. Use "),l("code",null,"true"),e(" to match the Origin header, or provide a domain or a CSV of domains for specific access")]),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_METHODS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Methods"),e(" header.")]),l("td",null,[l("code",null,"GET,POST,PATCH,DELETE")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_ALLOWED_HEADERS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Allow-Headers"),e(" header.")]),l("td",null,[l("code",null,"Content-Type,Authorization")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_EXPOSED_HEADERS")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Expose-Headers"),e(" header.")]),l("td",null,[l("code",null,"Content-Range")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_CREDENTIALS")]),l("td",null,[e("Whether or not to send the "),l("code",null,"Access-Control-Allow-Credentials"),e(" header.")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CORS_MAX_AGE")]),l("td",null,[e("Value for the "),l("code",null,"Access-Control-Max-Age"),e(" header.")]),l("td",null,[l("code",null,"18000")])])])],-1),ql=l("h2",{id:"rate-limiting",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#rate-limiting"},"#"),e(" Rate Limiting")],-1),Yl=l("p",null,[e("You can use the built-in rate-limiter to prevent users from hitting the API too much. Simply enabling the rate-limiter will set a default maximum of 50 requests per second, tracked in memory. Once you have multiple copies of Directus running under a load balancer, or your user base grows so much that memory is no longer a viable place to store the rate limiter information, you can use an external "),l("code",null,"memcache"),e(" or "),l("code",null,"redis"),e(" instance to store the rate limiter data.")],-1),Kl=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_ENABLED")]),l("td",null,"Whether or not to enable rate limiting on the API."),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_POINTS")]),l("td",null,"The amount of allowed hits per duration."),l("td",null,[l("code",null,"50")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_DURATION")]),l("td",null,"The time window in seconds in which the points are counted."),l("td",null,[l("code",null,"1")])]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_STORE")]),l("td",null,[e("Where to store the rate limiter counts. One of "),l("code",null,"memory"),e(", "),l("code",null,"redis"),e(", or "),l("code",null,"memcache"),e(".")]),l("td",null,[l("code",null,"memory")])])])],-1),zl=l("p",null,[e("Based on the "),l("code",null,"RATE_LIMITER_STORE"),e(" used, you must also provide the following configurations:")],-1),Xl=l("h3",{id:"memory",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#memory"},"#"),e(" Memory")],-1),Zl=l("p",null,"No additional configuration required.",-1),Jl=l("h3",{id:"redis",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#redis"},"#"),e(" Redis")],-1),Ql=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS")]),l("td",null,[e("Redis connection string, e.g., "),l("code",null,"redis://:authpassword@127.0.0.1:6380/4")]),l("td",null,"\u2014")])])],-1),$l=l("p",null,"Alternatively, you can provide the individual connection parameters:",-1),le=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_HOST")]),l("td",null,"Hostname of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_PORT")]),l("td",null,"Port of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_REDIS_PASSWORD")]),l("td",null,"Password for your Redis instance"),l("td",null,"\u2013")])])],-1),ee=l("h3",{id:"memcache",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#memcache"},"#"),e(" Memcache")],-1),ne=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RATE_LIMITER_MEMCACHE")]),l("td",null,[e("Location of your memcache instance. You can use "),l("a",{href:"#environment-syntax-prefix"},[l("code",null,"array:"),e(" syntax")]),e(", e.g., "),l("code",null,"array:<instance-1>,<instance-2>"),e(" for multiple memcache instances.")]),l("td",null,"\u2014")])])],-1),te=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Additional Rate Limiter Variables"),l("p",null,[e("All "),l("code",null,"RATE_LIMITER_*"),e(" variables are passed directly to a "),l("code",null,"rate-limiter-flexible"),e(" instance. Depending on your project\u2019s needs, you can extend the above environment variables to configure any of "),l("a",{href:"https://github.com/animir/node-rate-limiter-flexible/wiki/Options",target:"_blank",rel:"noopener noreferrer"},[e("the "),l("code",null,"rate-limiter-flexible"),e(" options")]),e(".")])],-1),oe=l("h3",{id:"example%3A-basic",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#example%3A-basic"},"#"),e(" Example: Basic")],-1),se=l("pre",null,[l("code",null,`// 10 requests per 5 seconds
|
|
80
|
+
|
|
81
|
+
RATE_LIMITER_POINTS="10"
|
|
82
|
+
RATE_LIMITER_DURATION="5"
|
|
83
|
+
`)],-1),ue=l("h3",{id:"example%3A-redis",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#example%3A-redis"},"#"),e(" Example: Redis")],-1),ae=l("pre",null,[l("code",null,`RATE_LIMITER_ENABLED="true"
|
|
84
|
+
|
|
85
|
+
RATE_LIMITER_POINTS="10"
|
|
86
|
+
RATE_LIMITER_DURATION="5"
|
|
87
|
+
|
|
88
|
+
RATE_LIMITER_STORE="redis"
|
|
89
|
+
|
|
90
|
+
RATE_LIMITER_REDIS="redis://@127.0.0.1"
|
|
91
|
+
`)],-1),de=l("h2",{id:"cache",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#cache"},"#"),e(" Cache")],-1),re=l("p",null,"Directus has a built-in data-caching option. Enabling this will cache the output of requests (based on the current user and exact query parameters used) into configured cache storage location. This drastically improves API performance, as subsequent requests are served straight from this cache. Enabling cache will also make Directus return accurate cache-control headers. Depending on your setup, this will further improve performance by caching the request in middleman servers (like CDNs) and even the browser.",-1),ie=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Internal Caching"),l("p",null,[e("In addition to data-caching, Directus also does some internal caching. Note "),l("code",null,"SCHEMA_CACHE"),e(" and "),l("code",null,"CACHE_PERMISSIONS"),e(" which are enabled by default. These speed up the overall performance of Directus, as we don\u2019t want to introspect the whole database or check all permissions on every request. When running Directus load balanced, you\u2019ll need to use a shared cache storage (like "),l("a",{href:"#redis-2"},"Redis"),e(" or "),l("a",{href:"#memcache-2"},"Memcache"),e(") or else disable all caching.")])],-1),ce=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Assets Cache"),l("p",null,[l("code",null,"Cache-Control"),e(" and "),l("code",null,"Last-Modified"),e(" headers for the "),l("code",null,"/assets"),e(" endpoint are separate from the regular data-cache. "),l("code",null,"Last-Modified"),e(" comes from "),l("code",null,"modified_on"),e(" DB field. This is useful as it\u2019s often possible to cache assets for far longer than you would cache database content. To learn more, see "),l("a",{href:"#assets"},"Assets"),e(".")])],-1),he=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CACHE_ENABLED")]),l("td",null,"Whether or not data caching is enabled."),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_TTL"),l("sup",null,"[1]")]),l("td",null,"How long the data cache is persisted."),l("td",null,[l("code",null,"5m")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_CONTROL_S_MAXAGE")]),l("td",null,[e("Whether to not to add the "),l("code",null,"s-maxage"),e(" expiration flag. Set to a number for a custom value.")]),l("td",null,[l("code",null,"0")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_AUTO_PURGE"),l("sup",null,"[2]")]),l("td",null,[e("Automatically purge the data cache on "),l("code",null,"create"),e(", "),l("code",null,"update"),e(", and "),l("code",null,"delete"),e(" actions.")]),l("td",null,[l("code",null,"false")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_SYSTEM_TTL"),l("sup",null,"[3]")]),l("td",null,[e("How long "),l("code",null,"CACHE_SCHEMA"),e(" and "),l("code",null,"CACHE_PERMISSIONS"),e(" are persisted.")]),l("td",null,[l("code",null,"10m")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_SCHEMA"),l("sup",null,"[3]")]),l("td",null,[e("Whether or not the database schema is cached. One of "),l("code",null,"false"),e(", "),l("code",null,"true")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_PERMISSIONS"),l("sup",null,"[3]")]),l("td",null,[e("Whether or not the user permissions are cached. One of "),l("code",null,"false"),e(", "),l("code",null,"true")]),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_NAMESPACE")]),l("td",null,"How to scope the cache data."),l("td",null,[l("code",null,"directus-cache")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_STORE"),l("sup",null,"[4]")]),l("td",null,[e("Where to store the cache data. Either "),l("code",null,"memory"),e(", "),l("code",null,"redis"),e(", or "),l("code",null,"memcache"),e(".")]),l("td",null,[l("code",null,"memory")])]),l("tr",null,[l("td",null,[l("code",null,"CACHE_STATUS_HEADER")]),l("td",null,[e("If set, returns the cache status in the configured header. One of "),l("code",null,"HIT"),e(", "),l("code",null,"MISS"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"CACHE_VALUE_MAX_SIZE")]),l("td",null,[e("Maximum size of values that will be cached. Accepts number of bytes, or human readable string. Use "),l("code",null,"false"),e(" for no limit")]),l("td",null,"false")])])],-1),_e=l("sup",null,"[1]",-1),pe=e(" `CACHE_TTL` Based on your project's needs, you might be able to aggressively cache your data, only requiring new data to be fetched every hour or so. This allows you to squeeze the most performance out of your Directus instance. This can be incredibly useful for applications where you have a lot of (public) read-access and where updates aren't real-time (for example a website). `CACHE_TTL` uses [`ms`](https://www.npmjs.com/package/ms) to parse the value, so you configure it using human readable values (like `2 days`, `7 hrs`, `5m`). "),fe=l("sup",null,"[2]",-1),me=e(" `CACHE_AUTO_PURGE` allows you to keep the Directus API real-time, while still getting the performance benefits on quick subsequent reads. "),Ee=l("sup",null,"[3]",-1),ge=e(" Not affected by the `CACHE_ENABLED` value. "),Ae=l("sup",null,"[4]",-1),be=e(" `CACHE_STORE` For larger projects, you most likely don't want to rely on local memory for caching. Instead, you can use the above `CACHE_STORE` environment variable to use either `memcache` or `redis` as the cache store. Based on the chosen `CACHE_STORE`, you must also provide the following configurations: "),Te=l("h3",{id:"memory-1",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#memory-1"},"#"),e(" Memory")],-1),Re=l("p",null,"No additional configuration required.",-1),Oe=l("h3",{id:"redis-1",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#redis-1"},"#"),e(" Redis")],-1),Se=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CACHE_REDIS")]),l("td",null,[e("Redis connection string, e.g., "),l("code",null,"redis://:authpassword@127.0.0.1:6380/4")]),l("td",null,"\u2014")])])],-1),Ie=l("p",null,"Alternatively, you can provide the individual connection parameters:",-1),ye=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CACHE_REDIS_HOST")]),l("td",null,"Hostname of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"CACHE_REDIS_PORT")]),l("td",null,"Port of the Redis instance"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"CACHE_REDIS_PASSWORD")]),l("td",null,"Password for your Redis instance"),l("td",null,"\u2013")])])],-1),De=l("h3",{id:"memcache-1",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#memcache-1"},"#"),e(" Memcache")],-1),Ce=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"CACHE_MEMCACHE")]),l("td",null,[e("Location of your memcache instance. You can use "),l("a",{href:"#environment-syntax-prefix"},[l("code",null,"array:"),e(" syntax")]),e(", e.g., "),l("code",null,"array:<instance-1>,<instance-2>"),e(" for multiple memcache instances.")]),l("td",null,"\u2014")])])],-1),ve=l("h2",{id:"file-storage",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#file-storage"},"#"),e(" File Storage")],-1),Le=l("p",null,[e("By default, Directus stores all uploaded files locally on disk. However, you can also configure Directus to use S3, Google Cloud Storage, or Azure. You can also configure "),l("em",null,"multiple"),e(" storage adapters at the same time. This allows you to choose where files are being uploaded on a file-by-file basis. In the Admin App, files will automatically be uploaded to the first configured storage location (in this case "),l("code",null,"local"),e("). The used storage location is saved under "),l("code",null,"storage"),e(" in "),l("code",null,"directus_files"),e(".")],-1),we=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"File Storage Default"),l("p",null,"If you don\u2019t provide any configuration for storage adapters, this default will be used:"),l("pre",null,[l("code",null,`STORAGE_LOCATIONS="local"
|
|
92
|
+
STORAGE_LOCAL_ROOT="./uploads"
|
|
93
|
+
`)])],-1),Ue=l("div",{class:"warning hint"},[l("div",{class:"hint-title"},"Case sensitivity"),l("p",null,"The location value(s) you specify should be capitalized when specifying the additional configuration values. For example, this will not work:"),l("pre",null,[l("code",null,`STORAGE_LOCATIONS="s3"
|
|
94
|
+
STORAGE_s3_DRIVER="s3" # Will not work, lowercase "s3" \u274C
|
|
95
|
+
`)]),l("p",null,"but this will work:"),l("pre",null,[l("code",null,`STORAGE_LOCATIONS="s3"
|
|
96
|
+
STORAGE_S3_DRIVER="s3" # Will work, "s3" is uppercased \u2705
|
|
97
|
+
`)])],-1),He=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_LOCATIONS")]),l("td",null,[e("A CSV of storage locations (e.g., "),l("code",null,"local,digitalocean,amazon"),e(") to use. You can use any names you\u2019d like for these keys.")]),l("td",null,[l("code",null,"local")])])])],-1),Ne=l("p",null,"For each of the storage locations listed, you must provide the following configuration:",-1),Pe=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_DRIVER")]),l("td",null,[e("Which driver to use, either "),l("code",null,"local"),e(", "),l("code",null,"s3"),e(", "),l("code",null,"gcs"),e(", "),l("code",null,"azure")]),l("td")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ROOT")]),l("td",null,"Where to store the files on disk"),l("td",null,[l("code",null,"''")])])])],-1),xe=l("p",null,"Based on your configured driver, you must also provide the following configurations:",-1),Ve=l("h3",{id:"local-(local)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#local-(local)"},"#"),e(" Local ("),l("code",null,"local"),e(")")],-1),Me=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ROOT")]),l("td",null,"Where to store the files on disk"),l("td",null,"\u2013")])])],-1),je=l("h3",{id:"s3-(s3)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#s3-(s3)"},"#"),e(" S3 ("),l("code",null,"s3"),e(")")],-1),ke=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_KEY")]),l("td",null,"User key"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_SECRET")]),l("td",null,"User secret"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_BUCKET")]),l("td",null,"S3 Bucket"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_REGION")]),l("td",null,"S3 Region"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ENDPOINT")]),l("td",null,"S3 Endpoint"),l("td",null,[l("code",null,"s3.amazonaws.com")])]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACL")]),l("td",null,"S3 ACL"),l("td",null,"\u2013")])])],-1),Be=l("h3",{id:"azure-(azure)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#azure-(azure)"},"#"),e(" Azure ("),l("code",null,"azure"),e(")")],-1),Ge=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_CONTAINER_NAME")]),l("td",null,"Azure Storage container"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACCOUNT_NAME")]),l("td",null,"Azure Storage account name"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ACCOUNT_KEY")]),l("td",null,"Azure Storage key"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_ENDPOINT")]),l("td",null,"Azure URL"),l("td",null,[l("code",null,"https://{ACCOUNT_KEY}.blob.core.windows.net")])])])],-1),Fe=l("h3",{id:"google-cloud-storage-(gcs)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#google-cloud-storage-(gcs)"},"#"),e(" Google Cloud Storage ("),l("code",null,"gcs"),e(")")],-1),We=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_KEY_FILENAME")]),l("td",null,"Path to key file on disk"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"STORAGE_<LOCATION>_BUCKET")]),l("td",null,"Google Cloud Storage bucket"),l("td",null,"\u2013")])])],-1),qe=l("h3",{id:"example%3A-multiple-storage-adapters",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#example%3A-multiple-storage-adapters"},"#"),e(" Example: Multiple Storage Adapters")],-1),Ye=l("p",null,"Below showcases a CSV of storage location names, with a config block for each:",-1),Ke=l("pre",null,[l("code",null,`STORAGE_LOCATIONS="local,aws"
|
|
98
|
+
|
|
99
|
+
STORAGE_LOCAL_DRIVER="local"
|
|
100
|
+
STORAGE_LOCAL_ROOT="local"
|
|
101
|
+
|
|
102
|
+
STORAGE_AWS_KEY="tp15c...510vk"
|
|
103
|
+
STORAGE_AWS_SECRET="yk29b...b932n"
|
|
104
|
+
STORAGE_AWS_REGION="us-east-2"
|
|
105
|
+
STORAGE_AWS_BUCKET="my-files"
|
|
106
|
+
`)],-1),ze=l("h3",{id:"metadata",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#metadata"},"#"),e(" Metadata")],-1),Xe=l("p",null,[e("When uploading an image, Directus persists the "),l("em",null,"description, title, and tags"),e(" from available EXIF metadata. For security purposes, collection of additional metadata must be configured:")],-1),Ze=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"FILE_METADATA_ALLOW_LIST")]),l("td",null,[e("A comma-separated list of metadata keys to collect during file upload. Use "),l("code",null,"*"),e(" for all"),l("sup",null,"[1]"),e(".")]),l("td",null,"ifd0.Make,ifd0.Model,exif.FNumber,exif.ExposureTime,exif.FocalLength,exif.ISO")])])],-1),Je=l("sup",null,"[1]",-1),Qe=e(": Extracting all metadata might cause memory issues when the file has an unusually large set of metadata "),$e=l("h2",{id:"assets",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#assets"},"#"),e(" Assets")],-1),ln=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"ASSETS_CACHE_TTL")]),l("td",null,[e("How long assets will be cached for in the browser. Sets the "),l("code",null,"max-age"),e(" value of the "),l("code",null,"Cache-Control"),e(" header.")]),l("td",null,[l("code",null,"30m")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_MAX_CONCURRENT")]),l("td",null,"How many file transformations can be done simultaneously"),l("td",null,[l("code",null,"4")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_IMAGE_MAX_DIMENSION")]),l("td",null,"The max pixel dimensions size (width/height) that is allowed to be transformed"),l("td",null,[l("code",null,"6000")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_TRANSFORM_MAX_OPERATIONS")]),l("td",null,"The max number of transform operations that is allowed to be processed (excludes saved presets)"),l("td",null,[l("code",null,"5")])]),l("tr",null,[l("td",null,[l("code",null,"ASSETS_CONTENT_SECURITY_POLICY")]),l("td",null,[e("Custom overrides for the Content-Security-Policy header. See "),l("a",{href:"https://helmetjs.github.io",target:"_blank",rel:"noopener noreferrer"},"helmet\u2019s documentation"),e(" for more information.")]),l("td",null,"\u2013")])])],-1),en=l("p",null,"Image transformations can be fairly heavy on memory usage. If you\u2019re using a system with 1GB or less available memory, we recommend lowering the allowed concurrent transformations to prevent you from overflowing your server.",-1),nn=l("h2",{id:"authentication",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#authentication"},"#"),e(" Authentication")],-1),tn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_PROVIDERS")]),l("td",null,"A comma-separated list of auth providers."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_DISABLE_DEFAULT")]),l("td",null,"Disable the default auth provider"),l("td",null,[l("code",null,"false")])])])],-1),on=l("p",null,"For each auth provider you list, you must also provide the following configuration:",-1),sn=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DRIVER")]),l("td",null,[e("Which driver to use, either "),l("code",null,"local"),e(", "),l("code",null,"oauth2"),e(", "),l("code",null,"openid"),e(", "),l("code",null,"ldap")]),l("td",null,"\u2013")])])],-1),un=l("p",null,"You may also be required to specify additional variables depending on the auth driver. See configuration details below.",-1),an=l("div",{class:"tip hint"},[l("div",{class:"hint-title"},"Multiple Providers"),l("p",null,"Directus users can only authenticate using the auth provider they are created with. It is not possible to authenticate with multiple providers for the same user.")],-1),dn=l("h3",{id:"local-(local)-1",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#local-(local)-1"},"#"),e(" Local ("),l("code",null,"local"),e(")")],-1),rn=l("p",null,"The default Directus email/password authentication flow.",-1),cn=l("p",null,"No additional configuration required.",-1),hn=l("h3",{id:"sso-(oauth2-and-openid)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#sso-(oauth2-and-openid)"},"#"),e(" SSO ("),l("code",null,"oauth2"),e(" and "),l("code",null,"openid"),e(")")],-1),_n=l("p",null,"Directus\u2019 SSO integrations provide powerful alternative ways to authenticate into your project. Directus will ask you to login on the external service, and return authenticated with a Directus account linked to that service.",-1),pn=l("p",null,[e("For example, you can login to Directus using a GitHub account by creating an "),l("a",{href:"https://github.com/settings/developers",target:"_blank",rel:"noopener noreferrer"},"OAuth 2.0 app in GitHub"),e(" and adding the following configuration to Directus:")],-1),fn=l("pre",null,[l("code",null,`AUTH_PROVIDERS="github"
|
|
107
|
+
|
|
108
|
+
AUTH_GITHUB_DRIVER="oauth2"
|
|
109
|
+
AUTH_GITHUB_CLIENT_ID="99d3...c3c4"
|
|
110
|
+
AUTH_GITHUB_CLIENT_SECRET="34ae...f963"
|
|
111
|
+
AUTH_GITHUB_AUTHORIZE_URL="https://github.com/login/oauth/authorize"
|
|
112
|
+
AUTH_GITHUB_ACCESS_URL="https://github.com/login/oauth/access_token"
|
|
113
|
+
AUTH_GITHUB_PROFILE_URL="https://api.github.com/user"
|
|
114
|
+
`)],-1),mn=e("More example SSO configurations "),En=e("can be found here"),gn=e("."),An=l("div",{class:"warning hint"},[l("div",{class:"hint-title"},"PUBLIC_URL"),l("p",null,[e("These flows rely on the "),l("code",null,"PUBLIC_URL"),e(" variable for redirecting. Ensure the variable is correctly configured.")])],-1),bn=l("h3",{id:"oauth-2.0",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#oauth-2.0"},"#"),e(" OAuth 2.0")],-1),Tn=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),Rn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_ID")]),l("td",null,"Client identifier for the OAuth provider."),l("td",null,"\u2013")],-1),On=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_SECRET")]),l("td",null,"Client secret for the OAuth provider."),l("td",null,"\u2013")],-1),Sn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_SCOPE")]),l("td",null,"A white-space separated list of permissions to request."),l("td",null,[l("code",null,"email")])],-1),In=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_AUTHORIZE_URL")]),l("td",null,"Authorization page URL of the OAuth provider."),l("td",null,"\u2013")],-1),yn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ACCESS_URL")]),l("td",null,"Access token URL of the OAuth provider."),l("td",null,"\u2013")],-1),Dn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_PROFILE_URL")]),l("td",null,"User profile URL of the OAuth provider."),l("td",null,"\u2013")],-1),Cn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_IDENTIFIER_KEY")]),l("td",null,[e("User profile identifier key "),l("sup",null,"[1]"),e(". Will default to "),l("code",null,"EMAIL_KEY"),e(".")]),l("td",null,"\u2013")],-1),vn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_EMAIL_KEY")]),l("td",null,"User profile email key."),l("td",null,[l("code",null,"email")])],-1),Ln=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_FIRST_NAME_KEY")]),l("td",null,"User profile first name key."),l("td",null,"\u2013")],-1),wn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_LAST_NAME_KEY")]),l("td",null,"User profile last name key."),l("td",null,"\u2013")],-1),Un=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ALLOW_PUBLIC_REGISTRATION")]),l("td",null,"Automatically create accounts for authenticating users."),l("td",null,[l("code",null,"false")])],-1),Hn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DEFAULT_ROLE_ID")]),l("td",null,"A Directus role ID to assign created users."),l("td",null,"\u2013")],-1),Nn=l("td",null,[l("code",null,"AUTH_<PROVIDER>_ICON")],-1),Pn=e("SVG icon to display with the login link. "),xn=e("See options here"),Vn=e("."),Mn=l("td",null,[l("code",null,"account_circle")],-1),jn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_PARAMS")]),l("td",null,"Custom query parameters applied to the authorization URL."),l("td",null,"\u2013")],-1),kn=l("sup",null,"[1]",-1),Bn=e(' When authenticating, Directus will match the identifier value from the external user profile to a Directus users "External Identifier". '),Gn=l("h3",{id:"openid",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#openid"},"#"),e(" OpenID")],-1),Fn=l("p",null,"OpenID is an authentication protocol built on OAuth 2.0, and should be preferred over standard OAuth 2.0 where possible.",-1),Wn=l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])],-1),qn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_ID")]),l("td",null,"Client identifier for the external service."),l("td",null,"\u2013")],-1),Yn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_SECRET")]),l("td",null,"Client secret for the external service."),l("td",null,"\u2013")],-1),Kn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_SCOPE")]),l("td",null,"A white-space separated list of permissions to request."),l("td",null,[l("code",null,"openid profile email")])],-1),zn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ISSUER_URL")]),l("td",null,[e("OpenID "),l("code",null,".well-known"),e(" discovery document URL of the external service.")]),l("td",null,"\u2013")],-1),Xn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_IDENTIFIER_KEY")]),l("td",null,[e("User profile identifier key "),l("sup",null,"[1]"),e(".")]),l("td",null,[l("code",null,"sub"),l("sup",null,"[2]")])],-1),Zn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_ALLOW_PUBLIC_REGISTRATION")]),l("td",null,"Automatically create accounts for authenticating users."),l("td",null,[l("code",null,"false")])],-1),Jn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_REQUIRE_VERIFIED_EMAIL")]),l("td",null,"Require created users to have a verified email address."),l("td",null,[l("code",null,"false")])],-1),Qn=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DEFAULT_ROLE_ID")]),l("td",null,"A Directus role ID to assign created users."),l("td",null,"\u2013")],-1),$n=l("td",null,[l("code",null,"AUTH_<PROVIDER>_ICON")],-1),lt=e("SVG icon to display with the login link. "),et=e("See options here"),nt=e("."),tt=l("td",null,[l("code",null,"account_circle")],-1),ot=l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_PARAMS")]),l("td",null,"Custom query parameters applied to the authorization URL."),l("td",null,"\u2013")],-1),st=l("sup",null,"[1]",-1),ut=e(' When authenticating, Directus will match the identifier value from the external user profile to a Directus users "External Identifier". '),at=l("sup",null,"[2]",-1),dt=e(" `sub` represents a unique user identifier defined by the OpenID provider. For users not relying on `PUBLIC_REGISTRATION` it is recommended to use a human-readable identifier, such as `email`. "),rt=l("h3",{id:"ldap-(ldap)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#ldap-(ldap)"},"#"),e(" LDAP ("),l("code",null,"ldap"),e(")")],-1),it=l("p",null,"LDAP allows Active Directory users to authenticate and use Directus without having to be manually configured. User information and roles will be assigned from Active Directory.",-1),ct=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_CLIENT_URL")]),l("td",null,"LDAP connection URL."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_BIND_DN")]),l("td",null,[e("Bind user "),l("sup",null,"[1]"),e(" distinguished name.")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_BIND_PASSWORD")]),l("td",null,"Bind user password."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_DN")]),l("td",null,"Directory path containing users."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_ATTRIBUTE")]),l("td",null,"Attribute to identify the user."),l("td",null,[l("code",null,"cn")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_USER_SCOPE")]),l("td",null,[e("Scope of the user search, either "),l("code",null,"base"),e(", "),l("code",null,"one"),e(", "),l("code",null,"sub"),e(),l("sup",null,"[2]"),e(".")]),l("td",null,[l("code",null,"one")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_MAIL_ATTRIBUTE")]),l("td",null,"User email attribute."),l("td",null,[l("code",null,"mail")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_FIRST_NAME_ATTRIBUTE")]),l("td",null,"User first name attribute."),l("td",null,[l("code",null,"givenName")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_LAST_NAME_ATTRIBUTE")]),l("td",null,"User last name attribute."),l("td",null,[l("code",null,"sn")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_DN"),l("sup",null,"[3]")]),l("td",null,"Directory path containing groups."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_ATTRIBUTE")]),l("td",null,"Attribute to identify user as a member of a group."),l("td",null,[l("code",null,"member")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_GROUP_SCOPE")]),l("td",null,[e("Scope of the group search, either "),l("code",null,"base"),e(", "),l("code",null,"one"),e(", "),l("code",null,"sub"),e(),l("sup",null,"[2]"),e(".")]),l("td",null,[l("code",null,"one")])]),l("tr",null,[l("td",null,[l("code",null,"AUTH_<PROVIDER>_DEFAULT_ROLE_ID")]),l("td",null,"A fallback Directus role ID to assign created users."),l("td",null,"\u2013")])])],-1),ht=l("sup",null,"[1]",-1),_t=e(" The bind user must have permission to query users and groups to perform authentication. Anonymous binding can by achieved by setting an empty value for `BIND_DN` and `BIND_PASSWORD`. "),pt=l("sup",null,"[2]",-1),ft=e(" The scope defines the following behaviors: "),mt=l("ul",null,[l("li",null,[l("code",null,"base"),e(": Limits the scope to a single object defined by the associated DN.")]),l("li",null,[l("code",null,"one"),e(": Searches all objects within the associated DN.")]),l("li",null,[l("code",null,"sub"),e(": Searches all objects and sub-objects within the associated DN.")])],-1),Et=l("sup",null,"[3]",-1),gt=e(" If `GROUP_DN` is specified, the user's role will always be updated on authentication to a matching group configured in AD, or fallback to the `DEFAULT_ROLE_ID`. "),At=l("h3",{id:"example%3A-ldap",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#example%3A-ldap"},"#"),e(" Example: LDAP")],-1),bt=l("pre",null,[l("code",null,`AUTH_PROVIDERS="ldap"
|
|
115
|
+
|
|
116
|
+
AUTH_LDAP_DRIVER="ldap"
|
|
117
|
+
AUTH_LDAP_CLIENT_URL="ldap://ldap.directus.io"
|
|
118
|
+
AUTH_LDAP_BIND_DN="CN=Bind User,OU=Users,DC=ldap,DC=directus,DC=io"
|
|
119
|
+
AUTH_LDAP_BIND_PASSWORD="p455w0rd"
|
|
120
|
+
AUTH_LDAP_USER_DN="OU=Users,DC=ldap,DC=directus,DC=io"
|
|
121
|
+
AUTH_LDAP_GROUP_DN="OU=Groups,DC=ldap,DC=directus,DC=io"
|
|
122
|
+
`)],-1),Tt=l("h3",{id:"example%3A-multiple-auth-providers",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#example%3A-multiple-auth-providers"},"#"),e(" Example: Multiple Auth Providers")],-1),Rt=l("p",null,"You can configure multiple providers for handling authentication in Directus. This allows for different options when logging in. To do this, provide a comma-separated list of provider names, and a config block for each provider:",-1),Ot=l("pre",null,[l("code",null,`AUTH_PROVIDERS="google,facebook"
|
|
123
|
+
|
|
124
|
+
AUTH_GOOGLE_DRIVER="openid"
|
|
125
|
+
AUTH_GOOGLE_CLIENT_ID="830d...29sd"
|
|
126
|
+
AUTH_GOOGLE_CLIENT_SECRET="la23...4k2l"
|
|
127
|
+
AUTH_GOOGLE_ISSUER_URL="https://accounts.google.com/.well-known/openid-configuration"
|
|
128
|
+
AUTH_GOOGLE_IDENTIFIER_KEY="email"
|
|
129
|
+
AUTH_GOOGLE_ICON="google"
|
|
130
|
+
|
|
131
|
+
AUTH_FACEBOOK_DRIVER="oauth2"
|
|
132
|
+
AUTH_FACEBOOK_CLIENT_ID="830d...29sd"
|
|
133
|
+
AUTH_FACEBOOK_CLIENT_SECRET="jd8x...685z"
|
|
134
|
+
AUTH_FACEBOOK_AUTHORIZE_URL="https://www.facebook.com/dialog/oauth"
|
|
135
|
+
AUTH_FACEBOOK_ACCESS_URL="https://graph.facebook.com/oauth/access_token"
|
|
136
|
+
AUTH_FACEBOOK_PROFILE_URL="https://graph.facebook.com/me?fields=email"
|
|
137
|
+
AUTH_FACEBOOK_ICON="facebook"
|
|
138
|
+
`)],-1),St=l("h2",{id:"extensions",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#extensions"},"#"),e(" Extensions")],-1),It=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EXTENSIONS_PATH")]),l("td",null,"Path to your local extensions folder."),l("td",null,[l("code",null,"./extensions")])]),l("tr",null,[l("td",null,[l("code",null,"EXTENSIONS_AUTO_RELOAD")]),l("td",null,"Automatically reload extensions when they have changed."),l("td",null,[l("code",null,"false")])])])],-1),yt=l("h2",{id:"messenger",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#messenger"},"#"),e(" Messenger")],-1),Dt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"MESSENGER_STORE")]),l("td",null,[e("One of "),l("code",null,"memory"),e(", "),l("code",null,"redis"),l("sup",null,"[1]")]),l("td",null,[l("code",null,"memory")])]),l("tr",null,[l("td",null,[l("code",null,"MESSENGER_NAMESPACE")]),l("td",null,"How to scope the channels in Redis"),l("td",null,[l("code",null,"directus")])]),l("tr",null,[l("td",null,[l("code",null,"MESSENGER_REDIS_*")]),l("td",null,"The Redis configuration for the pub/sub connection"),l("td",null,"\u2013")])])],-1),Ct=l("sup",null,"[1]",-1),vt=e(" `redis` should be used in load-balanced installations of Directus "),Lt=l("h2",{id:"email",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#email"},"#"),e(" Email")],-1),wt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_VERIFY_SETUP")]),l("td",null,"Check if email setup is properly configured."),l("td",null,[l("code",null,"true")])]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_FROM")]),l("td",null,"Email address from which emails are sent."),l("td",null,[l("code",null,"no-reply@directus.io")])]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_TRANSPORT")]),l("td",null,[e("What to use to send emails. One of "),l("code",null,"sendmail"),e(", "),l("code",null,"smtp"),e(", "),l("code",null,"mailgun"),e(", "),l("code",null,"ses"),e(".")]),l("td",null,[l("code",null,"sendmail")])])])],-1),Ut=l("p",null,[e("Based on the "),l("code",null,"EMAIL_TRANSPORT"),e(" used, you must also provide the following configurations:")],-1),Ht=l("h3",{id:"sendmail-(sendmail)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#sendmail-(sendmail)"},"#"),e(" Sendmail ("),l("code",null,"sendmail"),e(")")],-1),Nt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SENDMAIL_NEW_LINE")]),l("td",null,"What new line style to use in sendmail."),l("td",null,[l("code",null,"unix")])]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SENDMAIL_PATH")]),l("td",null,"Path to your sendmail executable."),l("td",null,[l("code",null,"/usr/sbin/sendmail")])])])],-1),Pt=l("h3",{id:"smtp-(smtp)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#smtp-(smtp)"},"#"),e(" SMTP ("),l("code",null,"smtp"),e(")")],-1),xt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_HOST")]),l("td",null,"SMTP Host"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_PORT")]),l("td",null,"SMTP Port"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_USER")]),l("td",null,"SMTP User"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_PASSWORD")]),l("td",null,"SMTP Password"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_POOL")]),l("td",null,"Use SMTP pooling"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_SECURE")]),l("td",null,"Enable TLS"),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SMTP_IGNORE_TLS")]),l("td",null,"Ignore TLS"),l("td",null,"\u2013")])])],-1),Vt=l("h3",{id:"mailgun-(mailgun)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#mailgun-(mailgun)"},"#"),e(" Mailgun ("),l("code",null,"mailgun"),e(")")],-1),Mt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_API_KEY")]),l("td",null,"Your Mailgun API key."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_DOMAIN")]),l("td",null,[e("A domain from "),l("a",{href:"https://app.mailgun.com/app/sending/domains",target:"_blank",rel:"noopener noreferrer"},"your Mailgun account")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_MAILGUN_HOST")]),l("td",null,"Allows you to specify a custom host."),l("td",null,[l("code",null,"api.mailgun.net")])])])],-1),jt=l("h3",{id:"aws-ses-(ses)",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#aws-ses-(ses)"},"#"),e(" AWS SES ("),l("code",null,"ses"),e(")")],-1),kt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_CREDENTIALS__ACCESS_KEY_ID")]),l("td",null,"Your AWS SES access key. ID."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEY")]),l("td",null,"Your AWS SES secret key."),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"EMAIL_SES_REGION")]),l("td",null,"Your AWS SES region."),l("td",null,"\u2013")])])],-1),Bt=l("h2",{id:"admin-account",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#admin-account"},"#"),e(" Admin Account")],-1),Gt=l("p",null,[e("If you\u2019re relying on Docker and/or the "),l("code",null,"directus bootstrap"),e(" CLI command, you can pass the following two environment variables to automatically configure the first user:")],-1),Ft=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"ADMIN_EMAIL")]),l("td",null,[e("The email address of the first user that\u2019s automatically created when using "),l("code",null,"directus bootstrap"),e(".")]),l("td",null,"\u2013")]),l("tr",null,[l("td",null,[l("code",null,"ADMIN_PASSWORD")]),l("td",null,[e("The password of the first user that\u2019s automatically created when using "),l("code",null,"directus bootstrap"),e(".")]),l("td",null,"\u2013")])])],-1),Wt=l("h2",{id:"telemetry",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#telemetry"},"#"),e(" Telemetry")],-1),qt=l("p",null,"To more accurately gauge the frequency of installation, version fragmentation, and general size of the userbase, Directus collects little and anonymized data about your environment. You can easily opt-out with the following environment variable:",-1),Yt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"TELEMETRY")]),l("td",null,"Allow Directus to collect anonymized data about your environment."),l("td",null,[l("code",null,"true")])])])],-1),Kt=l("h2",{id:"limits-%26-optimizations",tabindex:"-1"},[l("a",{class:"header-anchor",href:"#limits-%26-optimizations"},"#"),e(" Limits & Optimizations")],-1),zt=l("p",null,"Allows you to configure hard technical limits, to prevent abuse and optimize for your particular server environment.",-1),Xt=l("table",null,[l("thead",null,[l("tr",null,[l("th",null,"Variable"),l("th",null,"Description"),l("th",null,"Default Value")])]),l("tbody",null,[l("tr",null,[l("td",null,[l("code",null,"RELATIONAL_BATCH_SIZE")]),l("td",null,"How many rows are read into memory at a time when constructing nested relational datasets"),l("td",null,"25000")]),l("tr",null,[l("td",null,[l("code",null,"EXPORT_BATCH_SIZE")]),l("td",null,"How many rows are read into memory at a time when constructing exports"),l("td",null,"5000")])])],-1),lo="Configuration Options",eo=!1,no="Environment variables are used for all configuration within a Directus project. These variables can be defined in a number of ways, which we cover below.",to="28 min read",oo={name:"config-options",setup(Zt,{expose:a}){const s={title:"Configuration Options",modularExtension:!1,description:"Environment variables are used for all configuration within a Directus project. These variables can be defined in a number of ways, which we cover below.",readTime:"28 min read"};return a({frontmatter:s}),(Jt,Qt)=>{const t=u("router-link"),d=u("docs-wrapper");return r(),i(d,{frontmatter:s},{default:n(()=>[l("div",c,[h,_,p,f,m,E,g,A,b,T,R,O,S,I,y,D,C,v,L,w,U,H,N,P,x,V,M,j,k,B,G,F,W,q,Y,K,z,X,Z,J,Q,$,ll,el,nl,tl,ol,l("table",null,[sl,l("tbody",null,[ul,al,dl,rl,il,cl,hl,_l,l("tr",null,[pl,l("td",null,[fl,o(t,{to:"/docs/reference/authentication#request-password-reset"},{default:n(()=>[ml,El,gl]),_:1})]),Al]),l("tr",null,[bl,l("td",null,[Tl,o(t,{to:"/docs/reference/system/users#invite-a-new-user"},{default:n(()=>[Rl,Ol,Sl]),_:1})]),Il]),yl,Dl,Cl,vl,Ll,wl,Ul])]),Hl,Nl,Pl,l("p",null,[xl,Vl,Ml,o(t,{to:"/docs/reference/system/utilities#generate-a-hash"},{default:n(()=>[jl]),_:1}),kl]),Bl,Gl,Fl,Wl,ql,Yl,Kl,zl,Xl,Zl,Jl,Ql,$l,le,ee,ne,te,oe,se,ue,ae,de,re,ie,ce,he,_e,pe,fe,me,Ee,ge,Ae,be,Te,Re,Oe,Se,Ie,ye,De,Ce,ve,Le,we,Ue,He,Ne,Pe,xe,Ve,Me,je,ke,Be,Ge,Fe,We,qe,Ye,Ke,ze,Xe,Ze,Je,Qe,$e,ln,en,nn,tn,on,sn,un,an,dn,rn,cn,hn,_n,pn,fn,l("p",null,[mn,o(t,{to:"/docs/self-hosted/sso-examples"},{default:n(()=>[En]),_:1}),gn]),An,bn,l("table",null,[Tn,l("tbody",null,[Rn,On,Sn,In,yn,Dn,Cn,vn,Ln,wn,Un,Hn,l("tr",null,[Nn,l("td",null,[Pn,o(t,{to:"/docs/getting-started/glossary#icons"},{default:n(()=>[xn]),_:1}),Vn]),Mn]),jn])]),kn,Bn,Gn,Fn,l("table",null,[Wn,l("tbody",null,[qn,Yn,Kn,zn,Xn,Zn,Jn,Qn,l("tr",null,[$n,l("td",null,[lt,o(t,{to:"/docs/getting-started/glossary#icons"},{default:n(()=>[et]),_:1}),nt]),tt]),ot])]),st,ut,at,dt,rt,it,ct,ht,_t,pt,ft,mt,Et,gt,At,bt,Tt,Rt,Ot,St,It,yt,Dt,Ct,vt,Lt,wt,Ut,Ht,Nt,Pt,xt,Vt,Mt,jt,kt,Bt,Gt,Ft,Wt,qt,Yt,Kt,zt,Xt])]),_:1})}}};export{oo as default,no as description,eo as modularExtension,to as readTime,lo as title};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,o as d,b as c,w as o,g as t,e as n,B as e}from"./runtime-core.esm-bundler.e3d5f5b7.js";const h={class:"markdown-body"},_=t("blockquote",null,[t("p",null,[e("The Content Module is the primary way for Users to interact with Items in a Collection. Regardless of what your data model contains "),t("em",null,"(be it blog posts, event bookings, IoT fleets, geo-positions, CRM, or whatever!)"),e(" the Content Module enables you to view and manage, sort and search, or import and export data.")])],-1),u={class:"tip hint"},m=t("div",{class:"hint-title"},"Before You Begin",-1),g=e("A solid understanding about "),p=e("Collections"),f=e(", "),w=e("Items"),v=e(" and "),y=e("Fields"),C=e(" will help you use the Content module efficiently."),b=t("h2",{id:"collection-page",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#collection-page"},"#"),e(" Collection Page")],-1),I=t("p",null,[t("img",{src:"https://cdn.directus.io/docs/v9/app-guide/content/content/content-20220415A/collection-page-20220415A.webp",alt:"Collection Overview"})],-1),T=e("The Content Module consists of Collection Pages and Item Pages. Use the Navigation Bar on the left to move between Collections. Each Collection Page displays all Items in its Collection and comes with highly configurable "),x=e("Layouts"),k=e(" for browsing, visualizing, and managing Items. The Page Header includes key action buttons for sorting, searching, filtering, creating, editing, archiving, and deleting multiple Items. To learn more, see our guide on the "),M=e("Collection Page"),P=e("."),A={class:"tip hint"},B=e("The Content module helps you manage Items. Collections are managed within the "),U=t("strong",null,"Settings",-1),R=e(" menu, as these actions results in changes to the data model. To learn more, see our guide on "),S=e("data model configuration"),N=e("."),E=t("h2",{id:"item-page",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#item-page"},"#"),e(" Item Page")],-1),V=t("p",null,[t("img",{src:"https://cdn.directus.io/docs/v9/app-guide/content/content/content-20220415A/item-page-20220215A.webp",alt:"Article Overview"})],-1),j=e("When you click an Item on the Collection page, its Item Page will open. The Item Page is a form that enables you to view, edit or delete an Item and its field values. You can also comment on, share, archive, or revert an Item from this form. To learn more, see our guide on the "),D=e("Item Page"),O=e("."),Y=t("h2",{id:"shares",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#shares"},"#"),e(" Shares")],-1),q=t("video",{title:"Data Sharing",autoplay:"",playsinline:"",muted:"",loop:"",controls:""},[t("source",{src:"https://cdn.directus.io/docs/v9/app-guide/content/content/content-20220415A/data-shares-20220415A.mp4",type:"video/mp4"})],-1),z=e("In any project, certain Collections will have limited access permissions. In some cases, you may need to share one of the Items within the collection with an individual or group of individuals who don\u2019t yet have permission. In this case, use Shares. Shares enable you to share an Item from a Collection with anyone, regardless of their permissions, and even if they are not Users within the project. To learn more, see our guide on "),F=e("Data Sharing"),H=e("."),K="Content",Q=!1,X="The Content Module is the primary way for Users to interact with Items in a Collection. Regardless of what your data model contains _(be it blog posts, event bookings, IoT fleets, geo-positions, CRM, or whatever!)_ the Content Module enables Users to view and manage, sort and search, or import and export data.",Z="3 min read",$={name:"content",setup(L,{expose:l}){const a={title:"Content",modularExtension:!1,description:"The Content Module is the primary way for Users to interact with Items in a Collection. Regardless of what your data model contains _(be it blog posts, event bookings, IoT fleets, geo-positions, CRM, or whatever!)_ the Content Module enables Users to view and manage, sort and search, or import and export data.",readTime:"3 min read"};return l({frontmatter:a}),(W,G)=>{const s=i("router-link"),r=i("docs-wrapper");return d(),c(r,{frontmatter:a},{default:o(()=>[t("div",h,[_,t("div",u,[m,t("p",null,[g,n(s,{to:"/docs/getting-started/glossary#collections"},{default:o(()=>[p]),_:1}),f,n(s,{to:"/docs/getting-started/glossary#items"},{default:o(()=>[w]),_:1}),v,n(s,{to:"/docs/getting-started/glossary#fields"},{default:o(()=>[y]),_:1}),C])]),b,I,t("p",null,[T,n(s,{to:"/docs/getting-started/glossary#layouts"},{default:o(()=>[x]),_:1}),k,n(s,{to:"/docs/app/content/collections"},{default:o(()=>[M]),_:1}),P]),t("div",A,[t("p",null,[B,U,R,n(s,{to:"/docs/configuration/data-model"},{default:o(()=>[S]),_:1}),N])]),E,V,t("p",null,[j,n(s,{to:"/docs/app/content/items"},{default:o(()=>[D]),_:1}),O]),Y,q,t("p",null,[z,n(s,{to:"/docs/app/content/shares"},{default:o(()=>[F]),_:1}),H])])]),_:1})}}};export{$ as default,X as description,Q as modularExtension,Z as readTime,K as title};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import{a as l,o as d,b as r,w as t,g as e,e as o,B as n}from"./runtime-core.esm-bundler.e3d5f5b7.js";const u={class:"markdown-body"},h=e("h2",{id:"scaffolding-your-directus-extension",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#scaffolding-your-directus-extension"},"#"),n(" Scaffolding your Directus Extension")],-1),p=e("p",null,[n("The easiest way to start developing extensions is to use the "),e("code",null,"create-directus-extension"),n(" utility:")],-1),_=e("pre",null,[e("code",{class:"language-bash"},`npm init directus-extension
|
|
2
|
-
`)],-1),f=e("p",null,"After specifying the name of the extension, the type of the extension and the programming language you want to use, the utility will create a folder with the recommended file structure to create an extension.",-1),x=e("h3",{id:"extension-folder-structure",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#extension-folder-structure"},"#"),n(" Extension Folder Structure")],-1),g=e("p",null,[n("The folder created by the utility is in fact
|
|
2
|
+
`)],-1),f=e("p",null,"After specifying the name of the extension, the type of the extension and the programming language you want to use, the utility will create a folder with the recommended file structure to create an extension.",-1),x=e("h3",{id:"extension-folder-structure",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#extension-folder-structure"},"#"),n(" Extension Folder Structure")],-1),g=e("p",null,[n("The folder created by the utility is in fact an npm package. It comes with a few pre-installed packages depending on the extension type and the language you chose. The most important one is "),e("code",null,"@directus/extensions-sdk"),n(". This package includes a CLI, which allows you to build your extension and to scaffold additional extensions, and it provides Typescript helpers and other utilities.")],-1),y=e("p",null,[n("Inside the created folder there is a "),e("code",null,"src/"),n(" folder. This folder contains the entrypoint of your extension. If you write additional source files, they should go into this folder.")],-1),m=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Entrypoint"),e("p",null,[n("The entrypoint is either called "),e("code",null,"index.js"),n(" or "),e("code",null,"index.ts"),n(", depending on which programming language you chose.")])],-1),b=e("p",null,[n("The generated "),e("code",null,"package.json"),n(" file contains an additional "),e("code",null,"directus:extension"),n(" field with the following sub-fields:")],-1),w=e("ul",null,[e("li",null,[e("code",null,"type"),n(" \u2014 The type of the extension")]),e("li",null,[e("code",null,"path"),n(" \u2014 The path to the built extension")]),e("li",null,[e("code",null,"source"),n(" \u2014 The path to the source entrypoint")]),e("li",null,[e("code",null,"host"),n(" \u2014 A semver string that indicates with which versions of the Directus host, the extension is compatible with")])],-1),k=e("p",null,"The CLI will use those fields by default to determine the input and output file paths and how the extension should be built.",-1),v=e("h2",{id:"building-your-extension",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#building-your-extension"},"#"),n(" Building your Extension")],-1),T=e("p",null,[n("Before your extension can be used by Directus, it has to be built. If you used the "),e("code",null,"create-directus-extension"),n(" utility to scaffold your extension, building your extension is as easy as running:")],-1),j=e("pre",null,[e("code",{class:"language-bash"},`npm run build
|
|
3
3
|
`)],-1),E=e("p",null,[n("The generated "),e("code",null,"package.json"),n(" contains a script that calls the "),e("code",null,"directus-extension"),n(" CLI which is part of "),e("code",null,"@directus/extensions-sdk"),n(":")],-1),I=e("pre",null,[e("code",{class:"language-json"},[e("span",{class:"hljs-punctuation"},"{"),n(`
|
|
4
4
|
`),e("span",{class:"hljs-attr"},'"scripts"'),e("span",{class:"hljs-punctuation"},":"),n(),e("span",{class:"hljs-punctuation"},"{"),n(`
|
|
5
5
|
`),e("span",{class:"hljs-attr"},'"build"'),e("span",{class:"hljs-punctuation"},":"),n(),e("span",{class:"hljs-string"},'"directus-extension build"'),n(`
|
|
6
6
|
`),e("span",{class:"hljs-punctuation"},"}"),n(`
|
|
7
7
|
`),e("span",{class:"hljs-punctuation"},"}"),n(`
|
|
8
|
-
`)])],-1),C=e("p",null,[n("If you prefer to scaffold your extension manually, you can use the "),e("code",null,"directus-extension"),n(" CLI binary directly. The "),e("code",null,"--help"),n(" flag provides useful information regarding the available options and flags.")],-1),L=e("p",null,"Internally, the CLI uses Rollup to bundle your extension to a single entrypoint.",-1),D=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Watch"),e("p",null,[n("The CLI supports rebuilding extensions whenever a file has changed by using the "),e("code",null,"--watch"),n(" flag.")])],-1),
|
|
8
|
+
`)])],-1),C=e("p",null,[n("If you prefer to scaffold your extension manually, you can use the "),e("code",null,"directus-extension"),n(" CLI binary directly. The "),e("code",null,"--help"),n(" flag provides useful information regarding the available options and flags.")],-1),L=e("p",null,"Internally, the CLI uses Rollup to bundle your extension to a single entrypoint.",-1),D=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"Watch"),e("p",null,[n("The CLI supports rebuilding extensions whenever a file has changed by using the "),e("code",null,"--watch"),n(" flag.")])],-1),A=e("h3",{id:"configuring-the-cli",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#configuring-the-cli"},"#"),n(" Configuring the CLI")],-1),S=e("p",null,[n("Most of the time, it should be sufficient to use the CLI as is. But, in some cases it might be necessary to customize it to your specific needs. This can be done by creating a "),e("code",null,"extension.config.js"),n(" file at the root of your extension package with the following content:")],-1),B=e("pre",null,[e("code",{class:"language-js"},[e("span",{class:"hljs-variable language_"},"module"),n("."),e("span",{class:"hljs-property"},"exports"),n(` = {
|
|
9
9
|
`),e("span",{class:"hljs-attr"},"plugins"),n(`: [],
|
|
10
10
|
};
|
|
11
11
|
`)])],-1),O=e("h4",{id:"supported-options",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#supported-options"},"#"),n(" Supported Options")],-1),P=e("ul",null,[e("li",null,[e("code",null,"plugins"),n(" \u2014 An array of Rollup plugins that will be used when building extensions in addition to the built-in ones.")])],-1),M=e("div",{class:"tip hint"},[e("div",{class:"hint-title"},"CommonJS or ESM"),e("p",null,[n("By using the "),e("code",null,"type"),n(" field inside your "),e("code",null,"package.json"),n(" file or using the appropriate file extension ("),e("code",null,".mjs"),n(" or "),e("code",null,".cjs"),n("), the config file can be loaded as a CommonJS or ESM file.")])],-1),N=e("h2",{id:"developing-your-extension",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#developing-your-extension"},"#"),n(" Developing your Extension")],-1),R=e("p",null,"To learn more about developing extensions of a specific type, you can refer to one of the individual guides:",-1),V=e("h4",{id:"app-extensions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#app-extensions"},"#"),n(" App Extensions")],-1),F=n("Interfaces"),H=n("Displays"),J=n("Layouts"),W=n("Modules"),z=n("Panels"),U=e("h4",{id:"api-extensions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#api-extensions"},"#"),n(" API Extensions")],-1),X=n("Hooks"),q=n("Endpoints"),G=e("h4",{id:"hybrid-extensions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hybrid-extensions"},"#"),n(" Hybrid Extensions")],-1),K=n("Operations"),Q={class:"tip hint"},Y=e("div",{class:"hint-title"},"Live Reloading",-1),Z=n("When working on extensions, try setting the "),$=e("code",null,"EXTENSIONS_AUTO_RELOAD",-1),ee=n(" environment variable"),ne=n(". This will make the API reload extensions on changes automatically."),te=e("h2",{id:"publishing-your-extension",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#publishing-your-extension"},"#"),n(" Publishing your Extension")],-1),se=e("p",null,[n("To make an extension available to all Directus users, you can publish the npm package created by "),e("code",null,"@directus/extensions-sdk"),n(" to the npm registry. Make sure the name of the package follows the naming convention for package extensions: "),e("code",null,"directus-extension-<extension-name>"),n(" or "),e("code",null,"@<scope>/directus-extension-<extension-name>"),n(". "),e("code",null,"<extension-name>"),n(" has to be replaced with the name of your extension.")],-1),oe=e("h2",{id:"installing-an-extension",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#installing-an-extension"},"#"),n(" Installing an Extension")],-1),ie=e("p",null,"There are two ways to install an extension.",-1),le=e("h3",{id:"package-extension",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#package-extension"},"#"),n(" Package Extension")],-1),ae=e("p",null,"Package extensions are essentially npm packages. They can be installed from the npm registry, from a tarball, from a git repository or any other means supported by npm. On startup, Directus will automatically load any package extension installed into your Directus project folder.",-1),ce=e("p",null,"To install an extension from the npm registry, simply use the npm CLI:",-1),de=e("pre",null,[e("code",{class:"language-bash"},[e("span",{class:"hljs-built_in"},"cd"),n(` <directus-project-folder>
|
|
12
12
|
npm install <full-package-extension-name>
|
|
13
|
-
`)])],-1),re=e("p",null,[e("code",null,"<project-folder>"),n(" has to be replaced by the Directus project folder. "),e("code",null,"<full-package-extension-name>"),n(" should be replaced with the full name of the package extension (e.g. "),e("code",null,"directus-extension-custom"),n(").")],-1),ue=e("h3",{id:"local-extension",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#local-extension"},"#"),n(" Local Extension")],-1),he=e("p",null,[n("Local extensions are essentially the files generated by the "),e("code",null,"directus-extension build"),n(" command. They can be installed by copying those files into a specific extensions folder.")],-1),pe=e("p",null,[n("To install an extension locally, you have to move the output from the "),e("code",null,"dist/"),n(" folder into your project\u2019s "),e("code",null,"./extensions/<extension-folder>/<extension-name>/"),n(" folder. "),e("code",null,"<extension-folder>"),n(" has to be replaced by the extension type in plural form (e.g. interfaces). "),e("code",null,"<extension-name>"),n(" should be replaced with the name of your extension.")],-1),_e=e("div",{class:"warning hint"},[e("div",{class:"hint-title"},"Configurable Folders"),e("p",null,"The path to the built extension as well as the extensions directory are configurable and may be located elsewhere.")],-1),
|
|
13
|
+
`)])],-1),re=e("p",null,[e("code",null,"<project-folder>"),n(" has to be replaced by the Directus project folder. "),e("code",null,"<full-package-extension-name>"),n(" should be replaced with the full name of the package extension (e.g. "),e("code",null,"directus-extension-custom"),n(").")],-1),ue=e("h3",{id:"local-extension",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#local-extension"},"#"),n(" Local Extension")],-1),he=e("p",null,[n("Local extensions are essentially the files generated by the "),e("code",null,"directus-extension build"),n(" command. They can be installed by copying those files into a specific extensions folder.")],-1),pe=e("p",null,[n("To install an extension locally, you have to move the output from the "),e("code",null,"dist/"),n(" folder into your project\u2019s "),e("code",null,"./extensions/<extension-folder>/<extension-name>/"),n(" folder. "),e("code",null,"<extension-folder>"),n(" has to be replaced by the extension type in plural form (e.g. interfaces). "),e("code",null,"<extension-name>"),n(" should be replaced with the name of your extension.")],-1),_e=e("div",{class:"warning hint"},[e("div",{class:"hint-title"},"Configurable Folders"),e("p",null,"The path to the built extension as well as the extensions directory are configurable and may be located elsewhere.")],-1),me="Creating Extensions",be=!1,we="A guide on how to scaffold your Directus Extension.",ke="5 min read",ve={name:"creating-extensions",setup(fe,{expose:a}){const i={title:"Creating Extensions",modularExtension:!1,description:"A guide on how to scaffold your Directus Extension.",readTime:"5 min read"};return a({frontmatter:i}),(xe,ge)=>{const s=l("router-link"),c=l("docs-wrapper");return d(),r(c,{frontmatter:i},{default:t(()=>[e("div",u,[h,p,_,f,x,g,y,m,b,w,k,v,T,j,E,I,C,L,D,A,S,B,O,P,M,N,R,V,e("ul",null,[e("li",null,[o(s,{to:"/docs/extensions/interfaces"},{default:t(()=>[F]),_:1})]),e("li",null,[o(s,{to:"/docs/extensions/displays"},{default:t(()=>[H]),_:1})]),e("li",null,[o(s,{to:"/docs/extensions/layouts"},{default:t(()=>[J]),_:1})]),e("li",null,[o(s,{to:"/docs/extensions/modules"},{default:t(()=>[W]),_:1})]),e("li",null,[o(s,{to:"/docs/extensions/panels"},{default:t(()=>[z]),_:1})])]),U,e("ul",null,[e("li",null,[o(s,{to:"/docs/extensions/hooks"},{default:t(()=>[X]),_:1})]),e("li",null,[o(s,{to:"/docs/extensions/endpoints"},{default:t(()=>[q]),_:1})])]),G,e("ul",null,[e("li",null,[o(s,{to:"/docs/extensions/operations"},{default:t(()=>[K]),_:1})])]),e("div",Q,[Y,e("p",null,[Z,o(s,{to:"/docs/self-hosted/config-options"},{default:t(()=>[$,ee]),_:1}),ne])]),te,se,oe,ie,le,ae,ce,de,re,ue,he,pe,_e])]),_:1})}}};export{ve as default,we as description,be as modularExtension,ke as readTime,me as title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as L}from"./index.
|
|
1
|
+
import{y as L}from"./index.69857a47.entry.js";function q(v,g){return g.forEach(function(o){o&&typeof o!="string"&&!Array.isArray(o)&&Object.keys(o).forEach(function(c){if(c!=="default"&&!(c in v)){var f=Object.getOwnPropertyDescriptor(o,c);Object.defineProperty(v,c,f.get?f:{enumerable:!0,get:function(){return o[c]}})}})}),Object.freeze(Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}))}var O={exports:{}};(function(v,g){(function(o){o(L.exports)})(function(o){o.defineMode("crystal",function(c){function f(n,e){return new RegExp((e?"":"^")+"(?:"+n.join("|")+")"+(e?"$":"\\b"))}function l(n,e,r){return r.tokenize.push(n),n(e,r)}var y=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,_=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,b=/^(?:\[\][?=]?)/,A=/^(?:\.(?:\.{2})?|->|[?:])/,h=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,F=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,T=f(["abstract","alias","as","asm","begin","break","case","class","def","do","else","elsif","end","ensure","enum","extend","for","fun","if","include","instance_sizeof","lib","macro","module","next","of","out","pointerof","private","protected","rescue","return","require","select","sizeof","struct","super","then","type","typeof","uninitialized","union","unless","until","when","while","with","yield","__DIR__","__END_LINE__","__FILE__","__LINE__"]),j=f(["true","false","nil","self"]),P=["def","fun","macro","class","module","struct","lib","enum","union","do","for"],K=f(P),D=["if","unless","case","while","until","begin","then"],M=f(D),s=["end","else","elsif","rescue","ensure"],N=f(s),I=["\\)","\\}","\\]"],Z=new RegExp("^(?:"+I.join("|")+")$"),E={def:S,fun:S,macro:$,class:p,module:p,struct:p,lib:p,enum:p,union:p},z={"[":"]","{":"}","(":")","<":">"};function w(n,e){if(n.eatSpace())return null;if(e.lastToken!="\\"&&n.match("{%",!1))return l(a("%","%"),n,e);if(e.lastToken!="\\"&&n.match("{{",!1))return l(a("{","}"),n,e);if(n.peek()=="#")return n.skipToEnd(),"comment";var r;if(n.match(h))return n.eat(/[?!]/),r=n.current(),n.eat(":")?"atom":e.lastToken=="."?"property":T.test(r)?(K.test(r)?!(r=="fun"&&e.blocks.indexOf("lib")>=0)&&!(r=="def"&&e.lastToken=="abstract")&&(e.blocks.push(r),e.currentIndent+=1):(e.lastStyle=="operator"||!e.lastStyle)&&M.test(r)?(e.blocks.push(r),e.currentIndent+=1):r=="end"&&(e.blocks.pop(),e.currentIndent-=1),E.hasOwnProperty(r)&&e.tokenize.push(E[r]),"keyword"):j.test(r)?"atom":"variable";if(n.eat("@"))return n.peek()=="["?l(d("[","]","meta"),n,e):(n.eat("@"),n.match(h)||n.match(F),"variable-2");if(n.match(F))return"tag";if(n.eat(":"))return n.eat('"')?l(x('"',"atom",!1),n,e):n.match(h)||n.match(F)||n.match(y)||n.match(_)||n.match(b)?"atom":(n.eat(":"),"operator");if(n.eat('"'))return l(x('"',"string",!0),n,e);if(n.peek()=="%"){var u="string",t=!0,i;if(n.match("%r"))u="string-2",i=n.next();else if(n.match("%w"))t=!1,i=n.next();else if(n.match("%q"))t=!1,i=n.next();else if(i=n.match(/^%([^\w\s=])/))i=i[1];else{if(n.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/))return"meta";if(n.eat("%"))return"operator"}return z.hasOwnProperty(i)&&(i=z[i]),l(x(i,u,t),n,e)}return(r=n.match(/^<<-('?)([A-Z]\w*)\1/))?l(R(r[2],!r[1]),n,e):n.eat("'")?(n.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),n.eat("'"),"atom"):n.eat("0")?(n.eat("x")?n.match(/^[0-9a-fA-F_]+/):n.eat("o")?n.match(/^[0-7_]+/):n.eat("b")&&n.match(/^[01_]+/),"number"):n.eat(/^\d/)?(n.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/),"number"):n.match(y)?(n.eat("="),"operator"):n.match(_)||n.match(A)?"operator":(r=n.match(/[({[]/,!1))?(r=r[0],l(d(r,z[r],null),n,e)):n.eat("\\")?(n.next(),"meta"):(n.next(),null)}function d(n,e,r,u){return function(t,i){if(!u&&t.match(n))return i.tokenize[i.tokenize.length-1]=d(n,e,r,!0),i.currentIndent+=1,r;var k=w(t,i);return t.current()===e&&(i.tokenize.pop(),i.currentIndent-=1,k=r),k}}function a(n,e,r){return function(u,t){return!r&&u.match("{"+n)?(t.currentIndent+=1,t.tokenize[t.tokenize.length-1]=a(n,e,!0),"meta"):u.match(e+"}")?(t.currentIndent-=1,t.tokenize.pop(),"meta"):w(u,t)}}function $(n,e){if(n.eatSpace())return null;var r;if(r=n.match(h)){if(r=="def")return"keyword";n.eat(/[?!]/)}return e.tokenize.pop(),"def"}function S(n,e){return n.eatSpace()?null:(n.match(h)?n.eat(/[!?]/):n.match(y)||n.match(_)||n.match(b),e.tokenize.pop(),"def")}function p(n,e){return n.eatSpace()?null:(n.match(F),e.tokenize.pop(),"def")}function x(n,e,r){return function(u,t){for(var i=!1;u.peek();)if(i)u.next(),i=!1;else{if(u.match("{%",!1))return t.tokenize.push(a("%","%")),e;if(u.match("{{",!1))return t.tokenize.push(a("{","}")),e;if(r&&u.match("#{",!1))return t.tokenize.push(d("#{","}","meta")),e;var k=u.next();if(k==n)return t.tokenize.pop(),e;i=r&&k=="\\"}return e}}function R(n,e){return function(r,u){if(r.sol()&&(r.eatSpace(),r.match(n)))return u.tokenize.pop(),"string";for(var t=!1;r.peek();)if(t)r.next(),t=!1;else{if(r.match("{%",!1))return u.tokenize.push(a("%","%")),"string";if(r.match("{{",!1))return u.tokenize.push(a("{","}")),"string";if(e&&r.match("#{",!1))return u.tokenize.push(d("#{","}","meta")),"string";t=e&&r.next()=="\\"}return"string"}}return{startState:function(){return{tokenize:[w],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(n,e){var r=e.tokenize[e.tokenize.length-1](n,e),u=n.current();return r&&r!="comment"&&(e.lastToken=u,e.lastStyle=r),r},indent:function(n,e){return e=e.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),N.test(e)||Z.test(e)?c.indentUnit*(n.currentIndent-1):c.indentUnit*n.currentIndent},fold:"indent",electricInput:f(I.concat(s),!0),lineComment:"#"}}),o.defineMIME("text/x-crystal","crystal")})})();var U=O.exports,H=q({__proto__:null,default:U},[O.exports]);export{H as c};
|