Skip to content

Commit 373d31b

Browse files
authored
chore: added version script and updated to 0.0.2 (#27)
* feat: added 'version' script to manage all packages * chore: removed references to payload * refact: moved from 'payload' to 'mzinga' * chore: updated to 0.0.2
1 parent c902e3b commit 373d31b

File tree

123 files changed

+415
-391
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+415
-391
lines changed

docs/admin/bundlers.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ yarn add @payloadcms/bundler-vite
2727
// payload.config.ts
2828

2929
import { buildConfig } from 'payload/config'
30-
import { webpackBundler } from '@payloadcms/bundler-webpack'
31-
// import { viteBundler } from '@payloadcms/bundler-vite'
30+
import { webpackBundler } from '@mzinga/bundler-webpack'
31+
// import { viteBundler } from '@mzinga/bundler-vite'
3232

3333
export default buildConfig({
3434
// highlight-start
3535
admin: {
36-
bundler: webpackBundler() // or viteBundler()
36+
bundler: webpackBundler(), // or viteBundler()
3737
},
3838
// highlight-end
3939
})
@@ -48,7 +48,8 @@ Since the bundled file is sent to the browser, it can't include any server-only
4848
<Banner type="warning">
4949
**Using environment variables in the admin UI**
5050

51-
Bundles should not contain sensitive information. By default, Payload
52-
excludes env variables from the bundle. If you need to use env variables in your payload config,
53-
you need to prefix them with `PAYLOAD_PUBLIC_` to make them available to the client-side code.
51+
Bundles should not contain sensitive information. By default, Payload
52+
excludes env variables from the bundle. If you need to use env variables in your payload config,
53+
you need to prefix them with `PAYLOAD_PUBLIC_` to make them available to the client-side code.
54+
5455
</Banner>

docs/admin/excluding-server-code.mdx

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ export const createStripeSubscription = async ({ data, operation }) => {
7171
<Banner type="error">
7272
**Warning:**
7373

74-
The above code is NOT production-ready and should not be referenced to create Stripe
75-
subscriptions. Although creating a beforeChange hook is a completely valid spot to do things like
76-
create subscriptions, the code above is incomplete and insecure, meant for explanation purposes
77-
only.
74+
The above code is NOT production-ready and should not be referenced to create Stripe
75+
subscriptions. Although creating a beforeChange hook is a completely valid spot to do things like
76+
create subscriptions, the code above is incomplete and insecure, meant for explanation purposes
77+
only.
78+
7879
</Banner>
7980

8081
**As-is, this collection will prevent your Admin panel from bundling or loading correctly, because Stripe relies on some Node-only packages.**
@@ -104,6 +105,7 @@ By default the browser bundle will now include all the code from that file and a
104105
To fix this, we need to alias the `createStripeSubscription` file to a different file that can safely be included in the browser bundle.
105106

106107
First, we will create a mock file to replace the server-only file when bundling:
108+
107109
```js
108110
// mocks/modules.js
109111

@@ -124,14 +126,14 @@ Aliasing with [Webpack](/docs/admin/webpack) can be done by:
124126
// payload.config.ts
125127

126128
import { buildConfig } from 'payload/config'
127-
import { webpackBundler } from '@payloadcms/bundler-webpack'
129+
import { webpackBundler } from '@mzinga/bundler-webpack'
128130

129131
import { Subscriptions } from './collections/Subscriptions'
130132

131133
const mockModulePath = path.resolve(__dirname, 'mocks/emptyObject.js')
132134
const fullFilePath = path.resolve(
133135
__dirname,
134-
'collections/Subscriptions/hooks/createStripeSubscription'
136+
'collections/Subscriptions/hooks/createStripeSubscription',
135137
)
136138

137139
export default buildConfig({
@@ -162,7 +164,7 @@ Aliasing with [Vite](/docs/admin/vite) can be done by:
162164
// payload.config.ts
163165

164166
import { buildConfig } from 'payload/config'
165-
import { viteBundler } from '@payloadcms/bundler-vite'
167+
import { viteBundler } from '@mzinga/bundler-vite'
166168

167169
import { Subscriptions } from './collections/Subscriptions'
168170

@@ -173,33 +175,32 @@ export default buildConfig({
173175
admin: {
174176
bundler: viteBundler(),
175177
vite: (incomingViteConfig) => {
176-
const existingAliases = incomingViteConfig?.resolve?.alias || {};
177-
let aliasArray: { find: string | RegExp; replacement: string; }[] = [];
178+
const existingAliases = incomingViteConfig?.resolve?.alias || {}
179+
let aliasArray: { find: string | RegExp; replacement: string }[] = []
178180

179181
// Pass the existing Vite aliases
180182
if (Array.isArray(existingAliases)) {
181-
aliasArray = existingAliases;
183+
aliasArray = existingAliases
182184
} else {
183-
aliasArray = Object.values(existingAliases);
185+
aliasArray = Object.values(existingAliases)
184186
}
185187

186-
187188
// highlight-start
188189
// Add your own aliases using the find and replacement keys
189190
// remember, vite aliases are exact-match only
190191
aliasArray.push({
191192
find: '../server-only-module',
192-
replacement: path.resolve(__dirname, './path/to/browser-safe-module.js')
193-
});
193+
replacement: path.resolve(__dirname, './path/to/browser-safe-module.js'),
194+
})
194195
// highlight-end
195196

196197
return {
197198
...incomingViteConfig,
198199
resolve: {
199200
...(incomingViteConfig?.resolve || {}),
200201
alias: aliasArray,
201-
}
202-
};
202+
},
203+
}
203204
},
204205
},
205206
})

docs/admin/vite.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ yarn add @payloadcms/bundler-vite
2222
Then you will need to add the [bundler](/docs/admin/bundlers) to your Payload config:
2323

2424
```ts
25-
import { buildConfig } from '@payloadcms/config'
26-
import { viteBundler } from '@payloadcms/bundler-vite'
25+
import { buildConfig } from '@mzinga/config'
26+
import { viteBundler } from '@mzinga/bundler-vite'
2727

2828
export default buildConfig({
2929
collections: [],

docs/admin/webpack.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ yarn add @payloadcms/bundler-webpack
2222
// payload.config.ts
2323

2424
import { buildConfig } from 'payload/config'
25-
import { webpackBundler } from '@payloadcms/bundler-webpack'
25+
import { webpackBundler } from '@mzinga/bundler-webpack'
2626

2727
export default buildConfig({
2828
// highlight-start
2929
admin: {
30-
bundler: webpackBundler()
30+
bundler: webpackBundler(),
3131
},
3232
// highlight-end
3333
})
@@ -42,7 +42,7 @@ The function will receive the Webpack config as an argument and should return th
4242
// payload.config.ts
4343

4444
import { buildConfig } from 'payload/config'
45-
import { webpackBundler } from '@payloadcms/bundler-webpack'
45+
import { webpackBundler } from '@mzinga/bundler-webpack'
4646

4747
export default buildConfig({
4848
admin: {
@@ -61,7 +61,8 @@ export default buildConfig({
6161
<Banner type="success">
6262
**Tip:**
6363

64-
If changes to your Webpack aliases are not surfacing, they might be
65-
[cached](https://webpack.js.org/configuration/cache/) in `node_modules/.cache/webpack`. Try
66-
deleting that folder and restarting your server.
64+
If changes to your Webpack aliases are not surfacing, they might be
65+
[cached](https://webpack.js.org/configuration/cache/) in `node_modules/.cache/webpack`. Try
66+
deleting that folder and restarting your server.
67+
6768
</Banner>

docs/cloud/projects.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Projects generated from a template will come pre-configured with the official Cl
103103
`yarn add @payloadcms/plugin-cloud`
104104

105105
```js
106-
import { payloadCloud } from '@payloadcms/plugin-cloud'
106+
import { payloadCloud } from '@mzinga/plugin-cloud'
107107
import { buildConfig } from 'payload/config'
108108

109109
export default buildConfig({

docs/configuration/overview.mdx

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -13,54 +13,55 @@ Payload is a _config-based_, code-first CMS and application framework. The Paylo
1313
<Banner type="warning">
1414
**Important:**
1515

16-
This file is included in the Payload admin bundle, so make sure you do not embed any sensitive
17-
information.
16+
This file is included in the Payload admin bundle, so make sure you do not embed any sensitive
17+
information.
18+
1819
</Banner>
1920

2021
## Options
2122

22-
| Option | Description |
23-
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24-
| `admin` \* | Base Payload admin configuration. Specify bundler*, custom components, control metadata, set the Admin user collection, and [more](/docs/admin/overview#admin-options). Required. |
25-
| `editor` \* | Rich Text Editor which will be used by richText fields. Required. |
26-
| `db` \* | Database Adapter which will be used by Payload. Read more [here](/docs/database/overview). Required. |
27-
| `serverURL` | A string used to define the absolute URL of your app including the protocol, for example `https://example.com`. No paths allowed, only protocol, domain and (optionally) port |
28-
| `collections` | An array of all Collections that Payload will manage. To read more about how to define your collection configs, [click here](/docs/configuration/collections). |
29-
| `globals` | An array of all Globals that Payload will manage. For more on Globals and their configs, [click here](/docs/configuration/globals). |
30-
| `cors` | Either a whitelist array of URLS to allow CORS requests from, or a wildcard string (`'*'`) to accept incoming requests from any domain. |
31-
| `localization` | Opt-in and control how Payload handles the translation of your content into multiple locales. [More](/docs/configuration/localization) |
32-
| `graphQL` | Manage GraphQL-specific functionality here. Define your own queries and mutations, manage query complexity limits, and [more](/docs/graphql/overview#graphql-options). |
33-
| `cookiePrefix` | A string that will be prefixed to all cookies that Payload sets. |
34-
| `csrf` | A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. [More](/docs/authentication/overview#csrf-protection) |
35-
| `defaultDepth` | If a user does not specify `depth` while requesting a resource, this depth will be used. [More](/docs/getting-started/concepts#depth) |
36-
| `maxDepth` | The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries. Defaults to `10`. |
37-
| `indexSortableFields` | Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. |
38-
| `upload` | Base Payload upload configuration. [More](/docs/upload/overview#payload-wide-upload-options). |
39-
| `routes` | Control the routing structure that Payload binds itself to. Specify `admin`, `api`, `graphQL`, and `graphQLPlayground`. |
40-
| `email` | Base email settings to allow Payload to generate email such as Forgot Password requests and other requirements. [More](/docs/email/overview#configuration) |
41-
| `express` | Express-specific middleware options such as compression and JSON parsing. [More](/docs/configuration/express) |
42-
| `debug` | Enable to expose more detailed error information. |
43-
| `telemetry` | Disable Payload telemetry by passing `false`. [More](/docs/configuration/overview#telemetry) |
44-
| `rateLimit` | Control IP-based rate limiting for all Payload resources. Used to prevent DDoS attacks and [more](/docs/production/preventing-abuse#rate-limiting-requests). |
45-
| `hooks` | Tap into Payload-wide hooks. [More](/docs/hooks/overview) |
46-
| `plugins` | An array of Payload plugins. [More](/docs/plugins/overview) |
47-
| `endpoints` | An array of custom API endpoints added to the Payload router. [More](/docs/rest-api/overview#custom-endpoints) |
48-
| `custom` | Extension point for adding custom data (e.g. for plugins) |
23+
| Option | Description |
24+
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25+
| `admin` \* | Base Payload admin configuration. Specify bundler\*, custom components, control metadata, set the Admin user collection, and [more](/docs/admin/overview#admin-options). Required. |
26+
| `editor` \* | Rich Text Editor which will be used by richText fields. Required. |
27+
| `db` \* | Database Adapter which will be used by Payload. Read more [here](/docs/database/overview). Required. |
28+
| `serverURL` | A string used to define the absolute URL of your app including the protocol, for example `https://example.com`. No paths allowed, only protocol, domain and (optionally) port |
29+
| `collections` | An array of all Collections that Payload will manage. To read more about how to define your collection configs, [click here](/docs/configuration/collections). |
30+
| `globals` | An array of all Globals that Payload will manage. For more on Globals and their configs, [click here](/docs/configuration/globals). |
31+
| `cors` | Either a whitelist array of URLS to allow CORS requests from, or a wildcard string (`'*'`) to accept incoming requests from any domain. |
32+
| `localization` | Opt-in and control how Payload handles the translation of your content into multiple locales. [More](/docs/configuration/localization) |
33+
| `graphQL` | Manage GraphQL-specific functionality here. Define your own queries and mutations, manage query complexity limits, and [more](/docs/graphql/overview#graphql-options). |
34+
| `cookiePrefix` | A string that will be prefixed to all cookies that Payload sets. |
35+
| `csrf` | A whitelist array of URLs to allow Payload cookies to be accepted from as a form of CSRF protection. [More](/docs/authentication/overview#csrf-protection) |
36+
| `defaultDepth` | If a user does not specify `depth` while requesting a resource, this depth will be used. [More](/docs/getting-started/concepts#depth) |
37+
| `maxDepth` | The maximum allowed depth to be permitted application-wide. This setting helps prevent against malicious queries. Defaults to `10`. |
38+
| `indexSortableFields` | Automatically index all sortable top-level fields in the database to improve sort performance and add database compatibility for Azure Cosmos and similar. |
39+
| `upload` | Base Payload upload configuration. [More](/docs/upload/overview#payload-wide-upload-options). |
40+
| `routes` | Control the routing structure that Payload binds itself to. Specify `admin`, `api`, `graphQL`, and `graphQLPlayground`. |
41+
| `email` | Base email settings to allow Payload to generate email such as Forgot Password requests and other requirements. [More](/docs/email/overview#configuration) |
42+
| `express` | Express-specific middleware options such as compression and JSON parsing. [More](/docs/configuration/express) |
43+
| `debug` | Enable to expose more detailed error information. |
44+
| `telemetry` | Disable Payload telemetry by passing `false`. [More](/docs/configuration/overview#telemetry) |
45+
| `rateLimit` | Control IP-based rate limiting for all Payload resources. Used to prevent DDoS attacks and [more](/docs/production/preventing-abuse#rate-limiting-requests). |
46+
| `hooks` | Tap into Payload-wide hooks. [More](/docs/hooks/overview) |
47+
| `plugins` | An array of Payload plugins. [More](/docs/plugins/overview) |
48+
| `endpoints` | An array of custom API endpoints added to the Payload router. [More](/docs/rest-api/overview#custom-endpoints) |
49+
| `custom` | Extension point for adding custom data (e.g. for plugins) |
4950

5051
_\* An asterisk denotes that a property is required._
5152

5253
#### Simple example
5354

5455
```ts
5556
import { buildConfig } from 'payload/config'
56-
import { mongooseAdapter } from '@payloadcms/db-mongodb'
57-
import { postgresAdapter } from '@payloadcms/db-postgres' // beta
57+
import { mongooseAdapter } from '@mzinga/db-mongodb'
58+
import { postgresAdapter } from '@mzinga/db-postgres' // beta
5859
59-
import { viteBundler } from '@payloadcms/bundler-vite'
60-
import { webpackBundler } from '@payloadcms/bundler-webpack'
60+
import { viteBundler } from '@mzinga/bundler-vite'
61+
import { webpackBundler } from '@mzinga/bundler-webpack'
6162

62-
import { lexicalEditor } from '@payloadcms/richtext-lexical' // beta
63-
import { slateEditor } from '@payloadcms/richtext-slate'
63+
import { lexicalEditor } from '@mzinga/richtext-lexical' // beta
64+
import { slateEditor } from '@mzinga/richtext-slate'
6465

6566
export default buildConfig({
6667
admin: {
@@ -137,9 +138,10 @@ project-name
137138
<Banner type="warning">
138139
**Important:**
139140

140-
If you use an environment variable to configure any properties that are required for the Admin
141-
panel to function (ex. serverURL or any routes), you need to make sure that your Admin panel code
142-
can access it. [Click here](/docs/admin/webpack#admin-environment-vars) for more info.
141+
If you use an environment variable to configure any properties that are required for the Admin
142+
panel to function (ex. serverURL or any routes), you need to make sure that your Admin panel code
143+
can access it. [Click here](/docs/admin/webpack#admin-environment-vars) for more info.
144+
143145
</Banner>
144146

145147
### Customizing & Automating Config Location Detection

0 commit comments

Comments
 (0)