chore: move to monorepo structure

This commit is contained in:
Alessio Gravili
2023-08-23 12:20:30 +02:00
parent e24ad67168
commit a67278b29f
1398 changed files with 2392 additions and 16005 deletions

View File

@@ -1,156 +0,0 @@
import path from 'path';
import { buildConfigWithDefaults } from '../buildConfigWithDefaults';
export default buildConfigWithDefaults({
graphQL: {
schemaOutputFile: path.resolve(__dirname, 'schema.graphql'),
},
typescript: {
outputFile: path.resolve(__dirname, 'schema.ts'),
},
collections: [
{
slug: 'collection1',
fields: [
{
type: 'row',
fields: [{ type: 'text', required: true, name: 'testing' }],
},
{
type: 'tabs',
tabs: [
{
label: 'Tab 1',
fields: [
{
required: true,
type: 'text',
name: 'title',
},
],
},
],
},
{
type: 'array',
name: 'meta',
interfaceName: 'SharedMetaArray',
fields: [
{
name: 'title',
type: 'text',
},
{
name: 'description',
type: 'text',
},
],
},
{
type: 'blocks',
name: 'blocks',
required: true,
blocks: [
{
slug: 'block1',
interfaceName: 'SharedMetaBlock',
fields: [
{
required: true,
name: 'b1title',
type: 'text',
},
{
name: 'b1description',
type: 'text',
},
],
},
{
slug: 'block2',
interfaceName: 'AnotherSharedBlock',
fields: [
{
name: 'b2title',
type: 'text',
required: true,
},
{
name: 'b2description',
type: 'text',
},
],
},
],
},
],
},
{
slug: 'collection2',
fields: [
{
type: 'array',
name: 'meta',
interfaceName: 'SharedMetaArray',
fields: [
{
name: 'title',
type: 'text',
},
{
name: 'description',
type: 'text',
},
],
},
{
type: 'group',
name: 'meta',
interfaceName: 'SharedMeta',
fields: [
{
name: 'title',
type: 'text',
},
{
name: 'description',
type: 'text',
},
],
},
{
type: 'group',
name: 'nestedGroup',
fields: [
{
type: 'group',
name: 'meta',
interfaceName: 'SharedMeta',
fields: [
{
name: 'title',
type: 'text',
},
{
name: 'description',
type: 'text',
},
],
},
],
},
],
},
{
// this should not be written to the generated schema
slug: 'no-graphql',
graphQL: false,
fields: [
{
name: 'name',
type: 'text',
},
],
},
],
});

View File

@@ -1,68 +0,0 @@
/* tslint:disable */
/**
* This file was automatically generated by Payload CMS.
* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
* and re-run `payload generate:types` to regenerate this file.
*/
export type SharedMetaArray = {
title?: string;
description?: string;
id?: string;
}[];
export interface Config {
collections: {
collection1: Collection1;
collection2: Collection2;
users: User;
};
globals: {};
}
export interface Collection1 {
id: string;
testing: string;
title: string;
meta?: SharedMetaArray;
blocks: (SharedMetaBlock | AnotherSharedBlock)[];
updatedAt: string;
createdAt: string;
}
export interface SharedMetaBlock {
b1title: string;
b1description?: string;
id?: string;
blockName?: string;
blockType: 'block1';
}
export interface AnotherSharedBlock {
b2title: string;
b2description?: string;
id?: string;
blockName?: string;
blockType: 'block2';
}
export interface Collection2 {
id: string;
meta?: SharedMeta;
nestedGroup?: {
meta?: SharedMeta;
};
updatedAt: string;
createdAt: string;
}
export interface SharedMeta {
title?: string;
description?: string;
}
export interface User {
id: string;
updatedAt: string;
createdAt: string;
email?: string;
resetPasswordToken?: string;
resetPasswordExpiration?: string;
loginAttempts?: number;
lockUntil?: string;
password?: string;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +0,0 @@
{
"compilerOptions": {
"esModuleInterop": true,
"paths": {
"payload/generated-types": [
"./payload-types.ts",
],
},
}
}