I hereby claim:
- I am sdjnes on github.
- I am sdjnes (https://keybase.io/sdjnes) on keybase.
- I have a public key ASCnn76ia73Yj0u3bSoewEbihzet8qUSS0xV9HDQDrh4QQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
{ | |
"slate": { | |
"50": "#F8FAFC", | |
"100": "#F1F5F9", | |
"200": "#E2E8F0", | |
"300": "#CBD5E1", | |
"400": "#94A3B8", | |
"500": "#64748B", | |
"600": "#475569", | |
"700": "#334155", |
#!/bin/bash | |
GITHUB_ORG="" | |
GITHUB_REPO="" | |
# If the commit message contains [skip ci] then don't run | |
if [[ "$VERCEL_GIT_COMMIT_MESSAGE" == *"[skip ci]"* ]]; then | |
echo "⏭️ skipping ([skip ci] in commit message)" | |
exit 0 | |
fi |
The @payloadcms/plugin-cloud-storage
allows you to upload files from Payload collections to a Google Cloud Storage bucket.
It relies on Node APIs that are not available in the browser.
The payload.config.ts is used by both the server of Payload and the frontend for the webpack build.
The GCS adapter for this plugin relies on the @google-cloud/storage
which calls the Node APIs for processing and uploading files.
When you add this plugin to your payload.config.ts, and a collection uses a gcpAdapter, it will automatically extend your webpack config with the following (see: https://github.com/payloadcms/plugin-cloud-storage/blob/master/src/adapters/gcs/webpack.ts):
const { Octokit } = require('@octokit/action'); | |
const core = require('@actions/core'); | |
const github = require('@actions/github'); | |
const { execSync } = require('child_process'); | |
const { | |
runId, | |
repo: { repo, owner }, | |
eventName, | |
} = github.context; |
// To use it, you simply define a Modal and then render it | |
type MyComponentProps = { | |
description: string; | |
links: Array<{ href: string, label: string}> | |
} | |
const MyComponent = (props: MyComponentProps) => ... | |
const Page = () => { |
import { User } from 'payload/dist/auth'; | |
import { Access, AccessArgs, FieldAccess } from 'payload/types'; | |
type CheckerArgs = { | |
user?: User; | |
id?: string | number; | |
}; | |
type Checker = (args: CheckerArgs) => boolean; | |
const isAdmin: Checker = ({ user }) => user?.role && user?.role === 'admin'; |
import payload from 'payload'; | |
import { CollectionBeforeDeleteHook } from 'payload/types'; | |
/** | |
* A very inefficient function to prevent deletion of items when they are referenced in other collections | |
* | |
* This should be replaced when Payload implement this feature natively, or provide additional data that we can use | |
* to implement this more efficiently. | |
* | |
* It is on their roadmap (https://github.com/payloadcms/payload/discussions/2938) |