This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated file | |
// Option 1 | |
import { createSDK as createBaseSDK, type Options } from '@strapi/sdk-js' | |
export const schema = // generated | |
export const createSDK = (options: Options) => { | |
return createBaseSDK(options, schema) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const draftAndPublishSync = require('@strapi/strapi/lib/migrations/draft-publish'); | |
const { hasDraftAndPublish } = require('@strapi/utils').contentTypes; | |
module.exports = { | |
/** | |
* An asynchronous register function that runs before | |
* your application is initialized. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require("lodash"); | |
const { defineAbility, an } = require("@casl/ability"); | |
const { permittedFieldsOf } = require("@casl/ability/extra"); | |
function Article(attrs) { | |
Object.assign(this, attrs); | |
} | |
const user = { | |
id: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import "./App.css"; | |
import { ApolloProvider } from "@apollo/react-hooks"; | |
import gql from "graphql-tag"; | |
import { ApolloClient } from "apollo-client"; | |
import { createUploadLink } from "apollo-upload-client"; | |
import { InMemoryCache } from "apollo-cache-inmemory"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import "./App.css"; | |
import { ApolloProvider } from "@apollo/react-hooks"; | |
import gql from "graphql-tag"; | |
import { ApolloClient } from "apollo-client"; | |
import { createUploadLink } from "apollo-upload-client"; | |
import { InMemoryCache } from "apollo-cache-inmemory"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* Auth.js controller | |
* | |
* @description: A set of functions called "actions" for managing `Auth`. | |
*/ | |
/* eslint-disable no-useless-escape */ | |
const crypto = require('crypto'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import axios from 'axios'; | |
import './App.css'; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
images: [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10.16.0-alpine | |
RUN apk --no-cache add --virtual native-deps \ | |
g++ gcc libgcc libstdc++ linux-headers autoconf automake make nasm python git && \ | |
npm install --unsafe-perm --quiet node-gyp -g | |
RUN apk add --no-cache build-base binutils binutils-doc gcc-doc libtool imagemagick imagemagick-dev lcms2 fontconfig freetype zlib-dev | |
RUN npm install --unsafe-perm -g node-sass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ESClient from './modules/elasticsearch'; | |
const { Provider, Consumer } = React.createContext(); | |
class ES extends React.Component { | |
constructor(props) { | |
super(props); | |
this.client = new ESClient({ index: this.props.index, type: this.props.type }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { observable, action, observe } from 'mobx'; | |
// you can also use class and decorators but that's not really important here | |
// STORES | |
const createTodo = title => | |
observable( | |
{ | |
id: uuid(), |
NewerOlder