@payloadcms/figma 0.1.0-alpha.10 → 0.1.0-alpha.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/control-plane.d.ts +11 -0
- package/dist/api/control-plane.js +26 -0
- package/dist/auth/headless-oauth-flow.js +4 -0
- package/dist/auth/oauth-flow.js +17 -0
- package/dist/auth/refresh.js +12 -12
- package/dist/auth/requested-scopes.d.ts +1 -0
- package/dist/auth/requested-scopes.js +3 -0
- package/dist/auth/token-store.d.ts +16 -0
- package/dist/auth/token-store.js +33 -0
- package/dist/auth/types.d.ts +5 -3
- package/dist/commands/bootstrap.js +3 -0
- package/dist/commands/init.js +71 -1
- package/dist/commands/upgrade.js +65 -1
- package/dist/commands/upload-schema.js +3 -4
- package/dist/config/oauth.js +6 -1
- package/dist/constants.d.ts +0 -2
- package/dist/constants.js +0 -3
- package/dist/db-content-api/utilities/data/index.js +6 -0
- package/dist/db-content-api/utilities/schema/buildDocumentSchema.js +9 -4
- package/dist/plugin/build-config.d.ts +9 -1
- package/dist/plugin/build-config.js +158 -17
- package/dist/plugin/cloud-limits/CloudLimitModal/index.d.ts +2 -1
- package/dist/plugin/cloud-limits/icons/ExternalLinkIcon.d.ts +2 -1
- package/dist/storage-content-api/api-types.d.ts +5 -2
- package/dist/storage-content-api/buildBaseMediaResponseHeaders.d.ts +1 -0
- package/dist/storage-content-api/buildBaseMediaResponseHeaders.js +8 -0
- package/dist/storage-content-api/buildClientUploadFetchBackHeaders.d.ts +12 -0
- package/dist/storage-content-api/buildClientUploadFetchBackHeaders.js +26 -0
- package/dist/storage-content-api/buildMediaRequestHeaders.d.ts +1 -0
- package/dist/storage-content-api/buildMediaRequestHeaders.js +14 -0
- package/dist/storage-content-api/buildMediaResponseHeaders.d.ts +4 -0
- package/dist/storage-content-api/buildMediaResponseHeaders.js +52 -0
- package/dist/storage-content-api/client-uploads/generate.d.ts +7 -3
- package/dist/storage-content-api/client-uploads/generate.js +20 -20
- package/dist/storage-content-api/copyFile.d.ts +16 -0
- package/dist/storage-content-api/copyFile.js +90 -0
- package/dist/storage-content-api/deleteFile.d.ts +8 -0
- package/dist/storage-content-api/deleteFile.js +18 -0
- package/dist/storage-content-api/getDownloadResponseHeaderPolicy.d.ts +3 -3
- package/dist/storage-content-api/getDownloadResponseHeaderPolicy.js +10 -4
- package/dist/storage-content-api/getMediaType.d.ts +1 -0
- package/dist/storage-content-api/getMediaType.js +3 -0
- package/dist/storage-content-api/handleUpload.d.ts +1 -2
- package/dist/storage-content-api/handleUpload.js +13 -157
- package/dist/storage-content-api/hasSupportedContentEncoding.d.ts +1 -0
- package/dist/storage-content-api/hasSupportedContentEncoding.js +6 -0
- package/dist/storage-content-api/index.js +16 -8
- package/dist/storage-content-api/mediaErrorResponse.d.ts +1 -0
- package/dist/storage-content-api/mediaErrorResponse.js +12 -0
- package/dist/storage-content-api/shouldAttachMedia.d.ts +1 -0
- package/dist/storage-content-api/shouldAttachMedia.js +34 -0
- package/dist/storage-content-api/staticHandler.d.ts +2 -1
- package/dist/storage-content-api/staticHandler.js +85 -31
- package/dist/storage-content-api/uploadFileData.d.ts +10 -0
- package/dist/storage-content-api/uploadFileData.js +145 -0
- package/dist/utils/cache-bootstrap.js +1 -0
- package/dist/utils/env-management.d.ts +15 -0
- package/dist/utils/env-management.js +47 -0
- package/dist/utils/load-payload-config.js +1 -6
- package/dist/utils/payload-config-ast.d.ts +5 -0
- package/dist/utils/payload-config-ast.js +73 -4
- package/dist/utils/payload-config-modifier.js +3 -0
- package/dist/utils/payload-secret.d.ts +28 -0
- package/dist/utils/payload-secret.js +34 -0
- package/package.json +15 -13
- package/dist/storage-content-api/handleDelete.d.ts +0 -7
- package/dist/storage-content-api/handleDelete.js +0 -15
- package/dist/storage-content-api/utilities/getSafeFilename.d.ts +0 -11
- package/dist/storage-content-api/utilities/getSafeFilename.js +0 -59
- package/dist/storage-content-api/utilities/index.d.ts +0 -2
- package/dist/storage-content-api/utilities/index.js +0 -2
- package/dist/storage-content-api/utilities/parseUploadReference.d.ts +0 -17
- package/dist/storage-content-api/utilities/parseUploadReference.js +0 -27
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shape of the `uploadReference` this adapter attaches to client-uploaded files
|
|
3
|
-
* (via the `generate` upload-instructions handler). Payload exposes it as
|
|
4
|
-
* `unknown`, so it must be narrowed at runtime before use.
|
|
5
|
-
*/
|
|
6
|
-
export type ContentApiUploadReference = {
|
|
7
|
-
clientUploaded?: boolean;
|
|
8
|
-
filename?: string;
|
|
9
|
-
mimeType?: string;
|
|
10
|
-
prefix?: string;
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* Safely narrows an `unknown` uploadReference into the adapter's known shape,
|
|
14
|
-
* keeping only properties present with the expected type. Returns an empty
|
|
15
|
-
* object for any non-object input.
|
|
16
|
-
*/
|
|
17
|
-
export declare const parseUploadReference: (reference: unknown) => ContentApiUploadReference;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shape of the `uploadReference` this adapter attaches to client-uploaded files
|
|
3
|
-
* (via the `generate` upload-instructions handler). Payload exposes it as
|
|
4
|
-
* `unknown`, so it must be narrowed at runtime before use.
|
|
5
|
-
*/ /**
|
|
6
|
-
* Safely narrows an `unknown` uploadReference into the adapter's known shape,
|
|
7
|
-
* keeping only properties present with the expected type. Returns an empty
|
|
8
|
-
* object for any non-object input.
|
|
9
|
-
*/ export const parseUploadReference = (reference)=>{
|
|
10
|
-
if (!reference || typeof reference !== 'object') {
|
|
11
|
-
return {};
|
|
12
|
-
}
|
|
13
|
-
const result = {};
|
|
14
|
-
if ('clientUploaded' in reference && typeof reference.clientUploaded === 'boolean') {
|
|
15
|
-
result.clientUploaded = reference.clientUploaded;
|
|
16
|
-
}
|
|
17
|
-
if ('filename' in reference && typeof reference.filename === 'string') {
|
|
18
|
-
result.filename = reference.filename;
|
|
19
|
-
}
|
|
20
|
-
if ('mimeType' in reference && typeof reference.mimeType === 'string') {
|
|
21
|
-
result.mimeType = reference.mimeType;
|
|
22
|
-
}
|
|
23
|
-
if ('prefix' in reference && typeof reference.prefix === 'string') {
|
|
24
|
-
result.prefix = reference.prefix;
|
|
25
|
-
}
|
|
26
|
-
return result;
|
|
27
|
-
};
|