payload 4.0.0-internal.cd69eef → 4.0.0-internal.ce66a41
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/bin.js +17 -24
- package/dist/admin/RichText.d.ts +23 -1
- package/dist/admin/RichText.d.ts.map +1 -1
- package/dist/admin/RichText.js.map +1 -1
- package/dist/admin/adapters/devReload.d.ts +13 -0
- package/dist/admin/adapters/devReload.d.ts.map +1 -1
- package/dist/admin/adapters/devReload.js +14 -1
- package/dist/admin/adapters/devReload.js.map +1 -1
- package/dist/admin/fields/Array.d.ts +11 -13
- package/dist/admin/fields/Array.d.ts.map +1 -1
- package/dist/admin/fields/Array.js.map +1 -1
- package/dist/admin/fields/Blocks.d.ts +13 -16
- package/dist/admin/fields/Blocks.d.ts.map +1 -1
- package/dist/admin/fields/Blocks.js.map +1 -1
- package/dist/admin/fields/Checkbox.d.ts +11 -13
- package/dist/admin/fields/Checkbox.d.ts.map +1 -1
- package/dist/admin/fields/Checkbox.js.map +1 -1
- package/dist/admin/fields/Code.d.ts +11 -13
- package/dist/admin/fields/Code.d.ts.map +1 -1
- package/dist/admin/fields/Code.js.map +1 -1
- package/dist/admin/fields/Collapsible.d.ts +11 -13
- package/dist/admin/fields/Collapsible.d.ts.map +1 -1
- package/dist/admin/fields/Collapsible.js.map +1 -1
- package/dist/admin/fields/Date.d.ts +11 -13
- package/dist/admin/fields/Date.d.ts.map +1 -1
- package/dist/admin/fields/Date.js.map +1 -1
- package/dist/admin/fields/Email.d.ts +11 -13
- package/dist/admin/fields/Email.d.ts.map +1 -1
- package/dist/admin/fields/Email.js.map +1 -1
- package/dist/admin/fields/Group.d.ts +11 -13
- package/dist/admin/fields/Group.d.ts.map +1 -1
- package/dist/admin/fields/Group.js.map +1 -1
- package/dist/admin/fields/JSON.d.ts +11 -13
- package/dist/admin/fields/JSON.d.ts.map +1 -1
- package/dist/admin/fields/JSON.js.map +1 -1
- package/dist/admin/fields/Join.d.ts +12 -14
- package/dist/admin/fields/Join.d.ts.map +1 -1
- package/dist/admin/fields/Join.js.map +1 -1
- package/dist/admin/fields/Number.d.ts +11 -13
- package/dist/admin/fields/Number.d.ts.map +1 -1
- package/dist/admin/fields/Number.js.map +1 -1
- package/dist/admin/fields/Point.d.ts +11 -13
- package/dist/admin/fields/Point.d.ts.map +1 -1
- package/dist/admin/fields/Point.js.map +1 -1
- package/dist/admin/fields/Radio.d.ts +11 -13
- package/dist/admin/fields/Radio.d.ts.map +1 -1
- package/dist/admin/fields/Radio.js.map +1 -1
- package/dist/admin/fields/Relationship.d.ts +11 -13
- package/dist/admin/fields/Relationship.d.ts.map +1 -1
- package/dist/admin/fields/Relationship.js.map +1 -1
- package/dist/admin/fields/RichText.d.ts +13 -15
- package/dist/admin/fields/RichText.d.ts.map +1 -1
- package/dist/admin/fields/RichText.js.map +1 -1
- package/dist/admin/fields/Row.d.ts +10 -12
- package/dist/admin/fields/Row.d.ts.map +1 -1
- package/dist/admin/fields/Row.js.map +1 -1
- package/dist/admin/fields/Select.d.ts +11 -13
- package/dist/admin/fields/Select.d.ts.map +1 -1
- package/dist/admin/fields/Select.js.map +1 -1
- package/dist/admin/fields/Tabs.d.ts +11 -13
- package/dist/admin/fields/Tabs.d.ts.map +1 -1
- package/dist/admin/fields/Tabs.js.map +1 -1
- package/dist/admin/fields/Text.d.ts +11 -13
- package/dist/admin/fields/Text.d.ts.map +1 -1
- package/dist/admin/fields/Text.js.map +1 -1
- package/dist/admin/fields/Textarea.d.ts +11 -13
- package/dist/admin/fields/Textarea.d.ts.map +1 -1
- package/dist/admin/fields/Textarea.js.map +1 -1
- package/dist/admin/fields/UI.d.ts +3 -5
- package/dist/admin/fields/UI.d.ts.map +1 -1
- package/dist/admin/fields/UI.js.map +1 -1
- package/dist/admin/fields/Upload.d.ts +11 -13
- package/dist/admin/fields/Upload.d.ts.map +1 -1
- package/dist/admin/fields/Upload.js.map +1 -1
- package/dist/admin/forms/Description.d.ts +0 -2
- package/dist/admin/forms/Description.d.ts.map +1 -1
- package/dist/admin/forms/Description.js.map +1 -1
- package/dist/admin/forms/Diff.d.ts +0 -2
- package/dist/admin/forms/Diff.d.ts.map +1 -1
- package/dist/admin/forms/Diff.js.map +1 -1
- package/dist/admin/forms/Error.d.ts +0 -2
- package/dist/admin/forms/Error.d.ts.map +1 -1
- package/dist/admin/forms/Error.js.map +1 -1
- package/dist/admin/forms/Field.d.ts +4 -2
- package/dist/admin/forms/Field.d.ts.map +1 -1
- package/dist/admin/forms/Field.js.map +1 -1
- package/dist/admin/forms/Form.d.ts +2 -0
- package/dist/admin/forms/Form.d.ts.map +1 -1
- package/dist/admin/forms/Form.js.map +1 -1
- package/dist/admin/forms/Label.d.ts +2 -2
- package/dist/admin/forms/Label.d.ts.map +1 -1
- package/dist/admin/forms/Label.js.map +1 -1
- package/dist/admin/functions/index.d.ts +15 -11
- package/dist/admin/functions/index.d.ts.map +1 -1
- package/dist/admin/functions/index.js.map +1 -1
- package/dist/admin/getRequestLocale.d.ts +6 -0
- package/dist/admin/getRequestLocale.d.ts.map +1 -0
- package/dist/admin/getRequestLocale.js +38 -0
- package/dist/admin/getRequestLocale.js.map +1 -0
- package/dist/admin/initAdminContext.d.ts +39 -0
- package/dist/admin/initAdminContext.d.ts.map +1 -0
- package/dist/admin/initAdminContext.js +154 -0
- package/dist/admin/initAdminContext.js.map +1 -0
- package/dist/admin/types.d.ts +32 -32
- package/dist/admin/types.d.ts.map +1 -1
- package/dist/admin/types.js.map +1 -1
- package/dist/admin/views/dashboard.d.ts +2 -2
- package/dist/admin/views/dashboard.d.ts.map +1 -1
- package/dist/admin/views/dashboard.js.map +1 -1
- package/dist/admin/views/index.d.ts +2 -2
- package/dist/admin/views/index.d.ts.map +1 -1
- package/dist/admin/views/index.js.map +1 -1
- package/dist/admin/views/list.d.ts +9 -0
- package/dist/admin/views/list.d.ts.map +1 -1
- package/dist/admin/views/list.js.map +1 -1
- package/dist/auth/applyUserReadAccess.d.ts +13 -0
- package/dist/auth/applyUserReadAccess.d.ts.map +1 -0
- package/dist/auth/applyUserReadAccess.js +41 -0
- package/dist/auth/applyUserReadAccess.js.map +1 -0
- package/dist/auth/baseFields/apiKey/canCreateOrUpdateAPIKey.d.ts +4 -0
- package/dist/auth/baseFields/apiKey/canCreateOrUpdateAPIKey.d.ts.map +1 -0
- package/dist/auth/baseFields/apiKey/canCreateOrUpdateAPIKey.js +20 -0
- package/dist/auth/baseFields/apiKey/canCreateOrUpdateAPIKey.js.map +1 -0
- package/dist/auth/baseFields/apiKey/encryptAPIKey.d.ts +4 -0
- package/dist/auth/baseFields/apiKey/encryptAPIKey.d.ts.map +1 -0
- package/dist/auth/baseFields/apiKey/encryptAPIKey.js +11 -0
- package/dist/auth/baseFields/apiKey/encryptAPIKey.js.map +1 -0
- package/dist/auth/baseFields/apiKey/getAPIKeyLast4.d.ts +3 -0
- package/dist/auth/baseFields/apiKey/getAPIKeyLast4.d.ts.map +1 -0
- package/dist/auth/baseFields/apiKey/getAPIKeyLast4.js +5 -0
- package/dist/auth/baseFields/apiKey/getAPIKeyLast4.js.map +1 -0
- package/dist/auth/baseFields/apiKey/omitAPIKey.d.ts +5 -0
- package/dist/auth/baseFields/apiKey/omitAPIKey.d.ts.map +1 -0
- package/dist/auth/baseFields/apiKey/omitAPIKey.js +11 -0
- package/dist/auth/baseFields/apiKey/omitAPIKey.js.map +1 -0
- package/dist/auth/baseFields/apiKey/omitAPIKeyIndex.d.ts +4 -0
- package/dist/auth/baseFields/apiKey/omitAPIKeyIndex.d.ts.map +1 -0
- package/dist/auth/baseFields/apiKey/omitAPIKeyIndex.js +5 -0
- package/dist/auth/baseFields/apiKey/omitAPIKeyIndex.js.map +1 -0
- package/dist/auth/baseFields/apiKey/omitEncryptedAPIKey.d.ts +4 -0
- package/dist/auth/baseFields/apiKey/omitEncryptedAPIKey.d.ts.map +1 -0
- package/dist/auth/baseFields/apiKey/omitEncryptedAPIKey.js +5 -0
- package/dist/auth/baseFields/apiKey/omitEncryptedAPIKey.js.map +1 -0
- package/dist/auth/baseFields/apiKey/setAPIKeyIndex.d.ts +4 -0
- package/dist/auth/baseFields/apiKey/setAPIKeyIndex.d.ts.map +1 -0
- package/dist/auth/baseFields/apiKey/setAPIKeyIndex.js +12 -0
- package/dist/auth/baseFields/apiKey/setAPIKeyIndex.js.map +1 -0
- package/dist/auth/baseFields/apiKey/setKeyLast4.d.ts +4 -0
- package/dist/auth/baseFields/apiKey/setKeyLast4.d.ts.map +1 -0
- package/dist/auth/baseFields/apiKey/setKeyLast4.js +12 -0
- package/dist/auth/baseFields/apiKey/setKeyLast4.js.map +1 -0
- package/dist/auth/baseFields/apiKey.d.ts +6 -6
- package/dist/auth/baseFields/apiKey.d.ts.map +1 -1
- package/dist/auth/baseFields/apiKey.js +88 -57
- package/dist/auth/baseFields/apiKey.js.map +1 -1
- package/dist/auth/baseFields/auth.d.ts +1 -0
- package/dist/auth/baseFields/auth.d.ts.map +1 -1
- package/dist/auth/baseFields/auth.js +9 -0
- package/dist/auth/baseFields/auth.js.map +1 -1
- package/dist/auth/crypto.d.ts +73 -2
- package/dist/auth/crypto.d.ts.map +1 -1
- package/dist/auth/crypto.js +90 -13
- package/dist/auth/crypto.js.map +1 -1
- package/dist/auth/defaultUnlockAccess.d.ts +3 -0
- package/dist/auth/defaultUnlockAccess.d.ts.map +1 -0
- package/dist/auth/defaultUnlockAccess.js +8 -0
- package/dist/auth/defaultUnlockAccess.js.map +1 -0
- package/dist/auth/endpoints/index.d.ts +1 -0
- package/dist/auth/endpoints/index.d.ts.map +1 -1
- package/dist/auth/endpoints/index.js +8 -0
- package/dist/auth/endpoints/index.js.map +1 -1
- package/dist/auth/endpoints/login.d.ts.map +1 -1
- package/dist/auth/endpoints/login.js +2 -11
- package/dist/auth/endpoints/login.js.map +1 -1
- package/dist/auth/endpoints/refresh.d.ts.map +1 -1
- package/dist/auth/endpoints/refresh.js +4 -6
- package/dist/auth/endpoints/refresh.js.map +1 -1
- package/dist/auth/endpoints/revealAPIKey.d.ts +7 -0
- package/dist/auth/endpoints/revealAPIKey.d.ts.map +1 -0
- package/dist/auth/endpoints/revealAPIKey.js +122 -0
- package/dist/auth/endpoints/revealAPIKey.js.map +1 -0
- package/dist/auth/executeAccess.d.ts +2 -1
- package/dist/auth/executeAccess.d.ts.map +1 -1
- package/dist/auth/executeAccess.js +2 -1
- package/dist/auth/executeAccess.js.map +1 -1
- package/dist/auth/getAccessResults.js +1 -0
- package/dist/auth/getAccessResults.js.map +1 -1
- package/dist/auth/getAuthFields.d.ts +1 -1
- package/dist/auth/getAuthFields.d.ts.map +1 -1
- package/dist/auth/getAuthFields.js +7 -4
- package/dist/auth/getAuthFields.js.map +1 -1
- package/dist/auth/getFieldsToSign.d.ts.map +1 -1
- package/dist/auth/getFieldsToSign.js +20 -10
- package/dist/auth/getFieldsToSign.js.map +1 -1
- package/dist/auth/getLoginOptions.js.map +1 -1
- package/dist/auth/jwt.d.ts.map +1 -1
- package/dist/auth/jwt.js +2 -0
- package/dist/auth/jwt.js.map +1 -1
- package/dist/auth/jwtAuth.d.ts +9 -0
- package/dist/auth/jwtAuth.d.ts.map +1 -0
- package/dist/auth/jwtAuth.js +8 -0
- package/dist/auth/jwtAuth.js.map +1 -0
- package/dist/auth/loginWithCookie.d.ts +33 -0
- package/dist/auth/loginWithCookie.d.ts.map +1 -0
- package/dist/auth/loginWithCookie.js +34 -0
- package/dist/auth/loginWithCookie.js.map +1 -0
- package/dist/auth/operations/access.d.ts.map +1 -1
- package/dist/auth/operations/access.js +3 -9
- package/dist/auth/operations/access.js.map +1 -1
- package/dist/auth/operations/auth.d.ts.map +1 -1
- package/dist/auth/operations/auth.js +16 -21
- package/dist/auth/operations/auth.js.map +1 -1
- package/dist/auth/operations/forgotPassword.d.ts.map +1 -1
- package/dist/auth/operations/forgotPassword.js +97 -14
- package/dist/auth/operations/forgotPassword.js.map +1 -1
- package/dist/auth/operations/local/auth.js +7 -4
- package/dist/auth/operations/local/auth.js.map +1 -1
- package/dist/auth/operations/local/forgotPassword.d.ts +2 -2
- package/dist/auth/operations/local/forgotPassword.d.ts.map +1 -1
- package/dist/auth/operations/local/forgotPassword.js +6 -3
- package/dist/auth/operations/local/forgotPassword.js.map +1 -1
- package/dist/auth/operations/local/login.d.ts +2 -2
- package/dist/auth/operations/local/login.d.ts.map +1 -1
- package/dist/auth/operations/local/login.js +6 -3
- package/dist/auth/operations/local/login.js.map +1 -1
- package/dist/auth/operations/local/resetPassword.js +5 -2
- package/dist/auth/operations/local/resetPassword.js.map +1 -1
- package/dist/auth/operations/local/unlock.d.ts +2 -2
- package/dist/auth/operations/local/unlock.d.ts.map +1 -1
- package/dist/auth/operations/local/unlock.js +6 -3
- package/dist/auth/operations/local/unlock.js.map +1 -1
- package/dist/auth/operations/local/verifyEmail.js +5 -2
- package/dist/auth/operations/local/verifyEmail.js.map +1 -1
- package/dist/auth/operations/login.d.ts.map +1 -1
- package/dist/auth/operations/login.js +48 -26
- package/dist/auth/operations/login.js.map +1 -1
- package/dist/auth/operations/me.d.ts +0 -7
- package/dist/auth/operations/me.d.ts.map +1 -1
- package/dist/auth/operations/me.js +0 -6
- package/dist/auth/operations/me.js.map +1 -1
- package/dist/auth/operations/refresh.d.ts +0 -7
- package/dist/auth/operations/refresh.d.ts.map +1 -1
- package/dist/auth/operations/refresh.js +32 -15
- package/dist/auth/operations/refresh.js.map +1 -1
- package/dist/auth/operations/registerFirstUser.d.ts.map +1 -1
- package/dist/auth/operations/registerFirstUser.js +4 -4
- package/dist/auth/operations/registerFirstUser.js.map +1 -1
- package/dist/auth/operations/resetPassword.d.ts.map +1 -1
- package/dist/auth/operations/resetPassword.js +31 -22
- package/dist/auth/operations/resetPassword.js.map +1 -1
- package/dist/auth/operations/unlock.d.ts.map +1 -1
- package/dist/auth/operations/unlock.js +1 -0
- package/dist/auth/operations/unlock.js.map +1 -1
- package/dist/auth/rotateSecret.d.ts +51 -0
- package/dist/auth/rotateSecret.d.ts.map +1 -0
- package/dist/auth/rotateSecret.js +131 -0
- package/dist/auth/rotateSecret.js.map +1 -0
- package/dist/auth/serverFunctions/cookies.d.ts +47 -0
- package/dist/auth/serverFunctions/cookies.d.ts.map +1 -0
- package/dist/auth/serverFunctions/cookies.js +52 -0
- package/dist/auth/serverFunctions/cookies.js.map +1 -0
- package/dist/auth/serverFunctions/login.d.ts +29 -0
- package/dist/auth/serverFunctions/login.d.ts.map +1 -0
- package/dist/auth/serverFunctions/login.js +65 -0
- package/dist/auth/serverFunctions/login.js.map +1 -0
- package/dist/auth/serverFunctions/logout.d.ts +17 -0
- package/dist/auth/serverFunctions/logout.d.ts.map +1 -0
- package/dist/auth/serverFunctions/logout.js +59 -0
- package/dist/auth/serverFunctions/logout.js.map +1 -0
- package/dist/auth/serverFunctions/refresh.d.ts +17 -0
- package/dist/auth/serverFunctions/refresh.d.ts.map +1 -0
- package/dist/auth/serverFunctions/refresh.js +62 -0
- package/dist/auth/serverFunctions/refresh.js.map +1 -0
- package/dist/auth/strategies/apiKey.d.ts.map +1 -1
- package/dist/auth/strategies/apiKey.js +42 -4
- package/dist/auth/strategies/apiKey.js.map +1 -1
- package/dist/auth/strategies/jwt.d.ts.map +1 -1
- package/dist/auth/strategies/jwt.js +83 -11
- package/dist/auth/strategies/jwt.js.map +1 -1
- package/dist/auth/strategies/local/authenticate.d.ts +5 -1
- package/dist/auth/strategies/local/authenticate.d.ts.map +1 -1
- package/dist/auth/strategies/local/authenticate.js +8 -3
- package/dist/auth/strategies/local/authenticate.js.map +1 -1
- package/dist/auth/strategies/local/generatePasswordSaltHash.d.ts +9 -1
- package/dist/auth/strategies/local/generatePasswordSaltHash.d.ts.map +1 -1
- package/dist/auth/strategies/local/generatePasswordSaltHash.js +61 -34
- package/dist/auth/strategies/local/generatePasswordSaltHash.js.map +1 -1
- package/dist/auth/strategies/local/register.d.ts.map +1 -1
- package/dist/auth/strategies/local/register.js +1 -0
- package/dist/auth/strategies/local/register.js.map +1 -1
- package/dist/auth/types.d.ts +36 -20
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/auth/withBaseAccess.d.ts +22 -0
- package/dist/auth/withBaseAccess.d.ts.map +1 -0
- package/dist/auth/withBaseAccess.js +61 -0
- package/dist/auth/withBaseAccess.js.map +1 -0
- package/dist/{bin → cli/commands/build}/build.d.ts +8 -13
- package/dist/cli/commands/build/build.d.ts.map +1 -0
- package/dist/{bin → cli/commands/build}/build.js +26 -27
- package/dist/cli/commands/build/build.js.map +1 -0
- package/dist/cli/commands/build/index.d.ts +2 -0
- package/dist/cli/commands/build/index.d.ts.map +1 -0
- package/dist/cli/commands/build/index.js +26 -0
- package/dist/cli/commands/build/index.js.map +1 -0
- package/dist/cli/commands/collections/countDocuments.d.ts +2 -0
- package/dist/cli/commands/collections/countDocuments.d.ts.map +1 -0
- package/dist/cli/commands/collections/countDocuments.js +37 -0
- package/dist/cli/commands/collections/countDocuments.js.map +1 -0
- package/dist/cli/commands/collections/countVersions.d.ts +2 -0
- package/dist/cli/commands/collections/countVersions.d.ts.map +1 -0
- package/dist/cli/commands/collections/countVersions.js +36 -0
- package/dist/cli/commands/collections/countVersions.js.map +1 -0
- package/dist/cli/commands/collections/createDocuments.d.ts +2 -0
- package/dist/cli/commands/collections/createDocuments.d.ts.map +1 -0
- package/dist/cli/commands/collections/createDocuments.js +132 -0
- package/dist/cli/commands/collections/createDocuments.js.map +1 -0
- package/dist/cli/commands/collections/deleteDocuments.d.ts +2 -0
- package/dist/cli/commands/collections/deleteDocuments.d.ts.map +1 -0
- package/dist/cli/commands/collections/deleteDocuments.js +64 -0
- package/dist/cli/commands/collections/deleteDocuments.js.map +1 -0
- package/dist/cli/commands/collections/duplicateDocument.d.ts +2 -0
- package/dist/cli/commands/collections/duplicateDocument.d.ts.map +1 -0
- package/dist/cli/commands/collections/duplicateDocument.js +109 -0
- package/dist/cli/commands/collections/duplicateDocument.js.map +1 -0
- package/dist/cli/commands/collections/findDistinct.d.ts +2 -0
- package/dist/cli/commands/collections/findDistinct.d.ts.map +1 -0
- package/dist/cli/commands/collections/findDistinct.js +52 -0
- package/dist/cli/commands/collections/findDistinct.js.map +1 -0
- package/dist/cli/commands/collections/findDocuments.d.ts +2 -0
- package/dist/cli/commands/collections/findDocuments.d.ts.map +1 -0
- package/dist/cli/commands/collections/findDocuments.js +79 -0
- package/dist/cli/commands/collections/findDocuments.js.map +1 -0
- package/dist/cli/commands/collections/findVersionByID.d.ts +2 -0
- package/dist/cli/commands/collections/findVersionByID.d.ts.map +1 -0
- package/dist/cli/commands/collections/findVersionByID.js +48 -0
- package/dist/cli/commands/collections/findVersionByID.js.map +1 -0
- package/dist/cli/commands/collections/findVersions.d.ts +2 -0
- package/dist/cli/commands/collections/findVersions.d.ts.map +1 -0
- package/dist/cli/commands/collections/findVersions.js +57 -0
- package/dist/cli/commands/collections/findVersions.js.map +1 -0
- package/dist/cli/commands/collections/getCollectionSchema.d.ts +2 -0
- package/dist/cli/commands/collections/getCollectionSchema.d.ts.map +1 -0
- package/dist/cli/commands/collections/getCollectionSchema.js +61 -0
- package/dist/cli/commands/collections/getCollectionSchema.js.map +1 -0
- package/dist/cli/commands/collections/restoreVersion.d.ts +2 -0
- package/dist/cli/commands/collections/restoreVersion.d.ts.map +1 -0
- package/dist/cli/commands/collections/restoreVersion.js +47 -0
- package/dist/cli/commands/collections/restoreVersion.js.map +1 -0
- package/dist/cli/commands/collections/updateDocument.d.ts +2 -0
- package/dist/cli/commands/collections/updateDocument.d.ts.map +1 -0
- package/dist/cli/commands/collections/updateDocument.js +192 -0
- package/dist/cli/commands/collections/updateDocument.js.map +1 -0
- package/dist/cli/commands/data/input.d.ts +28 -0
- package/dist/cli/commands/data/input.d.ts.map +1 -0
- package/dist/cli/commands/data/input.js +76 -0
- package/dist/cli/commands/data/input.js.map +1 -0
- package/dist/cli/commands/data/utilities.d.ts +65 -0
- package/dist/cli/commands/data/utilities.d.ts.map +1 -0
- package/dist/cli/commands/data/utilities.js +67 -0
- package/dist/cli/commands/data/utilities.js.map +1 -0
- package/dist/cli/commands/generateDBSchema.d.ts +2 -0
- package/dist/cli/commands/generateDBSchema.d.ts.map +1 -0
- package/dist/cli/commands/generateDBSchema.js +29 -0
- package/dist/cli/commands/generateDBSchema.js.map +1 -0
- package/dist/cli/commands/generateImportMap/frameworkConventions.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/frameworkConventions.js.map +1 -0
- package/dist/{bin/generateImportMap/index.d.ts → cli/commands/generateImportMap/generateImportMap.d.ts} +8 -4
- package/dist/cli/commands/generateImportMap/generateImportMap.d.ts.map +1 -0
- package/dist/{bin/generateImportMap/index.js → cli/commands/generateImportMap/generateImportMap.js} +9 -4
- package/dist/cli/commands/generateImportMap/generateImportMap.js.map +1 -0
- package/dist/cli/commands/generateImportMap/index.d.ts +2 -0
- package/dist/cli/commands/generateImportMap/index.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/index.js +18 -0
- package/dist/cli/commands/generateImportMap/index.js.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/iterateCollections.d.ts +3 -3
- package/dist/cli/commands/generateImportMap/iterateCollections.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/iterateCollections.js.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/iterateConfig.d.ts +2 -2
- package/dist/cli/commands/generateImportMap/iterateConfig.d.ts.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/iterateConfig.js +1 -1
- package/dist/cli/commands/generateImportMap/iterateConfig.js.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/iterateFields.d.ts +3 -3
- package/dist/cli/commands/generateImportMap/iterateFields.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/iterateFields.js.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/iterateGlobals.d.ts +3 -3
- package/dist/cli/commands/generateImportMap/iterateGlobals.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/iterateGlobals.js.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/utilities/addPayloadComponentToImportMap.d.ts +2 -2
- package/dist/cli/commands/generateImportMap/utilities/addPayloadComponentToImportMap.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/utilities/addPayloadComponentToImportMap.js.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/utilities/getFromImportMap.d.ts +2 -2
- package/dist/cli/commands/generateImportMap/utilities/getFromImportMap.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/utilities/getFromImportMap.js.map +1 -0
- package/dist/cli/commands/generateImportMap/utilities/getImportMapToBaseDirPath.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/utilities/getImportMapToBaseDirPath.js.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/utilities/parsePayloadComponent.d.ts +1 -1
- package/dist/cli/commands/generateImportMap/utilities/parsePayloadComponent.d.ts.map +1 -0
- package/dist/cli/commands/generateImportMap/utilities/parsePayloadComponent.js.map +1 -0
- package/dist/cli/commands/generateImportMap/utilities/resolveImportMapFilePath.d.ts.map +1 -0
- package/dist/{bin → cli/commands}/generateImportMap/utilities/resolveImportMapFilePath.js +1 -1
- package/dist/cli/commands/generateImportMap/utilities/resolveImportMapFilePath.js.map +1 -0
- package/dist/cli/commands/generateTypes.d.ts +12 -0
- package/dist/cli/commands/generateTypes.d.ts.map +1 -0
- package/dist/{bin → cli/commands}/generateTypes.js +33 -7
- package/dist/cli/commands/generateTypes.js.map +1 -0
- package/dist/cli/commands/getConfigInfo.d.ts +2 -0
- package/dist/cli/commands/getConfigInfo.d.ts.map +1 -0
- package/dist/cli/commands/getConfigInfo.js +23 -0
- package/dist/cli/commands/getConfigInfo.js.map +1 -0
- package/dist/cli/commands/globals/countGlobalVersions.d.ts +2 -0
- package/dist/cli/commands/globals/countGlobalVersions.d.ts.map +1 -0
- package/dist/cli/commands/globals/countGlobalVersions.js +36 -0
- package/dist/cli/commands/globals/countGlobalVersions.js.map +1 -0
- package/dist/cli/commands/globals/findGlobal.d.ts +2 -0
- package/dist/cli/commands/globals/findGlobal.d.ts.map +1 -0
- package/dist/cli/commands/globals/findGlobal.js +42 -0
- package/dist/cli/commands/globals/findGlobal.js.map +1 -0
- package/dist/cli/commands/globals/findGlobalVersionByID.d.ts +2 -0
- package/dist/cli/commands/globals/findGlobalVersionByID.d.ts.map +1 -0
- package/dist/cli/commands/globals/findGlobalVersionByID.js +46 -0
- package/dist/cli/commands/globals/findGlobalVersionByID.js.map +1 -0
- package/dist/cli/commands/globals/findGlobalVersions.d.ts +2 -0
- package/dist/cli/commands/globals/findGlobalVersions.d.ts.map +1 -0
- package/dist/cli/commands/globals/findGlobalVersions.js +55 -0
- package/dist/cli/commands/globals/findGlobalVersions.js.map +1 -0
- package/dist/cli/commands/globals/getGlobalSchema.d.ts +2 -0
- package/dist/cli/commands/globals/getGlobalSchema.d.ts.map +1 -0
- package/dist/cli/commands/globals/getGlobalSchema.js +46 -0
- package/dist/cli/commands/globals/getGlobalSchema.js.map +1 -0
- package/dist/cli/commands/globals/restoreGlobalVersion.d.ts +2 -0
- package/dist/cli/commands/globals/restoreGlobalVersion.d.ts.map +1 -0
- package/dist/cli/commands/globals/restoreGlobalVersion.js +46 -0
- package/dist/cli/commands/globals/restoreGlobalVersion.js.map +1 -0
- package/dist/cli/commands/globals/updateGlobal.d.ts +2 -0
- package/dist/cli/commands/globals/updateGlobal.d.ts.map +1 -0
- package/dist/cli/commands/globals/updateGlobal.js +95 -0
- package/dist/cli/commands/globals/updateGlobal.js.map +1 -0
- package/dist/cli/commands/help.d.ts +2 -0
- package/dist/cli/commands/help.d.ts.map +1 -0
- package/dist/cli/commands/help.js +42 -0
- package/dist/cli/commands/help.js.map +1 -0
- package/dist/cli/commands/info.d.ts +2 -0
- package/dist/cli/commands/info.d.ts.map +1 -0
- package/dist/cli/commands/info.js +78 -0
- package/dist/cli/commands/info.js.map +1 -0
- package/dist/cli/commands/jobs/handleSchedules.d.ts +2 -0
- package/dist/cli/commands/jobs/handleSchedules.d.ts.map +1 -0
- package/dist/cli/commands/jobs/handleSchedules.js +17 -0
- package/dist/cli/commands/jobs/handleSchedules.js.map +1 -0
- package/dist/cli/commands/jobs/run.d.ts +2 -0
- package/dist/cli/commands/jobs/run.d.ts.map +1 -0
- package/dist/cli/commands/jobs/run.js +30 -0
- package/dist/cli/commands/jobs/run.js.map +1 -0
- package/dist/cli/commands/migrate/create.d.ts +2 -0
- package/dist/cli/commands/migrate/create.d.ts.map +1 -0
- package/dist/cli/commands/migrate/create.js +44 -0
- package/dist/cli/commands/migrate/create.js.map +1 -0
- package/dist/cli/commands/migrate/down.d.ts +2 -0
- package/dist/cli/commands/migrate/down.d.ts.map +1 -0
- package/dist/cli/commands/migrate/down.js +22 -0
- package/dist/cli/commands/migrate/down.js.map +1 -0
- package/dist/cli/commands/migrate/fresh.d.ts +2 -0
- package/dist/cli/commands/migrate/fresh.d.ts.map +1 -0
- package/dist/cli/commands/migrate/fresh.js +28 -0
- package/dist/cli/commands/migrate/fresh.js.map +1 -0
- package/dist/cli/commands/migrate/initialize.d.ts +11 -0
- package/dist/cli/commands/migrate/initialize.d.ts.map +1 -0
- package/dist/cli/commands/migrate/initialize.js +17 -0
- package/dist/cli/commands/migrate/initialize.js.map +1 -0
- package/dist/cli/commands/migrate/refresh.d.ts +2 -0
- package/dist/cli/commands/migrate/refresh.d.ts.map +1 -0
- package/dist/cli/commands/migrate/refresh.js +22 -0
- package/dist/cli/commands/migrate/refresh.js.map +1 -0
- package/dist/cli/commands/migrate/reset.d.ts +2 -0
- package/dist/cli/commands/migrate/reset.d.ts.map +1 -0
- package/dist/cli/commands/migrate/reset.js +22 -0
- package/dist/cli/commands/migrate/reset.js.map +1 -0
- package/dist/cli/commands/migrate/run.d.ts +2 -0
- package/dist/cli/commands/migrate/run.d.ts.map +1 -0
- package/dist/cli/commands/migrate/run.js +28 -0
- package/dist/cli/commands/migrate/run.js.map +1 -0
- package/dist/cli/commands/migrate/status.d.ts +2 -0
- package/dist/cli/commands/migrate/status.d.ts.map +1 -0
- package/dist/cli/commands/migrate/status.js +22 -0
- package/dist/cli/commands/migrate/status.js.map +1 -0
- package/dist/cli/commands/run.d.ts +2 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +45 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/defineCLICommand.d.ts +32 -0
- package/dist/cli/defineCLICommand.d.ts.map +1 -0
- package/dist/cli/defineCLICommand.js +26 -0
- package/dist/cli/defineCLICommand.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +95 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/program/createHelp.d.ts +8 -0
- package/dist/cli/program/createHelp.d.ts.map +1 -0
- package/dist/cli/program/createHelp.js +26 -0
- package/dist/cli/program/createHelp.js.map +1 -0
- package/dist/cli/program/loadCommands.d.ts +12 -0
- package/dist/cli/program/loadCommands.d.ts.map +1 -0
- package/dist/cli/program/loadCommands.js +62 -0
- package/dist/cli/program/loadCommands.js.map +1 -0
- package/dist/cli/program/normalizeHelpArguments.d.ts +12 -0
- package/dist/cli/program/normalizeHelpArguments.d.ts.map +1 -0
- package/dist/cli/program/normalizeHelpArguments.js +34 -0
- package/dist/cli/program/normalizeHelpArguments.js.map +1 -0
- package/dist/cli/program/registerCommand.d.ts +10 -0
- package/dist/cli/program/registerCommand.d.ts.map +1 -0
- package/dist/cli/program/registerCommand.js +185 -0
- package/dist/cli/program/registerCommand.js.map +1 -0
- package/dist/cli/runtime/createRuntime.d.ts +9 -0
- package/dist/cli/runtime/createRuntime.d.ts.map +1 -0
- package/dist/cli/runtime/createRuntime.js +81 -0
- package/dist/cli/runtime/createRuntime.js.map +1 -0
- package/dist/cli/runtime/getCommandInput.d.ts +17 -0
- package/dist/cli/runtime/getCommandInput.d.ts.map +1 -0
- package/dist/cli/runtime/getCommandInput.js +86 -0
- package/dist/cli/runtime/getCommandInput.js.map +1 -0
- package/dist/cli/runtime/invokeCommand.d.ts +23 -0
- package/dist/cli/runtime/invokeCommand.d.ts.map +1 -0
- package/dist/cli/runtime/invokeCommand.js +107 -0
- package/dist/cli/runtime/invokeCommand.js.map +1 -0
- package/dist/cli/runtime/loadEnv.d.ts.map +1 -0
- package/dist/{bin → cli/runtime}/loadEnv.js +1 -1
- package/dist/cli/runtime/loadEnv.js.map +1 -0
- package/dist/cli/runtime/output.d.ts +50 -0
- package/dist/cli/runtime/output.d.ts.map +1 -0
- package/dist/cli/runtime/output.js +125 -0
- package/dist/cli/runtime/output.js.map +1 -0
- package/dist/cli/runtime/redirectOutputToStderr.d.ts +8 -0
- package/dist/cli/runtime/redirectOutputToStderr.d.ts.map +1 -0
- package/dist/cli/runtime/redirectOutputToStderr.js +31 -0
- package/dist/cli/runtime/redirectOutputToStderr.js.map +1 -0
- package/dist/collections/config/client.d.ts +6 -6
- package/dist/collections/config/client.d.ts.map +1 -1
- package/dist/collections/config/client.js +12 -11
- package/dist/collections/config/client.js.map +1 -1
- package/dist/collections/config/defaults.d.ts +6 -4
- package/dist/collections/config/defaults.d.ts.map +1 -1
- package/dist/collections/config/defaults.js +49 -33
- package/dist/collections/config/defaults.js.map +1 -1
- package/dist/collections/config/sanitize.d.ts +4 -8
- package/dist/collections/config/sanitize.d.ts.map +1 -1
- package/dist/collections/config/sanitize.js +100 -28
- package/dist/collections/config/sanitize.js.map +1 -1
- package/dist/collections/config/types.d.ts +76 -51
- package/dist/collections/config/types.d.ts.map +1 -1
- package/dist/collections/config/types.js.map +1 -1
- package/dist/collections/config/useAsThumbnail.d.ts +6 -0
- package/dist/collections/config/useAsThumbnail.d.ts.map +1 -0
- package/dist/collections/config/useAsThumbnail.js +21 -0
- package/dist/collections/config/useAsThumbnail.js.map +1 -0
- package/dist/collections/endpoints/index.d.ts +1 -0
- package/dist/collections/endpoints/index.d.ts.map +1 -1
- package/dist/collections/endpoints/index.js +6 -5
- package/dist/collections/endpoints/index.js.map +1 -1
- package/dist/collections/operations/count.d.ts.map +1 -1
- package/dist/collections/operations/count.js +65 -70
- package/dist/collections/operations/count.js.map +1 -1
- package/dist/collections/operations/countVersions.d.ts.map +1 -1
- package/dist/collections/operations/countVersions.js +61 -66
- package/dist/collections/operations/countVersions.js.map +1 -1
- package/dist/collections/operations/create.d.ts.map +1 -1
- package/dist/collections/operations/create.js +144 -13
- package/dist/collections/operations/create.js.map +1 -1
- package/dist/collections/operations/delete.d.ts.map +1 -1
- package/dist/collections/operations/delete.js +215 -129
- package/dist/collections/operations/delete.js.map +1 -1
- package/dist/collections/operations/deleteByID.d.ts.map +1 -1
- package/dist/collections/operations/deleteByID.js +14 -13
- package/dist/collections/operations/deleteByID.js.map +1 -1
- package/dist/collections/operations/docAccess.d.ts.map +1 -1
- package/dist/collections/operations/docAccess.js +19 -25
- package/dist/collections/operations/docAccess.js.map +1 -1
- package/dist/collections/operations/find.d.ts.map +1 -1
- package/dist/collections/operations/find.js +248 -246
- package/dist/collections/operations/find.js.map +1 -1
- package/dist/collections/operations/findByID.d.ts.map +1 -1
- package/dist/collections/operations/findByID.js +258 -215
- package/dist/collections/operations/findByID.js.map +1 -1
- package/dist/collections/operations/findDistinct.d.ts.map +1 -1
- package/dist/collections/operations/findDistinct.js +235 -154
- package/dist/collections/operations/findDistinct.js.map +1 -1
- package/dist/collections/operations/findVersionByID.d.ts.map +1 -1
- package/dist/collections/operations/findVersionByID.js +145 -128
- package/dist/collections/operations/findVersionByID.js.map +1 -1
- package/dist/collections/operations/findVersions.d.ts.map +1 -1
- package/dist/collections/operations/findVersions.js +152 -149
- package/dist/collections/operations/findVersions.js.map +1 -1
- package/dist/collections/operations/inputSchemas.d.ts +877 -0
- package/dist/collections/operations/inputSchemas.d.ts.map +1 -0
- package/dist/collections/operations/inputSchemas.js +217 -0
- package/dist/collections/operations/inputSchemas.js.map +1 -0
- package/dist/collections/operations/local/count.d.ts +2 -7
- package/dist/collections/operations/local/count.d.ts.map +1 -1
- package/dist/collections/operations/local/count.js +6 -3
- package/dist/collections/operations/local/count.js.map +1 -1
- package/dist/collections/operations/local/countVersions.d.ts +2 -7
- package/dist/collections/operations/local/countVersions.d.ts.map +1 -1
- package/dist/collections/operations/local/countVersions.js +6 -3
- package/dist/collections/operations/local/countVersions.js.map +1 -1
- package/dist/collections/operations/local/create.d.ts +2 -7
- package/dist/collections/operations/local/create.d.ts.map +1 -1
- package/dist/collections/operations/local/create.js +6 -3
- package/dist/collections/operations/local/create.js.map +1 -1
- package/dist/collections/operations/local/delete.d.ts +2 -7
- package/dist/collections/operations/local/delete.d.ts.map +1 -1
- package/dist/collections/operations/local/delete.js +6 -3
- package/dist/collections/operations/local/delete.js.map +1 -1
- package/dist/collections/operations/local/duplicate.d.ts +2 -7
- package/dist/collections/operations/local/duplicate.d.ts.map +1 -1
- package/dist/collections/operations/local/duplicate.js +6 -3
- package/dist/collections/operations/local/duplicate.js.map +1 -1
- package/dist/collections/operations/local/find.d.ts +2 -7
- package/dist/collections/operations/local/find.d.ts.map +1 -1
- package/dist/collections/operations/local/find.js +6 -3
- package/dist/collections/operations/local/find.js.map +1 -1
- package/dist/collections/operations/local/findByID.d.ts +2 -7
- package/dist/collections/operations/local/findByID.d.ts.map +1 -1
- package/dist/collections/operations/local/findByID.js +6 -3
- package/dist/collections/operations/local/findByID.js.map +1 -1
- package/dist/collections/operations/local/findDistinct.d.ts +2 -7
- package/dist/collections/operations/local/findDistinct.d.ts.map +1 -1
- package/dist/collections/operations/local/findDistinct.js +6 -3
- package/dist/collections/operations/local/findDistinct.js.map +1 -1
- package/dist/collections/operations/local/findVersionByID.d.ts +2 -7
- package/dist/collections/operations/local/findVersionByID.d.ts.map +1 -1
- package/dist/collections/operations/local/findVersionByID.js +6 -3
- package/dist/collections/operations/local/findVersionByID.js.map +1 -1
- package/dist/collections/operations/local/findVersions.d.ts +2 -7
- package/dist/collections/operations/local/findVersions.d.ts.map +1 -1
- package/dist/collections/operations/local/findVersions.js +6 -3
- package/dist/collections/operations/local/findVersions.js.map +1 -1
- package/dist/collections/operations/local/restoreVersion.d.ts +2 -7
- package/dist/collections/operations/local/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/local/restoreVersion.js +6 -3
- package/dist/collections/operations/local/restoreVersion.js.map +1 -1
- package/dist/collections/operations/local/update.d.ts +2 -7
- package/dist/collections/operations/local/update.d.ts.map +1 -1
- package/dist/collections/operations/local/update.js +6 -3
- package/dist/collections/operations/local/update.js.map +1 -1
- package/dist/collections/operations/restoreVersion.d.ts.map +1 -1
- package/dist/collections/operations/restoreVersion.js +48 -13
- package/dist/collections/operations/restoreVersion.js.map +1 -1
- package/dist/collections/operations/update.d.ts.map +1 -1
- package/dist/collections/operations/update.js +148 -24
- package/dist/collections/operations/update.js.map +1 -1
- package/dist/collections/operations/updateByID.d.ts.map +1 -1
- package/dist/collections/operations/updateByID.js +80 -2
- package/dist/collections/operations/updateByID.js.map +1 -1
- package/dist/collections/operations/utilities/prefetchVersionForInheritedReadAccess.d.ts +15 -0
- package/dist/collections/operations/utilities/prefetchVersionForInheritedReadAccess.d.ts.map +1 -0
- package/dist/collections/operations/utilities/prefetchVersionForInheritedReadAccess.js +54 -0
- package/dist/collections/operations/utilities/prefetchVersionForInheritedReadAccess.js.map +1 -0
- package/dist/collections/operations/utilities/update.d.ts +2 -2
- package/dist/collections/operations/utilities/update.d.ts.map +1 -1
- package/dist/collections/operations/utilities/update.js +83 -19
- package/dist/collections/operations/utilities/update.js.map +1 -1
- package/dist/config/assertNoLegacySharpConfig.d.ts +21 -0
- package/dist/config/assertNoLegacySharpConfig.d.ts.map +1 -0
- package/dist/config/assertNoLegacySharpConfig.js +50 -0
- package/dist/config/assertNoLegacySharpConfig.js.map +1 -0
- package/dist/config/build.d.ts.map +1 -1
- package/dist/config/build.js +22 -1
- package/dist/config/build.js.map +1 -1
- package/dist/config/client.d.ts +2 -2
- package/dist/config/client.d.ts.map +1 -1
- package/dist/config/client.js +5 -6
- package/dist/config/client.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +98 -43
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/orderable/index.d.ts +1 -1
- package/dist/config/orderable/index.d.ts.map +1 -1
- package/dist/config/orderable/index.js +73 -16
- package/dist/config/orderable/index.js.map +1 -1
- package/dist/config/orderable/utils/getJoinScopeContext.d.ts.map +1 -1
- package/dist/config/orderable/utils/getJoinScopeContext.js +1 -0
- package/dist/config/orderable/utils/getJoinScopeContext.js.map +1 -1
- package/dist/config/orderable/utils/resolvePendingTargetKey.d.ts.map +1 -1
- package/dist/config/orderable/utils/resolvePendingTargetKey.js +1 -0
- package/dist/config/orderable/utils/resolvePendingTargetKey.js.map +1 -1
- package/dist/config/sanitize.d.ts +1 -1
- package/dist/config/sanitize.d.ts.map +1 -1
- package/dist/config/sanitize.js +98 -38
- package/dist/config/sanitize.js.map +1 -1
- package/dist/config/types.d.ts +527 -441
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/database/createDatabaseAdapter.d.ts +1 -1
- package/dist/database/createDatabaseAdapter.d.ts.map +1 -1
- package/dist/database/createDatabaseAdapter.js +4 -2
- package/dist/database/createDatabaseAdapter.js.map +1 -1
- package/dist/database/createSchemaBuildContext.d.ts +12 -0
- package/dist/database/createSchemaBuildContext.d.ts.map +1 -0
- package/dist/database/createSchemaBuildContext.js +24 -0
- package/dist/database/createSchemaBuildContext.js.map +1 -0
- package/dist/database/defaultBatchProcessing.d.ts +3 -0
- package/dist/database/defaultBatchProcessing.d.ts.map +1 -0
- package/dist/database/defaultBatchProcessing.js +93 -0
- package/dist/database/defaultBatchProcessing.js.map +1 -0
- package/dist/database/defaultCopy.d.ts +3 -0
- package/dist/database/defaultCopy.d.ts.map +1 -0
- package/dist/database/defaultCopy.js +73 -0
- package/dist/database/defaultCopy.js.map +1 -0
- package/dist/database/getLocalizedPaths.d.ts +2 -1
- package/dist/database/getLocalizedPaths.d.ts.map +1 -1
- package/dist/database/getLocalizedPaths.js +12 -3
- package/dist/database/getLocalizedPaths.js.map +1 -1
- package/dist/database/isNestedRelationshipQuery.d.ts +14 -0
- package/dist/database/isNestedRelationshipQuery.d.ts.map +1 -0
- package/dist/database/isNestedRelationshipQuery.js +19 -0
- package/dist/database/isNestedRelationshipQuery.js.map +1 -0
- package/dist/database/migrations/createMigration.d.ts.map +1 -1
- package/dist/database/migrations/createMigration.js +4 -0
- package/dist/database/migrations/createMigration.js.map +1 -1
- package/dist/database/migrations/getMigrations.d.ts.map +1 -1
- package/dist/database/migrations/getMigrations.js +1 -0
- package/dist/database/migrations/getMigrations.js.map +1 -1
- package/dist/database/migrations/getPredefinedMigration.js +2 -2
- package/dist/database/migrations/getPredefinedMigration.js.map +1 -1
- package/dist/database/migrations/migrate.d.ts.map +1 -1
- package/dist/database/migrations/migrate.js +14 -2
- package/dist/database/migrations/migrate.js.map +1 -1
- package/dist/database/migrations/migrateDown.d.ts +2 -2
- package/dist/database/migrations/migrateDown.d.ts.map +1 -1
- package/dist/database/migrations/migrateDown.js +17 -4
- package/dist/database/migrations/migrateDown.js.map +1 -1
- package/dist/database/migrations/migrateRefresh.d.ts +2 -2
- package/dist/database/migrations/migrateRefresh.d.ts.map +1 -1
- package/dist/database/migrations/migrateRefresh.js +16 -4
- package/dist/database/migrations/migrateRefresh.js.map +1 -1
- package/dist/database/migrations/migrateReset.d.ts +2 -2
- package/dist/database/migrations/migrateReset.d.ts.map +1 -1
- package/dist/database/migrations/migrateReset.js +17 -3
- package/dist/database/migrations/migrateReset.js.map +1 -1
- package/dist/database/migrations/migrateStatus.d.ts +2 -2
- package/dist/database/migrations/migrateStatus.d.ts.map +1 -1
- package/dist/database/migrations/migrateStatus.js +11 -6
- package/dist/database/migrations/migrateStatus.js.map +1 -1
- package/dist/database/migrations/migrationsCollection.d.ts.map +1 -1
- package/dist/database/migrations/migrationsCollection.js +1 -0
- package/dist/database/migrations/migrationsCollection.js.map +1 -1
- package/dist/database/prefixWherePaths.d.ts +6 -0
- package/dist/database/prefixWherePaths.d.ts.map +1 -0
- package/dist/database/prefixWherePaths.js +19 -0
- package/dist/database/prefixWherePaths.js.map +1 -0
- package/dist/database/queryValidation/validateQueryPaths.d.ts +2 -1
- package/dist/database/queryValidation/validateQueryPaths.d.ts.map +1 -1
- package/dist/database/queryValidation/validateQueryPaths.js +12 -2
- package/dist/database/queryValidation/validateQueryPaths.js.map +1 -1
- package/dist/database/queryValidation/validateSearchParams.d.ts +2 -1
- package/dist/database/queryValidation/validateSearchParams.d.ts.map +1 -1
- package/dist/database/queryValidation/validateSearchParams.js +88 -7
- package/dist/database/queryValidation/validateSearchParams.js.map +1 -1
- package/dist/database/queryValidation/validateSortQuery.d.ts +23 -0
- package/dist/database/queryValidation/validateSortQuery.d.ts.map +1 -0
- package/dist/database/queryValidation/validateSortQuery.js +54 -0
- package/dist/database/queryValidation/validateSortQuery.js.map +1 -0
- package/dist/database/sanitizeJoinQuery.d.ts.map +1 -1
- package/dist/database/sanitizeJoinQuery.js +9 -1
- package/dist/database/sanitizeJoinQuery.js.map +1 -1
- package/dist/database/sanitizeWhereQuery.d.ts +1 -1
- package/dist/database/sanitizeWhereQuery.d.ts.map +1 -1
- package/dist/database/sanitizeWhereQuery.js +44 -1
- package/dist/database/sanitizeWhereQuery.js.map +1 -1
- package/dist/database/types.d.ts +94 -8
- package/dist/database/types.d.ts.map +1 -1
- package/dist/database/types.js.map +1 -1
- package/dist/duplicateDocument/index.js +1 -0
- package/dist/duplicateDocument/index.js.map +1 -1
- package/dist/errors/APIError.d.ts +4 -0
- package/dist/errors/APIError.d.ts.map +1 -1
- package/dist/errors/APIError.js +5 -1
- package/dist/errors/APIError.js.map +1 -1
- package/dist/errors/AuthenticationError.d.ts.map +1 -1
- package/dist/errors/AuthenticationError.js +1 -0
- package/dist/errors/AuthenticationError.js.map +1 -1
- package/dist/errors/DuplicateCollection.d.ts.map +1 -1
- package/dist/errors/DuplicateCollection.js +1 -0
- package/dist/errors/DuplicateCollection.js.map +1 -1
- package/dist/errors/DuplicateFieldName.d.ts.map +1 -1
- package/dist/errors/DuplicateFieldName.js +1 -0
- package/dist/errors/DuplicateFieldName.js.map +1 -1
- package/dist/errors/DuplicateGlobal.d.ts.map +1 -1
- package/dist/errors/DuplicateGlobal.js +1 -0
- package/dist/errors/DuplicateGlobal.js.map +1 -1
- package/dist/errors/ErrorDeletingFile.d.ts.map +1 -1
- package/dist/errors/ErrorDeletingFile.js +1 -0
- package/dist/errors/ErrorDeletingFile.js.map +1 -1
- package/dist/errors/FileRetrievalError.d.ts.map +1 -1
- package/dist/errors/FileRetrievalError.js +1 -0
- package/dist/errors/FileRetrievalError.js.map +1 -1
- package/dist/errors/FileUploadError.d.ts.map +1 -1
- package/dist/errors/FileUploadError.js +1 -0
- package/dist/errors/FileUploadError.js.map +1 -1
- package/dist/errors/Forbidden.d.ts.map +1 -1
- package/dist/errors/Forbidden.js +1 -0
- package/dist/errors/Forbidden.js.map +1 -1
- package/dist/errors/InvalidConfiguration.d.ts.map +1 -1
- package/dist/errors/InvalidConfiguration.js +1 -0
- package/dist/errors/InvalidConfiguration.js.map +1 -1
- package/dist/errors/InvalidFieldJoin.d.ts.map +1 -1
- package/dist/errors/InvalidFieldJoin.js +1 -0
- package/dist/errors/InvalidFieldJoin.js.map +1 -1
- package/dist/errors/InvalidFieldName.d.ts.map +1 -1
- package/dist/errors/InvalidFieldName.js +1 -0
- package/dist/errors/InvalidFieldName.js.map +1 -1
- package/dist/errors/InvalidFieldRelationship.d.ts.map +1 -1
- package/dist/errors/InvalidFieldRelationship.js +1 -0
- package/dist/errors/InvalidFieldRelationship.js.map +1 -1
- package/dist/errors/InvalidSchema.d.ts.map +1 -1
- package/dist/errors/InvalidSchema.js +1 -0
- package/dist/errors/InvalidSchema.js.map +1 -1
- package/dist/errors/Locked.d.ts.map +1 -1
- package/dist/errors/Locked.js +1 -0
- package/dist/errors/Locked.js.map +1 -1
- package/dist/errors/LockedAuth.d.ts.map +1 -1
- package/dist/errors/LockedAuth.js +1 -0
- package/dist/errors/LockedAuth.js.map +1 -1
- package/dist/errors/MissingCollectionLabel.d.ts.map +1 -1
- package/dist/errors/MissingCollectionLabel.js +1 -0
- package/dist/errors/MissingCollectionLabel.js.map +1 -1
- package/dist/errors/MissingEditorProp.d.ts.map +1 -1
- package/dist/errors/MissingEditorProp.js +1 -0
- package/dist/errors/MissingEditorProp.js.map +1 -1
- package/dist/errors/MissingFieldInputOptions.d.ts.map +1 -1
- package/dist/errors/MissingFieldInputOptions.js +1 -0
- package/dist/errors/MissingFieldInputOptions.js.map +1 -1
- package/dist/errors/MissingFieldType.d.ts.map +1 -1
- package/dist/errors/MissingFieldType.js +1 -0
- package/dist/errors/MissingFieldType.js.map +1 -1
- package/dist/errors/MissingFile.d.ts.map +1 -1
- package/dist/errors/MissingFile.js +1 -0
- package/dist/errors/MissingFile.js.map +1 -1
- package/dist/errors/NotFound.d.ts.map +1 -1
- package/dist/errors/NotFound.js +1 -0
- package/dist/errors/NotFound.js.map +1 -1
- package/dist/errors/QueryError.d.ts.map +1 -1
- package/dist/errors/QueryError.js +1 -0
- package/dist/errors/QueryError.js.map +1 -1
- package/dist/errors/ReservedFieldName.d.ts.map +1 -1
- package/dist/errors/ReservedFieldName.js +1 -0
- package/dist/errors/ReservedFieldName.js.map +1 -1
- package/dist/errors/TimestampsRequired.d.ts.map +1 -1
- package/dist/errors/TimestampsRequired.js +1 -0
- package/dist/errors/TimestampsRequired.js.map +1 -1
- package/dist/errors/TransformerContractError.d.ts +11 -0
- package/dist/errors/TransformerContractError.d.ts.map +1 -0
- package/dist/errors/TransformerContractError.js +15 -0
- package/dist/errors/TransformerContractError.js.map +1 -0
- package/dist/errors/UnauthorizedError.d.ts.map +1 -1
- package/dist/errors/UnauthorizedError.js +1 -0
- package/dist/errors/UnauthorizedError.js.map +1 -1
- package/dist/errors/UnverifiedEmail.d.ts.map +1 -1
- package/dist/errors/UnverifiedEmail.js +1 -0
- package/dist/errors/UnverifiedEmail.js.map +1 -1
- package/dist/errors/ValidationError.d.ts.map +1 -1
- package/dist/errors/ValidationError.js +1 -0
- package/dist/errors/ValidationError.js.map +1 -1
- package/dist/errors/index.d.ts +1 -0
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +1 -0
- package/dist/errors/index.js.map +1 -1
- package/dist/exports/auth.d.ts +5 -0
- package/dist/exports/auth.d.ts.map +1 -0
- package/dist/exports/auth.js +6 -0
- package/dist/exports/auth.js.map +1 -0
- package/dist/exports/cli.d.ts +4 -0
- package/dist/exports/cli.d.ts.map +1 -0
- package/dist/exports/cli.js +4 -0
- package/dist/exports/cli.js.map +1 -0
- package/dist/exports/cliBuiltin.d.ts +37 -0
- package/dist/exports/cliBuiltin.d.ts.map +1 -0
- package/dist/exports/cliBuiltin.js +38 -0
- package/dist/exports/cliBuiltin.js.map +1 -0
- package/dist/exports/internal.d.ts +20 -1
- package/dist/exports/internal.d.ts.map +1 -1
- package/dist/exports/internal.js +17 -1
- package/dist/exports/internal.js.map +1 -1
- package/dist/exports/node.d.ts +2 -2
- package/dist/exports/node.d.ts.map +1 -1
- package/dist/exports/node.js +2 -2
- package/dist/exports/node.js.map +1 -1
- package/dist/exports/shared.d.ts +11 -4
- package/dist/exports/shared.d.ts.map +1 -1
- package/dist/exports/shared.js +10 -4
- package/dist/exports/shared.js.map +1 -1
- package/dist/fields/baseFields/authorship/index.d.ts +30 -0
- package/dist/fields/baseFields/authorship/index.d.ts.map +1 -0
- package/dist/fields/baseFields/authorship/index.js +151 -0
- package/dist/fields/baseFields/authorship/index.js.map +1 -0
- package/dist/fields/baseFields/authorship/types.d.ts +28 -0
- package/dist/fields/baseFields/authorship/types.d.ts.map +1 -0
- package/dist/fields/baseFields/authorship/types.js +10 -0
- package/dist/fields/baseFields/authorship/types.js.map +1 -0
- package/dist/fields/baseFields/slug/duplicateContext.d.ts +11 -0
- package/dist/fields/baseFields/slug/duplicateContext.d.ts.map +1 -0
- package/dist/fields/baseFields/slug/duplicateContext.js +21 -0
- package/dist/fields/baseFields/slug/duplicateContext.js.map +1 -0
- package/dist/fields/baseFields/slug/fillEmptyLocalizedSlugs.d.ts +23 -0
- package/dist/fields/baseFields/slug/fillEmptyLocalizedSlugs.d.ts.map +1 -0
- package/dist/fields/baseFields/slug/fillEmptyLocalizedSlugs.js +65 -0
- package/dist/fields/baseFields/slug/fillEmptyLocalizedSlugs.js.map +1 -0
- package/dist/fields/baseFields/slug/generateSlug.d.ts +13 -8
- package/dist/fields/baseFields/slug/generateSlug.d.ts.map +1 -1
- package/dist/fields/baseFields/slug/generateSlug.js +102 -45
- package/dist/fields/baseFields/slug/generateSlug.js.map +1 -1
- package/dist/fields/baseFields/slug/generateSlugBeforeDuplicate.d.ts +18 -0
- package/dist/fields/baseFields/slug/generateSlugBeforeDuplicate.d.ts.map +1 -0
- package/dist/fields/baseFields/slug/generateSlugBeforeDuplicate.js +20 -0
- package/dist/fields/baseFields/slug/generateSlugBeforeDuplicate.js.map +1 -0
- package/dist/fields/baseFields/slug/getSlugFallbackValue.d.ts +23 -0
- package/dist/fields/baseFields/slug/getSlugFallbackValue.d.ts.map +1 -0
- package/dist/fields/baseFields/slug/getSlugFallbackValue.js +24 -0
- package/dist/fields/baseFields/slug/getSlugFallbackValue.js.map +1 -0
- package/dist/fields/baseFields/slug/hasValue.d.ts +3 -0
- package/dist/fields/baseFields/slug/hasValue.d.ts.map +1 -0
- package/dist/fields/baseFields/slug/hasValue.js +3 -0
- package/dist/fields/baseFields/slug/hasValue.js.map +1 -0
- package/dist/fields/config/client.d.ts +1 -1
- package/dist/fields/config/client.d.ts.map +1 -1
- package/dist/fields/config/client.js +1 -1
- package/dist/fields/config/client.js.map +1 -1
- package/dist/fields/config/reservedFieldNames.js.map +1 -1
- package/dist/fields/config/sanitize.d.ts +6 -6
- package/dist/fields/config/sanitize.d.ts.map +1 -1
- package/dist/fields/config/sanitize.js +32 -22
- package/dist/fields/config/sanitize.js.map +1 -1
- package/dist/fields/config/types.d.ts +53 -50
- package/dist/fields/config/types.d.ts.map +1 -1
- package/dist/fields/config/types.js +1 -1
- package/dist/fields/config/types.js.map +1 -1
- package/dist/fields/hooks/beforeChange/index.d.ts +7 -1
- package/dist/fields/hooks/beforeChange/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/index.js +4 -2
- package/dist/fields/hooks/beforeChange/index.js.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.d.ts +2 -1
- package/dist/fields/hooks/beforeChange/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/promise.js +52 -9
- package/dist/fields/hooks/beforeChange/promise.js.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts +2 -1
- package/dist/fields/hooks/beforeChange/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeChange/traverseFields.js +3 -2
- package/dist/fields/hooks/beforeChange/traverseFields.js.map +1 -1
- package/dist/fields/hooks/beforeDuplicate/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeDuplicate/promise.js +4 -0
- package/dist/fields/hooks/beforeDuplicate/promise.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/getFallbackValue.d.ts +2 -1
- package/dist/fields/hooks/beforeValidate/getFallbackValue.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/getFallbackValue.js +2 -2
- package/dist/fields/hooks/beforeValidate/getFallbackValue.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/index.d.ts +6 -1
- package/dist/fields/hooks/beforeValidate/index.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/index.js +3 -1
- package/dist/fields/hooks/beforeValidate/index.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.d.ts +6 -1
- package/dist/fields/hooks/beforeValidate/promise.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/promise.js +29 -12
- package/dist/fields/hooks/beforeValidate/promise.js.map +1 -1
- package/dist/fields/hooks/beforeValidate/stripNullRows.d.ts +10 -0
- package/dist/fields/hooks/beforeValidate/stripNullRows.d.ts.map +1 -0
- package/dist/fields/hooks/beforeValidate/stripNullRows.js +18 -0
- package/dist/fields/hooks/beforeValidate/stripNullRows.js.map +1 -0
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts +6 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.d.ts.map +1 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.js +5 -1
- package/dist/fields/hooks/beforeValidate/traverseFields.js.map +1 -1
- package/dist/fields/validations.d.ts.map +1 -1
- package/dist/fields/validations.js +17 -15
- package/dist/fields/validations.js.map +1 -1
- package/dist/globals/config/client.d.ts +2 -2
- package/dist/globals/config/client.d.ts.map +1 -1
- package/dist/globals/config/client.js +1 -0
- package/dist/globals/config/client.js.map +1 -1
- package/dist/globals/config/sanitize.d.ts +3 -7
- package/dist/globals/config/sanitize.d.ts.map +1 -1
- package/dist/globals/config/sanitize.js +78 -9
- package/dist/globals/config/sanitize.js.map +1 -1
- package/dist/globals/config/types.d.ts +35 -16
- package/dist/globals/config/types.d.ts.map +1 -1
- package/dist/globals/config/types.js.map +1 -1
- package/dist/globals/operations/countGlobalVersions.d.ts.map +1 -1
- package/dist/globals/operations/countGlobalVersions.js +57 -55
- package/dist/globals/operations/countGlobalVersions.js.map +1 -1
- package/dist/globals/operations/docAccess.d.ts.map +1 -1
- package/dist/globals/operations/docAccess.js +19 -25
- package/dist/globals/operations/docAccess.js.map +1 -1
- package/dist/globals/operations/findOne.d.ts.map +1 -1
- package/dist/globals/operations/findOne.js +169 -174
- package/dist/globals/operations/findOne.js.map +1 -1
- package/dist/globals/operations/findVersionByID.d.ts.map +1 -1
- package/dist/globals/operations/findVersionByID.js +112 -108
- package/dist/globals/operations/findVersionByID.js.map +1 -1
- package/dist/globals/operations/findVersions.d.ts.map +1 -1
- package/dist/globals/operations/findVersions.js +118 -109
- package/dist/globals/operations/findVersions.js.map +1 -1
- package/dist/globals/operations/inputSchemas.d.ts +365 -0
- package/dist/globals/operations/inputSchemas.d.ts.map +1 -0
- package/dist/globals/operations/inputSchemas.js +104 -0
- package/dist/globals/operations/inputSchemas.js.map +1 -0
- package/dist/globals/operations/local/countVersions.d.ts +2 -7
- package/dist/globals/operations/local/countVersions.d.ts.map +1 -1
- package/dist/globals/operations/local/countVersions.js +6 -3
- package/dist/globals/operations/local/countVersions.js.map +1 -1
- package/dist/globals/operations/local/findOne.d.ts +2 -7
- package/dist/globals/operations/local/findOne.d.ts.map +1 -1
- package/dist/globals/operations/local/findOne.js +6 -3
- package/dist/globals/operations/local/findOne.js.map +1 -1
- package/dist/globals/operations/local/findVersionByID.d.ts +2 -7
- package/dist/globals/operations/local/findVersionByID.d.ts.map +1 -1
- package/dist/globals/operations/local/findVersionByID.js +6 -3
- package/dist/globals/operations/local/findVersionByID.js.map +1 -1
- package/dist/globals/operations/local/findVersions.d.ts +2 -7
- package/dist/globals/operations/local/findVersions.d.ts.map +1 -1
- package/dist/globals/operations/local/findVersions.js +6 -3
- package/dist/globals/operations/local/findVersions.js.map +1 -1
- package/dist/globals/operations/local/restoreVersion.d.ts +2 -7
- package/dist/globals/operations/local/restoreVersion.d.ts.map +1 -1
- package/dist/globals/operations/local/restoreVersion.js +6 -3
- package/dist/globals/operations/local/restoreVersion.js.map +1 -1
- package/dist/globals/operations/local/update.d.ts +2 -7
- package/dist/globals/operations/local/update.d.ts.map +1 -1
- package/dist/globals/operations/local/update.js +6 -3
- package/dist/globals/operations/local/update.js.map +1 -1
- package/dist/globals/operations/restoreVersion.d.ts.map +1 -1
- package/dist/globals/operations/restoreVersion.js +60 -14
- package/dist/globals/operations/restoreVersion.js.map +1 -1
- package/dist/globals/operations/update.d.ts.map +1 -1
- package/dist/globals/operations/update.js +106 -19
- package/dist/globals/operations/update.js.map +1 -1
- package/dist/hierarchy/addHierarchyToCollection.js +2 -0
- package/dist/hierarchy/addHierarchyToCollection.js.map +1 -1
- package/dist/hierarchy/hooks/collectionAfterDelete.d.ts.map +1 -1
- package/dist/hierarchy/hooks/collectionAfterDelete.js +1 -0
- package/dist/hierarchy/hooks/collectionAfterDelete.js.map +1 -1
- package/dist/hierarchy/hooks/collectionBeforeChange.js +1 -0
- package/dist/hierarchy/hooks/collectionBeforeChange.js.map +1 -1
- package/dist/hierarchy/hooks/collectionBeforeDelete.d.ts.map +1 -1
- package/dist/hierarchy/hooks/collectionBeforeDelete.js +1 -0
- package/dist/hierarchy/hooks/collectionBeforeDelete.js.map +1 -1
- package/dist/hierarchy/hooks/ensureSafeCollectionsChange.d.ts.map +1 -1
- package/dist/hierarchy/hooks/ensureSafeCollectionsChange.js +71 -33
- package/dist/hierarchy/hooks/ensureSafeCollectionsChange.js.map +1 -1
- package/dist/hierarchy/resolveHierarchyCollections.js +29 -20
- package/dist/hierarchy/resolveHierarchyCollections.js.map +1 -1
- package/dist/index.bundled.d.ts +3223 -1384
- package/dist/index.d.ts +117 -56
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +90 -70
- package/dist/index.js.map +1 -1
- package/dist/kv/adapters/DatabaseKVAdapter.d.ts.map +1 -1
- package/dist/kv/adapters/DatabaseKVAdapter.js +2 -1
- package/dist/kv/adapters/DatabaseKVAdapter.js.map +1 -1
- package/dist/llm-instructions/addLLMInstructions.d.ts +5 -0
- package/dist/llm-instructions/addLLMInstructions.d.ts.map +1 -0
- package/dist/llm-instructions/addLLMInstructions.js +31 -0
- package/dist/llm-instructions/addLLMInstructions.js.map +1 -0
- package/dist/llm-instructions/getInstructionTargetAccess.d.ts +8 -0
- package/dist/llm-instructions/getInstructionTargetAccess.d.ts.map +1 -0
- package/dist/llm-instructions/getInstructionTargetAccess.js +40 -0
- package/dist/llm-instructions/getInstructionTargetAccess.js.map +1 -0
- package/dist/llm-instructions/getInstructions.d.ts +8 -0
- package/dist/llm-instructions/getInstructions.d.ts.map +1 -0
- package/dist/llm-instructions/getInstructions.js +46 -0
- package/dist/llm-instructions/getInstructions.js.map +1 -0
- package/dist/llm-instructions/getInstructionsCollection.d.ts +6 -0
- package/dist/llm-instructions/getInstructionsCollection.d.ts.map +1 -0
- package/dist/llm-instructions/getInstructionsCollection.js +367 -0
- package/dist/llm-instructions/getInstructionsCollection.js.map +1 -0
- package/dist/llm-instructions/shared.d.ts +11 -0
- package/dist/llm-instructions/shared.d.ts.map +1 -0
- package/dist/llm-instructions/shared.js +3 -0
- package/dist/llm-instructions/shared.js.map +1 -0
- package/dist/locked-documents/config.d.ts.map +1 -1
- package/dist/locked-documents/config.js +1 -0
- package/dist/locked-documents/config.js.map +1 -1
- package/dist/preferences/config.d.ts.map +1 -1
- package/dist/preferences/config.js +3 -1
- package/dist/preferences/config.js.map +1 -1
- package/dist/preferences/types.d.ts +2 -0
- package/dist/preferences/types.d.ts.map +1 -1
- package/dist/preferences/types.js.map +1 -1
- package/dist/query-presets/access.d.ts.map +1 -1
- package/dist/query-presets/access.js +2 -1
- package/dist/query-presets/access.js.map +1 -1
- package/dist/query-presets/config.d.ts.map +1 -1
- package/dist/query-presets/config.js +1 -0
- package/dist/query-presets/config.js.map +1 -1
- package/dist/query-presets/constraints.js +1 -1
- package/dist/query-presets/constraints.js.map +1 -1
- package/dist/query-presets/preventLockout.js +6 -3
- package/dist/query-presets/preventLockout.js.map +1 -1
- package/dist/queues/config/collection.d.ts.map +1 -1
- package/dist/queues/config/collection.js +44 -43
- package/dist/queues/config/collection.js.map +1 -1
- package/dist/queues/config/global.d.ts +5 -6
- package/dist/queues/config/global.d.ts.map +1 -1
- package/dist/queues/config/global.js +2 -1
- package/dist/queues/config/global.js.map +1 -1
- package/dist/queues/config/types/index.d.ts +33 -25
- package/dist/queues/config/types/index.d.ts.map +1 -1
- package/dist/queues/config/types/index.js.map +1 -1
- package/dist/queues/config/types/taskTypes.d.ts +4 -7
- package/dist/queues/config/types/taskTypes.d.ts.map +1 -1
- package/dist/queues/config/types/taskTypes.js.map +1 -1
- package/dist/queues/config/types/workflowJSONTypes.d.ts +10 -9
- package/dist/queues/config/types/workflowJSONTypes.d.ts.map +1 -1
- package/dist/queues/config/types/workflowJSONTypes.js.map +1 -1
- package/dist/queues/config/types/workflowTypes.d.ts +11 -58
- package/dist/queues/config/types/workflowTypes.d.ts.map +1 -1
- package/dist/queues/config/types/workflowTypes.js.map +1 -1
- package/dist/queues/endpoints/handleSchedules.d.ts.map +1 -1
- package/dist/queues/endpoints/handleSchedules.js +3 -2
- package/dist/queues/endpoints/handleSchedules.js.map +1 -1
- package/dist/queues/endpoints/run.d.ts.map +1 -1
- package/dist/queues/endpoints/run.js +2 -1
- package/dist/queues/endpoints/run.js.map +1 -1
- package/dist/queues/errors/handleTaskError.js +4 -4
- package/dist/queues/errors/handleTaskError.js.map +1 -1
- package/dist/queues/errors/handleWorkflowError.js +1 -1
- package/dist/queues/errors/handleWorkflowError.js.map +1 -1
- package/dist/queues/errors/index.d.ts +6 -0
- package/dist/queues/errors/index.d.ts.map +1 -1
- package/dist/queues/errors/index.js +5 -0
- package/dist/queues/errors/index.js.map +1 -1
- package/dist/queues/localAPI.d.ts +10 -63
- package/dist/queues/localAPI.d.ts.map +1 -1
- package/dist/queues/localAPI.js +87 -78
- package/dist/queues/localAPI.js.map +1 -1
- package/dist/queues/operations/handleSchedules/countRunnableOrActiveJobsForQueue.d.ts +4 -4
- package/dist/queues/operations/handleSchedules/countRunnableOrActiveJobsForQueue.d.ts.map +1 -1
- package/dist/queues/operations/handleSchedules/countRunnableOrActiveJobsForQueue.js.map +1 -1
- package/dist/queues/operations/handleSchedules/index.d.ts +1 -1
- package/dist/queues/operations/handleSchedules/index.d.ts.map +1 -1
- package/dist/queues/operations/handleSchedules/index.js +2 -1
- package/dist/queues/operations/handleSchedules/index.js.map +1 -1
- package/dist/queues/operations/runJobs/heartbeat.d.ts +13 -0
- package/dist/queues/operations/runJobs/heartbeat.d.ts.map +1 -0
- package/dist/queues/operations/runJobs/heartbeat.js +66 -0
- package/dist/queues/operations/runJobs/heartbeat.js.map +1 -0
- package/dist/queues/operations/runJobs/index.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/index.js +133 -84
- package/dist/queues/operations/runJobs/index.js.map +1 -1
- package/dist/queues/operations/runJobs/runJSONJob/index.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/runJSONJob/index.js +6 -3
- package/dist/queues/operations/runJobs/runJSONJob/index.js.map +1 -1
- package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.js +5 -5
- package/dist/queues/operations/runJobs/runJob/getRunTaskFunction.js.map +1 -1
- package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.d.ts +2 -1
- package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.js +39 -8
- package/dist/queues/operations/runJobs/runJob/getUpdateJobFunction.js.map +1 -1
- package/dist/queues/operations/runJobs/runJob/importHandlerPath.js.map +1 -1
- package/dist/queues/operations/runJobs/runJob/index.d.ts.map +1 -1
- package/dist/queues/operations/runJobs/runJob/index.js +4 -4
- package/dist/queues/operations/runJobs/runJob/index.js.map +1 -1
- package/dist/queues/utilities/updateJob.d.ts.map +1 -1
- package/dist/queues/utilities/updateJob.js +3 -0
- package/dist/queues/utilities/updateJob.js.map +1 -1
- package/dist/types/constants.d.ts +21 -0
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/constants.js +23 -0
- package/dist/types/constants.js.map +1 -1
- package/dist/types/index.d.ts +11 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/operations.d.ts +9 -0
- package/dist/types/operations.d.ts.map +1 -0
- package/dist/types/operations.js +3 -0
- package/dist/types/operations.js.map +1 -0
- package/dist/uploads/assertClientUploadAccess.d.ts +7 -0
- package/dist/uploads/assertClientUploadAccess.d.ts.map +1 -0
- package/dist/uploads/assertClientUploadAccess.js +29 -0
- package/dist/uploads/assertClientUploadAccess.js.map +1 -0
- package/dist/uploads/assertClientUploadAllowed.d.ts +10 -0
- package/dist/uploads/assertClientUploadAllowed.d.ts.map +1 -0
- package/dist/uploads/assertClientUploadAllowed.js +41 -0
- package/dist/uploads/assertClientUploadAllowed.js.map +1 -0
- package/dist/uploads/checkFileAccess.d.ts.map +1 -1
- package/dist/uploads/checkFileAccess.js +6 -18
- package/dist/uploads/checkFileAccess.js.map +1 -1
- package/dist/uploads/checkFileRestrictions.d.ts +11 -1
- package/dist/uploads/checkFileRestrictions.d.ts.map +1 -1
- package/dist/uploads/checkFileRestrictions.js +91 -26
- package/dist/uploads/checkFileRestrictions.js.map +1 -1
- package/dist/uploads/clientUploadReceipt.d.ts +29 -0
- package/dist/uploads/clientUploadReceipt.d.ts.map +1 -0
- package/dist/uploads/clientUploadReceipt.js +76 -0
- package/dist/uploads/clientUploadReceipt.js.map +1 -0
- package/dist/uploads/deleteAssociatedFiles.d.ts.map +1 -1
- package/dist/uploads/deleteAssociatedFiles.js +59 -11
- package/dist/uploads/deleteAssociatedFiles.js.map +1 -1
- package/dist/uploads/detectSvgFromXml.d.ts +1 -4
- package/dist/uploads/detectSvgFromXml.d.ts.map +1 -1
- package/dist/uploads/detectSvgFromXml.js +2 -41
- package/dist/uploads/detectSvgFromXml.js.map +1 -1
- package/dist/uploads/docWithFilenameExists.d.ts +2 -1
- package/dist/uploads/docWithFilenameExists.d.ts.map +1 -1
- package/dist/uploads/docWithFilenameExists.js +27 -10
- package/dist/uploads/docWithFilenameExists.js.map +1 -1
- package/dist/uploads/downloadFileToBuffer.d.ts +11 -0
- package/dist/uploads/downloadFileToBuffer.d.ts.map +1 -0
- package/dist/uploads/downloadFileToBuffer.js +72 -0
- package/dist/uploads/downloadFileToBuffer.js.map +1 -0
- package/dist/uploads/endpoints/getFile.d.ts +17 -0
- package/dist/uploads/endpoints/getFile.d.ts.map +1 -1
- package/dist/uploads/endpoints/getFile.js +46 -12
- package/dist/uploads/endpoints/getFile.js.map +1 -1
- package/dist/uploads/endpoints/index.js +2 -2
- package/dist/uploads/endpoints/index.js.map +1 -1
- package/dist/uploads/endpoints/pasteURL.d.ts +3 -0
- package/dist/uploads/endpoints/pasteURL.d.ts.map +1 -0
- package/dist/uploads/endpoints/{getFileFromURL.js → pasteURL.js} +19 -55
- package/dist/uploads/endpoints/pasteURL.js.map +1 -0
- package/dist/uploads/endpoints/uploadInstructions.d.ts +12 -0
- package/dist/uploads/endpoints/uploadInstructions.d.ts.map +1 -1
- package/dist/uploads/endpoints/uploadInstructions.js +70 -21
- package/dist/uploads/endpoints/uploadInstructions.js.map +1 -1
- package/dist/uploads/fetchAPI-multipart/handlers.d.ts +2 -2
- package/dist/uploads/fetchAPI-multipart/handlers.d.ts.map +1 -1
- package/dist/uploads/fetchAPI-multipart/handlers.js +18 -5
- package/dist/uploads/fetchAPI-multipart/handlers.js.map +1 -1
- package/dist/uploads/fetchAPI-multipart/index.d.ts.map +1 -1
- package/dist/uploads/fetchAPI-multipart/index.js +24 -2
- package/dist/uploads/fetchAPI-multipart/index.js.map +1 -1
- package/dist/uploads/fetchAPI-multipart/isEligibleRequest.js +1 -2
- package/dist/uploads/fetchAPI-multipart/isEligibleRequest.js.map +1 -1
- package/dist/uploads/fetchAPI-multipart/processMultipart.d.ts +0 -6
- package/dist/uploads/fetchAPI-multipart/processMultipart.d.ts.map +1 -1
- package/dist/uploads/fetchAPI-multipart/processMultipart.js +146 -130
- package/dist/uploads/fetchAPI-multipart/processMultipart.js.map +1 -1
- package/dist/uploads/fetchAPI-stream-file/index.d.ts +4 -1
- package/dist/uploads/fetchAPI-stream-file/index.d.ts.map +1 -1
- package/dist/uploads/fetchAPI-stream-file/index.js +9 -2
- package/dist/uploads/fetchAPI-stream-file/index.js.map +1 -1
- package/dist/uploads/fetchWithRedirects.d.ts +19 -0
- package/dist/uploads/fetchWithRedirects.d.ts.map +1 -0
- package/dist/uploads/fetchWithRedirects.js +53 -0
- package/dist/uploads/fetchWithRedirects.js.map +1 -0
- package/dist/uploads/generateFileData.d.ts +31 -1
- package/dist/uploads/generateFileData.d.ts.map +1 -1
- package/dist/uploads/generateFileData.js +259 -199
- package/dist/uploads/generateFileData.js.map +1 -1
- package/dist/uploads/generateImageSizeFilename.d.ts.map +1 -0
- package/dist/uploads/generateImageSizeFilename.js.map +1 -0
- package/dist/uploads/generatePayloadFileURL.d.ts +25 -0
- package/dist/uploads/generatePayloadFileURL.d.ts.map +1 -0
- package/dist/uploads/generatePayloadFileURL.js +64 -0
- package/dist/uploads/generatePayloadFileURL.js.map +1 -0
- package/dist/uploads/getBaseFields.d.ts.map +1 -1
- package/dist/uploads/getBaseFields.js +12 -9
- package/dist/uploads/getBaseFields.js.map +1 -1
- package/dist/uploads/getFileContentRequirement.d.ts +39 -0
- package/dist/uploads/getFileContentRequirement.d.ts.map +1 -0
- package/dist/uploads/getFileContentRequirement.js +45 -0
- package/dist/uploads/getFileContentRequirement.js.map +1 -0
- package/dist/uploads/getFileFromUploadInstructions.d.ts +8 -0
- package/dist/uploads/getFileFromUploadInstructions.d.ts.map +1 -0
- package/dist/uploads/getFileFromUploadInstructions.js +307 -0
- package/dist/uploads/getFileFromUploadInstructions.js.map +1 -0
- package/dist/uploads/getFileTypeFallback.d.ts.map +1 -1
- package/dist/uploads/getFileTypeFallback.js +3 -1
- package/dist/uploads/getFileTypeFallback.js.map +1 -1
- package/dist/uploads/getFileTypeIdentity.d.ts +19 -0
- package/dist/uploads/getFileTypeIdentity.d.ts.map +1 -0
- package/dist/uploads/getFileTypeIdentity.js +34 -0
- package/dist/uploads/getFileTypeIdentity.js.map +1 -0
- package/dist/uploads/getImageSize.d.ts +8 -1
- package/dist/uploads/getImageSize.d.ts.map +1 -1
- package/dist/uploads/getImageSize.js +11 -19
- package/dist/uploads/getImageSize.js.map +1 -1
- package/dist/uploads/hasCropOrResizeEdit.d.ts +7 -0
- package/dist/uploads/hasCropOrResizeEdit.d.ts.map +1 -0
- package/dist/uploads/hasCropOrResizeEdit.js +6 -0
- package/dist/uploads/hasCropOrResizeEdit.js.map +1 -0
- package/dist/uploads/hasFullFileContents.d.ts +13 -0
- package/dist/uploads/hasFullFileContents.d.ts.map +1 -0
- package/dist/uploads/hasFullFileContents.js +12 -0
- package/dist/uploads/hasFullFileContents.js.map +1 -0
- package/dist/uploads/isAnimatedImage.d.ts +8 -0
- package/dist/uploads/isAnimatedImage.d.ts.map +1 -0
- package/dist/uploads/isAnimatedImage.js +22 -0
- package/dist/uploads/isAnimatedImage.js.map +1 -0
- package/dist/uploads/isProcessableImage.d.ts +2 -0
- package/dist/uploads/isProcessableImage.d.ts.map +1 -0
- package/dist/uploads/isProcessableImage.js +7 -0
- package/dist/uploads/isProcessableImage.js.map +1 -0
- package/dist/uploads/parseFilename.d.ts.map +1 -0
- package/dist/uploads/parseFilename.js.map +1 -0
- package/dist/uploads/probeImageSize.d.ts +39 -0
- package/dist/uploads/probeImageSize.d.ts.map +1 -0
- package/dist/uploads/probeImageSize.js +374 -0
- package/dist/uploads/probeImageSize.js.map +1 -0
- package/dist/uploads/resolveURLUploadInput.d.ts +25 -0
- package/dist/uploads/resolveURLUploadInput.d.ts.map +1 -0
- package/dist/uploads/resolveURLUploadInput.js +53 -0
- package/dist/uploads/resolveURLUploadInput.js.map +1 -0
- package/dist/uploads/safeFetch.d.ts.map +1 -1
- package/dist/uploads/safeFetch.js +3 -2
- package/dist/uploads/safeFetch.js.map +1 -1
- package/dist/uploads/sanitizeUploadData.d.ts +26 -0
- package/dist/uploads/sanitizeUploadData.d.ts.map +1 -0
- package/dist/uploads/sanitizeUploadData.js +161 -0
- package/dist/uploads/sanitizeUploadData.js.map +1 -0
- package/dist/uploads/stagedUpload.d.ts +27 -0
- package/dist/uploads/stagedUpload.d.ts.map +1 -0
- package/dist/uploads/stagedUpload.js +197 -0
- package/dist/uploads/stagedUpload.js.map +1 -0
- package/dist/uploads/transformers/createLazySourceGetter.d.ts +15 -0
- package/dist/uploads/transformers/createLazySourceGetter.d.ts.map +1 -0
- package/dist/uploads/transformers/createLazySourceGetter.js +22 -0
- package/dist/uploads/transformers/createLazySourceGetter.js.map +1 -0
- package/dist/uploads/transformers/finalizeFileResponse.d.ts +14 -0
- package/dist/uploads/transformers/finalizeFileResponse.d.ts.map +1 -0
- package/dist/uploads/transformers/finalizeFileResponse.js +49 -0
- package/dist/uploads/transformers/finalizeFileResponse.js.map +1 -0
- package/dist/uploads/transformers/getSourceFileResponse.d.ts +16 -0
- package/dist/uploads/transformers/getSourceFileResponse.d.ts.map +1 -0
- package/dist/uploads/transformers/getSourceFileResponse.js +17 -0
- package/dist/uploads/transformers/getSourceFileResponse.js.map +1 -0
- package/dist/uploads/transformers/handleDynamicFileRequest.d.ts +18 -0
- package/dist/uploads/transformers/handleDynamicFileRequest.d.ts.map +1 -0
- package/dist/uploads/transformers/handleDynamicFileRequest.js +277 -0
- package/dist/uploads/transformers/handleDynamicFileRequest.js.map +1 -0
- package/dist/uploads/transformers/matchesMimeType.d.ts +11 -0
- package/dist/uploads/transformers/matchesMimeType.d.ts.map +1 -0
- package/dist/uploads/transformers/matchesMimeType.js +39 -0
- package/dist/uploads/transformers/matchesMimeType.js.map +1 -0
- package/dist/uploads/transformers/planTransformerPipeline.d.ts +26 -0
- package/dist/uploads/transformers/planTransformerPipeline.d.ts.map +1 -0
- package/dist/uploads/transformers/planTransformerPipeline.js +36 -0
- package/dist/uploads/transformers/planTransformerPipeline.js.map +1 -0
- package/dist/uploads/transformers/resolveUploadDocument.d.ts +46 -0
- package/dist/uploads/transformers/resolveUploadDocument.d.ts.map +1 -0
- package/dist/uploads/transformers/resolveUploadDocument.js +77 -0
- package/dist/uploads/transformers/resolveUploadDocument.js.map +1 -0
- package/dist/uploads/transformers/transformUploadFile.d.ts +18 -0
- package/dist/uploads/transformers/transformUploadFile.d.ts.map +1 -0
- package/dist/uploads/transformers/transformUploadFile.js +30 -0
- package/dist/uploads/transformers/transformUploadFile.js.map +1 -0
- package/dist/uploads/transformers/types.d.ts +71 -0
- package/dist/uploads/transformers/types.d.ts.map +1 -0
- package/dist/uploads/transformers/types.js +6 -0
- package/dist/uploads/transformers/types.js.map +1 -0
- package/dist/uploads/transformers/uploadTransformerBridge.d.ts +48 -0
- package/dist/uploads/transformers/uploadTransformerBridge.d.ts.map +1 -0
- package/dist/uploads/transformers/uploadTransformerBridge.js +22 -0
- package/dist/uploads/transformers/uploadTransformerBridge.js.map +1 -0
- package/dist/uploads/transformers/validateTransformers.d.ts +11 -0
- package/dist/uploads/transformers/validateTransformers.d.ts.map +1 -0
- package/dist/uploads/transformers/validateTransformers.js +67 -0
- package/dist/uploads/transformers/validateTransformers.js.map +1 -0
- package/dist/uploads/transformers/withFileTransformAccessContext.d.ts +13 -0
- package/dist/uploads/transformers/withFileTransformAccessContext.d.ts.map +1 -0
- package/dist/uploads/transformers/withFileTransformAccessContext.js +18 -0
- package/dist/uploads/transformers/withFileTransformAccessContext.js.map +1 -0
- package/dist/uploads/types.d.ts +77 -73
- package/dist/uploads/types.d.ts.map +1 -1
- package/dist/uploads/types.js.map +1 -1
- package/dist/uploads/unlinkTempFiles.d.ts.map +1 -1
- package/dist/uploads/unlinkTempFiles.js +6 -2
- package/dist/uploads/unlinkTempFiles.js.map +1 -1
- package/dist/uploads/uploadContentSecurityPolicy.d.ts +2 -0
- package/dist/uploads/uploadContentSecurityPolicy.d.ts.map +1 -0
- package/dist/uploads/uploadContentSecurityPolicy.js +3 -0
- package/dist/uploads/uploadContentSecurityPolicy.js.map +1 -0
- package/dist/uploads/uploadFiles.d.ts.map +1 -1
- package/dist/uploads/uploadFiles.js +7 -2
- package/dist/uploads/uploadFiles.js.map +1 -1
- package/dist/uploads/validateISOBaseMediaFile.d.ts +4 -0
- package/dist/uploads/validateISOBaseMediaFile.d.ts.map +1 -0
- package/dist/uploads/validateISOBaseMediaFile.js +91 -0
- package/dist/uploads/validateISOBaseMediaFile.js.map +1 -0
- package/dist/uploads/validateSvg.d.ts +10 -4
- package/dist/uploads/validateSvg.d.ts.map +1 -1
- package/dist/uploads/validateSvg.js +280 -40
- package/dist/uploads/validateSvg.js.map +1 -1
- package/dist/uploads/validateUploadFilename.d.ts +3 -0
- package/dist/uploads/validateUploadFilename.d.ts.map +1 -0
- package/dist/uploads/validateUploadFilename.js +13 -0
- package/dist/uploads/validateUploadFilename.js.map +1 -0
- package/dist/uploads/validateUploadURL.d.ts +13 -0
- package/dist/uploads/validateUploadURL.d.ts.map +1 -0
- package/dist/uploads/validateUploadURL.js +37 -0
- package/dist/uploads/validateUploadURL.js.map +1 -0
- package/dist/utilities/addDataAndFileToRequest.d.ts.map +1 -1
- package/dist/utilities/addDataAndFileToRequest.js +14 -46
- package/dist/utilities/addDataAndFileToRequest.js.map +1 -1
- package/dist/utilities/appendNonTrashedFilter.d.ts +1 -1
- package/dist/utilities/appendNonTrashedFilter.d.ts.map +1 -1
- package/dist/utilities/appendNonTrashedFilter.js.map +1 -1
- package/dist/utilities/appendUploadSelectFields.d.ts.map +1 -1
- package/dist/utilities/appendUploadSelectFields.js +4 -3
- package/dist/utilities/appendUploadSelectFields.js.map +1 -1
- package/dist/utilities/batchProcessing.d.ts +23 -0
- package/dist/utilities/batchProcessing.d.ts.map +1 -0
- package/dist/utilities/batchProcessing.js +34 -0
- package/dist/utilities/batchProcessing.js.map +1 -0
- package/dist/utilities/canAccessAdmin.d.ts.map +1 -1
- package/dist/utilities/canAccessAdmin.js +2 -0
- package/dist/utilities/canAccessAdmin.js.map +1 -1
- package/dist/utilities/checkDocumentLockStatus.d.ts +19 -0
- package/dist/utilities/checkDocumentLockStatus.d.ts.map +1 -1
- package/dist/utilities/checkDocumentLockStatus.js +74 -0
- package/dist/utilities/checkDocumentLockStatus.js.map +1 -1
- package/dist/utilities/createPayloadRequest.d.ts +12 -10
- package/dist/utilities/createPayloadRequest.d.ts.map +1 -1
- package/dist/utilities/createPayloadRequest.js +98 -81
- package/dist/utilities/createPayloadRequest.js.map +1 -1
- package/dist/utilities/createPayloadRequestFromWebRequest.d.ts +14 -0
- package/dist/utilities/createPayloadRequestFromWebRequest.d.ts.map +1 -0
- package/dist/utilities/createPayloadRequestFromWebRequest.js +95 -0
- package/dist/utilities/createPayloadRequestFromWebRequest.js.map +1 -0
- package/dist/utilities/deepCopyObject.d.ts.map +1 -1
- package/dist/utilities/deepCopyObject.js +110 -19
- package/dist/utilities/deepCopyObject.js.map +1 -1
- package/dist/utilities/entityInputSchema/filterFieldsByAccess.d.ts +30 -0
- package/dist/utilities/entityInputSchema/filterFieldsByAccess.d.ts.map +1 -0
- package/dist/utilities/entityInputSchema/filterFieldsByAccess.js +71 -0
- package/dist/utilities/entityInputSchema/filterFieldsByAccess.js.map +1 -0
- package/dist/utilities/entityInputSchema/getEntityInputSchema.d.ts +13 -0
- package/dist/utilities/entityInputSchema/getEntityInputSchema.d.ts.map +1 -0
- package/dist/utilities/entityInputSchema/getEntityInputSchema.js +66 -0
- package/dist/utilities/entityInputSchema/getEntityInputSchema.js.map +1 -0
- package/dist/utilities/entityInputSchema/sanitizeEntitySchema.d.ts +10 -0
- package/dist/utilities/entityInputSchema/sanitizeEntitySchema.d.ts.map +1 -0
- package/dist/utilities/entityInputSchema/sanitizeEntitySchema.js +384 -0
- package/dist/utilities/entityInputSchema/sanitizeEntitySchema.js.map +1 -0
- package/dist/utilities/entityInputSchema/types.d.ts +16 -0
- package/dist/utilities/entityInputSchema/types.d.ts.map +1 -0
- package/dist/utilities/entityInputSchema/types.js +3 -0
- package/dist/utilities/entityInputSchema/types.js.map +1 -0
- package/dist/utilities/entityInputSchema/validateEntityData.d.ts +13 -0
- package/dist/utilities/entityInputSchema/validateEntityData.d.ts.map +1 -0
- package/dist/utilities/entityInputSchema/validateEntityData.js +138 -0
- package/dist/utilities/entityInputSchema/validateEntityData.js.map +1 -0
- package/dist/utilities/fieldPath.d.ts +13 -0
- package/dist/utilities/fieldPath.d.ts.map +1 -0
- package/dist/utilities/fieldPath.js +51 -0
- package/dist/utilities/fieldPath.js.map +1 -0
- package/dist/utilities/fieldValueExists.d.ts +29 -0
- package/dist/utilities/fieldValueExists.d.ts.map +1 -0
- package/dist/utilities/fieldValueExists.js +37 -0
- package/dist/utilities/fieldValueExists.js.map +1 -0
- package/dist/utilities/flattenAllFields.js +1 -1
- package/dist/utilities/flattenAllFields.js.map +1 -1
- package/dist/utilities/formatAdminURL.d.ts +1 -0
- package/dist/utilities/formatAdminURL.d.ts.map +1 -1
- package/dist/utilities/formatAdminURL.js +22 -4
- package/dist/utilities/formatAdminURL.js.map +1 -1
- package/dist/utilities/getEntityPermissions/entityDocExists.d.ts.map +1 -1
- package/dist/utilities/getEntityPermissions/entityDocExists.js +36 -5
- package/dist/utilities/getEntityPermissions/entityDocExists.js.map +1 -1
- package/dist/utilities/getEntityPermissions/getEntityPermissions.d.ts.map +1 -1
- package/dist/utilities/getEntityPermissions/getEntityPermissions.js +1 -0
- package/dist/utilities/getEntityPermissions/getEntityPermissions.js.map +1 -1
- package/dist/utilities/getNextVersion.d.ts +7 -0
- package/dist/utilities/getNextVersion.d.ts.map +1 -0
- package/dist/utilities/getNextVersion.js +20 -0
- package/dist/utilities/getNextVersion.js.map +1 -0
- package/dist/utilities/getObjectDotNotation.d.ts.map +1 -1
- package/dist/utilities/getObjectDotNotation.js +7 -1
- package/dist/utilities/getObjectDotNotation.js.map +1 -1
- package/dist/utilities/getRequestOrigin.d.ts.map +1 -1
- package/dist/utilities/getRequestOrigin.js.map +1 -1
- package/dist/utilities/getSafeRedirect.d.ts.map +1 -1
- package/dist/utilities/getSafeRedirect.js +16 -9
- package/dist/utilities/getSafeRedirect.js.map +1 -1
- package/dist/utilities/getTopLevelFieldNames.d.ts +2 -0
- package/dist/utilities/getTopLevelFieldNames.d.ts.map +1 -0
- package/dist/utilities/getTopLevelFieldNames.js +3 -0
- package/dist/utilities/getTopLevelFieldNames.js.map +1 -0
- package/dist/utilities/getUniqueFieldValue.d.ts +28 -0
- package/dist/utilities/getUniqueFieldValue.d.ts.map +1 -0
- package/dist/utilities/getUniqueFieldValue.js +27 -0
- package/dist/utilities/getUniqueFieldValue.js.map +1 -0
- package/dist/utilities/getVirtualFieldNames.d.ts +14 -0
- package/dist/utilities/getVirtualFieldNames.d.ts.map +1 -0
- package/dist/utilities/getVirtualFieldNames.js +35 -0
- package/dist/utilities/getVirtualFieldNames.js.map +1 -0
- package/dist/utilities/handleEndpoints.d.ts.map +1 -1
- package/dist/utilities/handleEndpoints.js +8 -7
- package/dist/utilities/handleEndpoints.js.map +1 -1
- package/dist/utilities/headersWithCors.js +1 -1
- package/dist/utilities/headersWithCors.js.map +1 -1
- package/dist/utilities/killTransaction.d.ts +7 -0
- package/dist/utilities/killTransaction.d.ts.map +1 -1
- package/dist/utilities/killTransaction.js +7 -0
- package/dist/utilities/killTransaction.js.map +1 -1
- package/dist/utilities/logError.d.ts.map +1 -1
- package/dist/utilities/logError.js +5 -2
- package/dist/utilities/logError.js.map +1 -1
- package/dist/utilities/nextJsDevReloadStrategy.d.ts +7 -0
- package/dist/utilities/nextJsDevReloadStrategy.d.ts.map +1 -0
- package/dist/utilities/nextJsDevReloadStrategy.js +62 -0
- package/dist/utilities/nextJsDevReloadStrategy.js.map +1 -0
- package/dist/utilities/parseDocumentID.d.ts +4 -1
- package/dist/utilities/parseDocumentID.d.ts.map +1 -1
- package/dist/utilities/parseDocumentID.js +7 -1
- package/dist/utilities/parseDocumentID.js.map +1 -1
- package/dist/utilities/parseParams/index.d.ts.map +1 -1
- package/dist/utilities/parseParams/index.js +3 -1
- package/dist/utilities/parseParams/index.js.map +1 -1
- package/dist/utilities/sanitizeUploadPrefix.d.ts +5 -0
- package/dist/utilities/sanitizeUploadPrefix.d.ts.map +1 -0
- package/dist/utilities/sanitizeUploadPrefix.js +18 -0
- package/dist/utilities/sanitizeUploadPrefix.js.map +1 -0
- package/dist/utilities/sharedInputSchemas.d.ts +52 -0
- package/dist/utilities/sharedInputSchemas.d.ts.map +1 -0
- package/dist/utilities/sharedInputSchemas.js +101 -0
- package/dist/utilities/sharedInputSchemas.js.map +1 -0
- package/dist/utilities/telemetry/featureInfo/getFeatureInfo.d.ts +4 -0
- package/dist/utilities/telemetry/featureInfo/getFeatureInfo.d.ts.map +1 -0
- package/dist/utilities/telemetry/featureInfo/getFeatureInfo.js +262 -0
- package/dist/utilities/telemetry/featureInfo/getFeatureInfo.js.map +1 -0
- package/dist/utilities/telemetry/featureInfo/types.d.ts +63 -0
- package/dist/utilities/telemetry/featureInfo/types.d.ts.map +1 -0
- package/dist/utilities/telemetry/featureInfo/types.js +3 -0
- package/dist/utilities/telemetry/featureInfo/types.js.map +1 -0
- package/dist/utilities/telemetry/getProjectContext.d.ts +16 -0
- package/dist/utilities/telemetry/getProjectContext.d.ts.map +1 -0
- package/dist/utilities/telemetry/getProjectContext.js +43 -0
- package/dist/utilities/telemetry/getProjectContext.js.map +1 -0
- package/dist/utilities/telemetry/index.d.ts +6 -1
- package/dist/utilities/telemetry/index.d.ts.map +1 -1
- package/dist/utilities/telemetry/index.js +21 -1
- package/dist/utilities/telemetry/index.js.map +1 -1
- package/dist/utilities/transformPointDataToPayload.d.ts +7 -0
- package/dist/utilities/transformPointDataToPayload.d.ts.map +1 -0
- package/dist/utilities/transformPointDataToPayload.js +28 -0
- package/dist/utilities/transformPointDataToPayload.js.map +1 -0
- package/dist/utilities/traverseFields.d.ts.map +1 -1
- package/dist/utilities/traverseFields.js +25 -36
- package/dist/utilities/traverseFields.js.map +1 -1
- package/dist/utilities/unflatten.d.ts.map +1 -1
- package/dist/utilities/unflatten.js +21 -9
- package/dist/utilities/unflatten.js.map +1 -1
- package/dist/utilities/unflattenData.d.ts +3 -0
- package/dist/utilities/unflattenData.d.ts.map +1 -0
- package/dist/utilities/unflattenData.js +14 -0
- package/dist/utilities/unflattenData.js.map +1 -0
- package/dist/utilities/zod.d.ts +5 -0
- package/dist/utilities/zod.d.ts.map +1 -0
- package/dist/utilities/zod.js +21 -0
- package/dist/utilities/zod.js.map +1 -0
- package/dist/versions/allLocalesPublicationStatus.d.ts +38 -0
- package/dist/versions/allLocalesPublicationStatus.d.ts.map +1 -0
- package/dist/versions/allLocalesPublicationStatus.js +57 -0
- package/dist/versions/allLocalesPublicationStatus.js.map +1 -0
- package/dist/versions/deleteCollectionVersions.d.ts +11 -1
- package/dist/versions/deleteCollectionVersions.d.ts.map +1 -1
- package/dist/versions/deleteCollectionVersions.js +10 -3
- package/dist/versions/deleteCollectionVersions.js.map +1 -1
- package/dist/versions/deleteScheduledPublishJobs.d.ts +5 -1
- package/dist/versions/deleteScheduledPublishJobs.d.ts.map +1 -1
- package/dist/versions/deleteScheduledPublishJobs.js +11 -5
- package/dist/versions/deleteScheduledPublishJobs.js.map +1 -1
- package/dist/versions/drafts/appendVersionToQueryKey.d.ts +1 -0
- package/dist/versions/drafts/appendVersionToQueryKey.d.ts.map +1 -1
- package/dist/versions/drafts/appendVersionToQueryKey.js +6 -12
- package/dist/versions/drafts/appendVersionToQueryKey.js.map +1 -1
- package/dist/versions/getLatestGlobalVersion.d.ts.map +1 -1
- package/dist/versions/getLatestGlobalVersion.js +10 -2
- package/dist/versions/getLatestGlobalVersion.js.map +1 -1
- package/dist/versions/getRestoredStatusesToAuthorize.d.ts +9 -0
- package/dist/versions/getRestoredStatusesToAuthorize.d.ts.map +1 -0
- package/dist/versions/getRestoredStatusesToAuthorize.js +22 -0
- package/dist/versions/getRestoredStatusesToAuthorize.js.map +1 -0
- package/dist/versions/isInheritedReadVersionsAccess.d.ts +6 -0
- package/dist/versions/isInheritedReadVersionsAccess.d.ts.map +1 -0
- package/dist/versions/isInheritedReadVersionsAccess.js +30 -0
- package/dist/versions/isInheritedReadVersionsAccess.js.map +1 -0
- package/dist/versions/payloadPackageList.d.ts.map +1 -1
- package/dist/versions/payloadPackageList.js +0 -1
- package/dist/versions/payloadPackageList.js.map +1 -1
- package/dist/versions/schedule/job.d.ts +2 -2
- package/dist/versions/schedule/job.d.ts.map +1 -1
- package/dist/versions/schedule/job.js +12 -8
- package/dist/versions/schedule/job.js.map +1 -1
- package/dist/versions/schedule/types.d.ts +5 -1
- package/dist/versions/schedule/types.d.ts.map +1 -1
- package/dist/versions/schedule/types.js.map +1 -1
- package/package.json +30 -13
- package/skills/payload/SKILL.md +544 -0
- package/skills/payload/reference/ACCESS-CONTROL-ADVANCED.md +718 -0
- package/skills/payload/reference/ACCESS-CONTROL.md +700 -0
- package/skills/payload/reference/ADAPTERS.md +312 -0
- package/skills/payload/reference/ADVANCED.md +393 -0
- package/skills/payload/reference/COLLECTIONS.md +336 -0
- package/skills/payload/reference/ENDPOINTS.md +650 -0
- package/skills/payload/reference/FIELD-TYPE-GUARDS.md +553 -0
- package/skills/payload/reference/FIELDS.md +748 -0
- package/skills/payload/reference/HOOKS.md +186 -0
- package/skills/payload/reference/PLUGIN-DEVELOPMENT.md +1445 -0
- package/skills/payload/reference/QUERIES.md +282 -0
- package/dist/auth/cookies.spec.js +0 -34
- package/dist/auth/cookies.spec.js.map +0 -1
- package/dist/auth/strategies/local/authenticate.spec.js +0 -83
- package/dist/auth/strategies/local/authenticate.spec.js.map +0 -1
- package/dist/bin/build.d.ts.map +0 -1
- package/dist/bin/build.js.map +0 -1
- package/dist/bin/build.spec.js +0 -594
- package/dist/bin/build.spec.js.map +0 -1
- package/dist/bin/frameworkConventions.d.ts.map +0 -1
- package/dist/bin/frameworkConventions.js.map +0 -1
- package/dist/bin/generateImportMap/generateImportMap.spec.js +0 -176
- package/dist/bin/generateImportMap/generateImportMap.spec.js.map +0 -1
- package/dist/bin/generateImportMap/index.d.ts.map +0 -1
- package/dist/bin/generateImportMap/index.js.map +0 -1
- package/dist/bin/generateImportMap/iterateCollections.d.ts.map +0 -1
- package/dist/bin/generateImportMap/iterateCollections.js.map +0 -1
- package/dist/bin/generateImportMap/iterateConfig.d.ts.map +0 -1
- package/dist/bin/generateImportMap/iterateConfig.js.map +0 -1
- package/dist/bin/generateImportMap/iterateFields.d.ts.map +0 -1
- package/dist/bin/generateImportMap/iterateFields.js.map +0 -1
- package/dist/bin/generateImportMap/iterateGlobals.d.ts.map +0 -1
- package/dist/bin/generateImportMap/iterateGlobals.js.map +0 -1
- package/dist/bin/generateImportMap/utilities/addPayloadComponentToImportMap.d.ts.map +0 -1
- package/dist/bin/generateImportMap/utilities/addPayloadComponentToImportMap.js.map +0 -1
- package/dist/bin/generateImportMap/utilities/getFromImportMap.d.ts.map +0 -1
- package/dist/bin/generateImportMap/utilities/getFromImportMap.js.map +0 -1
- package/dist/bin/generateImportMap/utilities/getImportMapToBaseDirPath.d.ts.map +0 -1
- package/dist/bin/generateImportMap/utilities/getImportMapToBaseDirPath.js.map +0 -1
- package/dist/bin/generateImportMap/utilities/parsePayloadComponent.d.ts.map +0 -1
- package/dist/bin/generateImportMap/utilities/parsePayloadComponent.js.map +0 -1
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.d.ts.map +0 -1
- package/dist/bin/generateImportMap/utilities/resolveImportMapFilePath.js.map +0 -1
- package/dist/bin/generateTypes.d.ts +0 -6
- package/dist/bin/generateTypes.d.ts.map +0 -1
- package/dist/bin/generateTypes.js.map +0 -1
- package/dist/bin/index.d.ts +0 -2
- package/dist/bin/index.d.ts.map +0 -1
- package/dist/bin/index.js +0 -200
- package/dist/bin/index.js.map +0 -1
- package/dist/bin/info.d.ts +0 -2
- package/dist/bin/info.d.ts.map +0 -1
- package/dist/bin/info.js +0 -56
- package/dist/bin/info.js.map +0 -1
- package/dist/bin/loadEnv.d.ts.map +0 -1
- package/dist/bin/loadEnv.js.map +0 -1
- package/dist/bin/migrate.d.ts +0 -15
- package/dist/bin/migrate.d.ts.map +0 -1
- package/dist/bin/migrate.js +0 -102
- package/dist/bin/migrate.js.map +0 -1
- package/dist/collections/config/defaults.spec.js +0 -47
- package/dist/collections/config/defaults.spec.js.map +0 -1
- package/dist/collections/config/sanitize.spec.js +0 -120
- package/dist/collections/config/sanitize.spec.js.map +0 -1
- package/dist/collections/config/useAsTitle.spec.js +0 -187
- package/dist/collections/config/useAsTitle.spec.js.map +0 -1
- package/dist/database/defaultUpdateJobs.d.ts +0 -3
- package/dist/database/defaultUpdateJobs.d.ts.map +0 -1
- package/dist/database/defaultUpdateJobs.js +0 -41
- package/dist/database/defaultUpdateJobs.js.map +0 -1
- package/dist/database/migrations/findMigrationDir.spec.js +0 -47
- package/dist/database/migrations/findMigrationDir.spec.js.map +0 -1
- package/dist/fields/baseFields/slug/countVersions.d.ts +0 -13
- package/dist/fields/baseFields/slug/countVersions.d.ts.map +0 -1
- package/dist/fields/baseFields/slug/countVersions.js +0 -27
- package/dist/fields/baseFields/slug/countVersions.js.map +0 -1
- package/dist/fields/config/reservedFieldNames.spec.js +0 -149
- package/dist/fields/config/reservedFieldNames.spec.js.map +0 -1
- package/dist/fields/config/sanitize.spec.js +0 -745
- package/dist/fields/config/sanitize.spec.js.map +0 -1
- package/dist/fields/isFieldDisabled.spec.js +0 -134
- package/dist/fields/isFieldDisabled.spec.js.map +0 -1
- package/dist/fields/validations.spec.js +0 -990
- package/dist/fields/validations.spec.js.map +0 -1
- package/dist/globals/config/sanitize.spec.js +0 -43
- package/dist/globals/config/sanitize.spec.js.map +0 -1
- package/dist/hierarchy/utils/getLocalizedValue.spec.js +0 -250
- package/dist/hierarchy/utils/getLocalizedValue.spec.js.map +0 -1
- package/dist/locked-documents/config.spec.js +0 -298
- package/dist/locked-documents/config.spec.js.map +0 -1
- package/dist/uploads/checkFileAccess.spec.js +0 -109
- package/dist/uploads/checkFileAccess.spec.js.map +0 -1
- package/dist/uploads/cropImage.d.ts +0 -30
- package/dist/uploads/cropImage.d.ts.map +0 -1
- package/dist/uploads/cropImage.js +0 -58
- package/dist/uploads/cropImage.js.map +0 -1
- package/dist/uploads/endpoints/getFileFromURL.d.ts +0 -3
- package/dist/uploads/endpoints/getFileFromURL.d.ts.map +0 -1
- package/dist/uploads/endpoints/getFileFromURL.js.map +0 -1
- package/dist/uploads/fetchAPI-multipart/isEligibleRequest.spec.js +0 -29
- package/dist/uploads/fetchAPI-multipart/isEligibleRequest.spec.js.map +0 -1
- package/dist/uploads/getExternalFile.d.ts +0 -10
- package/dist/uploads/getExternalFile.d.ts.map +0 -1
- package/dist/uploads/getExternalFile.js +0 -73
- package/dist/uploads/getExternalFile.js.map +0 -1
- package/dist/uploads/getSafeFilename.spec.js +0 -274
- package/dist/uploads/getSafeFilename.spec.js.map +0 -1
- package/dist/uploads/image-resizing/createImageSize.d.ts +0 -24
- package/dist/uploads/image-resizing/createImageSize.d.ts.map +0 -1
- package/dist/uploads/image-resizing/createImageSize.js +0 -23
- package/dist/uploads/image-resizing/createImageSize.js.map +0 -1
- package/dist/uploads/image-resizing/createImageSizes.d.ts +0 -39
- package/dist/uploads/image-resizing/createImageSizes.d.ts.map +0 -1
- package/dist/uploads/image-resizing/createImageSizes.js +0 -208
- package/dist/uploads/image-resizing/createImageSizes.js.map +0 -1
- package/dist/uploads/image-resizing/extractHeightFromImage.d.ts +0 -9
- package/dist/uploads/image-resizing/extractHeightFromImage.d.ts.map +0 -1
- package/dist/uploads/image-resizing/extractHeightFromImage.js +0 -13
- package/dist/uploads/image-resizing/extractHeightFromImage.js.map +0 -1
- package/dist/uploads/image-resizing/generateImageSizeFilename.d.ts.map +0 -1
- package/dist/uploads/image-resizing/generateImageSizeFilename.js.map +0 -1
- package/dist/uploads/image-resizing/getImageResizeAction.d.ts +0 -24
- package/dist/uploads/image-resizing/getImageResizeAction.d.ts.map +0 -1
- package/dist/uploads/image-resizing/getImageResizeAction.js +0 -56
- package/dist/uploads/image-resizing/getImageResizeAction.js.map +0 -1
- package/dist/uploads/image-resizing/parseFilename.d.ts.map +0 -1
- package/dist/uploads/image-resizing/parseFilename.js.map +0 -1
- package/dist/uploads/image-resizing/sanitizeResizeConfig.d.ts +0 -11
- package/dist/uploads/image-resizing/sanitizeResizeConfig.d.ts.map +0 -1
- package/dist/uploads/image-resizing/sanitizeResizeConfig.js +0 -20
- package/dist/uploads/image-resizing/sanitizeResizeConfig.js.map +0 -1
- package/dist/uploads/matchMimeType.spec.js +0 -66
- package/dist/uploads/matchMimeType.spec.js.map +0 -1
- package/dist/uploads/mimeTypeValidator.spec.js +0 -84
- package/dist/uploads/mimeTypeValidator.spec.js.map +0 -1
- package/dist/uploads/optionallyAppendMetadata.d.ts +0 -12
- package/dist/uploads/optionallyAppendMetadata.d.ts.map +0 -1
- package/dist/uploads/optionallyAppendMetadata.js +0 -17
- package/dist/uploads/optionallyAppendMetadata.js.map +0 -1
- package/dist/uploads/tempFile.d.ts +0 -7
- package/dist/uploads/tempFile.d.ts.map +0 -1
- package/dist/uploads/tempFile.js +0 -39
- package/dist/uploads/tempFile.js.map +0 -1
- package/dist/utilities/addDataAndFileToRequest.spec.js +0 -41
- package/dist/utilities/addDataAndFileToRequest.spec.js.map +0 -1
- package/dist/utilities/addSelectGenericsToGeneratedTypes.spec.js +0 -563
- package/dist/utilities/addSelectGenericsToGeneratedTypes.spec.js.map +0 -1
- package/dist/utilities/combineWhereConstraints.spec.js +0 -131
- package/dist/utilities/combineWhereConstraints.spec.js.map +0 -1
- package/dist/utilities/configToJSONSchema.spec.js +0 -1162
- package/dist/utilities/configToJSONSchema.spec.js.map +0 -1
- package/dist/utilities/createLocalReq.d.ts +0 -15
- package/dist/utilities/createLocalReq.d.ts.map +0 -1
- package/dist/utilities/createLocalReq.js +0 -110
- package/dist/utilities/createLocalReq.js.map +0 -1
- package/dist/utilities/createLocalReq.spec.js +0 -125
- package/dist/utilities/createLocalReq.spec.js.map +0 -1
- package/dist/utilities/filterDataToSelectedLocales.spec.js +0 -529
- package/dist/utilities/filterDataToSelectedLocales.spec.js.map +0 -1
- package/dist/utilities/flattenTopLevelFields.spec.js +0 -659
- package/dist/utilities/flattenTopLevelFields.spec.js.map +0 -1
- package/dist/utilities/formatAdminURL.spec.js +0 -168
- package/dist/utilities/formatAdminURL.spec.js.map +0 -1
- package/dist/utilities/formatErrors.spec.js +0 -101
- package/dist/utilities/formatErrors.spec.js.map +0 -1
- package/dist/utilities/formatLabels.spec.js +0 -38
- package/dist/utilities/formatLabels.spec.js.map +0 -1
- package/dist/utilities/getFieldByPath.spec.js +0 -157
- package/dist/utilities/getFieldByPath.spec.js.map +0 -1
- package/dist/utilities/getFieldPermissions.spec.js +0 -78
- package/dist/utilities/getFieldPermissions.spec.js.map +0 -1
- package/dist/utilities/getRequestOrigin.spec.js +0 -151
- package/dist/utilities/getRequestOrigin.spec.js.map +0 -1
- package/dist/utilities/getSafeRedirect.spec.js +0 -84
- package/dist/utilities/getSafeRedirect.spec.js.map +0 -1
- package/dist/utilities/isURLAllowed.spec.js +0 -78
- package/dist/utilities/isURLAllowed.spec.js.map +0 -1
- package/dist/utilities/isolateObjectProperty.spec.js +0 -120
- package/dist/utilities/isolateObjectProperty.spec.js.map +0 -1
- package/dist/utilities/mergeLocalizedData.spec.js +0 -1108
- package/dist/utilities/mergeLocalizedData.spec.js.map +0 -1
- package/dist/utilities/optionsAreEqual.spec.js +0 -319
- package/dist/utilities/optionsAreEqual.spec.js.map +0 -1
- package/dist/utilities/parseParams/index.spec.js +0 -384
- package/dist/utilities/parseParams/index.spec.js.map +0 -1
- package/dist/utilities/profiling.spec.js +0 -53
- package/dist/utilities/profiling.spec.js.map +0 -1
- package/dist/utilities/sanitizePermissions.spec.js +0 -1639
- package/dist/utilities/sanitizePermissions.spec.js.map +0 -1
- package/dist/utilities/sanitizeUserDataForEmail.spec.js +0 -134
- package/dist/utilities/sanitizeUserDataForEmail.spec.js.map +0 -1
- package/dist/utilities/telemetry/index.spec.js +0 -43
- package/dist/utilities/telemetry/index.spec.js.map +0 -1
- package/dist/utilities/traverseFields.spec.js +0 -53
- package/dist/utilities/traverseFields.spec.js.map +0 -1
- package/dist/utilities/validateTimezones.spec.js +0 -493
- package/dist/utilities/validateTimezones.spec.js.map +0 -1
- /package/dist/{bin → cli/commands/generateImportMap}/frameworkConventions.d.ts +0 -0
- /package/dist/{bin → cli/commands/generateImportMap}/frameworkConventions.js +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/iterateCollections.js +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/iterateFields.js +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/iterateGlobals.js +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/utilities/addPayloadComponentToImportMap.js +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/utilities/getFromImportMap.js +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/utilities/getImportMapToBaseDirPath.d.ts +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/utilities/getImportMapToBaseDirPath.js +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/utilities/parsePayloadComponent.js +0 -0
- /package/dist/{bin → cli/commands}/generateImportMap/utilities/resolveImportMapFilePath.d.ts +0 -0
- /package/dist/{bin → cli/runtime}/loadEnv.d.ts +0 -0
- /package/dist/uploads/{image-resizing/generateImageSizeFilename.d.ts → generateImageSizeFilename.d.ts} +0 -0
- /package/dist/uploads/{image-resizing/generateImageSizeFilename.js → generateImageSizeFilename.js} +0 -0
- /package/dist/uploads/{image-resizing/parseFilename.d.ts → parseFilename.d.ts} +0 -0
- /package/dist/uploads/{image-resizing/parseFilename.js → parseFilename.js} +0 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
/**
|
|
4
|
+
* Returns the raw value that the command schema will validate.
|
|
5
|
+
*
|
|
6
|
+
* For example, both commands return `{ migrationName: 'add-users' }`:
|
|
7
|
+
*
|
|
8
|
+
* ```sh
|
|
9
|
+
* payload migrate:create add-users
|
|
10
|
+
* payload migrate:create --input '{"migrationName":"add-users"}'
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Explicit shell values override values from `--input`. If `seed.json` contains
|
|
14
|
+
* `{ "returning": false }`, then `payload createDocuments --input @seed.json --returning`
|
|
15
|
+
* returns input with `{ returning: true }`.
|
|
16
|
+
*/ export const getCommandInput = async (command)=>{
|
|
17
|
+
const input = command.getOptionValue('input');
|
|
18
|
+
const shellInput = getShellInput(command);
|
|
19
|
+
if (input === undefined) {
|
|
20
|
+
return shellInput;
|
|
21
|
+
}
|
|
22
|
+
const parsedInput = await parseJSONInput(input);
|
|
23
|
+
if (typeof parsedInput !== 'object' || parsedInput === null || Array.isArray(parsedInput)) {
|
|
24
|
+
command.error('error: --input must contain a JSON object');
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
...parsedInput,
|
|
28
|
+
...shellInput
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Combines Commander's parsed positional arguments and explicitly passed options.
|
|
33
|
+
*
|
|
34
|
+
* For example, `payload migrate:create add-users --skip-empty` returns:
|
|
35
|
+
*
|
|
36
|
+
* ```ts
|
|
37
|
+
* { migrationName: 'add-users', skipEmpty: true }
|
|
38
|
+
* ```
|
|
39
|
+
*/ const getShellInput = (command)=>{
|
|
40
|
+
const input = {};
|
|
41
|
+
for (const [position, argument] of command.registeredArguments.entries()){
|
|
42
|
+
const value = command.processedArgs[position];
|
|
43
|
+
if (value !== undefined && (!Array.isArray(value) || value.length > 0)) {
|
|
44
|
+
input[argument.name()] = value;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
for (const option of command.options){
|
|
48
|
+
const name = option.attributeName();
|
|
49
|
+
// The schema applies defaults later, so only include options the user passed.
|
|
50
|
+
if (name !== 'input' && name !== 'json' && command.getOptionValueSource(name) === 'cli') {
|
|
51
|
+
input[name] = command.getOptionValue(name);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return input;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Reads and parses the value passed to `--input`.
|
|
58
|
+
*
|
|
59
|
+
* For example, `'{}'` is parsed directly, `@input.json` reads the JSON from that file,
|
|
60
|
+
* and `-` reads it from stdin. An input of `'{"force":true}'` returns `{ force: true }`.
|
|
61
|
+
*/ const parseJSONInput = async (input)=>{
|
|
62
|
+
let json = input;
|
|
63
|
+
switch(input){
|
|
64
|
+
case '-':
|
|
65
|
+
{
|
|
66
|
+
json = '';
|
|
67
|
+
for await (const chunk of process.stdin){
|
|
68
|
+
json += chunk.toString();
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
default:
|
|
73
|
+
{
|
|
74
|
+
if (input.startsWith('@')) {
|
|
75
|
+
json = await readFile(path.resolve(process.cwd(), input.slice(1)), 'utf8');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
try {
|
|
80
|
+
return JSON.parse(json);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
throw new Error(`Could not parse --input as JSON: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=getCommandInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/runtime/getCommandInput.ts"],"sourcesContent":["import type { Command } from 'commander'\n\nimport { readFile } from 'node:fs/promises'\nimport path from 'node:path'\n\n/**\n * Returns the raw value that the command schema will validate.\n *\n * For example, both commands return `{ migrationName: 'add-users' }`:\n *\n * ```sh\n * payload migrate:create add-users\n * payload migrate:create --input '{\"migrationName\":\"add-users\"}'\n * ```\n *\n * Explicit shell values override values from `--input`. If `seed.json` contains\n * `{ \"returning\": false }`, then `payload createDocuments --input @seed.json --returning`\n * returns input with `{ returning: true }`.\n */\nexport const getCommandInput = async (command: Command): Promise<unknown> => {\n const input = command.getOptionValue('input') as string | undefined\n const shellInput = getShellInput(command)\n\n if (input === undefined) {\n return shellInput\n }\n\n const parsedInput = await parseJSONInput(input)\n\n if (typeof parsedInput !== 'object' || parsedInput === null || Array.isArray(parsedInput)) {\n command.error('error: --input must contain a JSON object')\n }\n\n return { ...parsedInput, ...shellInput }\n}\n\n/**\n * Combines Commander's parsed positional arguments and explicitly passed options.\n *\n * For example, `payload migrate:create add-users --skip-empty` returns:\n *\n * ```ts\n * { migrationName: 'add-users', skipEmpty: true }\n * ```\n */\nconst getShellInput = (command: Command): Record<string, unknown> => {\n const input: Record<string, unknown> = {}\n\n for (const [position, argument] of command.registeredArguments.entries()) {\n const value = command.processedArgs[position]\n\n if (value !== undefined && (!Array.isArray(value) || value.length > 0)) {\n input[argument.name()] = value\n }\n }\n\n for (const option of command.options) {\n const name = option.attributeName()\n\n // The schema applies defaults later, so only include options the user passed.\n if (name !== 'input' && name !== 'json' && command.getOptionValueSource(name) === 'cli') {\n input[name] = command.getOptionValue(name)\n }\n }\n\n return input\n}\n\n/**\n * Reads and parses the value passed to `--input`.\n *\n * For example, `'{}'` is parsed directly, `@input.json` reads the JSON from that file,\n * and `-` reads it from stdin. An input of `'{\"force\":true}'` returns `{ force: true }`.\n */\nconst parseJSONInput = async (input: string): Promise<unknown> => {\n let json = input\n\n switch (input) {\n case '-': {\n json = ''\n for await (const chunk of process.stdin) {\n json += chunk.toString()\n }\n break\n }\n\n default: {\n if (input.startsWith('@')) {\n json = await readFile(path.resolve(process.cwd(), input.slice(1)), 'utf8')\n }\n }\n }\n\n try {\n return JSON.parse(json) as unknown\n } catch (error) {\n throw new Error(\n `Could not parse --input as JSON: ${error instanceof Error ? error.message : 'Unknown error'}`,\n )\n }\n}\n"],"names":["readFile","path","getCommandInput","command","input","getOptionValue","shellInput","getShellInput","undefined","parsedInput","parseJSONInput","Array","isArray","error","position","argument","registeredArguments","entries","value","processedArgs","length","name","option","options","attributeName","getOptionValueSource","json","chunk","process","stdin","toString","startsWith","resolve","cwd","slice","JSON","parse","Error","message"],"mappings":"AAEA,SAASA,QAAQ,QAAQ,mBAAkB;AAC3C,OAAOC,UAAU,YAAW;AAE5B;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMC,kBAAkB,OAAOC;IACpC,MAAMC,QAAQD,QAAQE,cAAc,CAAC;IACrC,MAAMC,aAAaC,cAAcJ;IAEjC,IAAIC,UAAUI,WAAW;QACvB,OAAOF;IACT;IAEA,MAAMG,cAAc,MAAMC,eAAeN;IAEzC,IAAI,OAAOK,gBAAgB,YAAYA,gBAAgB,QAAQE,MAAMC,OAAO,CAACH,cAAc;QACzFN,QAAQU,KAAK,CAAC;IAChB;IAEA,OAAO;QAAE,GAAGJ,WAAW;QAAE,GAAGH,UAAU;IAAC;AACzC,EAAC;AAED;;;;;;;;CAQC,GACD,MAAMC,gBAAgB,CAACJ;IACrB,MAAMC,QAAiC,CAAC;IAExC,KAAK,MAAM,CAACU,UAAUC,SAAS,IAAIZ,QAAQa,mBAAmB,CAACC,OAAO,GAAI;QACxE,MAAMC,QAAQf,QAAQgB,aAAa,CAACL,SAAS;QAE7C,IAAII,UAAUV,aAAc,CAAA,CAACG,MAAMC,OAAO,CAACM,UAAUA,MAAME,MAAM,GAAG,CAAA,GAAI;YACtEhB,KAAK,CAACW,SAASM,IAAI,GAAG,GAAGH;QAC3B;IACF;IAEA,KAAK,MAAMI,UAAUnB,QAAQoB,OAAO,CAAE;QACpC,MAAMF,OAAOC,OAAOE,aAAa;QAEjC,8EAA8E;QAC9E,IAAIH,SAAS,WAAWA,SAAS,UAAUlB,QAAQsB,oBAAoB,CAACJ,UAAU,OAAO;YACvFjB,KAAK,CAACiB,KAAK,GAAGlB,QAAQE,cAAc,CAACgB;QACvC;IACF;IAEA,OAAOjB;AACT;AAEA;;;;;CAKC,GACD,MAAMM,iBAAiB,OAAON;IAC5B,IAAIsB,OAAOtB;IAEX,OAAQA;QACN,KAAK;YAAK;gBACRsB,OAAO;gBACP,WAAW,MAAMC,SAASC,QAAQC,KAAK,CAAE;oBACvCH,QAAQC,MAAMG,QAAQ;gBACxB;gBACA;YACF;QAEA;YAAS;gBACP,IAAI1B,MAAM2B,UAAU,CAAC,MAAM;oBACzBL,OAAO,MAAM1B,SAASC,KAAK+B,OAAO,CAACJ,QAAQK,GAAG,IAAI7B,MAAM8B,KAAK,CAAC,KAAK;gBACrE;YACF;IACF;IAEA,IAAI;QACF,OAAOC,KAAKC,KAAK,CAACV;IACpB,EAAE,OAAOb,OAAO;QACd,MAAM,IAAIwB,MACR,CAAC,iCAAiC,EAAExB,iBAAiBwB,QAAQxB,MAAMyB,OAAO,GAAG,iBAAiB;IAElG;AACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import type { CLICommand, CLIHelp, CLIRuntime } from '../../config/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Runs a command through Payload's shared CLI behavior.
|
|
5
|
+
*
|
|
6
|
+
* For example, `payload jobs:run --limit 2 --json` goes through these steps:
|
|
7
|
+
*
|
|
8
|
+
* - reads arguments and options and merges them over the JSON value passed through `--input`
|
|
9
|
+
* - validates the input and includes the schema when reporting validation errors
|
|
10
|
+
* - passes the validated `args` and runtime helpers to the command handler
|
|
11
|
+
* - sends logs to stderr and writes a consistent JSON response to stdout in JSON mode
|
|
12
|
+
* - normalizes handler results, errors, and exit codes
|
|
13
|
+
* - runs the handler on a schedule when using `--cron`
|
|
14
|
+
*
|
|
15
|
+
* Binding the handler directly to `command.action()` would skip this shared behavior.
|
|
16
|
+
*/
|
|
17
|
+
export declare const invokeCLICommand: ({ command, definition, help, runtime, }: {
|
|
18
|
+
command: Command;
|
|
19
|
+
definition: CLICommand;
|
|
20
|
+
help: CLIHelp;
|
|
21
|
+
runtime: CLIRuntime;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
//# sourceMappingURL=invokeCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invokeCommand.d.ts","sourceRoot":"","sources":["../../../src/cli/runtime/invokeCommand.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAIxC,OAAO,KAAK,EAAE,UAAU,EAAoB,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAW9F;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,4CAK1B;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,UAAU,CAAA;CACpB,KAAG,OAAO,CAAC,IAAI,CAiGf,CAAA"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/* eslint-disable no-console */ import { Cron } from 'croner';
|
|
2
|
+
import { getCommandInput } from './getCommandInput.js';
|
|
3
|
+
import { CLICommandError, getCLIErrorOutput, isJSONOutput, withCLIOutputMode, writeCLIJSON } from './output.js';
|
|
4
|
+
/**
|
|
5
|
+
* Runs a command through Payload's shared CLI behavior.
|
|
6
|
+
*
|
|
7
|
+
* For example, `payload jobs:run --limit 2 --json` goes through these steps:
|
|
8
|
+
*
|
|
9
|
+
* - reads arguments and options and merges them over the JSON value passed through `--input`
|
|
10
|
+
* - validates the input and includes the schema when reporting validation errors
|
|
11
|
+
* - passes the validated `args` and runtime helpers to the command handler
|
|
12
|
+
* - sends logs to stderr and writes a consistent JSON response to stdout in JSON mode
|
|
13
|
+
* - normalizes handler results, errors, and exit codes
|
|
14
|
+
* - runs the handler on a schedule when using `--cron`
|
|
15
|
+
*
|
|
16
|
+
* Binding the handler directly to `command.action()` would skip this shared behavior.
|
|
17
|
+
*/ export const invokeCLICommand = async ({ command, definition, help, runtime })=>{
|
|
18
|
+
const rawInput = await getCommandInput(command);
|
|
19
|
+
const validation = await definition.input['~standard'].validate(rawInput);
|
|
20
|
+
if (validation.issues) {
|
|
21
|
+
const issues = validation.issues.map((issue)=>({
|
|
22
|
+
message: issue.message,
|
|
23
|
+
path: issue.path?.map((part)=>String(typeof part === 'object' ? part.key : part)).join('.')
|
|
24
|
+
}));
|
|
25
|
+
throw new CLICommandError({
|
|
26
|
+
code: 'INVALID_INPUT',
|
|
27
|
+
command: command.name(),
|
|
28
|
+
inputSchema: definition.schema,
|
|
29
|
+
issues,
|
|
30
|
+
message: `Invalid command input:\n${issues.map((issue)=>`- ${issue.path ? `${issue.path}: ` : ''}${issue.message}`).join('\n')}`
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
const callHandler = async ()=>{
|
|
34
|
+
const isJSON = isJSONOutput(command);
|
|
35
|
+
let handlerResult;
|
|
36
|
+
try {
|
|
37
|
+
handlerResult = await withCLIOutputMode({
|
|
38
|
+
isJSON,
|
|
39
|
+
run: ()=>definition.handler({
|
|
40
|
+
args: validation.value,
|
|
41
|
+
getConfig: runtime.getConfig,
|
|
42
|
+
getPayload: runtime.getPayload,
|
|
43
|
+
help,
|
|
44
|
+
isJSON
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
} catch (error) {
|
|
48
|
+
if (error instanceof CLICommandError) {
|
|
49
|
+
throw error;
|
|
50
|
+
}
|
|
51
|
+
throw new CLICommandError({
|
|
52
|
+
cause: error,
|
|
53
|
+
code: error && typeof error === 'object' && 'code' in error && typeof error.code === 'string' ? error.code : undefined,
|
|
54
|
+
command: command.name(),
|
|
55
|
+
message: error instanceof Error ? error.message : 'Unknown error'
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const { exitCode, result } = typeof handlerResult === 'number' ? {
|
|
59
|
+
exitCode: handlerResult
|
|
60
|
+
} : handlerResult ?? {};
|
|
61
|
+
if (isJSON) {
|
|
62
|
+
writeCLIJSON({
|
|
63
|
+
command,
|
|
64
|
+
value: {
|
|
65
|
+
command: command.name(),
|
|
66
|
+
...exitCode ? {
|
|
67
|
+
exitCode
|
|
68
|
+
} : {},
|
|
69
|
+
...result !== undefined ? {
|
|
70
|
+
result
|
|
71
|
+
} : {},
|
|
72
|
+
success: !exitCode
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
if (typeof exitCode === 'number') {
|
|
77
|
+
process.exitCode = exitCode;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const { cron } = command.optsWithGlobals();
|
|
81
|
+
if (!cron) {
|
|
82
|
+
await callHandler();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
runtime.markScheduled();
|
|
86
|
+
new Cron(cron, async ()=>{
|
|
87
|
+
try {
|
|
88
|
+
await callHandler();
|
|
89
|
+
} catch (error) {
|
|
90
|
+
if (isJSONOutput(command)) {
|
|
91
|
+
writeCLIJSON({
|
|
92
|
+
command,
|
|
93
|
+
value: getCLIErrorOutput({
|
|
94
|
+
error
|
|
95
|
+
})
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
console.error(error);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
protect: true
|
|
103
|
+
});
|
|
104
|
+
process.stdin.resume();
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
//# sourceMappingURL=invokeCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/runtime/invokeCommand.ts"],"sourcesContent":["/* eslint-disable no-console */\nimport type { Command } from 'commander'\n\nimport { Cron } from 'croner'\n\nimport type { CLICommand, CLICommandResult, CLIHelp, CLIRuntime } from '../../config/types.js'\n\nimport { getCommandInput } from './getCommandInput.js'\nimport {\n CLICommandError,\n getCLIErrorOutput,\n isJSONOutput,\n withCLIOutputMode,\n writeCLIJSON,\n} from './output.js'\n\n/**\n * Runs a command through Payload's shared CLI behavior.\n *\n * For example, `payload jobs:run --limit 2 --json` goes through these steps:\n *\n * - reads arguments and options and merges them over the JSON value passed through `--input`\n * - validates the input and includes the schema when reporting validation errors\n * - passes the validated `args` and runtime helpers to the command handler\n * - sends logs to stderr and writes a consistent JSON response to stdout in JSON mode\n * - normalizes handler results, errors, and exit codes\n * - runs the handler on a schedule when using `--cron`\n *\n * Binding the handler directly to `command.action()` would skip this shared behavior.\n */\nexport const invokeCLICommand = async ({\n command,\n definition,\n help,\n runtime,\n}: {\n command: Command\n definition: CLICommand\n help: CLIHelp\n runtime: CLIRuntime\n}): Promise<void> => {\n const rawInput = await getCommandInput(command)\n const validation = await definition.input['~standard'].validate(rawInput)\n\n if (validation.issues) {\n const issues = validation.issues.map((issue) => ({\n message: issue.message,\n path: issue.path?.map((part) => String(typeof part === 'object' ? part.key : part)).join('.'),\n }))\n\n throw new CLICommandError({\n code: 'INVALID_INPUT',\n command: command.name(),\n inputSchema: definition.schema,\n issues,\n message: `Invalid command input:\\n${issues\n .map((issue) => `- ${issue.path ? `${issue.path}: ` : ''}${issue.message}`)\n .join('\\n')}`,\n })\n }\n\n const callHandler = async (): Promise<void> => {\n const isJSON = isJSONOutput(command)\n let handlerResult: CLICommandResult | number | void\n\n try {\n handlerResult = await withCLIOutputMode({\n isJSON,\n run: () =>\n definition.handler({\n args: validation.value,\n getConfig: runtime.getConfig,\n getPayload: runtime.getPayload,\n help,\n isJSON,\n }),\n })\n } catch (error) {\n if (error instanceof CLICommandError) {\n throw error\n }\n\n throw new CLICommandError({\n cause: error,\n code:\n error && typeof error === 'object' && 'code' in error && typeof error.code === 'string'\n ? error.code\n : undefined,\n command: command.name(),\n message: error instanceof Error ? error.message : 'Unknown error',\n })\n }\n\n const { exitCode, result } =\n typeof handlerResult === 'number' ? { exitCode: handlerResult } : (handlerResult ?? {})\n\n if (isJSON) {\n writeCLIJSON({\n command,\n value: {\n command: command.name(),\n ...(exitCode ? { exitCode } : {}),\n ...(result !== undefined ? { result } : {}),\n success: !exitCode,\n },\n })\n }\n\n if (typeof exitCode === 'number') {\n process.exitCode = exitCode\n }\n }\n\n const { cron } = command.optsWithGlobals<{ cron?: string }>()\n\n if (!cron) {\n await callHandler()\n return\n }\n\n runtime.markScheduled()\n new Cron(\n cron,\n async () => {\n try {\n await callHandler()\n } catch (error) {\n if (isJSONOutput(command)) {\n writeCLIJSON({ command, value: getCLIErrorOutput({ error }) })\n } else {\n console.error(error)\n }\n }\n },\n { protect: true },\n )\n process.stdin.resume()\n}\n"],"names":["Cron","getCommandInput","CLICommandError","getCLIErrorOutput","isJSONOutput","withCLIOutputMode","writeCLIJSON","invokeCLICommand","command","definition","help","runtime","rawInput","validation","input","validate","issues","map","issue","message","path","part","String","key","join","code","name","inputSchema","schema","callHandler","isJSON","handlerResult","run","handler","args","value","getConfig","getPayload","error","cause","undefined","Error","exitCode","result","success","process","cron","optsWithGlobals","markScheduled","console","protect","stdin","resume"],"mappings":"AAAA,6BAA6B,GAG7B,SAASA,IAAI,QAAQ,SAAQ;AAI7B,SAASC,eAAe,QAAQ,uBAAsB;AACtD,SACEC,eAAe,EACfC,iBAAiB,EACjBC,YAAY,EACZC,iBAAiB,EACjBC,YAAY,QACP,cAAa;AAEpB;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMC,mBAAmB,OAAO,EACrCC,OAAO,EACPC,UAAU,EACVC,IAAI,EACJC,OAAO,EAMR;IACC,MAAMC,WAAW,MAAMX,gBAAgBO;IACvC,MAAMK,aAAa,MAAMJ,WAAWK,KAAK,CAAC,YAAY,CAACC,QAAQ,CAACH;IAEhE,IAAIC,WAAWG,MAAM,EAAE;QACrB,MAAMA,SAASH,WAAWG,MAAM,CAACC,GAAG,CAAC,CAACC,QAAW,CAAA;gBAC/CC,SAASD,MAAMC,OAAO;gBACtBC,MAAMF,MAAME,IAAI,EAAEH,IAAI,CAACI,OAASC,OAAO,OAAOD,SAAS,WAAWA,KAAKE,GAAG,GAAGF,OAAOG,KAAK;YAC3F,CAAA;QAEA,MAAM,IAAItB,gBAAgB;YACxBuB,MAAM;YACNjB,SAASA,QAAQkB,IAAI;YACrBC,aAAalB,WAAWmB,MAAM;YAC9BZ;YACAG,SAAS,CAAC,wBAAwB,EAAEH,OACjCC,GAAG,CAAC,CAACC,QAAU,CAAC,EAAE,EAAEA,MAAME,IAAI,GAAG,GAAGF,MAAME,IAAI,CAAC,EAAE,CAAC,GAAG,KAAKF,MAAMC,OAAO,EAAE,EACzEK,IAAI,CAAC,OAAO;QACjB;IACF;IAEA,MAAMK,cAAc;QAClB,MAAMC,SAAS1B,aAAaI;QAC5B,IAAIuB;QAEJ,IAAI;YACFA,gBAAgB,MAAM1B,kBAAkB;gBACtCyB;gBACAE,KAAK,IACHvB,WAAWwB,OAAO,CAAC;wBACjBC,MAAMrB,WAAWsB,KAAK;wBACtBC,WAAWzB,QAAQyB,SAAS;wBAC5BC,YAAY1B,QAAQ0B,UAAU;wBAC9B3B;wBACAoB;oBACF;YACJ;QACF,EAAE,OAAOQ,OAAO;YACd,IAAIA,iBAAiBpC,iBAAiB;gBACpC,MAAMoC;YACR;YAEA,MAAM,IAAIpC,gBAAgB;gBACxBqC,OAAOD;gBACPb,MACEa,SAAS,OAAOA,UAAU,YAAY,UAAUA,SAAS,OAAOA,MAAMb,IAAI,KAAK,WAC3Ea,MAAMb,IAAI,GACVe;gBACNhC,SAASA,QAAQkB,IAAI;gBACrBP,SAASmB,iBAAiBG,QAAQH,MAAMnB,OAAO,GAAG;YACpD;QACF;QAEA,MAAM,EAAEuB,QAAQ,EAAEC,MAAM,EAAE,GACxB,OAAOZ,kBAAkB,WAAW;YAAEW,UAAUX;QAAc,IAAKA,iBAAiB,CAAC;QAEvF,IAAID,QAAQ;YACVxB,aAAa;gBACXE;gBACA2B,OAAO;oBACL3B,SAASA,QAAQkB,IAAI;oBACrB,GAAIgB,WAAW;wBAAEA;oBAAS,IAAI,CAAC,CAAC;oBAChC,GAAIC,WAAWH,YAAY;wBAAEG;oBAAO,IAAI,CAAC,CAAC;oBAC1CC,SAAS,CAACF;gBACZ;YACF;QACF;QAEA,IAAI,OAAOA,aAAa,UAAU;YAChCG,QAAQH,QAAQ,GAAGA;QACrB;IACF;IAEA,MAAM,EAAEI,IAAI,EAAE,GAAGtC,QAAQuC,eAAe;IAExC,IAAI,CAACD,MAAM;QACT,MAAMjB;QACN;IACF;IAEAlB,QAAQqC,aAAa;IACrB,IAAIhD,KACF8C,MACA;QACE,IAAI;YACF,MAAMjB;QACR,EAAE,OAAOS,OAAO;YACd,IAAIlC,aAAaI,UAAU;gBACzBF,aAAa;oBAAEE;oBAAS2B,OAAOhC,kBAAkB;wBAAEmC;oBAAM;gBAAG;YAC9D,OAAO;gBACLW,QAAQX,KAAK,CAACA;YAChB;QACF;IACF,GACA;QAAEY,SAAS;IAAK;IAElBL,QAAQM,KAAK,CAACC,MAAM;AACtB,EAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadEnv.d.ts","sourceRoot":"","sources":["../../../src/cli/runtime/loadEnv.ts"],"names":[],"mappings":"AAoCA;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,QAqBpC"}
|
|
@@ -2,7 +2,7 @@ import dotenv from 'dotenv';
|
|
|
2
2
|
import dotenvExpand from 'dotenv-expand';
|
|
3
3
|
import { existsSync } from 'fs';
|
|
4
4
|
import nodePath from 'path';
|
|
5
|
-
import { findUpSync } from '
|
|
5
|
+
import { findUpSync } from '../../utilities/findUp.js';
|
|
6
6
|
/**
|
|
7
7
|
* Loads env files in priority order (same as Next.js convention):
|
|
8
8
|
* .env.${NODE_ENV}.local, .env.local (not for test), .env.${NODE_ENV}, .env
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/runtime/loadEnv.ts"],"sourcesContent":["import dotenv from 'dotenv'\nimport dotenvExpand from 'dotenv-expand'\nimport { existsSync } from 'fs'\nimport nodePath from 'path'\n\nimport { findUpSync } from '../../utilities/findUp.js'\n\n/**\n * Loads env files in priority order (same as Next.js convention):\n * .env.${NODE_ENV}.local, .env.local (not for test), .env.${NODE_ENV}, .env\n */\nfunction loadEnvFiles(dir: string, isDev: boolean): boolean {\n const nodeEnv = process.env.NODE_ENV || (isDev ? 'development' : 'production')\n const envFiles = [\n `.env.${nodeEnv}.local`,\n ...(nodeEnv !== 'test' ? ['.env.local'] : []),\n `.env.${nodeEnv}`,\n '.env',\n ]\n\n let loaded = false\n\n for (const envFile of envFiles) {\n const filePath = nodePath.resolve(dir, envFile)\n if (existsSync(filePath)) {\n const result = dotenv.config({ path: filePath })\n if (result.parsed) {\n dotenvExpand.expand(result)\n loaded = true\n }\n }\n }\n\n return loaded\n}\n\n/**\n * Try to find user's env files and load them.\n * Supports .env, .env.local, .env.development, .env.production, etc.\n * (same file priority as Next.js)\n */\nexport function loadEnv(path?: string) {\n const isDev = process.env.NODE_ENV !== 'production'\n\n if (path?.length) {\n loadEnvFiles(path, isDev)\n return\n }\n\n const loaded = loadEnvFiles(process.cwd(), isDev)\n\n if (!loaded) {\n findUpSync({\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n condition: (dir) => {\n if (loadEnvFiles(dir, isDev)) {\n return true\n }\n },\n dir: process.cwd(),\n })\n }\n}\n"],"names":["dotenv","dotenvExpand","existsSync","nodePath","findUpSync","loadEnvFiles","dir","isDev","nodeEnv","process","env","NODE_ENV","envFiles","loaded","envFile","filePath","resolve","result","config","path","parsed","expand","loadEnv","length","cwd","condition"],"mappings":"AAAA,OAAOA,YAAY,SAAQ;AAC3B,OAAOC,kBAAkB,gBAAe;AACxC,SAASC,UAAU,QAAQ,KAAI;AAC/B,OAAOC,cAAc,OAAM;AAE3B,SAASC,UAAU,QAAQ,4BAA2B;AAEtD;;;CAGC,GACD,SAASC,aAAaC,GAAW,EAAEC,KAAc;IAC/C,MAAMC,UAAUC,QAAQC,GAAG,CAACC,QAAQ,IAAKJ,CAAAA,QAAQ,gBAAgB,YAAW;IAC5E,MAAMK,WAAW;QACf,CAAC,KAAK,EAAEJ,QAAQ,MAAM,CAAC;WACnBA,YAAY,SAAS;YAAC;SAAa,GAAG,EAAE;QAC5C,CAAC,KAAK,EAAEA,SAAS;QACjB;KACD;IAED,IAAIK,SAAS;IAEb,KAAK,MAAMC,WAAWF,SAAU;QAC9B,MAAMG,WAAWZ,SAASa,OAAO,CAACV,KAAKQ;QACvC,IAAIZ,WAAWa,WAAW;YACxB,MAAME,SAASjB,OAAOkB,MAAM,CAAC;gBAAEC,MAAMJ;YAAS;YAC9C,IAAIE,OAAOG,MAAM,EAAE;gBACjBnB,aAAaoB,MAAM,CAACJ;gBACpBJ,SAAS;YACX;QACF;IACF;IAEA,OAAOA;AACT;AAEA;;;;CAIC,GACD,OAAO,SAASS,QAAQH,IAAa;IACnC,MAAMZ,QAAQE,QAAQC,GAAG,CAACC,QAAQ,KAAK;IAEvC,IAAIQ,MAAMI,QAAQ;QAChBlB,aAAac,MAAMZ;QACnB;IACF;IAEA,MAAMM,SAASR,aAAaI,QAAQe,GAAG,IAAIjB;IAE3C,IAAI,CAACM,QAAQ;QACXT,WAAW;YACT,oFAAoF;YACpFqB,WAAW,CAACnB;gBACV,IAAID,aAAaC,KAAKC,QAAQ;oBAC5B,OAAO;gBACT;YACF;YACAD,KAAKG,QAAQe,GAAG;QAClB;IACF;AACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { type Command } from 'commander';
|
|
2
|
+
export type CLIErrorIssue = {
|
|
3
|
+
message: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class CLICommandError extends Error {
|
|
7
|
+
code: string;
|
|
8
|
+
command?: string;
|
|
9
|
+
inputSchema?: Record<string, unknown>;
|
|
10
|
+
issues?: CLIErrorIssue[];
|
|
11
|
+
constructor({ cause, code, command, inputSchema, issues, message, }: {
|
|
12
|
+
cause?: unknown;
|
|
13
|
+
code?: string;
|
|
14
|
+
command?: string;
|
|
15
|
+
inputSchema?: Record<string, unknown>;
|
|
16
|
+
issues?: CLIErrorIssue[];
|
|
17
|
+
message: string;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export declare const isJSONOutput: (command?: Command) => boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Runs CLI work with one effective output mode, then restores the previous process state.
|
|
23
|
+
* JSON mode redirects diagnostic output and sets `PAYLOAD_CLI_JSON` so Payload loggers use stderr.
|
|
24
|
+
*/
|
|
25
|
+
export declare const withCLIOutputMode: <T>({ isJSON, run, }: {
|
|
26
|
+
isJSON: boolean;
|
|
27
|
+
run: () => Promise<T> | T;
|
|
28
|
+
}) => Promise<T>;
|
|
29
|
+
export declare const writeCLIJSON: ({ command, value }: {
|
|
30
|
+
command?: Command;
|
|
31
|
+
value: unknown;
|
|
32
|
+
}) => void;
|
|
33
|
+
export declare const getCLIErrorOutput: ({ command, error, }: {
|
|
34
|
+
command?: string;
|
|
35
|
+
error: unknown;
|
|
36
|
+
}) => Record<string, unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Formats a CLI failure and sets its exit code.
|
|
39
|
+
*
|
|
40
|
+
* Commander prints its own human-readable errors before throwing a `CommanderError`, so they
|
|
41
|
+
* are not printed again. Other errors are printed in full in human-readable mode to preserve
|
|
42
|
+
* their stack trace.
|
|
43
|
+
*/
|
|
44
|
+
export declare const handleCLIError: ({ cli, error }: {
|
|
45
|
+
cli?: Command;
|
|
46
|
+
error: unknown;
|
|
47
|
+
}) => void;
|
|
48
|
+
/** Wraps the CLI entry point so every failure uses the same output and exits cleanly. */
|
|
49
|
+
export declare const withErrorHandling: (run: () => Promise<void>) => (() => Promise<void>);
|
|
50
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/cli/runtime/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAkB,MAAM,WAAW,CAAA;AAIxD,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,qBAAa,eAAgB,SAAQ,KAAK;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAA;IAExB,YAAY,EACV,KAAK,EACL,IAAuB,EACvB,OAAO,EACP,WAAW,EACX,MAAM,EACN,OAAO,GACR,EAAE;QACD,KAAK,CAAC,EAAE,OAAO,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QACrC,MAAM,CAAC,EAAE,aAAa,EAAE,CAAA;QACxB,OAAO,EAAE,MAAM,CAAA;KAChB,EAOA;CACF;AAED,eAAO,MAAM,YAAY,aAAc,OAAO,KAAG,OAkBhD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAU,CAAC,oBAGtC;IACD,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;CAC1B,KAAG,OAAO,CAAC,CAAC,CAqBZ,CAAA;AAED,eAAO,MAAM,YAAY,uBAAwB;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,KAAG,IAYxF,CAAA;AAED,eAAO,MAAM,iBAAiB,wBAG3B;IACD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;CACf,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CA6BzB,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,mBAAoB;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,KAAG,IAelF,CAAA;AAED,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,QACtB,MAAM,OAAO,CAAC,IAAI,CAAC,KAAG,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAQ/C,CAAA"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { CommanderError } from 'commander';
|
|
2
|
+
import { redirectOutputToStderr, writeToCLIStdout } from './redirectOutputToStderr.js';
|
|
3
|
+
export class CLICommandError extends Error {
|
|
4
|
+
code;
|
|
5
|
+
command;
|
|
6
|
+
inputSchema;
|
|
7
|
+
issues;
|
|
8
|
+
constructor({ cause, code = 'COMMAND_FAILED', command, inputSchema, issues, message }){
|
|
9
|
+
super(message, {
|
|
10
|
+
cause
|
|
11
|
+
});
|
|
12
|
+
this.name = 'CLICommandError';
|
|
13
|
+
this.code = code;
|
|
14
|
+
this.command = command;
|
|
15
|
+
this.inputSchema = inputSchema;
|
|
16
|
+
this.issues = issues;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export const isJSONOutput = (command)=>{
|
|
20
|
+
if (command?.getOptionValueSourceWithGlobals('json') === 'cli') {
|
|
21
|
+
return Boolean(command.optsWithGlobals().json);
|
|
22
|
+
}
|
|
23
|
+
const separatorPosition = process.argv.indexOf('--', 2);
|
|
24
|
+
const payloadArguments = process.argv.slice(2, separatorPosition === -1 ? process.argv.length : separatorPosition);
|
|
25
|
+
const jsonPosition = payloadArguments.lastIndexOf('--json');
|
|
26
|
+
const noJSONPosition = payloadArguments.lastIndexOf('--no-json');
|
|
27
|
+
if (jsonPosition !== -1 || noJSONPosition !== -1) {
|
|
28
|
+
return jsonPosition > noJSONPosition;
|
|
29
|
+
}
|
|
30
|
+
return process.env.PAYLOAD_CLI_JSON !== undefined;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Runs CLI work with one effective output mode, then restores the previous process state.
|
|
34
|
+
* JSON mode redirects diagnostic output and sets `PAYLOAD_CLI_JSON` so Payload loggers use stderr.
|
|
35
|
+
*/ export const withCLIOutputMode = async ({ isJSON, run })=>{
|
|
36
|
+
const previousJSONSetting = process.env.PAYLOAD_CLI_JSON;
|
|
37
|
+
const restoreOutput = isJSON ? redirectOutputToStderr() : undefined;
|
|
38
|
+
if (isJSON) {
|
|
39
|
+
process.env.PAYLOAD_CLI_JSON = '1';
|
|
40
|
+
} else {
|
|
41
|
+
delete process.env.PAYLOAD_CLI_JSON;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
return await run();
|
|
45
|
+
} finally{
|
|
46
|
+
restoreOutput?.();
|
|
47
|
+
if (previousJSONSetting === undefined) {
|
|
48
|
+
delete process.env.PAYLOAD_CLI_JSON;
|
|
49
|
+
} else {
|
|
50
|
+
process.env.PAYLOAD_CLI_JSON = previousJSONSetting;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
export const writeCLIJSON = ({ command, value })=>{
|
|
55
|
+
const output = `${JSON.stringify(value, (_key, item)=>typeof item === 'bigint' ? item.toString() : item)}\n`;
|
|
56
|
+
const outputConfiguration = command?.configureOutput();
|
|
57
|
+
writeToCLIStdout({
|
|
58
|
+
output,
|
|
59
|
+
write: outputConfiguration?.writeOut ? (value)=>outputConfiguration.writeOut?.(value) : undefined
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
export const getCLIErrorOutput = ({ command, error })=>{
|
|
63
|
+
if (error instanceof CLICommandError) {
|
|
64
|
+
return {
|
|
65
|
+
command: error.command ?? command,
|
|
66
|
+
error: {
|
|
67
|
+
code: error.code,
|
|
68
|
+
message: error.message,
|
|
69
|
+
...error.issues ? {
|
|
70
|
+
issues: error.issues
|
|
71
|
+
} : {},
|
|
72
|
+
...error.inputSchema ? {
|
|
73
|
+
inputSchema: error.inputSchema
|
|
74
|
+
} : {}
|
|
75
|
+
},
|
|
76
|
+
success: false
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const errorWithDetails = error;
|
|
80
|
+
return {
|
|
81
|
+
...command ? {
|
|
82
|
+
command
|
|
83
|
+
} : {},
|
|
84
|
+
error: {
|
|
85
|
+
code: typeof errorWithDetails?.code === 'string' ? errorWithDetails.code : 'COMMAND_FAILED',
|
|
86
|
+
message: typeof errorWithDetails?.message === 'string' ? errorWithDetails.message : typeof error === 'string' ? error : 'Unknown error'
|
|
87
|
+
},
|
|
88
|
+
success: false
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Formats a CLI failure and sets its exit code.
|
|
93
|
+
*
|
|
94
|
+
* Commander prints its own human-readable errors before throwing a `CommanderError`, so they
|
|
95
|
+
* are not printed again. Other errors are printed in full in human-readable mode to preserve
|
|
96
|
+
* their stack trace.
|
|
97
|
+
*/ export const handleCLIError = ({ cli, error })=>{
|
|
98
|
+
const exitCode = error instanceof CommanderError ? error.exitCode : 1;
|
|
99
|
+
const shouldOutputJSON = isJSONOutput(cli);
|
|
100
|
+
if (shouldOutputJSON && exitCode !== 0) {
|
|
101
|
+
writeCLIJSON({
|
|
102
|
+
command: cli,
|
|
103
|
+
value: getCLIErrorOutput({
|
|
104
|
+
command: cli?.args[0],
|
|
105
|
+
error
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
} else if (!(error instanceof CommanderError)) {
|
|
109
|
+
// eslint-disable-next-line no-console
|
|
110
|
+
console.error(error);
|
|
111
|
+
}
|
|
112
|
+
process.exitCode = exitCode;
|
|
113
|
+
};
|
|
114
|
+
/** Wraps the CLI entry point so every failure uses the same output and exits cleanly. */ export const withErrorHandling = (run)=>async ()=>{
|
|
115
|
+
try {
|
|
116
|
+
await run();
|
|
117
|
+
} catch (error) {
|
|
118
|
+
handleCLIError({
|
|
119
|
+
error
|
|
120
|
+
});
|
|
121
|
+
process.exit(process.exitCode ?? 1);
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/runtime/output.ts"],"sourcesContent":["import { type Command, CommanderError } from 'commander'\n\nimport { redirectOutputToStderr, writeToCLIStdout } from './redirectOutputToStderr.js'\n\nexport type CLIErrorIssue = {\n message: string\n path?: string\n}\n\nexport class CLICommandError extends Error {\n code: string\n command?: string\n inputSchema?: Record<string, unknown>\n issues?: CLIErrorIssue[]\n\n constructor({\n cause,\n code = 'COMMAND_FAILED',\n command,\n inputSchema,\n issues,\n message,\n }: {\n cause?: unknown\n code?: string\n command?: string\n inputSchema?: Record<string, unknown>\n issues?: CLIErrorIssue[]\n message: string\n }) {\n super(message, { cause })\n this.name = 'CLICommandError'\n this.code = code\n this.command = command\n this.inputSchema = inputSchema\n this.issues = issues\n }\n}\n\nexport const isJSONOutput = (command?: Command): boolean => {\n if (command?.getOptionValueSourceWithGlobals('json') === 'cli') {\n return Boolean(command.optsWithGlobals<{ json?: boolean }>().json)\n }\n\n const separatorPosition = process.argv.indexOf('--', 2)\n const payloadArguments = process.argv.slice(\n 2,\n separatorPosition === -1 ? process.argv.length : separatorPosition,\n )\n const jsonPosition = payloadArguments.lastIndexOf('--json')\n const noJSONPosition = payloadArguments.lastIndexOf('--no-json')\n\n if (jsonPosition !== -1 || noJSONPosition !== -1) {\n return jsonPosition > noJSONPosition\n }\n\n return process.env.PAYLOAD_CLI_JSON !== undefined\n}\n\n/**\n * Runs CLI work with one effective output mode, then restores the previous process state.\n * JSON mode redirects diagnostic output and sets `PAYLOAD_CLI_JSON` so Payload loggers use stderr.\n */\nexport const withCLIOutputMode = async <T>({\n isJSON,\n run,\n}: {\n isJSON: boolean\n run: () => Promise<T> | T\n}): Promise<T> => {\n const previousJSONSetting = process.env.PAYLOAD_CLI_JSON\n const restoreOutput = isJSON ? redirectOutputToStderr() : undefined\n\n if (isJSON) {\n process.env.PAYLOAD_CLI_JSON = '1'\n } else {\n delete process.env.PAYLOAD_CLI_JSON\n }\n\n try {\n return await run()\n } finally {\n restoreOutput?.()\n\n if (previousJSONSetting === undefined) {\n delete process.env.PAYLOAD_CLI_JSON\n } else {\n process.env.PAYLOAD_CLI_JSON = previousJSONSetting\n }\n }\n}\n\nexport const writeCLIJSON = ({ command, value }: { command?: Command; value: unknown }): void => {\n const output = `${JSON.stringify(value, (_key, item) =>\n typeof item === 'bigint' ? item.toString() : item,\n )}\\n`\n const outputConfiguration = command?.configureOutput()\n\n writeToCLIStdout({\n output,\n write: outputConfiguration?.writeOut\n ? (value) => outputConfiguration.writeOut?.(value)\n : undefined,\n })\n}\n\nexport const getCLIErrorOutput = ({\n command,\n error,\n}: {\n command?: string\n error: unknown\n}): Record<string, unknown> => {\n if (error instanceof CLICommandError) {\n return {\n command: error.command ?? command,\n error: {\n code: error.code,\n message: error.message,\n ...(error.issues ? { issues: error.issues } : {}),\n ...(error.inputSchema ? { inputSchema: error.inputSchema } : {}),\n },\n success: false,\n }\n }\n\n const errorWithDetails = error as { code?: unknown; message?: unknown }\n\n return {\n ...(command ? { command } : {}),\n error: {\n code: typeof errorWithDetails?.code === 'string' ? errorWithDetails.code : 'COMMAND_FAILED',\n message:\n typeof errorWithDetails?.message === 'string'\n ? errorWithDetails.message\n : typeof error === 'string'\n ? error\n : 'Unknown error',\n },\n success: false,\n }\n}\n\n/**\n * Formats a CLI failure and sets its exit code.\n *\n * Commander prints its own human-readable errors before throwing a `CommanderError`, so they\n * are not printed again. Other errors are printed in full in human-readable mode to preserve\n * their stack trace.\n */\nexport const handleCLIError = ({ cli, error }: { cli?: Command; error: unknown }): void => {\n const exitCode = error instanceof CommanderError ? error.exitCode : 1\n const shouldOutputJSON = isJSONOutput(cli)\n\n if (shouldOutputJSON && exitCode !== 0) {\n writeCLIJSON({\n command: cli,\n value: getCLIErrorOutput({ command: cli?.args[0], error }),\n })\n } else if (!(error instanceof CommanderError)) {\n // eslint-disable-next-line no-console\n console.error(error)\n }\n\n process.exitCode = exitCode\n}\n\n/** Wraps the CLI entry point so every failure uses the same output and exits cleanly. */\nexport const withErrorHandling =\n (run: () => Promise<void>): (() => Promise<void>) =>\n async () => {\n try {\n await run()\n } catch (error) {\n handleCLIError({ error })\n process.exit(process.exitCode ?? 1)\n }\n }\n"],"names":["CommanderError","redirectOutputToStderr","writeToCLIStdout","CLICommandError","Error","code","command","inputSchema","issues","cause","message","name","isJSONOutput","getOptionValueSourceWithGlobals","Boolean","optsWithGlobals","json","separatorPosition","process","argv","indexOf","payloadArguments","slice","length","jsonPosition","lastIndexOf","noJSONPosition","env","PAYLOAD_CLI_JSON","undefined","withCLIOutputMode","isJSON","run","previousJSONSetting","restoreOutput","writeCLIJSON","value","output","JSON","stringify","_key","item","toString","outputConfiguration","configureOutput","write","writeOut","getCLIErrorOutput","error","success","errorWithDetails","handleCLIError","cli","exitCode","shouldOutputJSON","args","console","withErrorHandling","exit"],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Sends console calls and direct stdout writes to stderr until the returned function is called. */
|
|
2
|
+
export declare const redirectOutputToStderr: () => (() => void);
|
|
3
|
+
/** Writes the final CLI response to stdout even while diagnostic output is being redirected. */
|
|
4
|
+
export declare const writeToCLIStdout: ({ output, write, }: {
|
|
5
|
+
output: string;
|
|
6
|
+
write?: (output: string) => void;
|
|
7
|
+
}) => void;
|
|
8
|
+
//# sourceMappingURL=redirectOutputToStderr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redirectOutputToStderr.d.ts","sourceRoot":"","sources":["../../../src/cli/runtime/redirectOutputToStderr.ts"],"names":[],"mappings":"AAIA,oGAAoG;AACpG,eAAO,MAAM,sBAAsB,QAAO,CAAC,MAAM,IAAI,CAepD,CAAA;AAED,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,uBAG1B;IACD,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,KAAG,IAeH,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Console } from 'node:console';
|
|
2
|
+
const originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
3
|
+
/** Sends console calls and direct stdout writes to stderr until the returned function is called. */ export const redirectOutputToStderr = ()=>{
|
|
4
|
+
const previousConsole = globalThis.console;
|
|
5
|
+
const previousStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
6
|
+
globalThis.console = new Console({
|
|
7
|
+
colorMode: false,
|
|
8
|
+
stderr: process.stderr,
|
|
9
|
+
stdout: process.stderr
|
|
10
|
+
});
|
|
11
|
+
process.stdout.write = process.stderr.write.bind(process.stderr);
|
|
12
|
+
return ()=>{
|
|
13
|
+
globalThis.console = previousConsole;
|
|
14
|
+
process.stdout.write = previousStdoutWrite;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
/** Writes the final CLI response to stdout even while diagnostic output is being redirected. */ export const writeToCLIStdout = ({ output, write })=>{
|
|
18
|
+
if (!write) {
|
|
19
|
+
originalStdoutWrite(output);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const redirectedStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
23
|
+
process.stdout.write = originalStdoutWrite;
|
|
24
|
+
try {
|
|
25
|
+
write(output);
|
|
26
|
+
} finally{
|
|
27
|
+
process.stdout.write = redirectedStdoutWrite;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=redirectOutputToStderr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/cli/runtime/redirectOutputToStderr.ts"],"sourcesContent":["import { Console } from 'node:console'\n\nconst originalStdoutWrite = process.stdout.write.bind(process.stdout)\n\n/** Sends console calls and direct stdout writes to stderr until the returned function is called. */\nexport const redirectOutputToStderr = (): (() => void) => {\n const previousConsole = globalThis.console\n const previousStdoutWrite = process.stdout.write.bind(process.stdout)\n\n globalThis.console = new Console({\n colorMode: false,\n stderr: process.stderr,\n stdout: process.stderr,\n })\n process.stdout.write = process.stderr.write.bind(process.stderr)\n\n return () => {\n globalThis.console = previousConsole\n process.stdout.write = previousStdoutWrite\n }\n}\n\n/** Writes the final CLI response to stdout even while diagnostic output is being redirected. */\nexport const writeToCLIStdout = ({\n output,\n write,\n}: {\n output: string\n write?: (output: string) => void\n}): void => {\n if (!write) {\n originalStdoutWrite(output)\n return\n }\n\n const redirectedStdoutWrite = process.stdout.write.bind(process.stdout)\n\n process.stdout.write = originalStdoutWrite\n\n try {\n write(output)\n } finally {\n process.stdout.write = redirectedStdoutWrite\n }\n}\n"],"names":["Console","originalStdoutWrite","process","stdout","write","bind","redirectOutputToStderr","previousConsole","globalThis","console","previousStdoutWrite","colorMode","stderr","writeToCLIStdout","output","redirectedStdoutWrite"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAc;AAEtC,MAAMC,sBAAsBC,QAAQC,MAAM,CAACC,KAAK,CAACC,IAAI,CAACH,QAAQC,MAAM;AAEpE,kGAAkG,GAClG,OAAO,MAAMG,yBAAyB;IACpC,MAAMC,kBAAkBC,WAAWC,OAAO;IAC1C,MAAMC,sBAAsBR,QAAQC,MAAM,CAACC,KAAK,CAACC,IAAI,CAACH,QAAQC,MAAM;IAEpEK,WAAWC,OAAO,GAAG,IAAIT,QAAQ;QAC/BW,WAAW;QACXC,QAAQV,QAAQU,MAAM;QACtBT,QAAQD,QAAQU,MAAM;IACxB;IACAV,QAAQC,MAAM,CAACC,KAAK,GAAGF,QAAQU,MAAM,CAACR,KAAK,CAACC,IAAI,CAACH,QAAQU,MAAM;IAE/D,OAAO;QACLJ,WAAWC,OAAO,GAAGF;QACrBL,QAAQC,MAAM,CAACC,KAAK,GAAGM;IACzB;AACF,EAAC;AAED,8FAA8F,GAC9F,OAAO,MAAMG,mBAAmB,CAAC,EAC/BC,MAAM,EACNV,KAAK,EAIN;IACC,IAAI,CAACA,OAAO;QACVH,oBAAoBa;QACpB;IACF;IAEA,MAAMC,wBAAwBb,QAAQC,MAAM,CAACC,KAAK,CAACC,IAAI,CAACH,QAAQC,MAAM;IAEtED,QAAQC,MAAM,CAACC,KAAK,GAAGH;IAEvB,IAAI;QACFG,MAAMU;IACR,SAAU;QACRZ,QAAQC,MAAM,CAACC,KAAK,GAAGW;IACzB;AACF,EAAC"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import type { I18nClient } from '@payloadcms/translations';
|
|
2
2
|
import type { StaticDescription } from '../../admin/types.js';
|
|
3
|
-
import type { ImportMap } from '../../
|
|
3
|
+
import type { ImportMap } from '../../cli/commands/generateImportMap/generateImportMap.js';
|
|
4
4
|
import type { LivePreviewConfig, ServerOnlyLivePreviewProperties, StaticLabel } from '../../config/types.js';
|
|
5
5
|
import type { ClientField } from '../../fields/config/client.js';
|
|
6
6
|
import type { ClientHierarchyConfig } from '../../hierarchy/types.js';
|
|
7
7
|
import type { Payload } from '../../types/index.js';
|
|
8
|
-
import type { SanitizedUploadConfig } from '../../uploads/types.js';
|
|
8
|
+
import type { SanitizedUploadConfig, UploadInstructionsCapability } from '../../uploads/types.js';
|
|
9
9
|
import type { SanitizedCollectionConfig } from './types.js';
|
|
10
|
-
export type ServerOnlyCollectionProperties = keyof Pick<SanitizedCollectionConfig, 'access' | 'custom' | 'endpoints' | 'flattenedFields' | 'hooks' | 'indexes' | 'joins' | 'polymorphicJoins' | 'sanitizedIndexes' | 'select'>;
|
|
10
|
+
export type ServerOnlyCollectionProperties = keyof Pick<SanitizedCollectionConfig, 'access' | 'custom' | 'endpoints' | 'flattenedFields' | 'hooks' | 'indexes' | 'joins' | 'llmInstructions' | 'polymorphicJoins' | 'sanitizedIndexes' | 'select'>;
|
|
11
11
|
export type ServerOnlyCollectionAdminProperties = keyof Pick<SanitizedCollectionConfig['admin'], 'baseFilter' | 'baseListFilter' | 'components' | 'formatDocURL' | 'hidden'>;
|
|
12
|
-
export type ServerOnlyUploadProperties = keyof Pick<SanitizedCollectionConfig['upload'], 'admin' | 'adminThumbnail' | 'externalFileHeaderFilter' | 'handlers' | 'modifyResponseHeaders' | 'uploadInstructions'
|
|
12
|
+
export type ServerOnlyUploadProperties = keyof Pick<SanitizedCollectionConfig['upload'], 'admin' | 'adminThumbnail' | 'externalFileHeaderFilter' | 'handlers' | 'modifyResponseHeaders' | 'uploadInstructions'>;
|
|
13
13
|
type ClientUploadConfig = {
|
|
14
|
-
|
|
15
|
-
uploadInstructions?: true;
|
|
14
|
+
uploadInstructions: Pick<UploadInstructionsCapability, 'useInAdmin'>;
|
|
16
15
|
} & Omit<SanitizedUploadConfig, 'uploadInstructions'>;
|
|
17
16
|
export type ClientCollectionConfig = {
|
|
18
17
|
admin: {
|
|
@@ -21,6 +20,7 @@ export type ClientCollectionConfig = {
|
|
|
21
20
|
preview?: boolean;
|
|
22
21
|
} & Omit<SanitizedCollectionConfig['admin'], 'components' | 'description' | 'formatDocURL' | 'joins' | 'livePreview' | 'preview' | ServerOnlyCollectionAdminProperties>;
|
|
23
22
|
auth?: {
|
|
23
|
+
forgotPassword: Pick<SanitizedCollectionConfig['auth']['forgotPassword'], 'minRequestInterval'>;
|
|
24
24
|
verify?: true;
|
|
25
25
|
} & Omit<SanitizedCollectionConfig['auth'], 'forgotPassword' | 'strategies' | 'verify'>;
|
|
26
26
|
fields: ClientField[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/collections/config/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,0BAA0B,CAAA;AAErE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/collections/config/client.ts"],"names":[],"mappings":"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"}
|
|
@@ -5,6 +5,7 @@ const serverOnlyCollectionProperties = [
|
|
|
5
5
|
'endpoints',
|
|
6
6
|
'custom',
|
|
7
7
|
'joins',
|
|
8
|
+
'llmInstructions',
|
|
8
9
|
'polymorphicJoins',
|
|
9
10
|
'flattenedFields',
|
|
10
11
|
'indexes',
|
|
@@ -17,8 +18,7 @@ const serverOnlyUploadProperties = [
|
|
|
17
18
|
'externalFileHeaderFilter',
|
|
18
19
|
'handlers',
|
|
19
20
|
'modifyResponseHeaders',
|
|
20
|
-
'uploadInstructions'
|
|
21
|
-
'withMetadata'
|
|
21
|
+
'uploadInstructions'
|
|
22
22
|
];
|
|
23
23
|
const serverOnlyCollectionAdminProperties = [
|
|
24
24
|
'hidden',
|
|
@@ -80,6 +80,9 @@ export const createClientCollectionConfig = ({ collection, defaultIDType, i18n,
|
|
|
80
80
|
break;
|
|
81
81
|
}
|
|
82
82
|
clientCollection.auth = {};
|
|
83
|
+
clientCollection.auth.forgotPassword = {
|
|
84
|
+
minRequestInterval: collection.auth.forgotPassword.minRequestInterval
|
|
85
|
+
};
|
|
83
86
|
if (collection.auth.cookies) {
|
|
84
87
|
clientCollection.auth.cookies = collection.auth.cookies;
|
|
85
88
|
}
|
|
@@ -149,19 +152,17 @@ export const createClientCollectionConfig = ({ collection, defaultIDType, i18n,
|
|
|
149
152
|
if (!collection.upload) {
|
|
150
153
|
break;
|
|
151
154
|
}
|
|
152
|
-
clientCollection.upload = {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if (collection.upload.uploadInstructions) {
|
|
156
|
-
clientCollection.upload.uploadInstructions = true;
|
|
157
|
-
}
|
|
158
|
-
continue;
|
|
155
|
+
clientCollection.upload = {
|
|
156
|
+
uploadInstructions: {
|
|
157
|
+
useInAdmin: collection.upload.uploadInstructions?.useInAdmin ?? false
|
|
159
158
|
}
|
|
159
|
+
};
|
|
160
|
+
for(const uploadKey in collection.upload){
|
|
160
161
|
if (serverOnlyUploadProperties.includes(uploadKey)) {
|
|
161
162
|
continue;
|
|
162
163
|
}
|
|
163
|
-
if (uploadKey === '
|
|
164
|
-
clientCollection.upload.
|
|
164
|
+
if (uploadKey === 'variants') {
|
|
165
|
+
clientCollection.upload.variants = collection.upload.variants?.map((size)=>{
|
|
165
166
|
const sanitizedSize = {
|
|
166
167
|
...size
|
|
167
168
|
};
|