Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: payload cms #85

Open
wants to merge 39 commits into
base: feat/clevercloud
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
cd5c4cf
feat: update to next 15
ClementNumericite Nov 20, 2024
62c2b71
fix: move to src/ folder structure
ClementNumericite Nov 22, 2024
5d693bb
feat: payloadcms integration
ClementNumericite Nov 26, 2024
668cd5a
feat: setup trpc with payload & home cms first section
ClementNumericite Nov 26, 2024
7b0f815
feat: add CC s3 payload config
ClementNumericite Nov 28, 2024
b4703f9
feat: refactoring cms field payload implementation & home quality sec…
ClementNumericite Nov 28, 2024
86f9e14
feat: add empty container for loader
ClementNumericite Nov 28, 2024
98b471f
fix: minimumCacheTTL on images
ClementNumericite Nov 28, 2024
0098f8c
feat: add admin seed and configure yarn seed
ClementNumericite Nov 29, 2024
c8b278e
feat: seed home cms content
ClementNumericite Nov 29, 2024
1d58427
fix: README add seed payload
ClementNumericite Nov 29, 2024
8eb859c
feat: begin migration procedureHeaders to payload
ClementNumericite Nov 29, 2024
6317499
feat: procedureHeader homepage integration
ClementNumericite Nov 29, 2024
e271d11
fix: paylaod cms sections default collapsed
ClementNumericite Nov 29, 2024
15fde5a
feat: textWithImage section on cms
ClementNumericite Nov 29, 2024
b0221b2
fix: yarn dependencies
ClementNumericite Dec 2, 2024
0980844
feat: start working on help page in cms + base help content seeding
dan1M Dec 2, 2024
d652a45
feat: added wysiwyg seeding, custom rich text editor in order to be l…
dan1M Dec 3, 2024
c7885a7
fix: prisma seed
ClementNumericite Dec 4, 2024
352cdb3
fix: .env.example variables
ClementNumericite Dec 4, 2024
deb5914
feat: front get content from cms wysiwyg (html) + dynamic tabs
dan1M Dec 4, 2024
02ef66c
fix: update payload (^3.3.0) + mongo (5 in dockerfile)
dan1M Dec 4, 2024
ec83b1f
feat: indicator update with new indicator levels collection in cms + …
dan1M Dec 4, 2024
1811e15
feat: indicator levels seeding + creation after the indicator (header…
dan1M Dec 4, 2024
7874e83
feat: front get dynamic content for indicators and each levels of eva…
dan1M Dec 4, 2024
0c6d643
fix: add description for indicators
ClementNumericite Dec 6, 2024
8d578a4
fix: payload UI updates
ClementNumericite Dec 6, 2024
bfe38c5
fix: yarn package manager
ClementNumericite Dec 9, 2024
631e983
fix: resolve build errors by updating tsconfig
ClementNumericite Dec 9, 2024
fd9d1f8
fix: packageManager to yarn version
ClementNumericite Dec 9, 2024
6de7c21
fix: concat https with CELLAR_ADDON_HOST from CC
ClementNumericite Dec 9, 2024
6410b48
fix: use payload indicators on all app
ClementNumericite Dec 9, 2024
18d71d1
fix: remove old procedureheaders from prisma
ClementNumericite Dec 9, 2024
8818ecc
fix: refactor ProcedureHeaders to Indicators
ClementNumericite Dec 9, 2024
beb03e7
fix: rename procedureHeaders old name
ClementNumericite Dec 9, 2024
75fe6fb
feat: migrate users admins to payload
ClementNumericite Dec 11, 2024
616876a
fix: build issue old User import from prisma
ClementNumericite Dec 11, 2024
ef59338
fix: refactor payload connexion admin to handle connection from each …
ClementNumericite Dec 11, 2024
4bb5886
fix: issue redirection fetchMe
ClementNumericite Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ NEXT_PUBLIC_MATOMO_URL="xxx"
NEXT_PUBLIC_MATOMO_SITE_ID="xxx"

# AUTH
NEXTAUTH_SECRET=secretauth
NEXTAUTH_URL=http://localhost:3000
NEXT_PUBLIC_JWT_COOKIE_NAME=payload-token
JWT_SECRET=mysecret
JWT_SIGNING_KEY=mykey
JWT_ENCRYPTION_KEY=myencryptionkey
JWT_ENCRYPTION_ALGORITHM=HS512
JWT_EXPIRATION_TIME=2592000 # 1 month in seconds

# S3
CELLAR_ADDON_HOST=host
CELLAR_ADDON_KEY_ID=key-id
CELLAR_ADDON_KEY_SECRET=key-secret
S3_BUCKET_NAME=bucket

# This was inserted by `prisma init`:
# Environment variables declared in this file are automatically made available to Prisma.
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
Expand All @@ -26,3 +31,7 @@ JWT_EXPIRATION_TIME=2592000 # 1 month in seconds
# See the documentation for all the connection string options: https://pris.ly/d/connection-strings

MONGODB_ADDON_URI="mongodb://user:[email protected]:27018/observatoire?authSource=admin"

# Added by Payload# Added by Payload
DATABASE_URI=mongodb://user:[email protected]:27018/observatoire-payload?authSource=admin
PAYLOAD_SECRET=dev
Binary file added .yarn/install-state.gz
Binary file not shown.
19 changes: 19 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-fetch.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* eslint-disable */
//prettier-ignore
module.exports = {
name: "@yarnpkg/plugin-fetch",
factory: function (require) {
var plugin=(()=>{var le=Object.defineProperty;var pe=(s,e,t)=>e in s?le(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var c=(s=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(s,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):s)(function(s){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+s+'" is not supported')});var i=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var f=(s,e,t)=>(pe(s,typeof e!="symbol"?e+"":e,t),t);var $=i((Ue,A)=>{"use strict";A.exports=function(e){return e.map(function(t){return t&&typeof t=="object"?t.op.replace(/(.)/g,"\\$1"):/["\s]/.test(t)&&!/'/.test(t)?"'"+t.replace(/(['\\])/g,"\\$1")+"'":/["'\s]/.test(t)?'"'+t.replace(/(["\\$`!])/g,"\\$1")+'"':String(t).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}])/g,"$1\\$2")}).join(" ")}});var H=i((Ve,v)=>{var C=c("fs"),ue=c("path"),{parseSyml:fe}=c("@yarnpkg/parsers"),ke=["patch","npm","portal","link"],B=s=>{let e=s.trim().split("@");return s.startsWith("@")?e=e.slice(0,2):e=e.slice(0,1),e.join("@")},Y=(s,e)=>{let[t,r]=s.trim().split(`@${e}:`);return{key:t,version:r}},de=s=>{let[,e]=s.split("::")[0].split("#");return e};v.exports=function(){let e=C.readFileSync("yarn.lock","utf8"),t=fe(e),r=Object.keys(t).filter(o=>o.includes("@workspace:")),n=r.map(o=>{let[,l]=t[o].resolution.trim().split("@workspace:");return l==="."?null:l}).filter(Boolean);r.forEach(o=>{let{dependencies:l,dependenciesMeta:u,peerDependencies:b,peerDependenciesMeta:P,resolution:D,bin:ce}=t[o],[ae,w]=D.trim().split("@workspace:"),ie=ue.join(w,"package.json"),y={name:ae,version:"0.0.0",description:"**DON'T COMMIT** Generated file for caching",private:!0,dependencies:l,peerDependencies:b,peerDependenciesMeta:P,bin:ce};if(u){let m={};Object.keys(u).forEach(d=>{m[d]=l[d],delete l[d]}),y.optionalDependencies=m}if(w==="."){n.length>0&&(y.workspaces={packages:n});let m=Object.keys(t),d=new Map;m.forEach(p=>{p.split(",").forEach(k=>{if(k.includes("builtin<compat/"))return;let a=B(k);d.has(a)||d.set(a,[]),d.get(a).push(k)})}),y.resolutions=m.filter(p=>{var a;if(p.includes("@workspace:"))return!1;if(p.includes("@patch:"))return!((a=de(Y(p,"patch").version).match(/(\.\.\/)+/))!=null&&a.length);if(p.includes(", "))return!1;let k=B(p);return d.get(k).length===1}).reduce((p,k)=>(ke.forEach(a=>{if(!k.includes(`@${a}:`))return;let{key:x,version:g}=Y(k,a);switch(a){case"npm":p[x]=g.includes("@")?`${a}:${g}`:g;break;case"patch":k.includes("builtin<compat/")||(p[x]=`${a}:${g.split("::")[0]}`);break;case"portal":case"link":p[x]=`${a}:${g.split("::")[0]}`;break}}),p),{})}C.mkdirSync(w,{recursive:!0}),C.writeFileSync(ie,`${JSON.stringify(y,null,2)}
`)})}});var j=i((Ze,R)=>{var he=H();R.exports=s=>{s.context.stdout.write(`[YARN-FETCH] extracting package.json file(s) from yarn.lock
`),he()}});var K=i((Xe,L)=>{var h=c("fs"),me=c("path"),{execSync:ge}=c("child_process"),{parseSyml:ye}=c("@yarnpkg/parsers"),{BaseCommand:xe}=c("@yarnpkg/cli"),{Command:qe,Option:M}=c("clipanion"),be=$(),Pe=j(),q;L.exports=(q=class extends xe{protectPackageJson=M.Boolean("--protect-package-json");args=M.Proxy();async execute(){let{protectPackageJson:e=process.stdout.isTTY}=this,t=[];if(e){this.context.stdout.write(`[YARN-FETCH] backup possible package.json file(s)
`);let n=h.readFileSync("yarn.lock","utf8"),o=ye(n);t=Object.keys(o).filter(u=>u.includes("@workspace:")).map(u=>{let{resolution:b}=o[u],[,P]=b.trim().split("@workspace:");return me.join(P,"package.json")}),t.forEach(u=>{h.existsSync(u)&&!h.existsSync(`${u}.yarn-plugin-fetch-bak`)&&h.copyFileSync(u,`${u}.yarn-plugin-fetch-bak`)})}Pe(this);let r=`yarn ${be(this.args)}`;this.context.stdout.write(`[YARN-FETCH] ${r}
`);try{ge(r,{stdio:"inherit"})}catch(n){throw n}finally{e&&(this.context.stdout.write(`[YARN-FETCH] restoring possible package.json file(s)
`),t.forEach(n=>{h.existsSync(`${n}.yarn-plugin-fetch-bak`)?h.renameSync(`${n}.yarn-plugin-fetch-bak`,n):h.unlinkSync(n)}))}}},f(q,"paths",[["fetch"]]),f(q,"usage",qe.Usage({description:"fetch dependencies from yarn.lock in Docker build",details:`
expand yarn.lock to package.json file(s) and install dependencies in Docker build.
`,examples:[["yarn fetch --immutable","yarn fetch workspace my-package focus"]]})),q)});var W=i((st,I)=>{var{BaseCommand:we}=c("@yarnpkg/cli"),$e=j(),S;I.exports=(S=class extends we{async execute(){$e(this)}},f(S,"paths",[["fetch-tools","expand-lock"]]),S)});var z=i((rt,_)=>{function Ce(s,e,t){let r=e.split("."),n=s;for(let o of r){if(n[o]===void 0)return t;n=n[o]}return n}function je(s,e,t){let r=e.split("."),n=s;for(let o=0;o<r.length-1;o++){let l=r[o];(!n[l]||typeof n[l]!="object")&&(n[l]={}),n=n[l]}return n[r[r.length-1]]=t,s}function Se(s,e){let t=e.split("."),r=s;for(let n=0;n<t.length-1;n++){let o=t[n];if(!r[o])return!1;r=r[o]}return delete r[t[t.length-1]],!0}_.exports={get:Ce,set:je,unset:Se}});var E=i((ot,U)=>{var G=c("fs"),{get:Ee,set:Fe,unset:Je}=z();U.exports=function(e,t){let r=JSON.parse(G.readFileSync("package.json","utf-8")),n=Ee(r,e);n!==void 0&&(Fe(r,t,n),Je(r,e),G.writeFileSync("package.json",JSON.stringify(r,null,2)))}});var F=i((ct,V)=>{var Ne=E();V.exports=function(){Ne("scripts._postinstall","scripts.postinstall")}});var Q=i((it,Z)=>{var{BaseCommand:Te}=c("@yarnpkg/cli"),Oe=F(),J;Z.exports=(J=class extends Te{async execute(){Oe()}},f(J,"paths",[["fetch-tools","disable-postinstall"]]),J)});var N=i((pt,X)=>{var De=E();X.exports=function(){De("scripts.postinstall","scripts._postinstall")}});var te=i((ft,ee)=>{var{BaseCommand:Ae}=c("@yarnpkg/cli"),Be=N(),T;ee.exports=(T=class extends Ae{async execute(){Be()}},f(T,"paths",[["fetch-tools","disable-postinstall"]]),T)});var re=i((ht,ne)=>{var{execSync:Ye}=c("child_process"),{BaseCommand:ve}=c("@yarnpkg/cli"),{Option:se}=c("clipanion"),He=$(),Re=F(),Me=N(),O;ne.exports=(O=class extends ve{postinstall=se.Boolean("--postinstall");args=se.Proxy();async execute(){this.postinstall||(this.context.stdout.write(`[YARN-FETCH] disable postinstall command in package.json
`),Me());let e=`yarn workspaces focus --production ${He(this.args)}`;this.context.stdout.write(`[YARN-FETCH] ${e}
`),Ye(e,{stdio:"inherit"}),this.postinstall||(this.context.stdout.write(`[YARN-FETCH] re-enable postinstall command in package.json
`),Re())}},f(O,"paths",[["fetch-tools","production"]]),O)});var ze=i((gt,oe)=>{var Le=K(),Ke=W(),Ie=Q(),We=te(),_e=re();oe.exports={commands:[Le,Ke,We,Ie,_e]}});return ze();})();
return plugin;
}
};
Loading