[
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [TannerGabriel]# Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**To Reproduce**\nSteps to reproduce the behavior:\n1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Desktop (please complete the following information):**\n - OS: [e.g. iOS]\n - Browser [e.g. chrome, safari]\n - Version [e.g. 22]\n\n**Smartphone (please complete the following information):**\n - Device: [e.g. iPhone6]\n - OS: [e.g. iOS8.1]\n - Browser [e.g. stock browser, safari]\n - Version [e.g. 22]\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "content": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# You may wish to alter this file to override the set of languages analyzed,\n# or to provide custom queries or build logic.\n#\n# ******** NOTE ********\n# We have attempted to detect the languages in your repository. Please check\n# the `language` matrix defined below to confirm you have the correct set of\n# supported CodeQL languages.\n#\nname: \"CodeQL\"\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    # The branches below must be a subset of the branches above\n    branches: [ master ]\n  schedule:\n    - cron: '26 23 * * 2'\n\njobs:\n  analyze:\n    name: Analyze\n    runs-on: ubuntu-latest\n    permissions:\n      actions: read\n      contents: read\n      security-events: write\n\n    strategy:\n      fail-fast: false\n      matrix:\n        language: [ 'javascript' ]\n        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]\n        # Learn more:\n        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed\n\n    steps:\n    - name: Checkout repository\n      uses: actions/checkout@v2\n\n    # Initializes the CodeQL tools for scanning.\n    - name: Initialize CodeQL\n      uses: github/codeql-action/init@v1\n      with:\n        languages: ${{ matrix.language }}\n        # If you wish to specify custom queries, you can do so here or in a config file.\n        # By default, queries listed here will override any specified in a config file.\n        # Prefix the list here with \"+\" to use these queries and those in the config file.\n        # queries: ./path/to/local/query, your-org/your-repo/queries@main\n\n    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).\n    # If this step fails, then you should remove it and run the build manually (see below)\n    - name: Autobuild\n      uses: github/codeql-action/autobuild@v1\n\n    # ℹ️ Command-line programs to run using the OS shell.\n    # 📚 https://git.io/JvXDl\n\n    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines\n    #    and modify them (or add more) to build your code if your project\n    #    uses a compiled language\n\n    #- run: |\n    #   make bootstrap\n    #   make release\n\n    - name: Perform CodeQL Analysis\n      uses: github/codeql-action/analyze@v1\n"
  },
  {
    "path": ".github/workflows/stale.yml",
    "content": "name: Mark stale issues and pull requests\n\non:\n  schedule:\n  - cron: \"0 0 * * *\"\n\njobs:\n  stale:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions/stale@v1\n      with:\n        repo-token: ${{ secrets.GITHUB_TOKEN }}\n        stale-pr-message: 'Stale pull request message'\n        stale-issue-label: 'no-issue-activity'\n        stale-pr-label: 'no-pr-activity'\n        stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'\n        days-before-stale: 30\n        days-before-close: 5  \n"
  },
  {
    "path": ".gitignore",
    "content": "# compiled output\n/dist\n/node_modules\n\n# API Keys\n.env\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# OS\n.DS_Store\n\n# Tests\n/coverage\n/.nyc_output\n\n# IDEs and editors\n/.idea\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# IDE - VSCode\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json"
  },
  {
    "path": "Camera/.gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor.xml\n/.idea/assetWizardSettings.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
  },
  {
    "path": "Camera/.idea/codeStyles/Project.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <JetCodeStyleSettings>\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </JetCodeStyleSettings>\n    <codeStyleSettings language=\"kotlin\">\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </codeStyleSettings>\n  </code_scheme>\n</component>"
  },
  {
    "path": "Camera/.idea/codeStyles/codeStyleConfig.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <state>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n  </state>\n</component>"
  },
  {
    "path": "Camera/.idea/encodings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\" addBOMForNewFiles=\"with NO BOM\" />\n</project>"
  },
  {
    "path": "Camera/.idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/app\" />\n          </set>\n        </option>\n        <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": "Camera/.idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"CMakeSettings\">\n    <configurations>\n      <configuration PROFILE_NAME=\"Debug\" CONFIG_NAME=\"Debug\" />\n    </configurations>\n  </component>\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_8\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "path": "Camera/.idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"\" vcs=\"Git\" />\n    <mapping directory=\"$PROJECT_DIR$/..\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": "Camera/app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "Camera/app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandroid {\n    compileSdkVersion 28\n    defaultConfig {\n        applicationId \"com.example.videorecorder\"\n        minSdkVersion 15\n        targetSdkVersion 28\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation\"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n    implementation 'androidx.appcompat:appcompat:1.0.2'\n    implementation 'androidx.core:core-ktx:1.1.0-alpha03'\n    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'\n    testImplementation 'junit:junit:4.12'\n    androidTestImplementation 'androidx.test:runner:1.1.1'\n    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'\n\n    //Fotoapparat\n    implementation 'io.fotoapparat:fotoapparat:2.6.1'\n\n    //Picasso\n    implementation 'com.squareup.picasso:picasso:2.71828'\n\n    // Kotlin Android Coroutines\n    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.0-RC1'\n    implementation \"org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0-RC1\"\n\n    //Material Design\n    implementation 'com.google.android.material:material:1.0.0-rc01'\n\n}\n"
  },
  {
    "path": "Camera/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "Camera/app/src/androidTest/java/com/example/videorecorder/ExampleInstrumentedTest.kt",
    "content": "package com.example.videorecorder\n\nimport androidx.test.InstrumentationRegistry\nimport androidx.test.runner.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getTargetContext()\n        assertEquals(\"com.example.videorecorder\", appContext.packageName)\n    }\n}\n"
  },
  {
    "path": "Camera/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          xmlns:tools=\"http://schemas.android.com/tools\" package=\"com.example.videorecorder\">\n\n    <uses-feature android:name=\"android.hardware.camera\"\n                  android:required=\"true\" />\n\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>\n\n    <application\n            android:allowBackup=\"true\"\n            android:icon=\"@mipmap/ic_launcher\"\n            android:label=\"@string/app_name\"\n            android:roundIcon=\"@mipmap/ic_launcher_round\"\n            android:supportsRtl=\"true\"\n            android:theme=\"@style/AppTheme\" tools:ignore=\"GoogleAppIndexingWarning\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "Camera/app/src/main/java/com/example/videorecorder/MainActivity.kt",
    "content": "package com.example.videorecorder\n\n\nimport android.Manifest\nimport android.content.Intent\nimport android.content.pm.PackageManager\nimport android.os.Build\nimport androidx.appcompat.app.AppCompatActivity\nimport android.os.Bundle\nimport android.os.Environment\nimport androidx.annotation.RequiresApi\nimport androidx.core.app.ActivityCompat\nimport androidx.core.content.ContextCompat\nimport io.fotoapparat.Fotoapparat\nimport io.fotoapparat.configuration.CameraConfiguration\nimport io.fotoapparat.log.logcat\nimport io.fotoapparat.log.loggers\nimport io.fotoapparat.parameter.ScaleType\nimport io.fotoapparat.selector.*\nimport io.fotoapparat.view.CameraView\nimport kotlinx.android.synthetic.main.activity_main.*\nimport java.io.File\nimport kotlinx.coroutines.*\n\n\n\nclass MainActivity : AppCompatActivity() {\n\n    var fotoapparat: Fotoapparat? = null\n    val filename = \"test.png\"\n    val sd = Environment.getExternalStorageDirectory()\n    val dest = File(sd, filename)\n    var fotoapparatState : FotoapparatState? = null\n    var cameraStatus : CameraState? = null\n    var flashState: FlashState? = null\n\n    val permissions = arrayOf(android.Manifest.permission.CAMERA, android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.READ_EXTERNAL_STORAGE)\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        createFotoapparat()\n\n        cameraStatus = CameraState.BACK\n        flashState = FlashState.OFF\n        fotoapparatState = FotoapparatState.OFF\n\n        fab_camera.setOnClickListener {\n            print(\"Taking photo\")\n            val test = \"Test233\"\n            takePhoto()\n        }\n\n        fab_switch_camera.setOnClickListener {\n            switchCamera()\n        }\n\n        fab_flash.setOnClickListener {\n            changeFlashState()\n        }\n    }\n\n    private fun createFotoapparat(){\n        val cameraView = findViewById<CameraView>(R.id.camera_view)\n\n        fotoapparat = Fotoapparat(\n            context = this,\n            view = cameraView,\n            scaleType = ScaleType.CenterCrop,\n            lensPosition = back(),\n            logger = loggers(\n                logcat()\n            ),\n            cameraErrorCallback = { error ->\n                println(\"Recorder errors: $error\")\n            }\n        )\n    }\n\n    private fun changeFlashState() {\n        fotoapparat?.updateConfiguration(\n            CameraConfiguration(\n                flashMode = if(flashState == FlashState.TORCH) off() else torch()\n            )\n        )\n\n        if(flashState == FlashState.TORCH) flashState = FlashState.OFF\n        else flashState = FlashState.TORCH\n    }\n\n    private fun switchCamera() {\n        fotoapparat?.switchTo(\n            lensPosition =  if (cameraStatus == CameraState.BACK) front() else back(),\n            cameraConfiguration = CameraConfiguration()\n        )\n\n        if(cameraStatus == CameraState.BACK) cameraStatus = CameraState.FRONT\n        else cameraStatus = CameraState.BACK\n    }\n\n    private fun takePhoto() {\n       if (hasNoPermissions()) {\n\n           val permissions = arrayOf(android.Manifest.permission.CAMERA, android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.READ_EXTERNAL_STORAGE)\n           ActivityCompat.requestPermissions(this, permissions,0)\n       }else{\n           println(\"Has all permissions!\")\n           fotoapparat\n               ?.takePicture()\n               ?.saveToFile(dest)\n       }\n    }\n\n    @RequiresApi(Build.VERSION_CODES.M)\n    override fun onStart() {\n        super.onStart()\n\n        println(\"Onstart\")\n\n        if (hasNoPermissions()) {\n            requestPermission()\n        }else{\n            fotoapparat?.start()\n            fotoapparatState = FotoapparatState.ON\n        }\n    }\n\n    private fun hasNoPermissions(): Boolean{\n        return ContextCompat.checkSelfPermission(this,\n            Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,\n            Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,\n            Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED\n    }\n\n    fun requestPermission(){\n        ActivityCompat.requestPermissions(this, permissions,0)\n    }\n\n    override fun onStop() {\n        super.onStop()\n        fotoapparat?.stop()\n        FotoapparatState.OFF\n    }\n\n    override fun onPause() {\n        super.onPause()\n        println(\"OnPause\")\n    }\n\n    override fun onResume() {\n        super.onResume()\n        println(\"OnResume\")\n\n        println(fotoapparatState)\n\n        if(!hasNoPermissions() && fotoapparatState == FotoapparatState.OFF){\n            val intent = Intent(baseContext, MainActivity::class.java)\n            startActivity(intent)\n            finish()\n        }\n    }\n\n}\n\nenum class CameraState{\n    FRONT, BACK\n}\n\nenum class FlashState{\n    TORCH, OFF\n}\n\nenum class FotoapparatState{\n    ON, OFF\n}"
  },
  {
    "path": "Camera/app/src/main/res/drawable/ic_camera.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\"24dp\"\n        android:viewportWidth=\"24.0\"\n        android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0\"/>\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z\"/>\n</vector>\n"
  },
  {
    "path": "Camera/app/src/main/res/drawable/ic_flash.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\"24dp\"\n        android:viewportWidth=\"24.0\"\n        android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M7,2v11h3v9l7,-12h-4l4,-8z\"/>\n</vector>\n"
  },
  {
    "path": "Camera/app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:height=\"108dp\"\n        android:width=\"108dp\"\n        android:viewportHeight=\"108\"\n        android:viewportWidth=\"108\">\n    <path android:fillColor=\"#008577\"\n          android:pathData=\"M0,0h108v108h-108z\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M9,0L9,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,0L19,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M29,0L29,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M39,0L39,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M49,0L49,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M59,0L59,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M69,0L69,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M79,0L79,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M89,0L89,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M99,0L99,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,9L108,9\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,19L108,19\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,29L108,29\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,39L108,39\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,49L108,49\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,59L108,59\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,69L108,69\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,79L108,79\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,89L108,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,99L108,99\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,29L89,29\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,39L89,39\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,49L89,49\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,59L89,59\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,69L89,69\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,79L89,79\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M29,19L29,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M39,19L39,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M49,19L49,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M59,19L59,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M69,19L69,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M79,19L79,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n</vector>\n"
  },
  {
    "path": "Camera/app/src/main/res/drawable/ic_switch_camera.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\"24dp\"\n        android:viewportWidth=\"24.0\"\n        android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M20,4h-3.17L15,2L9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM15,15.5L15,13L9,13v2.5L5.5,12 9,8.5L9,11h6L15,8.5l3.5,3.5 -3.5,3.5z\"/>\n</vector>\n"
  },
  {
    "path": "Camera/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:aapt=\"http://schemas.android.com/aapt\"\n        android:width=\"108dp\"\n        android:height=\"108dp\"\n        android:viewportHeight=\"108\"\n        android:viewportWidth=\"108\">\n    <path\n            android:fillType=\"evenOdd\"\n            android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n            android:strokeColor=\"#00000000\"\n            android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                    android:endX=\"78.5885\"\n                    android:endY=\"90.9159\"\n                    android:startX=\"48.7653\"\n                    android:startY=\"61.0927\"\n                    android:type=\"linear\">\n                <item\n                        android:color=\"#44000000\"\n                        android:offset=\"0.0\"/>\n                <item\n                        android:color=\"#00000000\"\n                        android:offset=\"1.0\"/>\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n            android:fillColor=\"#FFFFFF\"\n            android:fillType=\"nonZero\"\n            android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n            android:strokeColor=\"#00000000\"\n            android:strokeWidth=\"1\"/>\n</vector>\n"
  },
  {
    "path": "Camera/app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:tools=\"http://schemas.android.com/tools\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\" xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n        tools:context=\".MainActivity\"\n        android:background=\"@android:color/black\">\n\n    <io.fotoapparat.view.CameraView\n            android:id=\"@+id/camera_view\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:layout_above=\"@id/fab_camera\"/>\n\n\n\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n        android:id=\"@+id/fab_camera\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        app:fabSize=\"normal\"\n        android:src=\"@drawable/ic_camera\"\n        android:layout_alignParentBottom=\"true\"\n        android:layout_margin=\"32dp\"\n        android:layout_centerHorizontal=\"true\"\n        app:backgroundTint=\"@android:color/white\"/>\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n            android:id=\"@+id/fab_flash\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            app:fabSize=\"normal\"\n            android:src=\"@drawable/ic_flash\"\n            android:layout_alignParentBottom=\"true\"\n            android:layout_margin=\"32dp\"\n            app:backgroundTint=\"@android:color/white\"/>\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n            android:id=\"@+id/fab_switch_camera\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            app:fabSize=\"normal\"\n            android:src=\"@drawable/ic_switch_camera\"\n            android:layout_alignParentBottom=\"true\"\n            android:layout_margin=\"32dp\"\n            android:layout_alignParentRight=\"true\"\n            app:backgroundTint=\"@android:color/white\"/>\n\n\n\n</RelativeLayout>"
  },
  {
    "path": "Camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "Camera/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "Camera/app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"colorPrimaryDark\">#00574B</color>\n    <color name=\"colorAccent\">#D81B60</color>\n</resources>\n"
  },
  {
    "path": "Camera/app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Camera</string>\n</resources>\n"
  },
  {
    "path": "Camera/app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "Camera/app/src/test/java/com/example/videorecorder/ExampleUnitTest.kt",
    "content": "package com.example.videorecorder\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}\n"
  },
  {
    "path": "Camera/build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    ext.kotlin_version = '1.3.11'\n    repositories {\n        google()\n        jcenter()\n        \n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.4.0-alpha09'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n        \n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "Camera/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Mon Dec 31 22:42:36 CET 2018\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-5.1-milestone-1-all.zip\n"
  },
  {
    "path": "Camera/gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n# Automatically convert third-party libraries to use AndroidX\nandroid.enableJetifier=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official\n"
  },
  {
    "path": "Camera/gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "Camera/gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "Camera/settings.gradle",
    "content": "include ':app'\n"
  },
  {
    "path": "CameraX/.gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor.xml\n/.idea/assetWizardSettings.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
  },
  {
    "path": "CameraX/.idea/codeStyles/Project.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <JetCodeStyleSettings>\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </JetCodeStyleSettings>\n    <codeStyleSettings language=\"kotlin\">\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </codeStyleSettings>\n  </code_scheme>\n</component>"
  },
  {
    "path": "CameraX/.idea/codeStyles/codeStyleConfig.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <state>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n  </state>\n</component>"
  },
  {
    "path": "CameraX/.idea/encodings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\" addBOMForNewFiles=\"with NO BOM\" />\n</project>"
  },
  {
    "path": "CameraX/.idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/app\" />\n          </set>\n        </option>\n        <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": "CameraX/.idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_8\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "path": "CameraX/.idea/runConfigurations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <option name=\"ignoredProducers\">\n      <set>\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": "CameraX/.idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"$PROJECT_DIR$/..\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": "CameraX/app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "CameraX/app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandroid {\n    compileSdkVersion 28\n    defaultConfig {\n        applicationId \"com.example.camerax\"\n        minSdkVersion 21\n        targetSdkVersion 28\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    // Kotlin lang\n    implementation \"org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version\"\n    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.1'\n\n    // AndroidX libraries\n    implementation 'androidx.appcompat:appcompat:1.1.0-alpha04'\n    implementation 'androidx.core:core-ktx:1.0.1'\n    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'\n\n    //Material Design\n    implementation 'com.google.android.material:material:1.1.0-alpha05'\n\n    // CameraX\n    def camerax_version = \"1.0.0-alpha01\"\n    implementation \"androidx.camera:camera-core:${camerax_version}\"\n    implementation \"androidx.camera:camera-camera2:${camerax_version}\"\n\n    // Unit testing\n    testImplementation 'androidx.test.ext:junit:1.1.0'\n    testImplementation 'androidx.test:rules:1.1.1'\n    testImplementation 'androidx.test:runner:1.1.1'\n    testImplementation 'androidx.test.espresso:espresso-core:3.1.1'\n    testImplementation \"org.robolectric:robolectric:4.1\"\n\n    // Instrumented testing\n    androidTestImplementation 'androidx.test.ext:junit:1.1.0'\n    androidTestImplementation 'androidx.test:rules:1.1.1'\n    androidTestImplementation 'androidx.test:runner:1.1.1'\n    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'\n}\n"
  },
  {
    "path": "CameraX/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "CameraX/app/src/androidTest/java/com/example/camerax/ExampleInstrumentedTest.kt",
    "content": "package com.example.camerax\n\nimport android.support.test.InstrumentationRegistry\nimport android.support.test.runner.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getTargetContext()\n        assertEquals(\"com.example.camerax\", appContext.packageName)\n    }\n}\n"
  },
  {
    "path": "CameraX/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" xmlns:tools=\"http://schemas.android.com/tools\"\n          package=\"com.example.camerax\">\n\n    <uses-permission android:name=\"android.permission.CAMERA\" />\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\"/>\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>\n\n    <application\n            android:allowBackup=\"true\"\n            android:icon=\"@mipmap/ic_launcher\"\n            android:label=\"@string/app_name\"\n            android:roundIcon=\"@mipmap/ic_launcher_round\"\n            android:supportsRtl=\"true\"\n            android:theme=\"@style/AppTheme\"\n            tools:ignore=\"GoogleAppIndexingWarning\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "CameraX/app/src/main/java/com/example/camerax/MainActivity.kt",
    "content": "package com.example.camerax\n\nimport android.Manifest\nimport android.content.pm.PackageManager\nimport android.os.Bundle\nimport android.os.Environment\nimport android.util.Log\nimport android.util.Rational\nimport android.util.Size\nimport android.view.TextureView\nimport androidx.camera.core.*\nimport androidx.appcompat.app.AppCompatActivity\nimport androidx.core.app.ActivityCompat\nimport androidx.core.content.ContextCompat\nimport androidx.lifecycle.LifecycleOwner\nimport kotlinx.android.synthetic.main.activity_main.*\nimport java.io.File\n\nval permissions = arrayOf(android.Manifest.permission.CAMERA, android.Manifest.permission.WRITE_EXTERNAL_STORAGE, android.Manifest.permission.READ_EXTERNAL_STORAGE)\n\nclass MainActivity : AppCompatActivity() {\n\n    private val filename = \"test.png\"\n    private val sd = Environment.getExternalStorageDirectory()\n    private val dest = File(sd, filename)\n    private var lensFacing = CameraX.LensFacing.BACK\n    private var imageCapture: ImageCapture? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        bindCamera()\n\n        // Takes an images and saves it in the local storage\n        fab_camera.setOnClickListener {\n            imageCapture?.takePicture(dest,\n                object : ImageCapture.OnImageSavedListener {\n                    override fun onError(error: ImageCapture.UseCaseError,\n                                         message: String, exc: Throwable?) {\n                        Log.e(\"Image\", error.toString())\n                    }\n                    override fun onImageSaved(file: File) {\n                        Log.v(\"Image\", \"Successfully saved image\")\n                    }\n                })\n        }\n\n        // Changes the flash mode when the button is clicked\n        fab_flash.setOnClickListener {\n            val flashMode = imageCapture?.flashMode\n            if(flashMode == FlashMode.ON) imageCapture?.flashMode = FlashMode.OFF\n            else imageCapture?.flashMode = FlashMode.ON\n        }\n\n        // Changes the lens direction if the button is clicked\n        fab_switch_camera.setOnClickListener {\n            lensFacing = if (CameraX.LensFacing.FRONT == lensFacing) {\n                CameraX.LensFacing.BACK\n            } else {\n                CameraX.LensFacing.FRONT\n            }\n            bindCamera()\n        }\n    }\n\n    /**\n     * Check if the app has all permissions\n     */\n    private fun hasNoPermissions(): Boolean{\n        return ContextCompat.checkSelfPermission(this,\n            Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,\n            Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this,\n            Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED\n    }\n\n    /**\n     * Request all permissions\n     */\n    private fun requestPermission(){\n        ActivityCompat.requestPermissions(this, permissions,0)\n    }\n\n    /**\n     * Bind the Camera to the lifecycle\n     */\n    private fun bindCamera(){\n        CameraX.unbindAll()\n\n        // Preview config for the camera\n        val previewConfig = PreviewConfig.Builder()\n            .setLensFacing(lensFacing)\n            .build()\n\n        val preview = Preview(previewConfig)\n\n        // Image capture config which controls the Flash and Lens\n        val imageCaptureConfig = ImageCaptureConfig.Builder()\n            .setTargetRotation(windowManager.defaultDisplay.rotation)\n            .setLensFacing(lensFacing)\n            .setFlashMode(FlashMode.ON)\n            .build()\n\n        imageCapture = ImageCapture(imageCaptureConfig)\n\n        // The view that displays the preview\n        val textureView: TextureView = findViewById(R.id.view_finder)\n\n        // Handles the output data of the camera\n        preview.setOnPreviewOutputUpdateListener { previewOutput ->\n            // Displays the camera image in our preview view\n            textureView.surfaceTexture = previewOutput.surfaceTexture\n        }\n\n        // Bind the camera to the lifecycle\n        CameraX.bindToLifecycle(this as LifecycleOwner, imageCapture, preview)\n    }\n\n    override fun onStart() {\n        super.onStart()\n\n        // Check and request permissions\n        if (hasNoPermissions()) {\n            requestPermission()\n        }\n    }\n\n}\n"
  },
  {
    "path": "CameraX/app/src/main/res/drawable/ic_camera.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\"24dp\"\n        android:viewportWidth=\"24.0\"\n        android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0\"/>\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2L9,2zM12,17c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z\"/>\n</vector>\n"
  },
  {
    "path": "CameraX/app/src/main/res/drawable/ic_flash.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\"24dp\"\n        android:viewportWidth=\"24.0\"\n        android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M7,2v11h3v9l7,-12h-4l4,-8z\"/>\n</vector>\n"
  },
  {
    "path": "CameraX/app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:height=\"108dp\"\n        android:width=\"108dp\"\n        android:viewportHeight=\"108\"\n        android:viewportWidth=\"108\">\n    <path android:fillColor=\"#008577\"\n          android:pathData=\"M0,0h108v108h-108z\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M9,0L9,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,0L19,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M29,0L29,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M39,0L39,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M49,0L49,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M59,0L59,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M69,0L69,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M79,0L79,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M89,0L89,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M99,0L99,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,9L108,9\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,19L108,19\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,29L108,29\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,39L108,39\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,49L108,49\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,59L108,59\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,69L108,69\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,79L108,79\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,89L108,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,99L108,99\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,29L89,29\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,39L89,39\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,49L89,49\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,59L89,59\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,69L89,69\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,79L89,79\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M29,19L29,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M39,19L39,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M49,19L49,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M59,19L59,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M69,19L69,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M79,19L79,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n</vector>\n"
  },
  {
    "path": "CameraX/app/src/main/res/drawable/ic_switch_camera.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\"24dp\"\n        android:viewportWidth=\"24.0\"\n        android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M20,4h-3.17L15,2L9,2L7.17,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM15,15.5L15,13L9,13v2.5L5.5,12 9,8.5L9,11h6L15,8.5l3.5,3.5 -3.5,3.5z\"/>\n</vector>\n"
  },
  {
    "path": "CameraX/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:aapt=\"http://schemas.android.com/aapt\"\n        android:width=\"108dp\"\n        android:height=\"108dp\"\n        android:viewportHeight=\"108\"\n        android:viewportWidth=\"108\">\n    <path\n            android:fillType=\"evenOdd\"\n            android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n            android:strokeColor=\"#00000000\"\n            android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                    android:endX=\"78.5885\"\n                    android:endY=\"90.9159\"\n                    android:startX=\"48.7653\"\n                    android:startY=\"61.0927\"\n                    android:type=\"linear\">\n                <item\n                        android:color=\"#44000000\"\n                        android:offset=\"0.0\"/>\n                <item\n                        android:color=\"#00000000\"\n                        android:offset=\"1.0\"/>\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n            android:fillColor=\"#FFFFFF\"\n            android:fillType=\"nonZero\"\n            android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n            android:strokeColor=\"#00000000\"\n            android:strokeWidth=\"1\"/>\n</vector>\n"
  },
  {
    "path": "CameraX/app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:tools=\"http://schemas.android.com/tools\"\n        xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        tools:context=\".MainActivity\"\n        android:orientation=\"vertical\">\n\n    <TextureView\n            android:id=\"@+id/view_finder\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\" />\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n            android:id=\"@+id/fab_camera\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            app:fabSize=\"normal\"\n            android:src=\"@drawable/ic_camera\"\n            android:layout_alignParentBottom=\"true\"\n            android:layout_margin=\"32dp\"\n            android:layout_centerHorizontal=\"true\"\n            app:backgroundTint=\"@android:color/white\"/>\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n            android:id=\"@+id/fab_flash\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            app:fabSize=\"normal\"\n            android:src=\"@drawable/ic_flash\"\n            android:layout_alignParentBottom=\"true\"\n            android:layout_margin=\"32dp\"\n            app:backgroundTint=\"@android:color/white\"/>\n\n    <com.google.android.material.floatingactionbutton.FloatingActionButton\n            android:id=\"@+id/fab_switch_camera\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            app:fabSize=\"normal\"\n            android:src=\"@drawable/ic_switch_camera\"\n            android:layout_alignParentBottom=\"true\"\n            android:layout_margin=\"32dp\"\n            android:layout_alignParentRight=\"true\"\n            app:backgroundTint=\"@android:color/white\"/>\n\n</RelativeLayout>"
  },
  {
    "path": "CameraX/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "CameraX/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "CameraX/app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"colorPrimaryDark\">#00574B</color>\n    <color name=\"colorAccent\">#D81B60</color>\n</resources>\n"
  },
  {
    "path": "CameraX/app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">CameraX</string>\n</resources>\n"
  },
  {
    "path": "CameraX/app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "CameraX/app/src/test/java/com/example/camerax/ExampleUnitTest.kt",
    "content": "package com.example.camerax\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}\n"
  },
  {
    "path": "CameraX/build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    ext.kotlin_version = '1.3.30'\n    repositories {\n        google()\n        jcenter()\n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.4.0'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n        \n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "CameraX/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Thu May 09 11:52:47 CEST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-5.1.1-all.zip\n"
  },
  {
    "path": "CameraX/gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official\nandroid.useAndroidX=true\nandroid.enableJetifier=true\n"
  },
  {
    "path": "CameraX/gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "CameraX/gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "CameraX/settings.gradle",
    "content": "include ':app'\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2019 Tanner Gabriel\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "Nest-CRUD/.gitignore",
    "content": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# OS\n.DS_Store\n\n# Tests\n/coverage\n/.nyc_output\n\n# IDEs and editors\n/.idea\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# IDE - VSCode\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json"
  },
  {
    "path": "Nest-CRUD/.prettierrc",
    "content": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "Nest-CRUD/README.md",
    "content": "# Nestjs MongoDB CRUD\n\nSimple MongoDB CRUD example demonstrating the Nestjs application structure as well as how you can work with databases. For an in-depth explanation of the application and the basic Nestjs concepts, you can follow [this article](https://gabrieltanner.org/blog/nestjs-crashcourse).\n\n## Requirements\n\n- [NodeJS](https://nodejs.org/en/)\n- MongoDB database\n\n## Getting started\n\n### Installing dependencies\n\nFirst, you need to install all the needed dependencies.\n\n```bash\n$ npm install\n```\n\n### Configuring the database\n\nBefore starting the application, you will need to create a MongoDB database and edit the connection string in the `app.modules.ts` file to match your database configuration. The repository includes a Docker-Compose file that helps you start MongoDB.\n\n```\ndocker-compose up\n```\n\nThe default database configuration in the `app.module.ts` file looks like this:\n\n```\n@Module({\n  imports: [MongooseModule.forRoot('mongodb://localhost/nest')],\n})\n```\n\nIf you are not running the database on your local machine, replace localhost with the correct IP-Address.\n\n### Starting the application\n\nAfter installing the dependencies, you can run the application using one of the following commands.\n\n```bash\n# development\n$ npm run start\n\n# watch mode\n$ npm run start:dev\n\n# production mode\n$ npm run start:prod\n```"
  },
  {
    "path": "Nest-CRUD/docker-compose.yaml",
    "content": "version: '3.7'\nservices:\n  mongodb:\n    image: mongo:latest\n    ports:\n      - 27017:27017\n    volumes:\n      - mongodb_data:/data/db\n\nvolumes:\n  mongodb_data:"
  },
  {
    "path": "Nest-CRUD/nest-cli.json",
    "content": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "Nest-CRUD/nodemon-debug.json",
    "content": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts\"\n}\n"
  },
  {
    "path": "Nest-CRUD/nodemon.json",
    "content": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "Nest-CRUD/package.json",
    "content": "{\n  \"name\": \"nest-crud\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"tsc -p tsconfig.build.json\",\n    \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n    \"start\": \"ts-node -r tsconfig-paths/register src/main.ts\",\n    \"start:dev\": \"concurrently --handle-input \\\"wait-on dist/main.js && nodemon\\\" \\\"tsc -w -p tsconfig.build.json\\\" \",\n    \"start:debug\": \"nodemon --config nodemon-debug.json\",\n    \"prestart:prod\": \"rimraf dist && npm run build\",\n    \"start:prod\": \"node dist/main.js\",\n    \"lint\": \"tslint -p tsconfig.json -c tslint.json\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"test:cov\": \"jest --coverage\",\n    \"test:debug\": \"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand\",\n    \"test:e2e\": \"jest --config ./test/jest-e2e.json\"\n  },\n  \"dependencies\": {\n    \"@nestjs/common\": \"8.2.6\",\n    \"@nestjs/core\": \"8.2.6\",\n    \"@nestjs/mongoose\": \"9.0.2\",\n    \"@nestjs/platform-express\": \"8.2.6\",\n    \"mongoose\": \"6.1.8\",\n    \"reflect-metadata\": \"0.1.13\",\n    \"rimraf\": \"3.0.2\",\n    \"rxjs\": \"7.5.2\"\n  },\n  \"devDependencies\": {\n    \"@nestjs/testing\": \"8.2.6\",\n    \"@types/express\": \"4.17.13\",\n    \"@types/jest\": \"27.4.0\",\n    \"@types/node\": \"17.0.12\",\n    \"@types/supertest\": \"2.0.11\",\n    \"concurrently\": \"7.0.0\",\n    \"jest\": \"27.4.7\",\n    \"nodemon\": \"2.0.15\",\n    \"prettier\": \"2.5.1\",\n    \"supertest\": \"6.2.2\",\n    \"ts-jest\": \"27.1.3\",\n    \"ts-node\": \"10.4.0\",\n    \"tsconfig-paths\": \"3.12.0\",\n    \"tslint\": \"5.20.1\",\n    \"typescript\": \"4.5.5\",\n    \"wait-on\": \"6.0.0\"\n  },\n  \"jest\": {\n    \"moduleFileExtensions\": [\n      \"js\",\n      \"json\",\n      \"ts\"\n    ],\n    \"rootDir\": \"src\",\n    \"testRegex\": \".spec.ts$\",\n    \"transform\": {\n      \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n    },\n    \"coverageDirectory\": \"../coverage\",\n    \"testEnvironment\": \"node\"\n  },\n  \"keywords\": [\n    \"Nestjs\",\n    \"Typescript\",\n    \"CRUD\",\n    \"MongoDB\"\n  ]\n}\n"
  },
  {
    "path": "Nest-CRUD/src/app.controller.spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\n\ndescribe('AppController', () => {\n  let appController: AppController;\n\n  beforeEach(async () => {\n    const app: TestingModule = await Test.createTestingModule({\n      controllers: [AppController],\n      providers: [AppService],\n    }).compile();\n\n    appController = app.get<AppController>(AppController);\n  });\n\n  describe('root', () => {\n    it('should return \"Hello World!\"', () => {\n      expect(appController.getHello()).toBe('Hello World!');\n    });\n  });\n});\n"
  },
  {
    "path": "Nest-CRUD/src/app.controller.ts",
    "content": "import { Controller, Get } from '@nestjs/common';\nimport { AppService } from './app.service';\n\n@Controller()\nexport class AppController {\n  constructor(private readonly appService: AppService) {}\n\n  @Get()\n  getHello(): string {\n    return this.appService.getHello();\n  }\n}\n"
  },
  {
    "path": "Nest-CRUD/src/app.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\nimport { MongooseModule } from '@nestjs/mongoose';\nimport { ItemsModule } from './items/items.module';\n\n@Module({\n  imports: [MongooseModule.forRoot('mongodb://localhost/nest'), ItemsModule],\n  controllers: [AppController],\n  providers: [AppService],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "Nest-CRUD/src/app.service.ts",
    "content": "import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n  getHello(): string {\n    return 'Hello World!';\n  }\n}\n"
  },
  {
    "path": "Nest-CRUD/src/items/dto/create-item.dto.ts",
    "content": "export class CreateItemDto {\n  readonly name: string;\n  readonly description: string;\n  readonly qty: number;\n}\n"
  },
  {
    "path": "Nest-CRUD/src/items/interfaces/item.interface.ts",
    "content": "import { Document } from 'mongoose';\n\nexport interface Item extends Document  {\n  id?: string;\n  name: string;\n  description?: string;\n  qty: number;\n}\n"
  },
  {
    "path": "Nest-CRUD/src/items/item.controller.spec.ts",
    "content": ""
  },
  {
    "path": "Nest-CRUD/src/items/items.controller.ts",
    "content": "import {\n    Controller,\n    Get,\n    Post,\n    Put,\n    Delete,\n    Body,\n    Param,\n  } from '@nestjs/common';\nimport { CreateItemDto } from './dto/create-item.dto';\nimport { ItemsService } from './items.service';\nimport { Item } from './interfaces/item.interface';\n\n@Controller('items')\n  export class ItemsController {\n    constructor(private readonly itemsService: ItemsService) {}\n\n    @Get()\n    findAll(): Promise<Item[]> {\n      return this.itemsService.findAll();\n    }\n\n    @Get(':id')\n    findOne(@Param('id') id): Promise<Item> {\n      return this.itemsService.findOne(id);\n    }\n\n    @Post()\n    create(@Body() createItemDto: CreateItemDto): Promise<Item> {\n      return this.itemsService.create(createItemDto);\n    }\n\n    @Delete(':id')\n    delete(@Param('id') id): Promise<Item> {\n      return this.itemsService.delete(id);\n    }\n\n    @Put(':id')\n    update(@Body() updateItemDto: CreateItemDto, @Param('id') id): Promise<Item> {\n      return this.itemsService.update(id, updateItemDto);\n    }\n  }\n"
  },
  {
    "path": "Nest-CRUD/src/items/items.module.ts",
    "content": "\nimport { Module } from '@nestjs/common';\nimport { MongooseModule } from '@nestjs/mongoose';\nimport { ItemsController } from './items.controller';\nimport { ItemsService } from './items.service';\nimport { ItemSchema } from './schemas/item.schema';\n\n@Module({\n  imports: [MongooseModule.forFeature([{ name: 'Item', schema: ItemSchema }])],\n  controllers: [ItemsController],\n  providers: [ItemsService],\n})\nexport class ItemsModule {}\n"
  },
  {
    "path": "Nest-CRUD/src/items/items.service.ts",
    "content": "import { Injectable } from '@nestjs/common';\nimport { Item } from './interfaces/item.interface';\nimport { Model } from 'mongoose';\nimport { InjectModel } from '@nestjs/mongoose';\nimport { CreateItemDto } from './dto/create-item.dto';\n\n@Injectable()\nexport class ItemsService {\n  constructor(@InjectModel('Item') private readonly itemModel: Model<Item>) {}\n\n  async findAll(): Promise<Item[]> {\n    return await this.itemModel.find();\n  }\n\n  async findOne(id: string): Promise<Item> {\n    return await this.itemModel.findOne({ _id: id });\n  }\n\n  async create(item: CreateItemDto): Promise<Item> {\n    const newItem = new this.itemModel(item);\n    return await newItem.save();\n  }\n\n  async delete(id: string): Promise<Item> {\n    return await this.itemModel.findByIdAndRemove(id);\n  }\n\n  async update(id: string, item: CreateItemDto): Promise<Item> {\n    return await this.itemModel.findByIdAndUpdate(id, item, { new: true });\n  }\n}\n"
  },
  {
    "path": "Nest-CRUD/src/items/schemas/item.schema.ts",
    "content": "import * as mongoose from 'mongoose';\n\nexport const ItemSchema = new mongoose.Schema({\n  name: String,\n  qty: Number,\n  description: String,\n});\n"
  },
  {
    "path": "Nest-CRUD/src/main.ts",
    "content": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule);\n  await app.listen(4000);\n}\nbootstrap();\n"
  },
  {
    "path": "Nest-CRUD/test/app.e2e-spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from './../src/app.module';\n\ndescribe('AppController (e2e)', () => {\n  let app;\n\n  beforeEach(async () => {\n    const moduleFixture: TestingModule = await Test.createTestingModule({\n      imports: [AppModule],\n    }).compile();\n\n    app = moduleFixture.createNestApplication();\n    await app.init();\n  });\n\n  it('/ (GET)', () => {\n    return request(app.getHttpServer())\n      .get('/')\n      .expect(200)\n      .expect('Hello World!');\n  });\n});\n"
  },
  {
    "path": "Nest-CRUD/test/jest-e2e.json",
    "content": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-spec.ts$\",\n  \"transform\": {\n    \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n  }\n}\n"
  },
  {
    "path": "Nest-CRUD/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "Nest-CRUD/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"target\": \"es6\",\n    \"sourceMap\": true,\n    \"outDir\": \"./dist\",\n    \"baseUrl\": \"./\",\n    \"incremental\": true\n  },\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "Nest-CRUD/tslint.json",
    "content": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  },\n  \"rules\": {\n    \"quotemark\": [true, \"single\"],\n    \"member-access\": [false],\n    \"ordered-imports\": [false],\n    \"max-line-length\": [true, 150],\n    \"member-ordering\": [false],\n    \"interface-name\": [false],\n    \"arrow-parens\": false,\n    \"object-literal-sort-keys\": false\n  },\n  \"rulesDirectory\": []\n}\n"
  },
  {
    "path": "NestVueChat/.gitignore",
    "content": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# OS\n.DS_Store\n\n# Tests\n/coverage\n/.nyc_output\n\n# IDEs and editors\n/.idea\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# IDE - VSCode\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json"
  },
  {
    "path": "NestVueChat/.prettierrc",
    "content": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "NestVueChat/README.md",
    "content": "# Nestjs file uploading\n\nNestjs Vue real-time chat, which utilizes Websockets to implement real-time communication in Nestjs. For an in-depth explanation of the application, you can follow [this article](https://gabrieltanner.org/blog/nestjs-realtime-chat).\n\n## Requirements\n\n- [NodeJS](https://nodejs.org/en/)\n\n## Getting started\n\n### Installing dependencies\n\nFirst, you need to install all the needed dependencies.\n\n```bash\n$ npm install\n```\n\n### Starting the application\n\nAfter installing the dependencies, you can run the application using one of the following commands.\n\n```bash\n# development\n$ npm run start\n\n# watch mode\n$ npm run start:dev\n\n# production mode\n$ npm run start:prod\n```\n\n## Testing the application\n\nAfter starting the application, you should see our layout when visiting http://localhost:3000 in your browser. After opening the application in multiple browser windows, you can test the functionality. "
  },
  {
    "path": "NestVueChat/nest-cli.json",
    "content": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "NestVueChat/nodemon-debug.json",
    "content": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts\"\n}\n"
  },
  {
    "path": "NestVueChat/nodemon.json",
    "content": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "NestVueChat/package.json",
    "content": "{\n  \"name\": \"backend\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"tsc -p tsconfig.build.json\",\n    \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n    \"start\": \"ts-node -r tsconfig-paths/register src/main.ts\",\n    \"start:dev\": \"concurrently --handle-input \\\"wait-on dist/main.js && nodemon\\\" \\\"tsc -w -p tsconfig.build.json\\\" \",\n    \"start:debug\": \"nodemon --config nodemon-debug.json\",\n    \"prestart:prod\": \"rimraf dist && npm run build\",\n    \"start:prod\": \"node dist/main.js\",\n    \"lint\": \"tslint -p tsconfig.json -c tslint.json\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"test:cov\": \"jest --coverage\",\n    \"test:debug\": \"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand\",\n    \"test:e2e\": \"jest --config ./test/jest-e2e.json\"\n  },\n  \"dependencies\": {\n    \"@nestjs/common\": \"8.2.6\",\n    \"@nestjs/core\": \"8.2.6\",\n    \"@nestjs/platform-express\": \"8.2.6\",\n    \"@nestjs/platform-socket.io\": \"8.2.6\",\n    \"@nestjs/websockets\": \"8.2.6\",\n    \"reflect-metadata\": \"0.1.13\",\n    \"rimraf\": \"3.0.2\",\n    \"rxjs\": \"7.5.2\"\n  },\n  \"devDependencies\": {\n    \"@nestjs/testing\": \"8.2.6\",\n    \"@types/express\": \"4.17.13\",\n    \"@types/jest\": \"27.4.0\",\n    \"@types/node\": \"17.0.12\",\n    \"@types/socket.io\": \"3.0.1\",\n    \"@types/supertest\": \"2.0.11\",\n    \"concurrently\": \"7.0.0\",\n    \"jest\": \"27.4.7\",\n    \"nodemon\": \"2.0.15\",\n    \"prettier\": \"2.5.1\",\n    \"supertest\": \"6.2.2\",\n    \"ts-jest\": \"27.1.3\",\n    \"ts-node\": \"10.4.0\",\n    \"tsconfig-paths\": \"3.12.0\",\n    \"tslint\": \"5.20.1\",\n    \"typescript\": \"4.5.5\",\n    \"wait-on\": \"6.0.0\"\n  },\n  \"jest\": {\n    \"moduleFileExtensions\": [\n      \"js\",\n      \"json\",\n      \"ts\"\n    ],\n    \"rootDir\": \"src\",\n    \"testRegex\": \".spec.ts$\",\n    \"transform\": {\n      \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n    },\n    \"coverageDirectory\": \"../coverage\",\n    \"testEnvironment\": \"node\"\n  },\n  \"keywords\": [\n    \"Nestjs\",\n    \"Typescript\",\n    \"Chat application\",\n    \"Nestjs Chat\",\n    \"Websockets\",\n    \"Nestjs Websockets\"\n  ]\n}\n"
  },
  {
    "path": "NestVueChat/src/app.gateway.ts",
    "content": "import {\n  SubscribeMessage,\n  WebSocketGateway,\n  OnGatewayInit,\n  WebSocketServer,\n  OnGatewayConnection,\n  OnGatewayDisconnect,\n} from '@nestjs/websockets';\nimport { Logger } from '@nestjs/common';\nimport { Socket, Server } from 'socket.io';\n\n@WebSocketGateway({\n  cors: {\n    origin: '*',\n  },\n})\nexport class AppGateway\n  implements OnGatewayInit, OnGatewayConnection, OnGatewayDisconnect {\n  @WebSocketServer() server: Server;\n\n  private logger: Logger = new Logger('AppGateway');\n\n  @SubscribeMessage('msgToServer')\n  handleMessage(client: Socket, payload: string): void {\n    this.server.emit('msgToClient', payload);\n  }\n\n  afterInit(server: Server) {\n    this.logger.log('Init');\n  }\n\n  handleDisconnect(client: Socket) {\n    this.logger.log(`Client disconnected: ${client.id}`);\n  }\n\n  handleConnection(client: Socket, ...args: any[]) {\n    this.logger.log(`Client connected: ${client.id}`);\n  }\n}\n"
  },
  {
    "path": "NestVueChat/src/app.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { AppGateway } from './app.gateway';\n\n@Module({\n  imports: [],\n  controllers: [],\n  providers: [AppGateway],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "NestVueChat/src/main.ts",
    "content": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\nimport { NestExpressApplication } from '@nestjs/platform-express';\nimport { join } from 'path';\n\nasync function bootstrap() {\n  const app = await NestFactory.create<NestExpressApplication>(AppModule);\n  app.useStaticAssets(join(__dirname, '..', 'static'));\n  await app.listen(3000);\n}\nbootstrap();\n"
  },
  {
    "path": "NestVueChat/static/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">\n    <link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css\" integrity=\"sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ\" crossorigin=\"anonymous\">\n    <title>Nestjs SocketIO</title>\n    <link rel=\"stylesheet\" href=\"styles.css\">\n    <script src=\"https://cdn.jsdelivr.net/npm/vue/dist/vue.js\"></script>\n    <script src=\"https://cdn.socket.io/4.3.2/socket.io.min.js\" integrity=\"sha384-KAZ4DtjNhLChOB/hxXuKqhMLYvx3b5MlT55xPEiNmREKRzeEm+RVPlTnAn0ajQNs\" crossorigin=\"anonymous\"></script>\n</head>\n<body>\n    <div id=\"app\" class=\"container\">\n            <div class=\"row\">\n                <div class=\"col-md-6 offset-md-3 col-sm-12\">\n                    <h1 class=\"text-center\">{{ title }}</h1>\n                    <br>\n                    <div id=\"status\"></div>\n                    <div id=\"chat\">\n                        <input type=\"text\" v-model=\"name\" id=\"username\" class=\"form-control\" placeholder=\"Enter name...\">\n                        <br>\n                        <div class=\"card\">\n                            <div id=\"messages\" class=\"card-block\">\n                                <ul>\n                                    <li v-for=\"message of messages\">{{ message.name }}: {{ message.text }}</li>\n                                </ul>\n                            </div>\n                        </div>\n                        <br>\n                        <textarea id=\"textarea\" class=\"form-control\" v-model=\"text\" placeholder=\"Enter message...\"></textarea>\n                        <br>\n                        <button id=\"send\" class=\"btn\" @click.prevent=\"sendMessage\">Send</button>\n                    </div>\n                </div>\n            </div>\n    </div>\n\n    <script src=\"main.js\"></script>\n</body>\n</html>"
  },
  {
    "path": "NestVueChat/static/main.js",
    "content": "const app = new Vue({\n    el: '#app',\n    data: {\n        title: 'Nestjs Websockets Chat',\n        name: '',\n        text: '',\n        messages: [],\n        socket: null\n    },\n    methods: {\n        sendMessage() {\n            if(this.validateInput()) {\n                const message = {\n                    name: this.name,\n                    text: this.text\n                }\n                this.socket.emit('msgToServer', message)\n                this.text = ''\n            }\n        },\n        receivedMessage(message) {\n            this.messages.push(message)\n        },\n        validateInput() {\n            return this.name.length > 0 && this.text.length > 0\n        }\n    },\n    created() {\n        this.socket = io('http://localhost:3000')\n        this.socket.on('msgToClient', (message) => {\n            this.receivedMessage(message)\n        })\n    }\n})"
  },
  {
    "path": "NestVueChat/static/styles.css",
    "content": "#messages{\n    height:300px;\n    overflow-y: scroll;\n}\n\n#app {\n    margin-top: 2rem;\n}"
  },
  {
    "path": "NestVueChat/test/app.e2e-spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from './../src/app.module';\n\ndescribe('AppController (e2e)', () => {\n  let app;\n\n  beforeEach(async () => {\n    const moduleFixture: TestingModule = await Test.createTestingModule({\n      imports: [AppModule],\n    }).compile();\n\n    app = moduleFixture.createNestApplication();\n    await app.init();\n  });\n\n  it('/ (GET)', () => {\n    return request(app.getHttpServer())\n      .get('/')\n      .expect(200)\n      .expect('Hello World!');\n  });\n});\n"
  },
  {
    "path": "NestVueChat/test/jest-e2e.json",
    "content": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-spec.ts$\",\n  \"transform\": {\n    \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n  }\n}\n"
  },
  {
    "path": "NestVueChat/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "NestVueChat/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"target\": \"es6\",\n    \"sourceMap\": true,\n    \"outDir\": \"./dist\",\n    \"baseUrl\": \"./\",\n    \"incremental\": true\n  },\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "NestVueChat/tslint.json",
    "content": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  },\n  \"rules\": {\n    \"quotemark\": [true, \"single\"],\n    \"member-access\": [false],\n    \"ordered-imports\": [false],\n    \"max-line-length\": [true, 150],\n    \"member-ordering\": [false],\n    \"interface-name\": [false],\n    \"arrow-parens\": false,\n    \"object-literal-sort-keys\": false\n  },\n  \"rulesDirectory\": []\n}\n"
  },
  {
    "path": "Notifications/.gitignore",
    "content": "*.iml\n.gradle\n/local.properties\n/.idea/caches\n/.idea/libraries\n/.idea/modules.xml\n/.idea/workspace.xml\n/.idea/navEditor.xml\n/.idea/assetWizardSettings.xml\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n"
  },
  {
    "path": "Notifications/.idea/codeStyles/Project.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <code_scheme name=\"Project\" version=\"173\">\n    <JetCodeStyleSettings>\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </JetCodeStyleSettings>\n    <codeStyleSettings language=\"kotlin\">\n      <option name=\"CODE_STYLE_DEFAULTS\" value=\"KOTLIN_OFFICIAL\" />\n    </codeStyleSettings>\n  </code_scheme>\n</component>"
  },
  {
    "path": "Notifications/.idea/codeStyles/codeStyleConfig.xml",
    "content": "<component name=\"ProjectCodeStyleConfiguration\">\n  <state>\n    <option name=\"USE_PER_PROJECT_SETTINGS\" value=\"true\" />\n  </state>\n</component>"
  },
  {
    "path": "Notifications/.idea/encodings.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"Encoding\" addBOMForNewFiles=\"with NO BOM\" />\n</project>"
  },
  {
    "path": "Notifications/.idea/gradle.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"GradleSettings\">\n    <option name=\"linkedExternalProjectsSettings\">\n      <GradleProjectSettings>\n        <option name=\"distributionType\" value=\"DEFAULT_WRAPPED\" />\n        <option name=\"externalProjectPath\" value=\"$PROJECT_DIR$\" />\n        <option name=\"modules\">\n          <set>\n            <option value=\"$PROJECT_DIR$\" />\n            <option value=\"$PROJECT_DIR$/app\" />\n          </set>\n        </option>\n        <option name=\"resolveModulePerSourceSet\" value=\"false\" />\n      </GradleProjectSettings>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": "Notifications/.idea/misc.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectRootManager\" version=\"2\" languageLevel=\"JDK_1_7\" project-jdk-name=\"1.8\" project-jdk-type=\"JavaSDK\">\n    <output url=\"file://$PROJECT_DIR$/build/classes\" />\n  </component>\n  <component name=\"ProjectType\">\n    <option name=\"id\" value=\"Android\" />\n  </component>\n</project>"
  },
  {
    "path": "Notifications/.idea/runConfigurations.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"RunConfigurationProducerService\">\n    <option name=\"ignoredProducers\">\n      <set>\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer\" />\n        <option value=\"org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer\" />\n      </set>\n    </option>\n  </component>\n</project>"
  },
  {
    "path": "Notifications/.idea/vcs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping directory=\"$PROJECT_DIR$/..\" vcs=\"Git\" />\n  </component>\n</project>"
  },
  {
    "path": "Notifications/app/.gitignore",
    "content": "/build\n"
  },
  {
    "path": "Notifications/app/build.gradle",
    "content": "apply plugin: 'com.android.application'\n\napply plugin: 'kotlin-android'\n\napply plugin: 'kotlin-android-extensions'\n\nandroid {\n    compileSdkVersion 28\n    defaultConfig {\n        applicationId \"com.example.notifications\"\n        minSdkVersion 15\n        targetSdkVersion 28\n        versionCode 1\n        versionName \"1.0\"\n        testInstrumentationRunner \"android.support.test.runner.AndroidJUnitRunner\"\n    }\n    buildTypes {\n        release {\n            minifyEnabled false\n            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'\n        }\n    }\n}\n\ndependencies {\n    implementation fileTree(dir: 'libs', include: ['*.jar'])\n    implementation\"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version\"\n    implementation 'com.android.support:appcompat-v7:28.0.0'\n    implementation 'com.android.support.constraint:constraint-layout:1.1.3'\n    testImplementation 'junit:junit:4.12'\n    androidTestImplementation 'com.android.support.test:runner:1.0.2'\n    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'\n    implementation \"com.android.support:support-compat:28.0.0\"\n}\n"
  },
  {
    "path": "Notifications/app/proguard-rules.pro",
    "content": "# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile\n"
  },
  {
    "path": "Notifications/app/src/androidTest/java/com/example/notifications/ExampleInstrumentedTest.kt",
    "content": "package com.example.notifications\n\nimport android.support.test.InstrumentationRegistry\nimport android.support.test.runner.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getTargetContext()\n        assertEquals(\"com.example.notifications\", appContext.packageName)\n    }\n}\n"
  },
  {
    "path": "Notifications/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n          package=\"com.example.notifications\">\n\n    <application\n            android:allowBackup=\"true\"\n            android:icon=\"@mipmap/ic_launcher\"\n            android:label=\"@string/app_name\"\n            android:roundIcon=\"@mipmap/ic_launcher_round\"\n            android:supportsRtl=\"true\"\n            android:theme=\"@style/AppTheme\">\n        <activity android:name=\".MainActivity\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\"/>\n\n                <category android:name=\"android.intent.category.LAUNCHER\"/>\n            </intent-filter>\n        </activity>\n    </application>\n\n</manifest>"
  },
  {
    "path": "Notifications/app/src/main/java/com/example/notifications/MainActivity.kt",
    "content": "package com.example.notifications\n\nimport android.app.Notification.VISIBILITY_PUBLIC\nimport android.os.Build\nimport android.support.v7.app.AppCompatActivity\nimport android.os.Bundle\nimport android.support.v4.app.NotificationCompat\nimport android.support.v4.app.NotificationManagerCompat\nimport kotlinx.android.synthetic.main.activity_main.*\nimport android.R.attr.name\nimport android.annotation.SuppressLint\nimport android.annotation.TargetApi\nimport android.app.Notification.VISIBILITY_PRIVATE\nimport android.app.NotificationChannel\nimport android.app.NotificationManager\nimport android.app.PendingIntent\nimport android.content.Context\nimport android.content.Intent\nimport android.graphics.BitmapFactory\nimport android.os.HandlerThread\nimport android.support.annotation.RequiresApi\nimport android.widget.RemoteViews\n\n\nclass MainActivity : AppCompatActivity() {\n\n    private val CHANNEL_ID = \"CHANNEL_ID\"\n\n    @SuppressLint(\"NewApi\")\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        createNotificationChannel()\n\n        default_notification_btn.setOnClickListener {\n            createNormalNotification()\n        }\n\n        head_up_notification_btn.setOnClickListener {\n            createHeadsUpNotification()\n        }\n\n        lock_screen_notification_btn.setOnClickListener {\n            createLockScreenNotification()\n        }\n\n        notification_badged.setOnClickListener {\n            createBadgedNotification()\n        }\n\n        notification_click_action_btn.setOnClickListener {\n            createNotificationWithClickAction()\n        }\n\n        notification_action_button_btn.setOnClickListener {\n            createNotificationWithActionButtons()\n        }\n\n        expandable_notification.setOnClickListener {\n            createExpandableNotification()\n        }\n\n        progress_bar_notification.setOnClickListener {\n            createProgressBarNotification()\n        }\n\n        group_notification.setOnClickListener {\n            createGroupNotification()\n        }\n\n        custom_notification.setOnClickListener {\n            createCustomNotification()\n        }\n    }\n\n    // Creates a standard notification\n    fun createNormalNotification(){\n        val builder = NotificationCompat.Builder(this, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setContentTitle(\"Normal Notification\")\n            .setContentText(\"Really great content for this notification\")\n            .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n\n        createNotification(0, builder)\n    }\n\n    // Creates a headup notification\n    fun createHeadsUpNotification(){\n        val builder = NotificationCompat.Builder(this, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setContentTitle(\"Heads up notification\")\n            .setContentText(\"Really great content for this notification\")\n            .setPriority(NotificationCompat.PRIORITY_HIGH)\n\n        if (Build.VERSION.SDK_INT >= 21) builder.setVibrate(LongArray(0))\n\n        createNotification(1, builder)\n    }\n\n    // Create a notification which will be visible on the lockscreen\n    @RequiresApi(Build.VERSION_CODES.LOLLIPOP)\n    fun createLockScreenNotification(){\n        val publicBuilder = NotificationCompat.Builder(this, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setContentTitle(\"Alternative notification\")\n            .setPriority(NotificationCompat.PRIORITY_HIGH)\n            .setVisibility(VISIBILITY_PUBLIC)\n\n        val builder = NotificationCompat.Builder(this, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setContentTitle(\"Lock screen Notification\")\n            .setContentText(\"Really great content for this notification\")\n            .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n            .setVisibility(VISIBILITY_PRIVATE)\n            .setPublicVersion(publicBuilder.build())\n\n        createNotification(2, builder)\n    }\n\n    // Create a notification which shows a badged on newer android versions\n    fun createBadgedNotification(){\n        val builder = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)\n            .setContentTitle(\"Badged Notification\")\n            .setContentText(\"New badged notification\")\n            .setSmallIcon(R.drawable.notification_icon)\n            .setBadgeIconType(NotificationCompat.BADGE_ICON_SMALL)\n\n        createNotification(3, builder)\n    }\n\n    // Create a notification with a click event\n    fun createNotificationWithClickAction(){\n        val intent = Intent(this, MainActivity::class.java).apply {\n            flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK\n        }\n\n        val pendingIntent: PendingIntent = PendingIntent.getActivity(this, 0, intent, 0)\n\n        val builder = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)\n            .setContentTitle(\"Notification with click action\")\n            .setContentText(\"New notification with great click action\")\n            .setSmallIcon(R.drawable.notification_icon)\n            .setBadgeIconType(NotificationCompat.BADGE_ICON_SMALL)\n            .setContentIntent(pendingIntent)\n            .setAutoCancel(true)\n\n        createNotification(4, builder)\n    }\n\n    // Create a notification with an action button\n    fun createNotificationWithActionButtons(){\n        val intent = Intent(this, MainActivity::class.java).apply {\n            flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK\n        }\n\n        val pendingIntent: PendingIntent = PendingIntent.getActivity(this, 0, intent, 0)\n\n        val builder = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)\n            .setContentTitle(\"Notification with click action\")\n            .setContentText(\"New notification with great click action\")\n            .setSmallIcon(R.drawable.notification_icon)\n            .setBadgeIconType(NotificationCompat.BADGE_ICON_SMALL)\n            .addAction(R.drawable.notification_icon, \"Open Activity\",\n                pendingIntent)\n\n        createNotification(5, builder)\n    }\n\n    // Create a notification that can be expanded for more information\n    fun createExpandableNotification(){\n        val bitmap = BitmapFactory.decodeResource(resources, R.drawable.notification_icon)\n\n        val builder = NotificationCompat.Builder(this, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setContentTitle(\"Simple expandable notification\")\n            .setContentText(\"Simple notification that can be expended \")\n            .setLargeIcon(bitmap)\n            .setStyle(NotificationCompat.BigPictureStyle()\n                .bigPicture(bitmap)\n                .bigLargeIcon(null))\n\n        /* Add large text\n        .setStyle(NotificationCompat.BigTextStyle()\n                .bigText(\"Some great big text\")\n         */\n\n        createNotification(6, builder)\n    }\n\n    // Create a notification with a simple progress bar\n    fun createProgressBarNotification(){\n        val builder = NotificationCompat.Builder(this, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setContentTitle(\"Simple progress bar notification\")\n            .setContentText(\"Simple notification with a progress bar \")\n\n        // Progress values\n        val PROGRESS_MAX = 100\n        val PROGRESS_CURRENT = 0\n\n        NotificationManagerCompat.from(this).apply {\n            // Sets the initial progress to 0\n            builder.setProgress(PROGRESS_MAX, PROGRESS_CURRENT, false)\n            notify(7 , builder.build())\n\n            for(i in 0 until 100){\n                builder.setProgress(PROGRESS_MAX, i, false)\n                HandlerThread.sleep(100)\n            }\n\n            // Updates the notification when the progress is done\n            builder.setContentText(\"Download complete\")\n                .setProgress(0, 0, false)\n            notify(7, builder.build())\n        }\n    }\n\n    val GROUP_KEY = \"com.android.example.KEY\"\n\n    // Create a simple group notification\n    fun createGroupNotification(){\n        val groupBuilderOne = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setContentTitle(\"Simple group notification\")\n            .setContentText(\"Simple notification group\")\n            .setGroup(GROUP_KEY)\n\n        val groupBuilderTwo = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setContentTitle(\"Second simple group notification\")\n            .setContentText(\"Simple notification group\")\n            .setGroup(GROUP_KEY)\n\n        // For older versions than 7.0\n        val summaryNotification = NotificationCompat.Builder(this@MainActivity, CHANNEL_ID)\n            .setContentTitle(\"Notification group summary\")\n            .setContentText(\"Notification group summary\")\n            .setSmallIcon(R.drawable.notification_icon)\n            .setGroup(GROUP_KEY)\n            .setGroupSummary(true)\n\n\n        createNotification(8, groupBuilderOne)\n        createNotification(9, groupBuilderTwo)\n        createNotification(10, summaryNotification)\n    }\n\n    fun createCustomNotification(){\n        // Get the layouts to use in the custom notification\n        val notificationLayout = RemoteViews(packageName, R.layout.custom_notification_layout)\n        val notificationLayoutExpanded = RemoteViews(packageName, R.layout.custom_notification_expended_layout)\n\n        notificationLayout.setTextViewText(R.id.notification_title, \"Title\")\n        notificationLayout.setTextViewText(R.id.notification_info, \"Expand for more information\")\n\n        // Apply the layouts to the notification\n        val customNotification = NotificationCompat.Builder(this, CHANNEL_ID)\n            .setSmallIcon(R.drawable.notification_icon)\n            .setStyle(NotificationCompat.DecoratedCustomViewStyle())\n            .setCustomContentView(notificationLayout)\n            .setCustomBigContentView(notificationLayoutExpanded)\n\n        createNotification(11, customNotification)\n    }\n\n    // Creates the notification and displays it\n    fun createNotification(id: Int, builder: NotificationCompat.Builder){\n        with(NotificationManagerCompat.from(this)) {\n            notify(id, builder.build())\n        }\n    }\n\n    // Create the notification channel\n    private fun createNotificationChannel() {\n        // Create the NotificationChannel, but only on API 26+ because\n        // the NotificationChannel class is new and not in the support library\n        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n            val name = \"Channel\"\n            val descriptionText = \"Simple channel example\"\n            val importance = NotificationManager.IMPORTANCE_DEFAULT\n            val channel = NotificationChannel(CHANNEL_ID, name, importance).apply {\n                description = descriptionText\n                //setShowBadge(false)\n            }\n            // Register the channel with the system\n            val notificationManager: NotificationManager =\n                getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager\n            notificationManager.createNotificationChannel(channel)\n        }\n    }\n\n}\n"
  },
  {
    "path": "Notifications/app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:height=\"108dp\"\n        android:width=\"108dp\"\n        android:viewportHeight=\"108\"\n        android:viewportWidth=\"108\">\n    <path android:fillColor=\"#008577\"\n          android:pathData=\"M0,0h108v108h-108z\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M9,0L9,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,0L19,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M29,0L29,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M39,0L39,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M49,0L49,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M59,0L59,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M69,0L69,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M79,0L79,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M89,0L89,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M99,0L99,108\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,9L108,9\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,19L108,19\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,29L108,29\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,39L108,39\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,49L108,49\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,59L108,59\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,69L108,69\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,79L108,79\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,89L108,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M0,99L108,99\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,29L89,29\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,39L89,39\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,49L89,49\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,59L89,59\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,69L89,69\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M19,79L89,79\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M29,19L29,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M39,19L39,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M49,19L49,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M59,19L59,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M69,19L69,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n    <path android:fillColor=\"#00000000\" android:pathData=\"M79,19L79,89\"\n          android:strokeColor=\"#33FFFFFF\" android:strokeWidth=\"0.8\"/>\n</vector>\n"
  },
  {
    "path": "Notifications/app/src/main/res/drawable/notification_icon.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        android:width=\"24dp\"\n        android:height=\"24dp\"\n        android:viewportWidth=\"24.0\"\n        android:viewportHeight=\"24.0\">\n    <path\n        android:fillColor=\"#FF000000\"\n        android:pathData=\"M6,18c0,0.55 0.45,1 1,1h1v3.5c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5L11,19h2v3.5c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5L16,19h1c0.55,0 1,-0.45 1,-1L18,8L6,8v10zM3.5,8C2.67,8 2,8.67 2,9.5v7c0,0.83 0.67,1.5 1.5,1.5S5,17.33 5,16.5v-7C5,8.67 4.33,8 3.5,8zM20.5,8c-0.83,0 -1.5,0.67 -1.5,1.5v7c0,0.83 0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5v-7c0,-0.83 -0.67,-1.5 -1.5,-1.5zM15.53,2.16l1.3,-1.3c0.2,-0.2 0.2,-0.51 0,-0.71 -0.2,-0.2 -0.51,-0.2 -0.71,0l-1.48,1.48C13.85,1.23 12.95,1 12,1c-0.96,0 -1.86,0.23 -2.66,0.63L7.85,0.15c-0.2,-0.2 -0.51,-0.2 -0.71,0 -0.2,0.2 -0.2,0.51 0,0.71l1.31,1.31C6.97,3.26 6,5.01 6,7h12c0,-1.99 -0.97,-3.75 -2.47,-4.84zM10,5L9,5L9,4h1v1zM15,5h-1L14,4h1v1z\"/>\n</vector>\n"
  },
  {
    "path": "Notifications/app/src/main/res/drawable-v24/ic_launcher_foreground.xml",
    "content": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:aapt=\"http://schemas.android.com/aapt\"\n        android:width=\"108dp\"\n        android:height=\"108dp\"\n        android:viewportHeight=\"108\"\n        android:viewportWidth=\"108\">\n    <path\n            android:fillType=\"evenOdd\"\n            android:pathData=\"M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z\"\n            android:strokeColor=\"#00000000\"\n            android:strokeWidth=\"1\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                    android:endX=\"78.5885\"\n                    android:endY=\"90.9159\"\n                    android:startX=\"48.7653\"\n                    android:startY=\"61.0927\"\n                    android:type=\"linear\">\n                <item\n                        android:color=\"#44000000\"\n                        android:offset=\"0.0\"/>\n                <item\n                        android:color=\"#00000000\"\n                        android:offset=\"1.0\"/>\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n            android:fillColor=\"#FFFFFF\"\n            android:fillType=\"nonZero\"\n            android:pathData=\"M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z\"\n            android:strokeColor=\"#00000000\"\n            android:strokeWidth=\"1\"/>\n</vector>\n"
  },
  {
    "path": "Notifications/app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView\n        xmlns:android=\"http://schemas.android.com/apk/res/android\"\n        xmlns:tools=\"http://schemas.android.com/tools\"\n        xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        tools:context=\".MainActivity\"\n        >\n    <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:orientation=\"vertical\">\n\n        <Button\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/default_notification_btn\"\n                android:layout_marginStart=\"8dp\"\n                android:layout_marginRight=\"8dp\"\n                android:layout_marginTop=\"8dp\"\n                android:text=\"default notification\" android:layout_marginLeft=\"8dp\"/>\n        <Button\n                android:text=\"Head up\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/head_up_notification_btn\" android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\"\n                android:layout_marginLeft=\"8dp\"\n                android:layout_marginStart=\"8dp\"\n                android:layout_marginTop=\"8dp\"/>\n\n        <Button\n                android:text=\"Lockscreen\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/lock_screen_notification_btn\" android:layout_marginLeft=\"8dp\"\n                android:layout_marginStart=\"8dp\"\n                android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\" android:layout_marginTop=\"8dp\"/>\n\n        <Button\n                android:text=\"Click action\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/notification_click_action_btn\" android:layout_marginLeft=\"8dp\"\n                android:layout_marginStart=\"8dp\" android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\" android:layout_marginTop=\"8dp\"\n        />\n        <Button\n                android:text=\"Action Button\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/notification_action_button_btn\" android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\" android:layout_marginLeft=\"8dp\" android:layout_marginStart=\"8dp\"\n                android:layout_marginTop=\"8dp\"/>\n        <Button\n                android:text=\"Badged\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/notification_badged\" app:layout_constraintEnd_toEndOf=\"parent\"\n                android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\" app:layout_constraintStart_toStartOf=\"parent\"\n                android:layout_marginLeft=\"8dp\" android:layout_marginStart=\"8dp\" android:layout_marginTop=\"8dp\"\n        />\n\n        <Button\n                android:text=\"expandable\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/expandable_notification\"\n                android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\"\n                android:layout_marginLeft=\"8dp\"\n                android:layout_marginStart=\"8dp\"\n                android:layout_marginTop=\"8dp\"/>\n\n        <Button\n                android:text=\"progress_bar\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/progress_bar_notification\"\n                android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\"\n                android:layout_marginLeft=\"8dp\"\n                android:layout_marginStart=\"8dp\"\n                android:layout_marginTop=\"8dp\"/>\n\n        <Button\n                android:text=\"group notification\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/group_notification\"\n                android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\"\n                android:layout_marginLeft=\"8dp\"\n                android:layout_marginStart=\"8dp\"\n                android:layout_marginTop=\"8dp\"/>\n\n        <Button\n                android:text=\"Custom notification\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:id=\"@+id/custom_notification\"\n                android:layout_marginEnd=\"8dp\"\n                android:layout_marginRight=\"8dp\"\n                android:layout_marginLeft=\"8dp\"\n                android:layout_marginStart=\"8dp\"\n                android:layout_marginTop=\"8dp\"/>\n    </LinearLayout>\n</ScrollView>"
  },
  {
    "path": "Notifications/app/src/main/res/layout/custom_notification_expended_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"256dp\"\n              android:orientation=\"vertical\">\n\n    <TextView\n            android:id=\"@+id/notification_expanded_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Expended notification\"\n            style=\"@style/TextAppearance.Compat.Notification.Title\" />\n\n    <TextView\n            android:id=\"@+id/notification_expanded_info\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Expand notification informations\"\n            style=\"@style/TextAppearance.Compat.Notification.Info\" />\n\n    <ImageView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:src=\"@drawable/ic_launcher_background\"/>\n</LinearLayout>"
  },
  {
    "path": "Notifications/app/src/main/res/layout/custom_notification_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n              android:layout_width=\"match_parent\"\n              android:layout_height=\"match_parent\"\n              android:orientation=\"vertical\">\n\n    <TextView\n            android:id=\"@+id/notification_title\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            style=\"@style/TextAppearance.Compat.Notification.Title\" />\n\n    <TextView\n            android:id=\"@+id/notification_info\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            style=\"@style/TextAppearance.Compat.Notification.Info\" />\n</LinearLayout>"
  },
  {
    "path": "Notifications/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "Notifications/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\"/>\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\"/>\n</adaptive-icon>"
  },
  {
    "path": "Notifications/app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"colorPrimary\">#008577</color>\n    <color name=\"colorPrimaryDark\">#00574B</color>\n    <color name=\"colorAccent\">#D81B60</color>\n</resources>\n"
  },
  {
    "path": "Notifications/app/src/main/res/values/strings.xml",
    "content": "<resources>\n    <string name=\"app_name\">Notifications</string>\n</resources>\n"
  },
  {
    "path": "Notifications/app/src/main/res/values/styles.xml",
    "content": "<resources>\n\n    <!-- Base application theme. -->\n    <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.DarkActionBar\">\n        <!-- Customize your theme here. -->\n        <item name=\"colorPrimary\">@color/colorPrimary</item>\n        <item name=\"colorPrimaryDark\">@color/colorPrimaryDark</item>\n        <item name=\"colorAccent\">@color/colorAccent</item>\n    </style>\n\n</resources>\n"
  },
  {
    "path": "Notifications/app/src/test/java/com/example/notifications/ExampleUnitTest.kt",
    "content": "package com.example.notifications\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}\n"
  },
  {
    "path": "Notifications/build.gradle",
    "content": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n    ext.kotlin_version = '1.3.21'\n    repositories {\n        google()\n        jcenter()\n        \n    }\n    dependencies {\n        classpath 'com.android.tools.build:gradle:3.4.0'\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\n        // NOTE: Do not place your application dependencies here; they belong\n        // in the individual module build.gradle files\n    }\n}\n\nallprojects {\n    repositories {\n        google()\n        jcenter()\n        \n    }\n}\n\ntask clean(type: Delete) {\n    delete rootProject.buildDir\n}\n"
  },
  {
    "path": "Notifications/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Sat Apr 20 11:00:18 CEST 2019\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-5.1.1-all.zip\n"
  },
  {
    "path": "Notifications/gradle.properties",
    "content": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx1536m\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. More details, visit\n# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects\n# org.gradle.parallel=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official\n"
  },
  {
    "path": "Notifications/gradlew",
    "content": "#!/usr/bin/env sh\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS=\"\"\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin, switch paths to Windows format before running java\nif $cygwin ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=$((i+1))\n    done\n    case $i in\n        (0) set -- ;;\n        (1) set -- \"$args0\" ;;\n        (2) set -- \"$args0\" \"$args1\" ;;\n        (3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        (4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        (5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        (6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        (7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        (8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        (9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=$(save \"$@\")\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\n# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong\nif [ \"$(uname)\" = \"Darwin\" ] && [ \"$HOME\" = \"$PWD\" ]; then\n  cd \"$(dirname \"$0\")\"\nfi\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "Notifications/gradlew.bat",
    "content": "@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto init\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto init\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:init\n@rem Get command-line arguments, handling Windows variants\n\nif not \"%OS%\" == \"Windows_NT\" goto win9xME_args\n\n:win9xME_args\n@rem Slurp the command line arguments.\nset CMD_LINE_ARGS=\nset _SKIP=2\n\n:win9xME_args_slurp\nif \"x%~1\" == \"x\" goto execute\n\nset CMD_LINE_ARGS=%*\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "Notifications/settings.gradle",
    "content": "include ':app'\n"
  },
  {
    "path": "README.md",
    "content": "# Blog\n\nList of all projects in the repository:\n\n- [Nestjs GraphQL Server](nest-graph-ql)\n- [Nestjs File uploading](nest-file-uploading)\n- [Nestjs MongoDB CRUD](Nest-CRUD)\n- [Nestjs Websocket Chat](NestVueChat)\n- [Nuxt Ghost Blog](nuxt-ghost)\n- [Prisma CRUD](prisma-crud)\n- [Android Notifications](Notifications)\n- [Android Camera](Camera)\n- [Android CameraX](CameraX)\n- [Nestjs Typeorm](nestjs-typeorm)\n- [Nestjs Authentication](nest-auth)\n- [Express Authentication Boilerplate](express-auth-boilerplate)\n\n## Author\n\nGabriel Tanner\n\n## Support me\n\n<a href=\"https://www.buymeacoffee.com/gabrieltanner\" target=\"_blank\"><img src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" ></a>\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details\n"
  },
  {
    "path": "nest-auth/.dockerignore",
    "content": "/dist\n/node_modules"
  },
  {
    "path": "nest-auth/.gitignore",
    "content": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# OS\n.DS_Store\n\n# Tests\n/coverage\n/.nyc_output\n\n# IDEs and editors\n/.idea\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# IDE - VSCode\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json"
  },
  {
    "path": "nest-auth/.prettierrc",
    "content": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "nest-auth/Dockerfile",
    "content": "FROM node:12\n\nWORKDIR /usr/src/app\n\nCOPY package*.json ./\n\nRUN npm ci\n\nCOPY . .\n\nRUN npm run build\n\nEXPOSE 3000\n\nCMD [ \"npm\", \"start\" ]"
  },
  {
    "path": "nest-auth/README.md",
    "content": "<p align=\"center\">\n  <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /></a>\n</p>\n\n[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master\n[travis-url]: https://travis-ci.org/nestjs/nest\n[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux\n[linux-url]: https://travis-ci.org/nestjs/nest\n  \n  <p align=\"center\">A progressive <a href=\"http://nodejs.org\" target=\"blank\">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href=\"https://angular.io\" target=\"blank\">Angular</a>.</p>\n    <p align=\"center\">\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/v/@nestjs/core.svg\" alt=\"NPM Version\" /></a>\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/l/@nestjs/core.svg\" alt=\"Package License\" /></a>\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/dm/@nestjs/core.svg\" alt=\"NPM Downloads\" /></a>\n<a href=\"https://travis-ci.org/nestjs/nest\"><img src=\"https://api.travis-ci.org/nestjs/nest.svg?branch=master\" alt=\"Travis\" /></a>\n<a href=\"https://travis-ci.org/nestjs/nest\"><img src=\"https://img.shields.io/travis/nestjs/nest/master.svg?label=linux\" alt=\"Linux\" /></a>\n<a href=\"https://coveralls.io/github/nestjs/nest?branch=master\"><img src=\"https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5\" alt=\"Coverage\" /></a>\n<a href=\"https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge\"><img src=\"https://badges.gitter.im/nestjs/nestjs.svg\" alt=\"Gitter\" /></a>\n<a href=\"https://opencollective.com/nest#backer\"><img src=\"https://opencollective.com/nest/backers/badge.svg\" alt=\"Backers on Open Collective\" /></a>\n<a href=\"https://opencollective.com/nest#sponsor\"><img src=\"https://opencollective.com/nest/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\" /></a>\n  <a href=\"https://paypal.me/kamilmysliwiec\"><img src=\"https://img.shields.io/badge/Donate-PayPal-dc3d53.svg\"/></a>\n  <a href=\"https://twitter.com/nestframework\"><img src=\"https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow\"></a>\n</p>\n  <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)\n  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->\n\n## Description\n\n[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.\n\n## Installation\n\n```bash\n$ npm install\n```\n\n## Running the app\n\n```bash\n# development\n$ npm run start\n\n# watch mode\n$ npm run start:dev\n\n# production mode\n$ npm run start:prod\n```\n\n## Test\n\n```bash\n# unit tests\n$ npm run test\n\n# e2e tests\n$ npm run test:e2e\n\n# test coverage\n$ npm run test:cov\n```\n\n## Support\n\nNest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).\n\n## Stay in touch\n\n- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)\n- Website - [https://nestjs.com](https://nestjs.com/)\n- Twitter - [@nestframework](https://twitter.com/nestframework)\n\n## License\n\n  Nest is [MIT licensed](LICENSE).\n"
  },
  {
    "path": "nest-auth/docker-compose.yml",
    "content": "version: '3'\n\nservices:\n  nodejs:\n    build:\n      context: ./\n      dockerfile: Dockerfile\n    container_name: nodejs\n    restart: always\n    environment:\n      - DATABASE_HOST=mongo\n      - PORT=3000\n    ports:\n      - '3000:3000'\n    depends_on: [mongo]\n  mongo:\n    container_name: mongo\n    image: mongo\n    ports:\n      - '27017:27017'\n    volumes:\n      - mongo_data:/data/db\n\nvolumes:\n  mongo_data: {}\n"
  },
  {
    "path": "nest-auth/nest-cli.json",
    "content": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "nest-auth/nodemon-debug.json",
    "content": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts\"\n}\n"
  },
  {
    "path": "nest-auth/nodemon.json",
    "content": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "nest-auth/package.json",
    "content": "{\n  \"name\": \"nest-auth\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"tsc -p tsconfig.build.json\",\n    \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n    \"start\": \"ts-node -r tsconfig-paths/register src/main.ts\",\n    \"start:dev\": \"concurrently --handle-input \\\"wait-on dist/main.js && nodemon\\\" \\\"tsc -w -p tsconfig.build.json\\\" \",\n    \"start:debug\": \"nodemon --config nodemon-debug.json\",\n    \"prestart:prod\": \"rimraf dist && npm run build\",\n    \"start:prod\": \"node dist/main.js\",\n    \"lint\": \"tslint -p tsconfig.json -c tslint.json\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"test:cov\": \"jest --coverage\",\n    \"test:debug\": \"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand\",\n    \"test:e2e\": \"jest --config ./test/jest-e2e.json\"\n  },\n  \"dependencies\": {\n    \"@nestjs/common\": \"8.2.6\",\n    \"@nestjs/core\": \"8.2.6\",\n    \"@nestjs/mongoose\": \"9.0.2\",\n    \"@nestjs/passport\": \"8.1.0\",\n    \"@nestjs/platform-express\": \"8.2.6\",\n    \"bcrypt\": \"5.0.1\",\n    \"dotenv\": \"14.3.2\",\n    \"jsonwebtoken\": \"8.5.1\",\n    \"mongoose\": \"6.1.8\",\n    \"passport\": \"0.5.2\",\n    \"passport-jwt\": \"4.0.0\",\n    \"reflect-metadata\": \"0.1.13\",\n    \"rimraf\": \"3.0.2\",\n    \"rxjs\": \"7.5.2\"\n  },\n  \"devDependencies\": {\n    \"@nestjs/testing\": \"8.2.6\",\n    \"@types/express\": \"4.17.13\",\n    \"@types/jest\": \"27.4.0\",\n    \"@types/jsonwebtoken\": \"8.5.8\",\n    \"@types/mongoose\": \"5.11.96\",\n    \"@types/node\": \"17.0.12\",\n    \"@types/passport-local-mongoose\": \"6.1.0\",\n    \"@types/supertest\": \"2.0.11\",\n    \"concurrently\": \"7.0.0\",\n    \"jest\": \"27.4.7\",\n    \"nodemon\": \"2.0.15\",\n    \"prettier\": \"2.5.1\",\n    \"supertest\": \"6.2.2\",\n    \"ts-jest\": \"27.1.3\",\n    \"ts-node\": \"10.4.0\",\n    \"tsconfig-paths\": \"3.12.0\",\n    \"tslint\": \"5.20.1\",\n    \"typescript\": \"4.5.5\",\n    \"wait-on\": \"6.0.0\"\n  },\n  \"jest\": {\n    \"moduleFileExtensions\": [\n      \"js\",\n      \"json\",\n      \"ts\"\n    ],\n    \"rootDir\": \"src\",\n    \"testRegex\": \".spec.ts$\",\n    \"transform\": {\n      \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n    },\n    \"coverageDirectory\": \"../coverage\",\n    \"testEnvironment\": \"node\"\n  },\n  \"keywords\": [\n    \"Nestjs\",\n    \"Typescript\",\n    \"Authentification\",\n    \"Passport\",\n    \"JWT\"\n  ]\n}"
  },
  {
    "path": "nest-auth/src/app.controller.ts",
    "content": "import { Controller, Get } from '@nestjs/common';\nimport { AppService } from './app.service';\n\n@Controller()\nexport class AppController {\n  constructor(private readonly appService: AppService) {}\n\n  @Get()\n  getHello(): string {\n    return this.appService.getHello();\n  }\n}\n"
  },
  {
    "path": "nest-auth/src/app.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\nimport { UserModule } from './user/user.module';\nimport { MongooseModule } from '@nestjs/mongoose';\nimport { AuthModule } from './auth/auth.module';\n\n@Module({\n  imports: [\n    UserModule,\n    MongooseModule.forRoot(`mongodb://${process.env.DATABASE_HOST}/nestauth`),\n    AuthModule,\n  ],\n  controllers: [AppController],\n  providers: [AppService],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "nest-auth/src/app.service.ts",
    "content": "import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n  getHello(): string {\n    return 'Hello World!';\n  }\n}\n"
  },
  {
    "path": "nest-auth/src/auth/auth.controller.ts",
    "content": "import { Controller, Post, Body, Get, UseGuards } from '@nestjs/common';\nimport { UserService } from '../user/user.service';\nimport { AuthService } from './auth.service';\nimport { LoginUserDto } from '../user/dto/login-user.dto';\nimport { AuthGuard } from '@nestjs/passport';\nimport { Payload } from '../types/payload';\nimport { CreateUserDto } from '../user/dto/create-user.dto';\n\n@Controller('auth')\nexport class AuthController {\n    constructor(private userService: UserService, private authService: AuthService) {}\n\n    @Get()\n    @UseGuards(AuthGuard('jwt'))\n    tempAuth() {\n        return {auth: 'works'};\n    }\n\n    @Post('login')\n    async login(@Body() userDTO: LoginUserDto) {\n        const user = await this.userService.findByLogin(userDTO);\n        const payload: Payload = {\n            email: user.email,\n        };\n\n        const token = await this.authService.signPayload(payload);\n        return { user, token };\n    }\n\n    @Post('register')\n    async register(@Body() userDTO: CreateUserDto) {\n        const user = await this.userService.create(userDTO);\n\n        const payload: Payload = {\n            email: user.email,\n        };\n\n        const token = await this.authService.signPayload(payload);\n        return { user, token };\n    }\n}\n"
  },
  {
    "path": "nest-auth/src/auth/auth.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { AuthService } from './auth.service';\nimport { AuthController } from './auth.controller';\nimport { UserModule } from '../user/user.module';\nimport { JwtStrategy } from './jwt.strategy';\n\n@Module({\n  imports: [UserModule],\n  providers: [AuthService, JwtStrategy],\n  controllers: [AuthController],\n})\nexport class AuthModule {}\n"
  },
  {
    "path": "nest-auth/src/auth/auth.service.ts",
    "content": "import { Injectable } from '@nestjs/common';\nimport { UserService } from '../user/user.service';\nimport { Payload } from 'src/types/payload';\nimport { sign } from 'jsonwebtoken';\n\n@Injectable()\nexport class AuthService {\n    constructor(private userService: UserService) {}\n\n    async signPayload(payload: Payload) {\n        return sign(payload, 'secretKey', { expiresIn: '12h' });\n    }\n\n    async validateUser(payload: Payload) {\n        return await this.userService.findByPayload(payload);\n    }\n}\n"
  },
  {
    "path": "nest-auth/src/auth/jwt.strategy.ts",
    "content": "import { Injectable, HttpException, HttpStatus } from '@nestjs/common';\nimport { PassportStrategy } from '@nestjs/passport';\nimport { Strategy, ExtractJwt, VerifiedCallback } from 'passport-jwt';\nimport { AuthService } from './auth.service';\nimport 'dotenv/config'\n\n@Injectable()\nexport class JwtStrategy extends PassportStrategy(Strategy) {\n    constructor(private authService: AuthService) {\n        super({\n            jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),\n            secretOrKey: process.env.SECRET_KEY,\n        });\n    }\n\n    async validate(payload: any, done: VerifiedCallback) {\n        const user = await this.authService.validateUser(payload);\n        if (!user) {\n            return done(\n                new HttpException('Unauthorized access', HttpStatus.UNAUTHORIZED),\n                false,\n            );\n        }\n\n        return done(null, user, payload.iat);\n    }\n}\n"
  },
  {
    "path": "nest-auth/src/main.ts",
    "content": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule);\n  app.enableCors();\n  await app.listen(process.env.PORT);\n}\nbootstrap();\n"
  },
  {
    "path": "nest-auth/src/models/user.schema.ts",
    "content": "import * as mongoose from 'mongoose';\nimport * as bcrypt from 'bcrypt';\n\nexport const UserSchema = new mongoose.Schema({\n    email: {\n        type: String,\n        unique: true,\n        required: true,\n    },\n    password: {\n        type: String,\n        required: true,\n    },\n});\n\nUserSchema.pre('save', async function(next: mongoose.HookNextFunction) {\n    try {\n        if (!this.isModified('password')) {\n        return next();\n        }\n        // tslint:disable-next-line: no-string-literal\n        const hashed = await bcrypt.hash(this['password'], 10);\n        // tslint:disable-next-line: no-string-literal\n        this['password'] = hashed;\n        return next();\n    } catch (err) {\n        return next(err);\n    }\n});\n"
  },
  {
    "path": "nest-auth/src/types/payload.ts",
    "content": "export interface Payload {\n    email: string;\n    expiresIn?: string;\n}\n"
  },
  {
    "path": "nest-auth/src/types/user.ts",
    "content": "import { Document } from 'mongoose';\n\nexport interface User extends Document {\n    readonly email: string;\n    readonly password: string;\n}\n"
  },
  {
    "path": "nest-auth/src/user/dto/create-user.dto.ts",
    "content": "export class CreateUserDto {\n    readonly email: string;\n    readonly password: string;\n}\n"
  },
  {
    "path": "nest-auth/src/user/dto/login-user.dto.ts",
    "content": "export class LoginUserDto {\n    readonly email: string;\n    readonly password: string;\n}\n"
  },
  {
    "path": "nest-auth/src/user/user.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { UserService } from './user.service';\nimport { UserSchema } from '../models/user.schema';\nimport { MongooseModule } from '@nestjs/mongoose';\n\n@Module({\n  imports: [MongooseModule.forFeature([{name: 'User', schema: UserSchema}])],\n  providers: [UserService],\n  controllers: [],\n  exports: [UserService, MongooseModule.forFeature([{name: 'User', schema: UserSchema}])],\n})\nexport class UserModule {}\n"
  },
  {
    "path": "nest-auth/src/user/user.service.ts",
    "content": "import { Injectable, Logger, HttpException, HttpStatus } from '@nestjs/common';\nimport { InjectModel } from '@nestjs/mongoose';\nimport { Model } from 'mongoose';\nimport { User } from '../types/user';\nimport { CreateUserDto } from '../user/dto/create-user.dto';\nimport { LoginUserDto } from '../user/dto/login-user.dto';\nimport * as bcrypt from 'bcrypt';\n\n@Injectable()\nexport class UserService {\n    constructor(@InjectModel('User') private readonly userModel: Model<User>) {}\n\n    sanitizeUser(user: User) {\n        const sanitized = user.toObject();\n        delete sanitized.password;\n        return sanitized;\n    }\n\n    async create(userDTO: CreateUserDto) {\n        const {email} = userDTO;\n        const user = await this.userModel.findOne({email});\n        if (user) {\n            throw new HttpException('User already exists', HttpStatus.BAD_REQUEST);\n        }\n\n        const createdUser = new this.userModel(userDTO);\n        await createdUser.save();\n        return this.sanitizeUser(createdUser);\n    }\n\n    async findByLogin(userDTO: LoginUserDto) {\n        const {email, password} = userDTO;\n        const user = await this.userModel.findOne({email});\n        if (!user) {\n            throw new HttpException('Invalid credentials', HttpStatus.UNAUTHORIZED);\n        }\n\n        if (await bcrypt.compare(password, user.password)) {\n            return this.sanitizeUser(user);\n        } else {\n            throw new HttpException('Invalid credentials', HttpStatus.UNAUTHORIZED);\n        }\n    }\n\n    async findByPayload(payload: any) {\n        const { email } = payload;\n        return await this.userModel.findOne({ email });\n    }\n}\n"
  },
  {
    "path": "nest-auth/test/app.e2e-spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from './../src/app.module';\n\ndescribe('AppController (e2e)', () => {\n  let app;\n\n  beforeEach(async () => {\n    const moduleFixture: TestingModule = await Test.createTestingModule({\n      imports: [AppModule],\n    }).compile();\n\n    app = moduleFixture.createNestApplication();\n    await app.init();\n  });\n\n  it('/ (GET)', () => {\n    return request(app.getHttpServer())\n      .get('/')\n      .expect(200)\n      .expect('Hello World!');\n  });\n});\n"
  },
  {
    "path": "nest-auth/test/jest-e2e.json",
    "content": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-spec.ts$\",\n  \"transform\": {\n    \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n  }\n}\n"
  },
  {
    "path": "nest-auth/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "nest-auth/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"target\": \"es6\",\n    \"sourceMap\": true,\n    \"outDir\": \"./dist\",\n    \"baseUrl\": \"./\",\n    \"incremental\": true\n  },\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "nest-auth/tslint.json",
    "content": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  },\n  \"rules\": {\n    \"quotemark\": [true, \"single\"],\n    \"member-access\": [false],\n    \"ordered-imports\": [false],\n    \"max-line-length\": [true, 150],\n    \"member-ordering\": [false],\n    \"interface-name\": [false],\n    \"arrow-parens\": false,\n    \"object-literal-sort-keys\": false\n  },\n  \"rulesDirectory\": []\n}\n"
  },
  {
    "path": "nest-file-uploading/.dockerignore",
    "content": "/dist\n/node_modules"
  },
  {
    "path": "nest-file-uploading/.gitignore",
    "content": "# compiled output\n/dist\n/node_modules\n/files\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# OS\n.DS_Store\n\n# Tests\n/coverage\n/.nyc_output\n\n# IDEs and editors\n/.idea\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# IDE - VSCode\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json"
  },
  {
    "path": "nest-file-uploading/.prettierrc",
    "content": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "nest-file-uploading/Dockerfile",
    "content": "FROM node:12\n\nWORKDIR /usr/src/app\n\nCOPY package*.json ./\n\nRUN npm ci\n\nCOPY . .\n\nRUN npm run build\n\nEXPOSE 3000\n\nCMD [ \"npm\", \"start\" ]"
  },
  {
    "path": "nest-file-uploading/README.md",
    "content": "# Nestjs file uploading\n\nNestjs file uploading example demonstrating how to upload single and multiple files over an HTTP endpoint. For an in-depth explanation of the application and the basic Nestjs concepts, you can follow [this article](https://gabrieltanner.org/blog/nestjs-file-uploading-using-multer).\n\n## Requirements\n\n- [NodeJS](https://nodejs.org/en/)\n\n## Getting started\n\n### Installing dependencies\n\nFirst, you need to install all the needed dependencies.\n\n```bash\n$ npm install\n```\n\n### Starting the application\n\nAfter installing the dependencies, you can run the application using one of the following commands.\n\n```bash\n# development\n$ npm run start\n\n# watch mode\n$ npm run start:dev\n\n# production mode\n$ npm run start:prod\n```\n\n## Sending HTTP request\n\nOnce the server has started successfully, you can start sending HTTP requests to the three endpoints:\n\n- GET request - `localhost:3000/:imgpath` - Get an uploaded image\n- POST request - `localhost:3000` - Upload a single image\n- POST request - `localhost:3000/multiple` - Upload multiple images at a time"
  },
  {
    "path": "nest-file-uploading/docker-compose.yml",
    "content": "version: '3'\n\nservices:\n  nodejs:\n    build:\n      context: ./\n      dockerfile: Dockerfile\n    container_name: nodejs\n    restart: always\n    ports:\n      - '3000:3000'\n"
  },
  {
    "path": "nest-file-uploading/nest-cli.json",
    "content": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "nest-file-uploading/nodemon-debug.json",
    "content": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts\"\n}\n"
  },
  {
    "path": "nest-file-uploading/nodemon.json",
    "content": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "nest-file-uploading/package.json",
    "content": "{\n  \"name\": \"nest-file-uploading\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"tsc -p tsconfig.build.json\",\n    \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n    \"start\": \"ts-node -r tsconfig-paths/register src/main.ts\",\n    \"start:dev\": \"concurrently --handle-input \\\"wait-on dist/main.js && nodemon\\\" \\\"tsc -w -p tsconfig.build.json\\\" \",\n    \"start:debug\": \"nodemon --config nodemon-debug.json\",\n    \"prestart:prod\": \"rimraf dist && npm run build\",\n    \"start:prod\": \"node dist/main.js\",\n    \"lint\": \"tslint -p tsconfig.json -c tslint.json\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"test:cov\": \"jest --coverage\",\n    \"test:debug\": \"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand\",\n    \"test:e2e\": \"jest --config ./test/jest-e2e.json\"\n  },\n  \"dependencies\": {\n    \"@nestjs/common\": \"8.2.6\",\n    \"@nestjs/core\": \"8.2.6\",\n    \"@nestjs/platform-express\": \"8.2.6\",\n    \"reflect-metadata\": \"0.1.13\",\n    \"rimraf\": \"3.0.2\",\n    \"rxjs\": \"7.5.2\"\n  },\n  \"devDependencies\": {\n    \"@nestjs/testing\": \"8.2.6\",\n    \"@types/express\": \"4.17.13\",\n    \"@types/jest\": \"27.4.0\",\n    \"@types/node\": \"17.0.12\",\n    \"@types/supertest\": \"2.0.11\",\n    \"concurrently\": \"7.0.0\",\n    \"jest\": \"27.4.7\",\n    \"nodemon\": \"2.0.15\",\n    \"prettier\": \"2.5.1\",\n    \"supertest\": \"6.2.2\",\n    \"ts-jest\": \"27.1.3\",\n    \"ts-node\": \"10.4.0\",\n    \"tsconfig-paths\": \"3.12.0\",\n    \"tslint\": \"5.20.1\",\n    \"typescript\": \"4.5.5\",\n    \"wait-on\": \"6.0.0\"\n  },\n  \"jest\": {\n    \"moduleFileExtensions\": [\n      \"js\",\n      \"json\",\n      \"ts\"\n    ],\n    \"rootDir\": \"src\",\n    \"testRegex\": \".spec.ts$\",\n    \"transform\": {\n      \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n    },\n    \"coverageDirectory\": \"../coverage\",\n    \"testEnvironment\": \"node\"\n  },\n  \"keywords\": [\n    \"Nestjs\",\n    \"Typescript\",\n    \"File uploading\",\n    \"Node\"\n  ]\n}\n"
  },
  {
    "path": "nest-file-uploading/src/app.controller.ts",
    "content": "import {\n  Controller,\n  Get,\n  Post,\n  UseInterceptors,\n  UploadedFile,\n  UploadedFiles,\n  Res,\n  Param,\n} from '@nestjs/common';\nimport { FileInterceptor, FilesInterceptor } from '@nestjs/platform-express';\nimport { diskStorage } from 'multer';\nimport { editFileName, imageFileFilter } from './utils/file-upload.utils';\n\n@Controller()\nexport class AppController {\n  @Post()\n  @UseInterceptors(\n    FileInterceptor('image', {\n      storage: diskStorage({\n        destination: './files',\n        filename: editFileName,\n      }),\n      fileFilter: imageFileFilter,\n    }),\n  )\n  async uploadedFile(@UploadedFile() file) {\n    const response = {\n      originalname: file.originalname,\n      filename: file.filename,\n    };\n    return response;\n  }\n\n  @Post('multiple')\n  @UseInterceptors(\n    FilesInterceptor('image', 20, {\n      storage: diskStorage({\n        destination: './files',\n        filename: editFileName,\n      }),\n      fileFilter: imageFileFilter,\n    }),\n  )\n  async uploadMultipleFiles(@UploadedFiles() files) {\n    const response = [];\n    files.forEach(file => {\n      const fileReponse = {\n        originalname: file.originalname,\n        filename: file.filename,\n      };\n      response.push(fileReponse);\n    });\n    return response;\n  }\n\n  @Get(':imgpath')\n  seeUploadedFile(@Param('imgpath') image, @Res() res) {\n    return res.sendFile(image, { root: './files' });\n  }\n}\n"
  },
  {
    "path": "nest-file-uploading/src/app.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { MulterModule } from '@nestjs/platform-express';\n\n@Module({\n  imports: [MulterModule.register({\n    dest: './files',\n  })],\n  controllers: [AppController],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "nest-file-uploading/src/main.ts",
    "content": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule);\n  await app.listen(3000);\n}\nbootstrap();\n"
  },
  {
    "path": "nest-file-uploading/src/utils/file-upload.utils.ts",
    "content": "import { extname } from 'path';\n\nexport const imageFileFilter = (req, file, callback) => {\n  if (!file.originalname.match(/\\.(jpg|jpeg|png|gif)$/)) {\n    return callback(new Error('Only image files are allowed!'), false);\n  }\n  callback(null, true);\n};\n\nexport const editFileName = (req, file, callback) => {\n  const name = file.originalname.split('.')[0];\n  const fileExtName = extname(file.originalname);\n  const randomName = Array(4)\n    .fill(null)\n    .map(() => Math.round(Math.random() * 16).toString(16))\n    .join('');\n  callback(null, `${name}-${randomName}${fileExtName}`);\n};\n"
  },
  {
    "path": "nest-file-uploading/test/app.e2e-spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from './../src/app.module';\n\ndescribe('AppController (e2e)', () => {\n  let app;\n\n  beforeEach(async () => {\n    const moduleFixture: TestingModule = await Test.createTestingModule({\n      imports: [AppModule],\n    }).compile();\n\n    app = moduleFixture.createNestApplication();\n    await app.init();\n  });\n\n  it('/ (GET)', () => {\n    return request(app.getHttpServer())\n      .get('/')\n      .expect(200)\n      .expect('Hello World!');\n  });\n});\n"
  },
  {
    "path": "nest-file-uploading/test/jest-e2e.json",
    "content": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-spec.ts$\",\n  \"transform\": {\n    \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n  }\n}\n"
  },
  {
    "path": "nest-file-uploading/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "nest-file-uploading/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"target\": \"es6\",\n    \"sourceMap\": true,\n    \"outDir\": \"./dist\",\n    \"baseUrl\": \"./\",\n    \"incremental\": true\n  },\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "nest-file-uploading/tslint.json",
    "content": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  },\n  \"rules\": {\n    \"quotemark\": [true, \"single\"],\n    \"member-access\": [false],\n    \"ordered-imports\": [false],\n    \"max-line-length\": [true, 150],\n    \"member-ordering\": [false],\n    \"interface-name\": [false],\n    \"arrow-parens\": false,\n    \"object-literal-sort-keys\": false\n  },\n  \"rulesDirectory\": []\n}\n"
  },
  {
    "path": "nest-graph-ql/.gitignore",
    "content": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# OS\n.DS_Store\n\n# Tests\n/coverage\n/.nyc_output\n\n# IDEs and editors\n/.idea\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# IDE - VSCode\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json"
  },
  {
    "path": "nest-graph-ql/.prettierrc",
    "content": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "nest-graph-ql/README.md",
    "content": "# Nestjs GraphQL\n\nExample demonstrating how to build a GraphQL CRUD application using Nestjs and MongoDB. For an in-depth explanation of the application and the basic Nestjs concepts, you can follow [this article](https://gabrieltanner.org/blog/nestjs-graphqlserver).\n\n## Requirements\n\n- [NodeJS](https://nodejs.org/en/)\n- MongoDB database\n\n## Getting started\n\n### Installing dependencies\n\nFirst, you need to install all the needed dependencies.\n\n```bash\n$ npm install\n```\n\n### Configuring the database\n\nBefore starting the application, you will need to create a MongoDB database and edit the connection string in the `app.modules.ts` file to match your database configuration. The repository includes a Docker-Compose file that helps you start MongoDB.\n\n```\ndocker-compose up\n```\n\nThe default database configuration in the `app.module.ts` file looks like this:\n\n```\n@Module({\n  imports: [MongooseModule.forRoot('mongodb://localhost/nest')],\n})\n```\n\nIf you are not running the database on your local machine, replace localhost with the correct IP-Address.\n\n### Starting the application\n\nAfter installing the dependencies, you can run the application using one of the following commands.\n\n```bash\n# development\n$ npm run start\n\n# watch mode\n$ npm run start:dev\n\n# production mode\n$ npm run start:prod\n```\n\n## Testing the application\n\nAfter starting the application you can start using it by either opening the GraphQL playground on http://localhost:3000/graphql or sending a request through an HTTP client like [Postman](https://www.postman.com/) or [Insomnia](https://insomnia.rest/).\n\n### Creating an item\n\n```\nmutation {\n  createItem(input: {title: \"item\", price: 10, description: \"test\"}) {\n    title\n    price\n    description\n    id\n  }\n}\n```\n\n### Getting all items\n\n```\n{\n  items {\n    title,\n    price,\n    description,\n    id\n  }\n}\n```\n\n### Updating item\n\n```\nmutation {\n  updateItem(id: \"ID\", input: {title: \"item123\", price: 10, description: \"test123\"}) {\n    title\n    price\n    description\n    id\n  }\n}\n```\n\n### Deleting item\n\n```\nmutation {\n  deleteItem(id: \"ID\") {\n    title\n    price\n    description\n    id\n  }\n}\n```\n"
  },
  {
    "path": "nest-graph-ql/docker-compose.yaml",
    "content": "version: '3.7'\nservices:\n  mongodb:\n    image: mongo:latest\n    ports:\n      - 27017:27017\n    volumes:\n      - mongodb_data:/data/db\n\nvolumes:\n  mongodb_data:"
  },
  {
    "path": "nest-graph-ql/nest-cli.json",
    "content": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "nest-graph-ql/nodemon-debug.json",
    "content": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts\"\n}\n"
  },
  {
    "path": "nest-graph-ql/nodemon.json",
    "content": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "nest-graph-ql/package.json",
    "content": "{\n  \"name\": \"nest-graph-ql\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"tsc -p tsconfig.build.json\",\n    \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n    \"start\": \"ts-node -r tsconfig-paths/register src/main.ts\",\n    \"start:dev\": \"concurrently --handle-input \\\"wait-on dist/main.js && nodemon\\\" \\\"tsc -w -p tsconfig.build.json\\\" \",\n    \"start:debug\": \"nodemon --config nodemon-debug.json\",\n    \"prestart:prod\": \"rimraf dist && npm run build\",\n    \"start:prod\": \"node dist/main.js\",\n    \"lint\": \"tslint -p tsconfig.json -c tslint.json\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"test:cov\": \"jest --coverage\",\n    \"test:debug\": \"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand\",\n    \"test:e2e\": \"jest --config ./test/jest-e2e.json\"\n  },\n  \"dependencies\": {\n    \"@nestjs/common\": \"8.2.6\",\n    \"@nestjs/core\": \"8.2.6\",\n    \"@nestjs/graphql\": \"9.1.2\",\n    \"@nestjs/mongoose\": \"9.0.2\",\n    \"@nestjs/platform-express\": \"8.2.6\",\n    \"apollo-server-express\": \"3.6.2\",\n    \"class-transformer\": \"0.5.1\",\n    \"class-validator\": \"^0.13.2\",\n    \"graphql\": \"^15.7.2\",\n    \"graphql-tools\": \"8.2.0\",\n    \"mongoose\": \"6.1.8\",\n    \"reflect-metadata\": \"0.1.13\",\n    \"rimraf\": \"3.0.2\",\n    \"rxjs\": \"7.5.2\",\n    \"type-graphql\": \"1.1.1\",\n    \"y18n\": \"^5.0.8\"\n  },\n  \"devDependencies\": {\n    \"@nestjs/testing\": \"8.2.6\",\n    \"@types/express\": \"4.17.13\",\n    \"@types/jest\": \"27.4.0\",\n    \"@types/node\": \"17.0.12\",\n    \"@types/supertest\": \"2.0.11\",\n    \"concurrently\": \"7.0.0\",\n    \"jest\": \"27.4.7\",\n    \"nodemon\": \"2.0.15\",\n    \"prettier\": \"2.5.1\",\n    \"supertest\": \"6.2.2\",\n    \"ts-jest\": \"27.1.3\",\n    \"ts-node\": \"10.4.0\",\n    \"tsconfig-paths\": \"3.12.0\",\n    \"tslint\": \"5.20.1\",\n    \"typescript\": \"4.5.5\",\n    \"wait-on\": \"6.0.0\"\n  },\n  \"jest\": {\n    \"moduleFileExtensions\": [\n      \"js\",\n      \"json\",\n      \"ts\"\n    ],\n    \"rootDir\": \"src\",\n    \"testRegex\": \".spec.ts$\",\n    \"transform\": {\n      \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n    },\n    \"coverageDirectory\": \"../coverage\",\n    \"testEnvironment\": \"node\"\n  },\n  \"keywords\": [\n    \"Nestjs\",\n    \"Typescript\",\n    \"GraphQL\",\n    \"Nestjs GraphQL\"\n  ]\n}\n"
  },
  {
    "path": "nest-graph-ql/schema.gql",
    "content": "# ------------------------------------------------------\n# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)\n# ------------------------------------------------------\n\ntype ItemType {\n  id: ID!\n  title: String!\n  price: Int!\n  description: String!\n}\n\ntype Query {\n  items: [ItemType!]!\n  hello: String!\n}\n\ntype Mutation {\n  createItem(input: ItemInput!): ItemType!\n  updateItem(input: ItemInput!, id: String!): ItemType!\n  deleteItem(id: String!): ItemType!\n}\n\ninput ItemInput {\n  title: String!\n  price: Int!\n  description: String!\n}\n"
  },
  {
    "path": "nest-graph-ql/src/app.controller.spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\n\ndescribe('AppController', () => {\n  let appController: AppController;\n\n  beforeEach(async () => {\n    const app: TestingModule = await Test.createTestingModule({\n      controllers: [AppController],\n      providers: [AppService],\n    }).compile();\n\n    appController = app.get<AppController>(AppController);\n  });\n\n  describe('root', () => {\n    it('should return \"Hello World!\"', () => {\n      expect(appController.getHello()).toBe('Hello World!');\n    });\n  });\n});\n"
  },
  {
    "path": "nest-graph-ql/src/app.controller.ts",
    "content": "import { Controller, Get } from '@nestjs/common';\nimport { AppService } from './app.service';\n\n@Controller()\nexport class AppController {\n  constructor(private readonly appService: AppService) {}\n\n  @Get()\n  getHello(): string {\n    return this.appService.getHello();\n  }\n}\n"
  },
  {
    "path": "nest-graph-ql/src/app.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\nimport { GraphQLModule } from '@nestjs/graphql';\nimport { ItemsModule } from './items/items.module';\nimport { MongooseModule } from '@nestjs/mongoose';\n\n@Module({\n  imports: [\n  GraphQLModule.forRoot({\n    autoSchemaFile: 'schema.gql',\n  }),\n  ItemsModule,\n  MongooseModule.forRoot('mongodb://localhost/nestgraphql')],\n  controllers: [AppController],\n  providers: [AppService],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "nest-graph-ql/src/app.service.ts",
    "content": "import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n  getHello(): string {\n    return 'Hello World!';\n  }\n}\n"
  },
  {
    "path": "nest-graph-ql/src/items/dto/create-item.dto.ts",
    "content": "import { ObjectType, Field, Int, ID } from '@nestjs/graphql';\nimport { IsString, IsNotEmpty, IsNumber } from 'class-validator';\n@ObjectType()\nexport class ItemType {\n  @Field(() => ID)\n  @IsString()\n  readonly id?: string;\n  @Field()\n  @IsString()\n  @IsNotEmpty()\n  readonly title: string;\n  @Field(() => Int)\n  @IsNumber()\n  readonly price: number;\n  @Field()\n  @IsString()\n  readonly description: string;\n}\n"
  },
  {
    "path": "nest-graph-ql/src/items/input-items.input.ts",
    "content": "import { InputType, Field, Int } from '@nestjs/graphql';\n\n@InputType()\nexport class ItemInput {\n  @Field()\n  readonly title: string;\n  @Field(() => Int)\n  readonly price: number;\n  @Field()\n  readonly description: string;\n}\n"
  },
  {
    "path": "nest-graph-ql/src/items/interfaces/item.interface.ts",
    "content": "import { Document } from 'mongoose';\n\nexport interface Item extends Document {\n    readonly title: string;\n    readonly price: number;\n    readonly description: string;\n}\n"
  },
  {
    "path": "nest-graph-ql/src/items/item.schema.ts",
    "content": "import * as mongoose from 'mongoose';\n\nexport const ItemSchema = new mongoose.Schema({\n  title: String,\n  price: Number,\n  description: String,\n});\n"
  },
  {
    "path": "nest-graph-ql/src/items/items.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { ItemsResolver } from './items.resolver';\nimport { ItemSchema } from './item.schema';\nimport { MongooseModule } from '@nestjs/mongoose';\nimport { ItemsService } from './items.service';\n\n@Module({\n    imports: [MongooseModule.forFeature([{ name: 'Item', schema: ItemSchema }])],\n    providers: [ItemsResolver, ItemsService],\n})\nexport class ItemsModule {}\n"
  },
  {
    "path": "nest-graph-ql/src/items/items.resolver.ts",
    "content": "import { Resolver, Query, Mutation, Args } from '@nestjs/graphql';\nimport { ItemsService } from './items.service';\nimport { ItemType } from './dto/create-item.dto';\nimport { ItemInput } from './input-items.input';\nimport { Item } from './interfaces/item.interface'\n\n@Resolver(of => ItemType)\nexport class ItemsResolver {\n  constructor(private readonly itemsService: ItemsService) {}\n\n  @Query(returns  => [ItemType])\n  async items(): Promise<ItemType[]> {\n    return this.itemsService.findAll();\n  }\n\n  @Mutation(returns => ItemType)\n  async createItem(@Args('input') input: ItemInput): Promise<ItemType> {\n    return this.itemsService.create(input);\n  }\n\n  @Mutation(returns => ItemType)\n  async updateItem(\n    @Args('id') id: string,\n    @Args('input') input: ItemInput,\n  ) {\n    return this.itemsService.update(id, input as Item);\n  }\n\n  @Mutation(returns  => ItemType)\n  async deleteItem(@Args('id') id: string) {\n    return this.itemsService.delete(id);\n  }\n\n  @Query(returns => String)\n  async hello() {\n    return 'hello';\n  }\n}\n"
  },
  {
    "path": "nest-graph-ql/src/items/items.service.spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport { ItemsService } from './items.service';\n\ndescribe('ItemsService', () => {\n  let service: ItemsService;\n\n  beforeEach(async () => {\n    const module: TestingModule = await Test.createTestingModule({\n      providers: [ItemsService],\n    }).compile();\n\n    service = module.get<ItemsService>(ItemsService);\n  });\n\n  it('should be defined', () => {\n    expect(service).toBeDefined();\n  });\n});\n"
  },
  {
    "path": "nest-graph-ql/src/items/items.service.ts",
    "content": "import { Injectable } from '@nestjs/common';\nimport { InjectModel } from '@nestjs/mongoose';\nimport { Model } from 'mongoose';\nimport { ItemType } from './dto/create-item.dto';\nimport { Item } from './interfaces/item.interface';\nimport { ItemInput } from './input-items.input';\n\n@Injectable()\nexport class ItemsService {\n  constructor(@InjectModel('Item') private itemModel: Model<Item>) {}\n\n  async create(createItemDto: ItemInput): Promise<ItemType> {\n    const createdItem = new this.itemModel(createItemDto);\n    return await createdItem.save() as any;\n  }\n\n  async findAll(): Promise<ItemType[]> {\n    return await this.itemModel.find().exec();\n  }\n\n  async findOne(id: string): Promise<ItemType> {\n    return await this.itemModel.findOne({ _id: id });\n  }\n\n  async delete(id: string): Promise<ItemType> {\n    return await this.itemModel.findByIdAndRemove(id);\n  }\n\n  async update(id: string, item: Item): Promise<ItemType> {\n    return await this.itemModel.findByIdAndUpdate(id, item, { new: true });\n  }\n}\n"
  },
  {
    "path": "nest-graph-ql/src/main.ts",
    "content": "import { ValidationPipe } from '@nestjs/common';\nimport { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule);\n  app.useGlobalPipes(new ValidationPipe());\n  await app.listen(3000);\n}\nbootstrap();\n"
  },
  {
    "path": "nest-graph-ql/test/items.e2e-spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { ItemsModule } from '../src/items/items.module';\nimport { MongooseModule } from '@nestjs/mongoose';\nimport { GraphQLModule } from '@nestjs/graphql';\nimport { Item } from '../src/items/interfaces/item.interface';\n\ndescribe('ItemsController (e2e)', () => {\n  let app;\n\n  beforeAll(async () => {\n    const moduleFixture: TestingModule = await Test.createTestingModule({\n      imports: [\n        ItemsModule,\n        MongooseModule.forRoot('mongodb://localhost/nestgraphqltesting'),\n        GraphQLModule.forRoot({\n          autoSchemaFile: 'schema.gql',\n        }),\n      ],\n    }).compile();\n\n    app = moduleFixture.createNestApplication();\n    await app.init();\n  });\n\n  afterAll(async () => {\n    await app.close();\n  });\n\n  const item: Item = {\n    title: 'Great item',\n    price: 10,\n    description: 'Description of this great item',\n  };\n\n  let id: string = '';\n\n  const updatedItem: Item = {\n    title: 'Great updated item',\n    price: 20,\n    description: 'Updated description of this great item',\n  };\n\n  const createitemObject = JSON.stringify(item).replace(\n    /\\\"([^(\\\")\"]+)\\\":/g,\n    '$1:',\n  );\n\n  const createItemQuery = `\n  mutation {\n    createItem(input: ${createitemObject}) {\n      title\n      price\n      description\n      id\n    }\n  }`;\n\n  it('createItem', () => {\n    return request(app.getHttpServer())\n      .post('/graphql')\n      .send({\n        operationName: null,\n        query: createItemQuery,\n      })\n      .expect(({ body }) => {\n        const data = body.data.createItem;\n        id = data.id;\n        expect(data.title).toBe(item.title);\n        expect(data.description).toBe(item.description);\n        expect(data.price).toBe(item.price);\n      })\n      .expect(200);\n  });\n\n  it('getItems', () => {\n    return request(app.getHttpServer())\n      .post('/graphql')\n      .send({\n        operationName: null,\n        query: '{items{title, price, description, id}}',\n      })\n      .expect(({ body }) => {\n        const data = body.data.items;\n        const itemResult = data[0];\n        expect(data.length).toBeGreaterThan(0);\n        expect(itemResult.title).toBe(item.title);\n        expect(itemResult.description).toBe(item.description);\n        expect(itemResult.price).toBe(item.price);\n      })\n      .expect(200);\n  });\n\n  const updateItemObject = JSON.stringify(updatedItem).replace(\n    /\\\"([^(\\\")\"]+)\\\":/g,\n    '$1:',\n  );\n\n  it('updateItem', () => {\n    const updateItemQuery = `\n    mutation {\n      updateItem(id: \"${id}\", input: ${updateItemObject}) {\n        title\n        price\n        description\n        id\n      }\n    }`;\n\n    return request(app.getHttpServer())\n      .post('/graphql')\n      .send({\n        operationName: null,\n        query: updateItemQuery,\n      })\n      .expect(({ body }) => {\n        const data = body.data.updateItem;\n        expect(data.title).toBe(updatedItem.title);\n        expect(data.description).toBe(updatedItem.description);\n        expect(data.price).toBe(updatedItem.price);\n      })\n      .expect(200);\n  });\n\n  it('deleteItem', () => {\n    const deleteItemQuery = `\n      mutation {\n        deleteItem(id: \"${id}\") {\n          title\n          price\n          description\n          id\n        }\n      }`;\n\n    return request(app.getHttpServer())\n      .post('/graphql')\n      .send({\n        operationName: null,\n        query: deleteItemQuery,\n      })\n      .expect(({ body }) => {\n        const data = body.data.deleteItem;\n        expect(data.title).toBe(updatedItem.title);\n        expect(data.description).toBe(updatedItem.description);\n        expect(data.price).toBe(updatedItem.price);\n      })\n      .expect(200);\n  });\n});\n"
  },
  {
    "path": "nest-graph-ql/test/jest-e2e.json",
    "content": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-spec.ts$\",\n  \"transform\": {\n    \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n  }\n}\n"
  },
  {
    "path": "nest-graph-ql/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "nest-graph-ql/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"target\": \"es6\",\n    \"sourceMap\": true,\n    \"outDir\": \"./dist\",\n    \"baseUrl\": \"./\",\n    \"incremental\": true\n  },\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "nest-graph-ql/tslint.json",
    "content": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  },\n  \"rules\": {\n    \"quotemark\": [true, \"single\"],\n    \"member-access\": [false],\n    \"ordered-imports\": [false],\n    \"max-line-length\": [true, 150],\n    \"member-ordering\": [false],\n    \"interface-name\": [false],\n    \"arrow-parens\": false,\n    \"object-literal-sort-keys\": false\n  },\n  \"rulesDirectory\": []\n}"
  },
  {
    "path": "nestjs-typeorm/.gitignore",
    "content": "# compiled output\n/dist\n/node_modules\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n\n# OS\n.DS_Store\n\n# Tests\n/coverage\n/.nyc_output\n\n# IDEs and editors\n/.idea\n.project\n.classpath\n.c9/\n*.launch\n.settings/\n*.sublime-workspace\n\n# IDE - VSCode\n.vscode/*\n!.vscode/settings.json\n!.vscode/tasks.json\n!.vscode/launch.json\n!.vscode/extensions.json"
  },
  {
    "path": "nestjs-typeorm/.prettierrc",
    "content": "{\n  \"singleQuote\": true,\n  \"trailingComma\": \"all\"\n}"
  },
  {
    "path": "nestjs-typeorm/README.md",
    "content": "<p align=\"center\">\n  <a href=\"http://nestjs.com/\" target=\"blank\"><img src=\"https://nestjs.com/img/logo_text.svg\" width=\"320\" alt=\"Nest Logo\" /></a>\n</p>\n\n[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master\n[travis-url]: https://travis-ci.org/nestjs/nest\n[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux\n[linux-url]: https://travis-ci.org/nestjs/nest\n  \n  <p align=\"center\">A progressive <a href=\"http://nodejs.org\" target=\"blank\">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href=\"https://angular.io\" target=\"blank\">Angular</a>.</p>\n    <p align=\"center\">\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/v/@nestjs/core.svg\" alt=\"NPM Version\" /></a>\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/l/@nestjs/core.svg\" alt=\"Package License\" /></a>\n<a href=\"https://www.npmjs.com/~nestjscore\"><img src=\"https://img.shields.io/npm/dm/@nestjs/core.svg\" alt=\"NPM Downloads\" /></a>\n<a href=\"https://travis-ci.org/nestjs/nest\"><img src=\"https://api.travis-ci.org/nestjs/nest.svg?branch=master\" alt=\"Travis\" /></a>\n<a href=\"https://travis-ci.org/nestjs/nest\"><img src=\"https://img.shields.io/travis/nestjs/nest/master.svg?label=linux\" alt=\"Linux\" /></a>\n<a href=\"https://coveralls.io/github/nestjs/nest?branch=master\"><img src=\"https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5\" alt=\"Coverage\" /></a>\n<a href=\"https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge\"><img src=\"https://badges.gitter.im/nestjs/nestjs.svg\" alt=\"Gitter\" /></a>\n<a href=\"https://opencollective.com/nest#backer\"><img src=\"https://opencollective.com/nest/backers/badge.svg\" alt=\"Backers on Open Collective\" /></a>\n<a href=\"https://opencollective.com/nest#sponsor\"><img src=\"https://opencollective.com/nest/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\" /></a>\n  <a href=\"https://paypal.me/kamilmysliwiec\"><img src=\"https://img.shields.io/badge/Donate-PayPal-dc3d53.svg\"/></a>\n  <a href=\"https://twitter.com/nestframework\"><img src=\"https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow\"></a>\n</p>\n  <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)\n  [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->\n\n## Description\n\n[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.\n\n## Installation\n\n```bash\n$ npm install\n```\n\n## Running the app\n\n```bash\n# development\n$ npm run start\n\n# watch mode\n$ npm run start:dev\n\n# production mode\n$ npm run start:prod\n```\n\n## Test\n\n```bash\n# unit tests\n$ npm run test\n\n# e2e tests\n$ npm run test:e2e\n\n# test coverage\n$ npm run test:cov\n```\n\n## Support\n\nNest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).\n\n## Stay in touch\n\n- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)\n- Website - [https://nestjs.com](https://nestjs.com/)\n- Twitter - [@nestframework](https://twitter.com/nestframework)\n\n## License\n\n  Nest is [MIT licensed](LICENSE).\n"
  },
  {
    "path": "nestjs-typeorm/docker-compose.yaml",
    "content": "version: '3.7'\nservices:\n  mongodb:\n    image: mongo:latest\n    ports:\n      - 27017:27017\n    volumes:\n      - mongodb_data:/data/db\n\nvolumes:\n  mongodb_data:"
  },
  {
    "path": "nestjs-typeorm/nest-cli.json",
    "content": "{\n  \"language\": \"ts\",\n  \"collection\": \"@nestjs/schematics\",\n  \"sourceRoot\": \"src\"\n}\n"
  },
  {
    "path": "nestjs-typeorm/nodemon-debug.json",
    "content": "{\n  \"watch\": [\"src\"],\n  \"ext\": \"ts\",\n  \"ignore\": [\"src/**/*.spec.ts\"],\n  \"exec\": \"node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts\"\n}\n"
  },
  {
    "path": "nestjs-typeorm/nodemon.json",
    "content": "{\n  \"watch\": [\"dist\"],\n  \"ext\": \"js\",\n  \"exec\": \"node dist/main\"\n}\n"
  },
  {
    "path": "nestjs-typeorm/package.json",
    "content": "{\n  \"name\": \"nestjs-typeorm\",\n  \"version\": \"0.0.1\",\n  \"description\": \"\",\n  \"author\": \"\",\n  \"license\": \"MIT\",\n  \"scripts\": {\n    \"build\": \"tsc -p tsconfig.build.json\",\n    \"format\": \"prettier --write \\\"src/**/*.ts\\\"\",\n    \"start\": \"ts-node -r tsconfig-paths/register src/main.ts\",\n    \"start:dev\": \"concurrently --handle-input \\\"wait-on dist/main.js && nodemon\\\" \\\"tsc -w -p tsconfig.build.json\\\" \",\n    \"start:debug\": \"nodemon --config nodemon-debug.json\",\n    \"prestart:prod\": \"rimraf dist && npm run build\",\n    \"start:prod\": \"node dist/main.js\",\n    \"lint\": \"tslint -p tsconfig.json -c tslint.json\",\n    \"test\": \"jest\",\n    \"test:watch\": \"jest --watch\",\n    \"test:cov\": \"jest --coverage\",\n    \"test:debug\": \"node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand\",\n    \"test:e2e\": \"jest --config ./test/jest-e2e.json\"\n  },\n  \"dependencies\": {\n    \"@nestjs/common\": \"8.2.6\",\n    \"@nestjs/core\": \"8.2.6\",\n    \"@nestjs/platform-express\": \"8.2.6\",\n    \"@nestjs/typeorm\": \"8.0.3\",\n    \"mongodb\": \"^3.7.3\",\n    \"reflect-metadata\": \"0.1.13\",\n    \"rimraf\": \"3.0.2\",\n    \"rxjs\": \"7.5.2\",\n    \"typeorm\": \"0.2.41\"\n  },\n  \"devDependencies\": {\n    \"@nestjs/testing\": \"8.2.6\",\n    \"@types/express\": \"4.17.13\",\n    \"@types/jest\": \"27.4.0\",\n    \"@types/node\": \"17.0.12\",\n    \"@types/supertest\": \"2.0.11\",\n    \"concurrently\": \"7.0.0\",\n    \"jest\": \"27.4.7\",\n    \"nodemon\": \"2.0.15\",\n    \"prettier\": \"2.5.1\",\n    \"supertest\": \"6.2.2\",\n    \"ts-jest\": \"27.1.3\",\n    \"ts-node\": \"10.4.0\",\n    \"tsconfig-paths\": \"3.12.0\",\n    \"tslint\": \"5.20.1\",\n    \"typescript\": \"4.5.5\",\n    \"wait-on\": \"6.0.0\"\n  },\n  \"jest\": {\n    \"moduleFileExtensions\": [\n      \"js\",\n      \"json\",\n      \"ts\"\n    ],\n    \"rootDir\": \"src\",\n    \"testRegex\": \".spec.ts$\",\n    \"transform\": {\n      \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n    },\n    \"coverageDirectory\": \"../coverage\",\n    \"testEnvironment\": \"node\"\n  },\n  \"keywords\": [\n    \"Nestjs\",\n    \"Typescript\",\n    \"Typeorm\",\n    \"Nestjs typeorm\"\n  ]\n}\n"
  },
  {
    "path": "nestjs-typeorm/src/app.controller.ts",
    "content": "import { Controller, Get } from '@nestjs/common';\nimport { AppService } from './app.service';\n\n@Controller()\nexport class AppController {\n  constructor(private readonly appService: AppService) {}\n\n  @Get()\n  getHello(): string {\n    return this.appService.getHello();\n  }\n}\n"
  },
  {
    "path": "nestjs-typeorm/src/app.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\nimport { TypeOrmModule } from '@nestjs/typeorm';\nimport { join } from 'path';\nimport { ItemModule } from './item/item.module';\n\n@Module({\n  imports: [TypeOrmModule.forRoot({\n    type: 'mongodb',\n    host: 'localhost',\n    database: 'test',\n    entities: [join(__dirname, '**/**.entity{.ts,.js}')],\n    synchronize: true,\n  }), ItemModule],\n  controllers: [AppController],\n  providers: [AppService],\n})\nexport class AppModule {}\n"
  },
  {
    "path": "nestjs-typeorm/src/app.service.ts",
    "content": "import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n  getHello(): string {\n    return 'Hello World!';\n  }\n}\n"
  },
  {
    "path": "nestjs-typeorm/src/item/item.controller.ts",
    "content": "import { Controller, Get, Param, Post, Body, Put, Delete, HttpException, HttpStatus } from '@nestjs/common';\nimport { ItemService } from './item.service';\nimport { Item } from './item.entity';\nimport { ItemDto } from './item.dto';\n\n@Controller('item')\nexport class ItemController {\n    constructor(private itemService: ItemService) {}\n\n    @Get()\n    async findAllItems(): Promise<Item[]> {\n        return await this.itemService.findAll();\n    }\n\n    @Get(':id')\n    async findById(@Param('id') id: number): Promise<Item> {\n        return await this.itemService.findById(id);\n    }\n\n    @Post()\n    async createItem(@Body() item: Item) {\n        return await this.itemService.createItem(item);\n    }\n\n    @Put(':id')\n    async updateItem(@Param('id') id: string, @Body() item: ItemDto) {\n        return await this.itemService.update(id, item);\n    }\n\n    @Delete(':id')\n    async deleteItem(@Param('id') id: string) {\n        return await this.itemService.delete(id);\n    }\n}\n"
  },
  {
    "path": "nestjs-typeorm/src/item/item.dto.ts",
    "content": "export class ItemDto {\n    name: string;\n    description: string;\n    qty: number;\n}\n"
  },
  {
    "path": "nestjs-typeorm/src/item/item.entity.ts",
    "content": "import { Entity, PrimaryGeneratedColumn, Column, ObjectIdColumn } from 'typeorm';\n\n@Entity()\nexport class Item {\n  @ObjectIdColumn()\n  _id: number;\n\n  @Column({ length: 500 })\n  name: string;\n\n  @Column('text')\n  description: string;\n\n  @Column('int')\n  qty: number;\n}\n"
  },
  {
    "path": "nestjs-typeorm/src/item/item.module.ts",
    "content": "import { Module } from '@nestjs/common';\nimport { ItemController } from './item.controller';\nimport { ItemService } from './item.service';\nimport { TypeOrmModule } from '@nestjs/typeorm';\nimport { Item } from './item.entity';\n\n@Module({\n  imports: [TypeOrmModule.forFeature([Item])],\n  controllers: [ItemController],\n  providers: [ItemService],\n})\nexport class ItemModule {}\n"
  },
  {
    "path": "nestjs-typeorm/src/item/item.service.ts",
    "content": "import { Injectable, HttpException, HttpStatus } from '@nestjs/common';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { Item } from './item.entity';\nimport { Repository } from 'typeorm';\nimport { ItemDto } from './item.dto';\n\n@Injectable()\nexport class ItemService {\n    constructor(@InjectRepository(Item) private readonly itemRepository: Repository<Item>) {}\n\n    async findAll(): Promise<Item[]> {\n        return await this.itemRepository.find();\n    }\n\n    async findById(id: number): Promise<Item> {\n        return await this.itemRepository.findOne(id);\n    }\n\n    async createItem(item: Item) {\n        return await this.itemRepository.save(item);\n    }\n\n    async update(id: string, newItem: ItemDto) {\n        const item = await this.itemRepository.findOne(id);\n        await this.itemRepository.merge(item, newItem);\n        return await this.itemRepository.save(item);\n    }\n\n    async delete(id: string) {\n        return await this.itemRepository.delete(id);\n    }\n}\n"
  },
  {
    "path": "nestjs-typeorm/src/main.ts",
    "content": "import { NestFactory } from '@nestjs/core';\nimport { AppModule } from './app.module';\n\nasync function bootstrap() {\n  const app = await NestFactory.create(AppModule);\n  await app.listen(3000);\n}\nbootstrap();\n"
  },
  {
    "path": "nestjs-typeorm/test/app.e2e-spec.ts",
    "content": "import { Test, TestingModule } from '@nestjs/testing';\nimport * as request from 'supertest';\nimport { AppModule } from './../src/app.module';\n\ndescribe('AppController (e2e)', () => {\n  let app;\n\n  beforeEach(async () => {\n    const moduleFixture: TestingModule = await Test.createTestingModule({\n      imports: [AppModule],\n    }).compile();\n\n    app = moduleFixture.createNestApplication();\n    await app.init();\n  });\n\n  it('/ (GET)', () => {\n    return request(app.getHttpServer())\n      .get('/')\n      .expect(200)\n      .expect('Hello World!');\n  });\n});\n"
  },
  {
    "path": "nestjs-typeorm/test/jest-e2e.json",
    "content": "{\n  \"moduleFileExtensions\": [\"js\", \"json\", \"ts\"],\n  \"rootDir\": \".\",\n  \"testEnvironment\": \"node\",\n  \"testRegex\": \".e2e-spec.ts$\",\n  \"transform\": {\n    \"^.+\\\\.(t|j)s$\": \"ts-jest\"\n  }\n}\n"
  },
  {
    "path": "nestjs-typeorm/tsconfig.build.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"exclude\": [\"node_modules\", \"test\", \"dist\", \"**/*spec.ts\"]\n}\n"
  },
  {
    "path": "nestjs-typeorm/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"module\": \"commonjs\",\n    \"declaration\": true,\n    \"removeComments\": true,\n    \"emitDecoratorMetadata\": true,\n    \"experimentalDecorators\": true,\n    \"target\": \"es6\",\n    \"sourceMap\": true,\n    \"outDir\": \"./dist\",\n    \"baseUrl\": \"./\",\n    \"incremental\": true\n  },\n  \"exclude\": [\"node_modules\"]\n}\n"
  },
  {
    "path": "nestjs-typeorm/tslint.json",
    "content": "{\n  \"defaultSeverity\": \"error\",\n  \"extends\": [\"tslint:recommended\"],\n  \"jsRules\": {\n    \"no-unused-expression\": true\n  },\n  \"rules\": {\n    \"quotemark\": [true, \"single\"],\n    \"member-access\": [false],\n    \"ordered-imports\": [false],\n    \"max-line-length\": [true, 150],\n    \"member-ordering\": [false],\n    \"interface-name\": [false],\n    \"arrow-parens\": false,\n    \"object-literal-sort-keys\": false\n  },\n  \"rulesDirectory\": []\n}\n"
  },
  {
    "path": "nuxt-ghost/.eslintrc.js",
    "content": "module.exports = {\n  root: true,\n  env: {\n    browser: true,\n    node: true\n  },\n  parserOptions: {},\n  extends: [],\n  // add your custom rules here\n  rules: {}\n}\n"
  },
  {
    "path": "nuxt-ghost/.gitignore",
    "content": "# Created by .ignore support plugin (hsz.mobi)\n### Node template\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n.env\nconstants.js\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# next.js build output\n.next\n\n# nuxt.js build output\n.nuxt\n\n# Nuxt generate\ndist\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless\n\n# IDE / Editor\n.idea\n.editorconfig\n\n# Service worker\nsw.*\n\n# Mac OSX\n.DS_Store\n\n# Vim swap files\n*.swp\n"
  },
  {
    "path": "nuxt-ghost/README.md",
    "content": "# NuxtGhost\n\n> Nuxtjs frontend for a Ghost API\n\n## Build Setup\n\n``` bash\n# install dependencies\n$ yarn install\n\n# serve with hot reload at localhost:3000\n$ yarn dev\n\n# build for production and launch server\n$ yarn build\n$ yarn start\n\n# generate static project\n$ yarn generate\n```\n\nFor detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).\n"
  },
  {
    "path": "nuxt-ghost/assets/README.md",
    "content": "# ASSETS\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThis directory contains your un-compiled assets such as LESS, SASS, or JavaScript.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).\n"
  },
  {
    "path": "nuxt-ghost/components/README.md",
    "content": "# COMPONENTS\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThe components directory contains your Vue.js Components.\n\n_Nuxt.js doesn't supercharge these components._\n"
  },
  {
    "path": "nuxt-ghost/jsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"~/*\": [\"./*\"],\n      \"@/*\": [\"./*\"],\n      \"~~/*\": [\"./*\"],\n      \"@@/*\": [\"./*\"]\n    }\n  },\n  \"exclude\": [\"node_modules\", \".nuxt\", \"dist\"]\n}\n"
  },
  {
    "path": "nuxt-ghost/layouts/README.md",
    "content": "# LAYOUTS\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThis directory contains your Application Layouts.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).\n"
  },
  {
    "path": "nuxt-ghost/layouts/default.vue",
    "content": "<template>\n  <section>\n    <nuxt />\n  </section>\n</template>\n\n<script>\nexport default {\n};\n</script>\n"
  },
  {
    "path": "nuxt-ghost/middleware/README.md",
    "content": "# MIDDLEWARE\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThis directory contains your application middleware.\nMiddleware let you define custom functions that can be run before rendering either a page or a group of pages.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).\n"
  },
  {
    "path": "nuxt-ghost/nuxt.config.js",
    "content": "export default {\n  mode: 'universal',\n  /*\n   ** Headers of the page\n   */\n  head: {\n    titleTemplate: '%s - ' + process.env.npm_package_name,\n    title: process.env.npm_package_name || '',\n    meta: [{\n        charset: 'utf-8'\n      },\n      {\n        name: 'viewport',\n        content: 'width=device-width, initial-scale=1'\n      },\n      {\n        hid: 'description',\n        name: 'description',\n        content: process.env.npm_package_description || ''\n      }\n    ],\n    link: [{\n      rel: 'icon',\n      type: 'image/x-icon',\n      href: '/favicon.ico'\n    }]\n  },\n  /*\n   ** Customize the progress-bar color\n   */\n  loading: {\n    color: '#fff'\n  },\n  /*\n   ** Global CSS\n   */\n  css: [],\n  /*\n   ** Plugins to load before mounting the App\n   */\n  plugins: [],\n  /*\n   ** Nuxt.js dev-modules\n   */\n  /*\n   ** Nuxt.js modules\n   */\n  modules: [],\n\n  /*\n   ** Build configuration\n   */\n  build: {\n    /*\n     ** You can extend webpack config here\n     */\n    extend(config, ctx) {}\n  }\n}\n"
  },
  {
    "path": "nuxt-ghost/package.json",
    "content": "{\n  \"name\": \"NuxtGhost\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Nuxtjs frontend for a Ghost API\",\n  \"author\": \"Tanner Gabriel\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"nuxt\",\n    \"build\": \"nuxt build\",\n    \"start\": \"nuxt start\",\n    \"generate\": \"nuxt generate\"\n  },\n  \"dependencies\": {\n    \"@tryghost/content-api\": \"1.5.4\",\n    \"nuxt\": \"2.15.4\"\n  },\n  \"devDependencies\": {}\n}\n"
  },
  {
    "path": "nuxt-ghost/pages/README.md",
    "content": "# PAGES\n\nThis directory contains your Application Views and Routes.\nThe framework reads all the `*.vue` files inside this directory and creates the router of your application.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).\n"
  },
  {
    "path": "nuxt-ghost/pages/index.vue",
    "content": "<template>\n  <section>\n    <section class=\"blog-post\">\n      <h1 class=\"title\">{{ post.title }}</h1>\n      <div v-html=\"post.html\"></div>\n    </section>\n  </section>\n</template>\n\n<script>\nimport { ghostAPI, postIndexFields } from \"@/utils/ghost\";\n\nexport default {\n  async asyncData() {\n    const posts = await ghostAPI().posts.browse({\n      fields: postIndexFields\n    });\n    const post = posts[0];\n    return {\n      post\n    };\n  }\n};\n</script>\n\n<style scoped>\n.blog-post {\n  margin: 25px 0;\n  align-content: center;\n  width: 100%;\n  display: flex;\n  justify-content: center;\n  flex-direction: column;\n  align-items: center;\n}\n\n.title {\n  margin: 50px 0;\n}\n\np {\n  color: #000;\n  margin: 15px 0 5px;\n  max-width: 450px;\n  line-height: 1.44;\n}\n</style>"
  },
  {
    "path": "nuxt-ghost/plugins/README.md",
    "content": "# PLUGINS\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThis directory contains Javascript plugins that you want to run before mounting the root Vue.js application.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).\n"
  },
  {
    "path": "nuxt-ghost/static/README.md",
    "content": "# STATIC\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThis directory contains your static files.\nEach file inside this directory is mapped to `/`.\nThus you'd want to delete this README.md before deploying to production.\n\nExample: `/static/robots.txt` is mapped as `/robots.txt`.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).\n"
  },
  {
    "path": "nuxt-ghost/store/README.md",
    "content": "# STORE\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThis directory contains your Vuex Store files.\nVuex Store option is implemented in the Nuxt.js framework.\n\nCreating a file in this directory automatically activates the option in the framework.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).\n"
  },
  {
    "path": "nuxt-ghost/utils/ghost.js",
    "content": "import GhostContentAPI from '@tryghost/content-api'\nimport {\n  API_KEY\n} from \"../config/constants\";\n\nconst ghost = (url, key) => {\n  return new GhostContentAPI({\n    url: url,\n    key: key,\n    version: 'v2'\n  })\n}\n\nconst postsPerPage = 5\n\nconst postIndexFields = [\n  'id',\n  'uuid',\n  'title',\n  'slug',\n  'feature_image',\n  'published_at',\n  'html',\n  'excerpt'\n]\n\nconst ghostAPI = () => {\n  return ghost(\"http://localhost:2368\", API_KEY)\n}\n\nexport {\n  ghostAPI,\n  postsPerPage,\n  postIndexFields\n}\n"
  },
  {
    "path": "nuxt-supabase-auth/.editorconfig",
    "content": "# editorconfig.org\nroot = true\n\n[*]\nindent_style = space\nindent_size = 2\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\n\n[*.md]\ntrim_trailing_whitespace = false\n"
  },
  {
    "path": "nuxt-supabase-auth/.gitignore",
    "content": "# Created by .ignore support plugin (hsz.mobi)\n### Node template\n# Logs\n/logs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# TypeScript v1 declaration files\ntypings/\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variables file\n.env\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n\n# next.js build output\n.next\n\n# nuxt.js build output\n.nuxt\n\n# Nuxt generate\ndist\n\n# vuepress build output\n.vuepress/dist\n\n# Serverless directories\n.serverless\n\n# IDE / Editor\n.idea\n\n# Service worker\nsw.*\n\n# macOS\n.DS_Store\n\n# Vim swap files\n*.swp\n"
  },
  {
    "path": "nuxt-supabase-auth/README.md",
    "content": "# Nuxt Supabase Auth\n\n> Basic authentication example using Nuxtjs and Supabase\n\n## Functionality\n\n- Register\n- Login\n- Logout\n- Automatically redirect unauthenticated users\n\n## Build Setup\n\n```bash\n# install dependencies\n$ npm install\n\n# serve with hot reload at localhost:3000\n$ npm run dev\n\n# build for production and launch server\n$ npm run build\n$ npm run start\n```\n"
  },
  {
    "path": "nuxt-supabase-auth/assets/css/tailwind.css",
    "content": "@import \"tailwindcss/base\";\n@import \"tailwindcss/components\";\n@import \"tailwindcss/utilities\";\n"
  },
  {
    "path": "nuxt-supabase-auth/jsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"baseUrl\": \".\",\n    \"paths\": {\n      \"~/*\": [\"./*\"],\n      \"@/*\": [\"./*\"],\n      \"~~/*\": [\"./*\"],\n      \"@@/*\": [\"./*\"]\n    }\n  },\n  \"exclude\": [\"node_modules\", \".nuxt\", \"dist\"]\n}\n"
  },
  {
    "path": "nuxt-supabase-auth/layouts/default.vue",
    "content": "<template>\n  <div class=\"app\">\n    <main>\n      <nuxt />\n    </main>\n  </div>\n</template>\n\n<script>\nexport default {};\n</script>\n\n<style>\n*,\n*::before,\n*::after {\n  @apply m-0 p-0 box-border;\n}\nbody {\n  @apply font-mainBody text-primary dark:text-lightestGray transition-colors dark:bg-primary;\n  scroll-behavior: smooth;\n}\n</style>\n"
  },
  {
    "path": "nuxt-supabase-auth/middleware/auth.js",
    "content": "export default async function({ app, redirect }) {\n  if (\n    app.context.route.fullPath !== \"/login\" &&\n    app.context.route.fullPath !== \"/register\" &&\n    !app.$supabase.auth.user()\n  ) {\n    redirect(\"/login\");\n  }\n}\n"
  },
  {
    "path": "nuxt-supabase-auth/nuxt.config.js",
    "content": "export default {\n  // Target: https://go.nuxtjs.dev/config-target\n  target: 'static',\n\n  // Global page headers: https://go.nuxtjs.dev/config-head\n  head: {\n    title: \"nuxt-supabase-auth\",\n    htmlAttrs: {\n      lang: 'en'\n    },\n    meta: [\n      { charset: 'utf-8' },\n      { name: 'viewport', content: 'width=device-width, initial-scale=1' },\n      { hid: 'description', name: 'description', content: '' },\n      { name: 'format-detection', content: 'telephone=no' }\n    ],\n    link: [\n      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },\n      { rel: \"preconnect\", href: \"https://fonts.googleapis.com\" },\n      { rel: \"preconnect\", href: \"https://fonts.gstatic.com\", crossorigin: true },\n      { href: \"https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700&display=swap\", rel: \"stylesheet\" },\n      { href: \"https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap\", rel: \"stylesheet\" }\n    ]\n  },\n\n  // Global CSS: https://go.nuxtjs.dev/config-css\n  css: [\n  ],\n\n  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins\n  plugins: [\n    { src: '~plugins/client.js' },\n  ],\n\n  // Auto import components: https://go.nuxtjs.dev/config-components\n  components: true,\n\n  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules\n  buildModules: [\n    // https://go.nuxtjs.dev/tailwindcss\n    '@nuxtjs/tailwindcss',\n    '@nuxtjs/dotenv'\n  ],\n\n  // Modules: https://go.nuxtjs.dev/config-modules\n  modules: [\n\n  ],\n\n  // Build Configuration: https://go.nuxtjs.dev/config-build\n  build: {\n  },\n\n  router: {\n    scrollBehavior(to) {\n      if (to.hash && to.hash !== \"#\") {\n        return window.scrollTo({\n          top: document.querySelector(to.hash).offsetTop,\n          behavior: \"smooth\",\n        });\n      }\n      return window.scrollTo({ top: 0, behavior: \"smooth\" });\n    },\n    middleware: ['auth']\n  },\n}\n"
  },
  {
    "path": "nuxt-supabase-auth/package.json",
    "content": "{\n  \"name\": \"nuxtsupabase\",\n  \"version\": \"1.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"dev\": \"nuxt\",\n    \"build\": \"nuxt build\",\n    \"start\": \"nuxt start\",\n    \"generate\": \"nuxt generate\"\n  },\n  \"dependencies\": {\n    \"@supabase/supabase-js\": \"^1.22.5\",\n    \"core-js\": \"^3.15.1\",\n    \"nuxt\": \"^2.15.7\",\n    \"vuex\": \"^3.6.2\"\n  },\n  \"devDependencies\": {\n    \"@nuxtjs/dotenv\": \"^1.4.1\",\n    \"@nuxtjs/tailwindcss\": \"^4.2.0\",\n    \"postcss\": \"^8.3.5\"\n  }\n}\n"
  },
  {
    "path": "nuxt-supabase-auth/pages/index.vue",
    "content": "<template>\n  <div class=\"py-8 px-3.75 md:py-12 lg:py-15\">\n    <div\n        v-if=\"alertOpen\"\n        class=\"text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500\"\n      >\n        <span class=\"text-xl inline-block mr-5 align-middle\">\n          <i class=\"fas fa-bell\"></i>\n        </span>\n        <span class=\"inline-block align-middle mr-8\">\n          <b class=\"capitalize\">Error!</b> {{ errorMessage }}\n        </span>\n        <button\n          class=\"absolute bg-transparent text-2xl font-semibold leading-none right-0 top-0 mt-4 mr-6 outline-none focus:outline-none\"\n          v-on:click=\"closeAlert()\"\n        >\n          <span>×</span>\n        </button>\n      </div>\n\n      <button\n            @click=\"signOut\"\n            class=\"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500\"\n          >\n            <span class=\"absolute left-0 inset-y-0 flex items-center pl-3\">\n              <svg\n                class=\"h-5 w-5 text-indigo-500 group-hover:text-indigo-400\"\n                xmlns=\"http://www.w3.org/2000/svg\"\n                viewBox=\"0 0 20 20\"\n                fill=\"currentColor\"\n                aria-hidden=\"true\"\n              >\n                <path\n                  fill-rule=\"evenodd\"\n                  d=\"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z\"\n                  clip-rule=\"evenodd\"\n                />\n              </svg>\n            </span>\n            Sign out\n          </button>\n  </div>\n</template>\n\n<script>\n\n\nexport default {\n  data: () => ({\n    alertOpen: false,\n    errorMessage: \"\"\n  }),\n  methods: {\n    async signOut() {\n      try {\n        let { error } = await this.$supabase.auth.signOut()\n        if (error) throw error\n        else this.$router.push(\"/login\")\n      } catch (error) {\n        alert(error.message)\n        this.alertOpen = true;\n        this.errorMessage = error.error_description || error.message;\n      }\n    },\n    closeAlert() {\n      this.alertOpen = false;\n    }\n  },\n};\n</script>\n\n<style>\n\n</style>"
  },
  {
    "path": "nuxt-supabase-auth/pages/login.vue",
    "content": "<template>\n  <div\n    class=\"min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8\"\n  >\n    <div class=\"max-w-md w-full space-y-8\">\n      <div\n        v-if=\"alertOpen\"\n        class=\"text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500\"\n      >\n        <span class=\"text-xl inline-block mr-5 align-middle\">\n          <i class=\"fas fa-bell\"></i>\n        </span>\n        <span class=\"inline-block align-middle mr-8\">\n          <b class=\"capitalize\">Error!</b> {{ errorMessage }}\n        </span>\n        <button\n          class=\"absolute bg-transparent text-2xl font-semibold leading-none right-0 top-0 mt-4 mr-6 outline-none focus:outline-none\"\n          v-on:click=\"closeAlert()\"\n        >\n          <span>×</span>\n        </button>\n      </div>\n\n      <div>\n        <h2 class=\"mt-6 text-center text-3xl font-extrabold text-gray-900\">\n          Sign in to your account\n        </h2>\n      </div>\n      <form class=\"mt-8 space-y-6\" @submit.prevent=\"handleLogin\">\n        <input type=\"hidden\" name=\"remember\" value=\"true\" />\n        <div class=\"rounded-md shadow-sm -space-y-px\">\n          <div>\n            <label for=\"email-address\" class=\"sr-only\">Email address</label>\n            <input\n              id=\"email-address\"\n              name=\"email\"\n              type=\"email\"\n              autocomplete=\"email\"\n              required\n              class=\"appearance-none rounded-none relative block w-full my-4 px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm\"\n              placeholder=\"Email address\"\n              v-model=\"email\"\n            />\n          </div>\n          \n          <div>\n            <label for=\"password\" class=\"sr-only\">Password</label>\n            <input\n              id=\"password\"\n              name=\"password\"\n              type=\"password\"\n              autocomplete=\"current-password\"\n              required\n              class=\"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm\"\n              placeholder=\"Password\"\n              v-model=\"password\"\n            />\n          </div>\n        </div>\n\n        <div>\n          <button\n            type=\"submit\"\n            class=\"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500\"\n          >\n            <span class=\"absolute left-0 inset-y-0 flex items-center pl-3\">\n              <svg\n                class=\"h-5 w-5 text-indigo-500 group-hover:text-indigo-400\"\n                xmlns=\"http://www.w3.org/2000/svg\"\n                viewBox=\"0 0 20 20\"\n                fill=\"currentColor\"\n                aria-hidden=\"true\"\n              >\n                <path\n                  fill-rule=\"evenodd\"\n                  d=\"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z\"\n                  clip-rule=\"evenodd\"\n                />\n              </svg>\n            </span>\n            Sign in\n          </button>\n        </div>\n      </form>\n      <NuxtLink to=\"/register\" exact>Create a new user instead</NuxtLink>\n    </div>\n  </div>\n</template>\n\n<script>\nexport default {\n  data: () => ({\n    email: \"\",\n    password: \"\",\n    alertOpen: false,\n    errorMessage: \"\"\n  }),\n  mounted() {\n    if(this.$supabase.auth.user()) {\n      this.$router.push(\"/\")\n    }\n  },\n  methods: {\n    async handleLogin() {\n      try {\n        const { error } = await this.$supabase.auth.signIn({\n          email: this.email,\n          password: this.password\n        });\n        if (error) throw error;\n        else this.$router.push(\"/\")\n      } catch (error) {\n        this.alertOpen = true;\n        this.errorMessage = error.error_description || error.message;\n      } finally {\n      }\n    },\n    closeAlert() {\n      this.alertOpen = false;\n    }\n  },\n};\n</script>\n"
  },
  {
    "path": "nuxt-supabase-auth/pages/register.vue",
    "content": "<template>\n  <div\n    class=\"min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8\"\n  >\n    <div class=\"max-w-md w-full space-y-8\">\n      <div\n        v-if=\"alertOpen\"\n        class=\"text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500\"\n      >\n        <span class=\"text-xl inline-block mr-5 align-middle\">\n          <i class=\"fas fa-bell\"></i>\n        </span>\n        <span class=\"inline-block align-middle mr-8\">\n          <b class=\"capitalize\">Error!</b> {{ errorMessage }}\n        </span>\n        <button\n          class=\"absolute bg-transparent text-2xl font-semibold leading-none right-0 top-0 mt-4 mr-6 outline-none focus:outline-none\"\n          v-on:click=\"closeAlert()\"\n        >\n          <span>×</span>\n        </button>\n      </div>\n\n      <div>\n        <h2 class=\"mt-6 text-center text-3xl font-extrabold text-gray-900\">\n          Create a new account\n        </h2>\n      </div>\n      <form class=\"mt-8 space-y-6\" @submit.prevent=\"handleLogin\">\n        <input type=\"hidden\" name=\"remember\" value=\"true\" />\n        <div class=\"rounded-md shadow-sm -space-y-px\">\n          <div>\n            <label for=\"email-address\" class=\"sr-only\">Email address</label>\n            <input\n              id=\"email-address\"\n              name=\"email\"\n              type=\"email\"\n              autocomplete=\"email\"\n              required\n              class=\"appearance-none rounded-none relative block w-full my-4 px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-t-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm\"\n              placeholder=\"Email address\"\n              v-model=\"email\"\n            />\n          </div>\n          <div>\n            <label for=\"password\" class=\"sr-only\">Password</label>\n            <input\n              id=\"password\"\n              name=\"password\"\n              type=\"password\"\n              autocomplete=\"current-password\"\n              required\n              class=\"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 focus:z-10 sm:text-sm\"\n              placeholder=\"Password\"\n              v-model=\"password\"\n            />\n          </div>\n        </div>\n\n        <div>\n          <button\n            type=\"submit\"\n            class=\"group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500\"\n          >\n            <span class=\"absolute left-0 inset-y-0 flex items-center pl-3\">\n              <svg\n                class=\"h-5 w-5 text-indigo-500 group-hover:text-indigo-400\"\n                xmlns=\"http://www.w3.org/2000/svg\"\n                viewBox=\"0 0 20 20\"\n                fill=\"currentColor\"\n                aria-hidden=\"true\"\n              >\n                <path\n                  fill-rule=\"evenodd\"\n                  d=\"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z\"\n                  clip-rule=\"evenodd\"\n                />\n              </svg>\n            </span>\n            Sign in\n          </button>\n        </div>\n      </form>\n      <NuxtLink to=\"/login\" exact>Sign in instead</NuxtLink>\n    </div>\n  </div>\n</template>\n\n<script>\nexport default {\n  data: () => ({\n    email: \"\",\n    password: \"\",\n    alertOpen: false,\n    errorMessage: \"\"\n  }),\n  mounted() {\n    if (this.$supabase.auth.user()) {\n      this.$router.push(\"/\");\n    }\n  },\n  methods: {\n    async handleLogin() {\n      try {\n        const { error } = await this.$supabase.auth.signUp({\n          email: this.email,\n          password: this.password\n        });\n        if (error) throw error;\n        else this.$router.push(\"/\");\n      } catch (error) {\n        this.alertOpen = true;\n        this.errorMessage = error.error_description || error.message;\n      } finally {\n      }\n    },\n    closeAlert() {\n      this.alertOpen = false;\n    }\n  }\n};\n</script>\n"
  },
  {
    "path": "nuxt-supabase-auth/plugins/client.js",
    "content": "import { createClient } from '@supabase/supabase-js'\n\nconst supabaseUrl = process.env.SUPABASE_URL\nconst supabaseAnonKey = process.env.SUPABASE_ANON_KEY\n\nconst supabase = createClient(supabaseUrl, supabaseAnonKey)\n\nexport default (_, inject) => {\n  inject('supabase', supabase)\n}"
  },
  {
    "path": "nuxt-supabase-auth/store/README.md",
    "content": "# STORE\n\n**This directory is not required, you can delete it if you don't want to use it.**\n\nThis directory contains your Vuex Store files.\nVuex Store option is implemented in the Nuxt.js framework.\n\nCreating a file in this directory automatically activates the option in the framework.\n\nMore information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).\n"
  },
  {
    "path": "nuxt-supabase-auth/tailwind.config.js",
    "content": "module.exports = {\n  mode: 'jit',\n  purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],\n  darkMode: 'class', // or 'media' or 'class'\n  theme: {\n    extend: {\n      spacing: {\n        '1.75': '0.4375rem',\n        '2.5': '0.625rem',\n        '3.75': '0.9375rem',\n        '4.5': '1.125rem',\n        '5.25': '1.3125rem',\n        '5.5': '1.375rem',\n        '6.25': '1.5625rem',\n        '7.5': '1.875rem',\n        '8.75': '2.1875rem',\n        '15': '3.75rem',\n        '70': '17.5rem',\n        '100': '25rem',\n        '75%': '75%',\n        '110%': '110%',\n      },\n      colors: {\n        primary: '#141526',\n        secondary: '#727377',\n        lightestGray: '#f7f7f7',\n        link: '#3399ff',\n        codeBg: '#2d2d2d',\n        codeHighlight: '#f08d49'\n      },\n      letterSpacing: {\n        '1px': '1px',\n        '2px': '2px',\n        '5px': '5px',\n      },\n      maxWidth: {\n        '6.5xl': '75rem'\n      },\n      fontSize: {\n        '1.5xl': '22px',\n        '3.5xl': '32px'\n      },\n      fontFamily: {\n        mainBody: ['Nunito Sans', 'sans-serif'],\n        mainHeader: ['Lato', 'sans-serif']\n      }\n    },\n  },\n  variants: {\n    extend: {},\n  },\n  plugins: [],\n}\n"
  },
  {
    "path": "prisma-crud/.gitignore",
    "content": ".env*\ndist\npackage-lock.json\nnode_modules\n.idea\n.vscode\n*.log"
  },
  {
    "path": "prisma-crud/README.md",
    "content": "<h1 align=\"center\"><strong>Boilerplate for a Basic GraphQL Server w/ TypeScript</strong></h1>\n\n<br />\n\n<div align=\"center\"><img src=\"https://imgur.com/1MfnLVl.png\" /></div>\n\n<div align=\"center\"><strong>🚀 Bootstrap your GraphQL server within seconds</strong></div>\n<div align=\"center\">Basic starter kit for a flexible GraphQL server for TypeScript - based on best practices from the GraphQL community.</div>\n\n## Features\n\n- **Scalable GraphQL server:** The server uses [`graphql-yoga`](https://github.com/prisma/graphql-yoga) which is based on Apollo Server & Express\n- **Static type generation**: TypeScript types for GraphQL queries & mutations are generated in a build step\n- **GraphQL database:** Includes GraphQL database binding to [Prisma](https://www.prismagraphql.com) (running on MySQL)\n- **Tooling**: Out-of-the-box support for [GraphQL Playground](https://github.com/prisma/graphql-playground) & [query performance tracing](https://github.com/apollographql/apollo-tracing)\n- **Extensible**: Simple and flexible [data model](./database/datamodel.graphql) – easy to adjust and extend\n- **No configuration overhead**: Preconfigured [`graphql-config`](https://github.com/prisma/graphql-config) setup\n\nRead more about the idea behind GraphQL boilerplates [here](https://blog.graph.cool/graphql-boilerplates-graphql-create-how-to-setup-a-graphql-project-6428be2f3a5).\n\n## Requirements\n\nYou need to have the [GraphQL CLI](https://github.com/graphql-cli/graphql-cli) installed to bootstrap your GraphQL server using `graphql create`:\n\n```sh\nnpm install -g graphql-cli\n```\n\n## Getting started\n\n```sh\n# 1. Bootstrap GraphQL server in directory `my-app`, based on `typescript-basic` boilerplate\ngraphql create my-app --boilerplate typescript-basic\n\n# 2. When prompted, deploy the Prisma service to a _public cluster_\n\n# 3. Navigate to the new project\ncd my-app\n\n# 4. Start server (runs on http://localhost:4000) and open GraphQL Playground\nyarn dev\n```\n\n![](https://imgur.com/hElq68i.png)\n\n## Documentation\n\n### Commands\n\n* `yarn start` starts GraphQL server on `http://localhost:4000`\n* `yarn dev` starts GraphQL server on `http://localhost:4000` _and_ opens GraphQL Playground\n* `yarn playground` opens the GraphQL Playground for the `projects` from [`.graphqlconfig.yml`](./.graphqlconfig.yml)\n* `yarn prisma <subcommand>` gives access to local version of Prisma CLI (e.g. `yarn prisma deploy`)\n\n> **Note**: We recommend that you're using `yarn dev` during development as it will give you access to the GraphQL API or your server (defined by the [application schema](./src/schema.graphql)) as well as to the Prisma API directly (defined by the [Prisma database schema](./generated/prisma.graphql)). If you're starting the server with `yarn start`, you'll only be able to access the API of the application schema.\n\n### Project structure\n\n![](https://imgur.com/95faUsa.png)\n\n| File name 　　　　　　　　　　　　　　| Description 　　　　　　　　<br><br>|\n| :--  | :--         |\n| `└── database ` (_directory_) | _Contains all files that are related to the Prisma database service_ |\\\n| `　　├── prisma.yml` | The root configuration file for your Prisma database service ([docs](https://www.prismagraphql.com/docs/reference/prisma.yml/overview-and-example-foatho8aip)) |\n| `　　└── datamodel.graphql` | Defines your data model (written in [GraphQL SDL](https://blog.graph.cool/graphql-sdl-schema-definition-language-6755bcb9ce51)) |\n| `└── src ` (_directory_) | _Contains the source files for your GraphQL server_ |\n| `　　├── index.ts` | The entry point for your GraphQL server |\n| `　　├── schema.graphql` | The **application schema** defining the API exposed to client applications  |\n| `　　└── generated` (_directory_) | _Contains generated files_ |\n| `　　　　└── prisma-client` (_directory_) | The generated Prisma client  |\n\n## Contributing\n\nThe GraphQL boilerplates are maintained by the GraphQL community, with official support from the [Apollo](https://www.apollographql.com/) & [Prisma](https://www.prisma.io) teams.\n\nYour feedback is **very helpful**, please share your opinion and thoughts! If you have any questions or want to contribute yourself, join the `#graphql-boilerplate` channel on our [Slack](https://slack.prisma.io/)."
  },
  {
    "path": "prisma-crud/package.json",
    "content": "{\n  \"name\": \"prisma-crud\",\n  \"scripts\": {\n    \"start\": \"ts-node src/index.ts\"\n  },\n  \"dependencies\": {\n    \"graphql\": \"14.4.2\",\n    \"graphql-yoga\": \"1.18.1\",\n    \"prisma-client-lib\": \"1.34.3\"\n  },\n  \"devDependencies\": {\n    \"prisma\": \"1.34.3\",\n    \"ts-node\": \"7.0.1\",\n    \"typescript\": \"3.2.2\"\n  },\n  \"keywords\": [\n    \"Prisma\",\n    \"Typescript\",\n    \"CRUD\",\n    \"Prisma Typescript\"\n  ]\n}"
  },
  {
    "path": "prisma-crud/prisma/datamodel.prisma",
    "content": "type Post {\n  id: ID! @id\n  published: Boolean! @default(value: false)\n  title: String!\n  content: String!\n}\n\ntype User {\n  id: ID! @id\n  email: String! @unique\n  password: String!\n  \n}"
  },
  {
    "path": "prisma-crud/prisma/prisma.yml",
    "content": "# Specifies the HTTP endpoint of your Prisma API (deployed to a Prisma Demo server).\nendpoint: https://eu1.prisma.sh/public-veilfriend-42/prisma-crud/dev\n\n# Defines your models, each model is mapped to the database as a table.\ndatamodel: datamodel.prisma\n\n# Specifies the language and directory for the generated Prisma client.\ngenerate:\n  - generator: typescript-client\n    output: ../src/generated/prisma-client\n\n# Seed your service with initial data based on `seed.graphql`.\nseed:\n  import: seed.graphql\n\n# Ensures Prisma client is re-generated after a datamodel change.\nhooks:\n  post-deploy:\n    - prisma generate\n\n# If specified, the `secret` must be used to generate a JWT which is attached\n# to the `Authorization` header of HTTP requests made against the Prisma API.\n# Info: https://www.prisma.io/docs/prisma-graphql-api/reference/authentication-ghd4/\n# secret: mysecret123\n"
  },
  {
    "path": "prisma-crud/prisma/seed.graphql",
    "content": "mutation {\n\tpost1: createPost(\n\t\tdata: {\n\t\t\ttitle: \"Some great post\"\n\t\t\tcontent: \"Some great content\"\n\t\t\tpublished: true\n\t\t}\n\t) {\n\t\tid\n\t}\n}\n"
  },
  {
    "path": "prisma-crud/src/generated/prisma-client/index.ts",
    "content": "// Code generated by Prisma (prisma@1.34.3). DO NOT EDIT.\n// Please don't change this file manually but run `prisma generate` to update it.\n// For more information, please read the docs: https://www.prisma.io/docs/prisma-client/\n\nimport { DocumentNode } from \"graphql\";\nimport {\n  makePrismaClientClass,\n  BaseClientOptions,\n  Model\n} from \"prisma-client-lib\";\nimport { typeDefs } from \"./prisma-schema\";\n\nexport type AtLeastOne<T, U = { [K in keyof T]: Pick<T, K> }> = Partial<T> &\n  U[keyof U];\n\nexport type Maybe<T> = T | undefined | null;\n\nexport interface Exists {\n  post: (where?: PostWhereInput) => Promise<boolean>;\n  user: (where?: UserWhereInput) => Promise<boolean>;\n}\n\nexport interface Node {}\n\nexport type FragmentableArray<T> = Promise<Array<T>> & Fragmentable;\n\nexport interface Fragmentable {\n  $fragment<T>(fragment: string | DocumentNode): Promise<T>;\n}\n\nexport interface Prisma {\n  $exists: Exists;\n  $graphql: <T = any>(\n    query: string,\n    variables?: { [key: string]: any }\n  ) => Promise<T>;\n\n  /**\n   * Queries\n   */\n\n  post: (where: PostWhereUniqueInput) => PostNullablePromise;\n  posts: (args?: {\n    where?: PostWhereInput;\n    orderBy?: PostOrderByInput;\n    skip?: Int;\n    after?: String;\n    before?: String;\n    first?: Int;\n    last?: Int;\n  }) => FragmentableArray<Post>;\n  postsConnection: (args?: {\n    where?: PostWhereInput;\n    orderBy?: PostOrderByInput;\n    skip?: Int;\n    after?: String;\n    before?: String;\n    first?: Int;\n    last?: Int;\n  }) => PostConnectionPromise;\n  user: (where: UserWhereUniqueInput) => UserNullablePromise;\n  users: (args?: {\n    where?: UserWhereInput;\n    orderBy?: UserOrderByInput;\n    skip?: Int;\n    after?: String;\n    before?: String;\n    first?: Int;\n    last?: Int;\n  }) => FragmentableArray<User>;\n  usersConnection: (args?: {\n    where?: UserWhereInput;\n    orderBy?: UserOrderByInput;\n    skip?: Int;\n    after?: String;\n    before?: String;\n    first?: Int;\n    last?: Int;\n  }) => UserConnectionPromise;\n  node: (args: { id: ID_Output }) => Node;\n\n  /**\n   * Mutations\n   */\n\n  createPost: (data: PostCreateInput) => PostPromise;\n  updatePost: (args: {\n    data: PostUpdateInput;\n    where: PostWhereUniqueInput;\n  }) => PostPromise;\n  updateManyPosts: (args: {\n    data: PostUpdateManyMutationInput;\n    where?: PostWhereInput;\n  }) => BatchPayloadPromise;\n  upsertPost: (args: {\n    where: PostWhereUniqueInput;\n    create: PostCreateInput;\n    update: PostUpdateInput;\n  }) => PostPromise;\n  deletePost: (where: PostWhereUniqueInput) => PostPromise;\n  deleteManyPosts: (where?: PostWhereInput) => BatchPayloadPromise;\n  createUser: (data: UserCreateInput) => UserPromise;\n  updateUser: (args: {\n    data: UserUpdateInput;\n    where: UserWhereUniqueInput;\n  }) => UserPromise;\n  updateManyUsers: (args: {\n    data: UserUpdateManyMutationInput;\n    where?: UserWhereInput;\n  }) => BatchPayloadPromise;\n  upsertUser: (args: {\n    where: UserWhereUniqueInput;\n    create: UserCreateInput;\n    update: UserUpdateInput;\n  }) => UserPromise;\n  deleteUser: (where: UserWhereUniqueInput) => UserPromise;\n  deleteManyUsers: (where?: UserWhereInput) => BatchPayloadPromise;\n\n  /**\n   * Subscriptions\n   */\n\n  $subscribe: Subscription;\n}\n\nexport interface Subscription {\n  post: (\n    where?: PostSubscriptionWhereInput\n  ) => PostSubscriptionPayloadSubscription;\n  user: (\n    where?: UserSubscriptionWhereInput\n  ) => UserSubscriptionPayloadSubscription;\n}\n\nexport interface ClientConstructor<T> {\n  new (options?: BaseClientOptions): T;\n}\n\n/**\n * Types\n */\n\nexport type PostOrderByInput =\n  | \"id_ASC\"\n  | \"id_DESC\"\n  | \"published_ASC\"\n  | \"published_DESC\"\n  | \"title_ASC\"\n  | \"title_DESC\"\n  | \"content_ASC\"\n  | \"content_DESC\";\n\nexport type UserOrderByInput =\n  | \"id_ASC\"\n  | \"id_DESC\"\n  | \"email_ASC\"\n  | \"email_DESC\"\n  | \"password_ASC\"\n  | \"password_DESC\";\n\nexport type MutationType = \"CREATED\" | \"UPDATED\" | \"DELETED\";\n\nexport interface UserCreateInput {\n  id?: Maybe<ID_Input>;\n  email: String;\n  password: String;\n}\n\nexport type PostWhereUniqueInput = AtLeastOne<{\n  id: Maybe<ID_Input>;\n}>;\n\nexport interface PostUpdateInput {\n  published?: Maybe<Boolean>;\n  title?: Maybe<String>;\n  content?: Maybe<String>;\n}\n\nexport interface PostWhereInput {\n  id?: Maybe<ID_Input>;\n  id_not?: Maybe<ID_Input>;\n  id_in?: Maybe<ID_Input[] | ID_Input>;\n  id_not_in?: Maybe<ID_Input[] | ID_Input>;\n  id_lt?: Maybe<ID_Input>;\n  id_lte?: Maybe<ID_Input>;\n  id_gt?: Maybe<ID_Input>;\n  id_gte?: Maybe<ID_Input>;\n  id_contains?: Maybe<ID_Input>;\n  id_not_contains?: Maybe<ID_Input>;\n  id_starts_with?: Maybe<ID_Input>;\n  id_not_starts_with?: Maybe<ID_Input>;\n  id_ends_with?: Maybe<ID_Input>;\n  id_not_ends_with?: Maybe<ID_Input>;\n  published?: Maybe<Boolean>;\n  published_not?: Maybe<Boolean>;\n  title?: Maybe<String>;\n  title_not?: Maybe<String>;\n  title_in?: Maybe<String[] | String>;\n  title_not_in?: Maybe<String[] | String>;\n  title_lt?: Maybe<String>;\n  title_lte?: Maybe<String>;\n  title_gt?: Maybe<String>;\n  title_gte?: Maybe<String>;\n  title_contains?: Maybe<String>;\n  title_not_contains?: Maybe<String>;\n  title_starts_with?: Maybe<String>;\n  title_not_starts_with?: Maybe<String>;\n  title_ends_with?: Maybe<String>;\n  title_not_ends_with?: Maybe<String>;\n  content?: Maybe<String>;\n  content_not?: Maybe<String>;\n  content_in?: Maybe<String[] | String>;\n  content_not_in?: Maybe<String[] | String>;\n  content_lt?: Maybe<String>;\n  content_lte?: Maybe<String>;\n  content_gt?: Maybe<String>;\n  content_gte?: Maybe<String>;\n  content_contains?: Maybe<String>;\n  content_not_contains?: Maybe<String>;\n  content_starts_with?: Maybe<String>;\n  content_not_starts_with?: Maybe<String>;\n  content_ends_with?: Maybe<String>;\n  content_not_ends_with?: Maybe<String>;\n  AND?: Maybe<PostWhereInput[] | PostWhereInput>;\n  OR?: Maybe<PostWhereInput[] | PostWhereInput>;\n  NOT?: Maybe<PostWhereInput[] | PostWhereInput>;\n}\n\nexport interface PostSubscriptionWhereInput {\n  mutation_in?: Maybe<MutationType[] | MutationType>;\n  updatedFields_contains?: Maybe<String>;\n  updatedFields_contains_every?: Maybe<String[] | String>;\n  updatedFields_contains_some?: Maybe<String[] | String>;\n  node?: Maybe<PostWhereInput>;\n  AND?: Maybe<PostSubscriptionWhereInput[] | PostSubscriptionWhereInput>;\n  OR?: Maybe<PostSubscriptionWhereInput[] | PostSubscriptionWhereInput>;\n  NOT?: Maybe<PostSubscriptionWhereInput[] | PostSubscriptionWhereInput>;\n}\n\nexport interface UserWhereInput {\n  id?: Maybe<ID_Input>;\n  id_not?: Maybe<ID_Input>;\n  id_in?: Maybe<ID_Input[] | ID_Input>;\n  id_not_in?: Maybe<ID_Input[] | ID_Input>;\n  id_lt?: Maybe<ID_Input>;\n  id_lte?: Maybe<ID_Input>;\n  id_gt?: Maybe<ID_Input>;\n  id_gte?: Maybe<ID_Input>;\n  id_contains?: Maybe<ID_Input>;\n  id_not_contains?: Maybe<ID_Input>;\n  id_starts_with?: Maybe<ID_Input>;\n  id_not_starts_with?: Maybe<ID_Input>;\n  id_ends_with?: Maybe<ID_Input>;\n  id_not_ends_with?: Maybe<ID_Input>;\n  email?: Maybe<String>;\n  email_not?: Maybe<String>;\n  email_in?: Maybe<String[] | String>;\n  email_not_in?: Maybe<String[] | String>;\n  email_lt?: Maybe<String>;\n  email_lte?: Maybe<String>;\n  email_gt?: Maybe<String>;\n  email_gte?: Maybe<String>;\n  email_contains?: Maybe<String>;\n  email_not_contains?: Maybe<String>;\n  email_starts_with?: Maybe<String>;\n  email_not_starts_with?: Maybe<String>;\n  email_ends_with?: Maybe<String>;\n  email_not_ends_with?: Maybe<String>;\n  password?: Maybe<String>;\n  password_not?: Maybe<String>;\n  password_in?: Maybe<String[] | String>;\n  password_not_in?: Maybe<String[] | String>;\n  password_lt?: Maybe<String>;\n  password_lte?: Maybe<String>;\n  password_gt?: Maybe<String>;\n  password_gte?: Maybe<String>;\n  password_contains?: Maybe<String>;\n  password_not_contains?: Maybe<String>;\n  password_starts_with?: Maybe<String>;\n  password_not_starts_with?: Maybe<String>;\n  password_ends_with?: Maybe<String>;\n  password_not_ends_with?: Maybe<String>;\n  AND?: Maybe<UserWhereInput[] | UserWhereInput>;\n  OR?: Maybe<UserWhereInput[] | UserWhereInput>;\n  NOT?: Maybe<UserWhereInput[] | UserWhereInput>;\n}\n\nexport interface PostCreateInput {\n  id?: Maybe<ID_Input>;\n  published?: Maybe<Boolean>;\n  title: String;\n  content: String;\n}\n\nexport type UserWhereUniqueInput = AtLeastOne<{\n  id: Maybe<ID_Input>;\n  email?: Maybe<String>;\n}>;\n\nexport interface UserUpdateManyMutationInput {\n  email?: Maybe<String>;\n  password?: Maybe<String>;\n}\n\nexport interface PostUpdateManyMutationInput {\n  published?: Maybe<Boolean>;\n  title?: Maybe<String>;\n  content?: Maybe<String>;\n}\n\nexport interface UserSubscriptionWhereInput {\n  mutation_in?: Maybe<MutationType[] | MutationType>;\n  updatedFields_contains?: Maybe<String>;\n  updatedFields_contains_every?: Maybe<String[] | String>;\n  updatedFields_contains_some?: Maybe<String[] | String>;\n  node?: Maybe<UserWhereInput>;\n  AND?: Maybe<UserSubscriptionWhereInput[] | UserSubscriptionWhereInput>;\n  OR?: Maybe<UserSubscriptionWhereInput[] | UserSubscriptionWhereInput>;\n  NOT?: Maybe<UserSubscriptionWhereInput[] | UserSubscriptionWhereInput>;\n}\n\nexport interface UserUpdateInput {\n  email?: Maybe<String>;\n  password?: Maybe<String>;\n}\n\nexport interface NodeNode {\n  id: ID_Output;\n}\n\nexport interface UserEdge {\n  node: User;\n  cursor: String;\n}\n\nexport interface UserEdgePromise extends Promise<UserEdge>, Fragmentable {\n  node: <T = UserPromise>() => T;\n  cursor: () => Promise<String>;\n}\n\nexport interface UserEdgeSubscription\n  extends Promise<AsyncIterator<UserEdge>>,\n    Fragmentable {\n  node: <T = UserSubscription>() => T;\n  cursor: () => Promise<AsyncIterator<String>>;\n}\n\nexport interface PostConnection {\n  pageInfo: PageInfo;\n  edges: PostEdge[];\n}\n\nexport interface PostConnectionPromise\n  extends Promise<PostConnection>,\n    Fragmentable {\n  pageInfo: <T = PageInfoPromise>() => T;\n  edges: <T = FragmentableArray<PostEdge>>() => T;\n  aggregate: <T = AggregatePostPromise>() => T;\n}\n\nexport interface PostConnectionSubscription\n  extends Promise<AsyncIterator<PostConnection>>,\n    Fragmentable {\n  pageInfo: <T = PageInfoSubscription>() => T;\n  edges: <T = Promise<AsyncIterator<PostEdgeSubscription>>>() => T;\n  aggregate: <T = AggregatePostSubscription>() => T;\n}\n\nexport interface UserPreviousValues {\n  id: ID_Output;\n  email: String;\n  password: String;\n}\n\nexport interface UserPreviousValuesPromise\n  extends Promise<UserPreviousValues>,\n    Fragmentable {\n  id: () => Promise<ID_Output>;\n  email: () => Promise<String>;\n  password: () => Promise<String>;\n}\n\nexport interface UserPreviousValuesSubscription\n  extends Promise<AsyncIterator<UserPreviousValues>>,\n    Fragmentable {\n  id: () => Promise<AsyncIterator<ID_Output>>;\n  email: () => Promise<AsyncIterator<String>>;\n  password: () => Promise<AsyncIterator<String>>;\n}\n\nexport interface PageInfo {\n  hasNextPage: Boolean;\n  hasPreviousPage: Boolean;\n  startCursor?: String;\n  endCursor?: String;\n}\n\nexport interface PageInfoPromise extends Promise<PageInfo>, Fragmentable {\n  hasNextPage: () => Promise<Boolean>;\n  hasPreviousPage: () => Promise<Boolean>;\n  startCursor: () => Promise<String>;\n  endCursor: () => Promise<String>;\n}\n\nexport interface PageInfoSubscription\n  extends Promise<AsyncIterator<PageInfo>>,\n    Fragmentable {\n  hasNextPage: () => Promise<AsyncIterator<Boolean>>;\n  hasPreviousPage: () => Promise<AsyncIterator<Boolean>>;\n  startCursor: () => Promise<AsyncIterator<String>>;\n  endCursor: () => Promise<AsyncIterator<String>>;\n}\n\nexport interface PostSubscriptionPayload {\n  mutation: MutationType;\n  node: Post;\n  updatedFields: String[];\n  previousValues: PostPreviousValues;\n}\n\nexport interface PostSubscriptionPayloadPromise\n  extends Promise<PostSubscriptionPayload>,\n    Fragmentable {\n  mutation: () => Promise<MutationType>;\n  node: <T = PostPromise>() => T;\n  updatedFields: () => Promise<String[]>;\n  previousValues: <T = PostPreviousValuesPromise>() => T;\n}\n\nexport interface PostSubscriptionPayloadSubscription\n  extends Promise<AsyncIterator<PostSubscriptionPayload>>,\n    Fragmentable {\n  mutation: () => Promise<AsyncIterator<MutationType>>;\n  node: <T = PostSubscription>() => T;\n  updatedFields: () => Promise<AsyncIterator<String[]>>;\n  previousValues: <T = PostPreviousValuesSubscription>() => T;\n}\n\nexport interface UserConnection {\n  pageInfo: PageInfo;\n  edges: UserEdge[];\n}\n\nexport interface UserConnectionPromise\n  extends Promise<UserConnection>,\n    Fragmentable {\n  pageInfo: <T = PageInfoPromise>() => T;\n  edges: <T = FragmentableArray<UserEdge>>() => T;\n  aggregate: <T = AggregateUserPromise>() => T;\n}\n\nexport interface UserConnectionSubscription\n  extends Promise<AsyncIterator<UserConnection>>,\n    Fragmentable {\n  pageInfo: <T = PageInfoSubscription>() => T;\n  edges: <T = Promise<AsyncIterator<UserEdgeSubscription>>>() => T;\n  aggregate: <T = AggregateUserSubscription>() => T;\n}\n\nexport interface PostPreviousValues {\n  id: ID_Output;\n  published: Boolean;\n  title: String;\n  content: String;\n}\n\nexport interface PostPreviousValuesPromise\n  extends Promise<PostPreviousValues>,\n    Fragmentable {\n  id: () => Promise<ID_Output>;\n  published: () => Promise<Boolean>;\n  title: () => Promise<String>;\n  content: () => Promise<String>;\n}\n\nexport interface PostPreviousValuesSubscription\n  extends Promise<AsyncIterator<PostPreviousValues>>,\n    Fragmentable {\n  id: () => Promise<AsyncIterator<ID_Output>>;\n  published: () => Promise<AsyncIterator<Boolean>>;\n  title: () => Promise<AsyncIterator<String>>;\n  content: () => Promise<AsyncIterator<String>>;\n}\n\nexport interface Post {\n  id: ID_Output;\n  published: Boolean;\n  title: String;\n  content: String;\n}\n\nexport interface PostPromise extends Promise<Post>, Fragmentable {\n  id: () => Promise<ID_Output>;\n  published: () => Promise<Boolean>;\n  title: () => Promise<String>;\n  content: () => Promise<String>;\n}\n\nexport interface PostSubscription\n  extends Promise<AsyncIterator<Post>>,\n    Fragmentable {\n  id: () => Promise<AsyncIterator<ID_Output>>;\n  published: () => Promise<AsyncIterator<Boolean>>;\n  title: () => Promise<AsyncIterator<String>>;\n  content: () => Promise<AsyncIterator<String>>;\n}\n\nexport interface PostNullablePromise\n  extends Promise<Post | null>,\n    Fragmentable {\n  id: () => Promise<ID_Output>;\n  published: () => Promise<Boolean>;\n  title: () => Promise<String>;\n  content: () => Promise<String>;\n}\n\nexport interface User {\n  id: ID_Output;\n  email: String;\n  password: String;\n}\n\nexport interface UserPromise extends Promise<User>, Fragmentable {\n  id: () => Promise<ID_Output>;\n  email: () => Promise<String>;\n  password: () => Promise<String>;\n}\n\nexport interface UserSubscription\n  extends Promise<AsyncIterator<User>>,\n    Fragmentable {\n  id: () => Promise<AsyncIterator<ID_Output>>;\n  email: () => Promise<AsyncIterator<String>>;\n  password: () => Promise<AsyncIterator<String>>;\n}\n\nexport interface UserNullablePromise\n  extends Promise<User | null>,\n    Fragmentable {\n  id: () => Promise<ID_Output>;\n  email: () => Promise<String>;\n  password: () => Promise<String>;\n}\n\nexport interface AggregateUser {\n  count: Int;\n}\n\nexport interface AggregateUserPromise\n  extends Promise<AggregateUser>,\n    Fragmentable {\n  count: () => Promise<Int>;\n}\n\nexport interface AggregateUserSubscription\n  extends Promise<AsyncIterator<AggregateUser>>,\n    Fragmentable {\n  count: () => Promise<AsyncIterator<Int>>;\n}\n\nexport interface AggregatePost {\n  count: Int;\n}\n\nexport interface AggregatePostPromise\n  extends Promise<AggregatePost>,\n    Fragmentable {\n  count: () => Promise<Int>;\n}\n\nexport interface AggregatePostSubscription\n  extends Promise<AsyncIterator<AggregatePost>>,\n    Fragmentable {\n  count: () => Promise<AsyncIterator<Int>>;\n}\n\nexport interface UserSubscriptionPayload {\n  mutation: MutationType;\n  node: User;\n  updatedFields: String[];\n  previousValues: UserPreviousValues;\n}\n\nexport interface UserSubscriptionPayloadPromise\n  extends Promise<UserSubscriptionPayload>,\n    Fragmentable {\n  mutation: () => Promise<MutationType>;\n  node: <T = UserPromise>() => T;\n  updatedFields: () => Promise<String[]>;\n  previousValues: <T = UserPreviousValuesPromise>() => T;\n}\n\nexport interface UserSubscriptionPayloadSubscription\n  extends Promise<AsyncIterator<UserSubscriptionPayload>>,\n    Fragmentable {\n  mutation: () => Promise<AsyncIterator<MutationType>>;\n  node: <T = UserSubscription>() => T;\n  updatedFields: () => Promise<AsyncIterator<String[]>>;\n  previousValues: <T = UserPreviousValuesSubscription>() => T;\n}\n\nexport interface BatchPayload {\n  count: Long;\n}\n\nexport interface BatchPayloadPromise\n  extends Promise<BatchPayload>,\n    Fragmentable {\n  count: () => Promise<Long>;\n}\n\nexport interface BatchPayloadSubscription\n  extends Promise<AsyncIterator<BatchPayload>>,\n    Fragmentable {\n  count: () => Promise<AsyncIterator<Long>>;\n}\n\nexport interface PostEdge {\n  node: Post;\n  cursor: String;\n}\n\nexport interface PostEdgePromise extends Promise<PostEdge>, Fragmentable {\n  node: <T = PostPromise>() => T;\n  cursor: () => Promise<String>;\n}\n\nexport interface PostEdgeSubscription\n  extends Promise<AsyncIterator<PostEdge>>,\n    Fragmentable {\n  node: <T = PostSubscription>() => T;\n  cursor: () => Promise<AsyncIterator<String>>;\n}\n\n/*\nThe `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.\n*/\nexport type Int = number;\n\n/*\nThe `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.\n*/\nexport type ID_Input = string | number;\nexport type ID_Output = string;\n\nexport type Long = string;\n\n/*\nThe `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.\n*/\nexport type String = string;\n\n/*\nThe `Boolean` scalar type represents `true` or `false`.\n*/\nexport type Boolean = boolean;\n\n/**\n * Model Metadata\n */\n\nexport const models: Model[] = [\n  {\n    name: \"Post\",\n    embedded: false\n  },\n  {\n    name: \"User\",\n    embedded: false\n  }\n];\n\n/**\n * Type Defs\n */\n\nexport const Prisma = makePrismaClientClass<ClientConstructor<Prisma>>({\n  typeDefs,\n  models,\n  endpoint: `https://eu1.prisma.sh/public-veilfriend-42/prisma-crud/dev`\n});\nexport const prisma = new Prisma();\n"
  },
  {
    "path": "prisma-crud/src/generated/prisma-client/prisma-schema.ts",
    "content": "// Code generated by Prisma (prisma@1.34.3). DO NOT EDIT.\n  // Please don't change this file manually but run `prisma generate` to update it.\n  // For more information, please read the docs: https://www.prisma.io/docs/prisma-client/\n\nexport const typeDefs = /* GraphQL */ `type AggregatePost {\n  count: Int!\n}\n\ntype AggregateUser {\n  count: Int!\n}\n\ntype BatchPayload {\n  count: Long!\n}\n\nscalar Long\n\ntype Mutation {\n  createPost(data: PostCreateInput!): Post!\n  updatePost(data: PostUpdateInput!, where: PostWhereUniqueInput!): Post\n  updateManyPosts(data: PostUpdateManyMutationInput!, where: PostWhereInput): BatchPayload!\n  upsertPost(where: PostWhereUniqueInput!, create: PostCreateInput!, update: PostUpdateInput!): Post!\n  deletePost(where: PostWhereUniqueInput!): Post\n  deleteManyPosts(where: PostWhereInput): BatchPayload!\n  createUser(data: UserCreateInput!): User!\n  updateUser(data: UserUpdateInput!, where: UserWhereUniqueInput!): User\n  updateManyUsers(data: UserUpdateManyMutationInput!, where: UserWhereInput): BatchPayload!\n  upsertUser(where: UserWhereUniqueInput!, create: UserCreateInput!, update: UserUpdateInput!): User!\n  deleteUser(where: UserWhereUniqueInput!): User\n  deleteManyUsers(where: UserWhereInput): BatchPayload!\n}\n\nenum MutationType {\n  CREATED\n  UPDATED\n  DELETED\n}\n\ninterface Node {\n  id: ID!\n}\n\ntype PageInfo {\n  hasNextPage: Boolean!\n  hasPreviousPage: Boolean!\n  startCursor: String\n  endCursor: String\n}\n\ntype Post {\n  id: ID!\n  published: Boolean!\n  title: String!\n  content: String!\n}\n\ntype PostConnection {\n  pageInfo: PageInfo!\n  edges: [PostEdge]!\n  aggregate: AggregatePost!\n}\n\ninput PostCreateInput {\n  id: ID\n  published: Boolean\n  title: String!\n  content: String!\n}\n\ntype PostEdge {\n  node: Post!\n  cursor: String!\n}\n\nenum PostOrderByInput {\n  id_ASC\n  id_DESC\n  published_ASC\n  published_DESC\n  title_ASC\n  title_DESC\n  content_ASC\n  content_DESC\n}\n\ntype PostPreviousValues {\n  id: ID!\n  published: Boolean!\n  title: String!\n  content: String!\n}\n\ntype PostSubscriptionPayload {\n  mutation: MutationType!\n  node: Post\n  updatedFields: [String!]\n  previousValues: PostPreviousValues\n}\n\ninput PostSubscriptionWhereInput {\n  mutation_in: [MutationType!]\n  updatedFields_contains: String\n  updatedFields_contains_every: [String!]\n  updatedFields_contains_some: [String!]\n  node: PostWhereInput\n  AND: [PostSubscriptionWhereInput!]\n  OR: [PostSubscriptionWhereInput!]\n  NOT: [PostSubscriptionWhereInput!]\n}\n\ninput PostUpdateInput {\n  published: Boolean\n  title: String\n  content: String\n}\n\ninput PostUpdateManyMutationInput {\n  published: Boolean\n  title: String\n  content: String\n}\n\ninput PostWhereInput {\n  id: ID\n  id_not: ID\n  id_in: [ID!]\n  id_not_in: [ID!]\n  id_lt: ID\n  id_lte: ID\n  id_gt: ID\n  id_gte: ID\n  id_contains: ID\n  id_not_contains: ID\n  id_starts_with: ID\n  id_not_starts_with: ID\n  id_ends_with: ID\n  id_not_ends_with: ID\n  published: Boolean\n  published_not: Boolean\n  title: String\n  title_not: String\n  title_in: [String!]\n  title_not_in: [String!]\n  title_lt: String\n  title_lte: String\n  title_gt: String\n  title_gte: String\n  title_contains: String\n  title_not_contains: String\n  title_starts_with: String\n  title_not_starts_with: String\n  title_ends_with: String\n  title_not_ends_with: String\n  content: String\n  content_not: String\n  content_in: [String!]\n  content_not_in: [String!]\n  content_lt: String\n  content_lte: String\n  content_gt: String\n  content_gte: String\n  content_contains: String\n  content_not_contains: String\n  content_starts_with: String\n  content_not_starts_with: String\n  content_ends_with: String\n  content_not_ends_with: String\n  AND: [PostWhereInput!]\n  OR: [PostWhereInput!]\n  NOT: [PostWhereInput!]\n}\n\ninput PostWhereUniqueInput {\n  id: ID\n}\n\ntype Query {\n  post(where: PostWhereUniqueInput!): Post\n  posts(where: PostWhereInput, orderBy: PostOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [Post]!\n  postsConnection(where: PostWhereInput, orderBy: PostOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): PostConnection!\n  user(where: UserWhereUniqueInput!): User\n  users(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): [User]!\n  usersConnection(where: UserWhereInput, orderBy: UserOrderByInput, skip: Int, after: String, before: String, first: Int, last: Int): UserConnection!\n  node(id: ID!): Node\n}\n\ntype Subscription {\n  post(where: PostSubscriptionWhereInput): PostSubscriptionPayload\n  user(where: UserSubscriptionWhereInput): UserSubscriptionPayload\n}\n\ntype User {\n  id: ID!\n  email: String!\n  password: String!\n}\n\ntype UserConnection {\n  pageInfo: PageInfo!\n  edges: [UserEdge]!\n  aggregate: AggregateUser!\n}\n\ninput UserCreateInput {\n  id: ID\n  email: String!\n  password: String!\n}\n\ntype UserEdge {\n  node: User!\n  cursor: String!\n}\n\nenum UserOrderByInput {\n  id_ASC\n  id_DESC\n  email_ASC\n  email_DESC\n  password_ASC\n  password_DESC\n}\n\ntype UserPreviousValues {\n  id: ID!\n  email: String!\n  password: String!\n}\n\ntype UserSubscriptionPayload {\n  mutation: MutationType!\n  node: User\n  updatedFields: [String!]\n  previousValues: UserPreviousValues\n}\n\ninput UserSubscriptionWhereInput {\n  mutation_in: [MutationType!]\n  updatedFields_contains: String\n  updatedFields_contains_every: [String!]\n  updatedFields_contains_some: [String!]\n  node: UserWhereInput\n  AND: [UserSubscriptionWhereInput!]\n  OR: [UserSubscriptionWhereInput!]\n  NOT: [UserSubscriptionWhereInput!]\n}\n\ninput UserUpdateInput {\n  email: String\n  password: String\n}\n\ninput UserUpdateManyMutationInput {\n  email: String\n  password: String\n}\n\ninput UserWhereInput {\n  id: ID\n  id_not: ID\n  id_in: [ID!]\n  id_not_in: [ID!]\n  id_lt: ID\n  id_lte: ID\n  id_gt: ID\n  id_gte: ID\n  id_contains: ID\n  id_not_contains: ID\n  id_starts_with: ID\n  id_not_starts_with: ID\n  id_ends_with: ID\n  id_not_ends_with: ID\n  email: String\n  email_not: String\n  email_in: [String!]\n  email_not_in: [String!]\n  email_lt: String\n  email_lte: String\n  email_gt: String\n  email_gte: String\n  email_contains: String\n  email_not_contains: String\n  email_starts_with: String\n  email_not_starts_with: String\n  email_ends_with: String\n  email_not_ends_with: String\n  password: String\n  password_not: String\n  password_in: [String!]\n  password_not_in: [String!]\n  password_lt: String\n  password_lte: String\n  password_gt: String\n  password_gte: String\n  password_contains: String\n  password_not_contains: String\n  password_starts_with: String\n  password_not_starts_with: String\n  password_ends_with: String\n  password_not_ends_with: String\n  AND: [UserWhereInput!]\n  OR: [UserWhereInput!]\n  NOT: [UserWhereInput!]\n}\n\ninput UserWhereUniqueInput {\n  id: ID\n  email: String\n}\n`"
  },
  {
    "path": "prisma-crud/src/index.ts",
    "content": "import { GraphQLServer } from 'graphql-yoga'\nimport { prisma } from './generated/prisma-client'\nimport { Context } from './utils'\n\nconst resolvers = {\n\tQuery: {\n\t\tfeed(parent, args, context: Context) {\n\t\t\treturn context.prisma.posts({ where: { published: true } })\n\t\t},\n\t\tdrafts(parent, args, context: Context) {\n\t\t\treturn context.prisma.posts({ where: { published: false } })\n\t\t},\n\t\tpost(parent, { id }, context: Context) {\n\t\t\treturn context.prisma.post({ id })\n\t\t},\n\t\tusers(parent, args, context: Context) {\n\t\t\treturn context.prisma.users()\n\t\t},\n\t},\n\tMutation: {\n\t\tcreateUser(parent, { email, password }, context: Context) {\n\t\t\treturn context.prisma.createUser({ email, password })\n\t\t},\n\t\tcreateDraft(parent, { title, content }, context: Context) {\n\t\t\treturn context.prisma.createPost({ title, content })\n\t\t},\n\t\tdeletePost(parent, { id }, context: Context) {\n\t\t\treturn context.prisma.deletePost({ id })\n\t\t},\n\t\tpublish(parent, { id }, context: Context) {\n\t\t\treturn context.prisma.updatePost({\n\t\t\t\twhere: { id },\n\t\t\t\tdata: { published: true },\n\t\t\t})\n\t\t},\n\t},\n}\n\nconst server = new GraphQLServer({\n\ttypeDefs: './src/schema.graphql',\n\tresolvers,\n\tcontext: { prisma },\n})\nserver.start(() => console.log('Server is running on http://localhost:4000'))\n"
  },
  {
    "path": "prisma-crud/src/schema.graphql",
    "content": "type Query {\n\tfeed: [Post!]!\n\tdrafts: [Post!]!\n\tpost(id: ID!): Post\n\tusers: [User!]!\n}\n\ntype Mutation {\n\tcreateUser(email: String!, password: String!): User\n\tcreateDraft(title: String!, content: String): Post\n\tdeletePost(id: ID!): Post\n\tpublish(id: ID!): Post\n}\n\ntype Post {\n\tid: ID!\n\tpublished: Boolean!\n\ttitle: String!\n\tcontent: String!\n}\n\ntype User {\n\tid: ID!\n\temail: String!\n\tpassword: String!\n}\n"
  },
  {
    "path": "prisma-crud/src/utils.ts",
    "content": "import { Prisma } from './generated/prisma-client'\n\nexport interface Context {\n  prisma: Prisma\n}\n"
  },
  {
    "path": "prisma-crud/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"target\": \"es5\",\n    \"moduleResolution\": \"node\",\n    \"module\": \"commonjs\",\n    \"sourceMap\": true,\n    \"rootDir\": \"src\",\n    \"outDir\": \"dist\",\n    \"lib\": [\n      \"esnext\", \"dom\"\n    ]\n  }\n}\n"
  },
  {
    "path": "renovate.json",
    "content": "{\n  \"extends\": [\n    \"config:base\", \":disableDependencyDashboard\"\n  ]\n}\n"
  }
]