Advertisement
Guest User

Untitled

a guest
Apr 15th, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import {
  2.   createDatabase,
  3.   createLocalDatabase,
  4.   TinaLevelClient,
  5. } from '@tinacms/datalayer';
  6. // eslint-disable-next-line @typescript-eslint/no-var-requires
  7. // import Level from 'level';
  8. import { ClassicLevel } from 'classic-level';
  9.  
  10. ...
  11.  
  12. const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === 'true';
  13.  
  14. export default isLocal
  15.   ? createLocalDatabase({})
  16.   : createDatabase({
  17.       gitProvider: new GitLabProvider({
  18.         token: process.env.GITLAB_PERSONAL_ACCESS_TOKEN,
  19.         projectId: process.env.GITLAB_PROJECT_ID,
  20.         branch: process.env.GITLAB_BRANCH,
  21.         host: process.env.GITLAB_HOST,
  22.       }),
  23.       databaseAdapter: new ClassicLevel('awd', { valueEncoding: 'json' }),
  24.       tinaDirectory: 'tina',
  25.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement