Compare commits

..

10 commits

Author SHA1 Message Date
ebb8a95624 Initial Integration of ActivityPub module 2024-12-29 13:03:32 +11:00
91419bd4ee Updated version to 4.21.0 2024-04-01 14:42:25 +11:00
997e7042e5 Updated podcast episode schema 2024-03-31 18:15:51 +11:00
385631bf32 Added MediaEmbed to CKEditor 2024-01-14 21:27:42 +11:00
aa8597512f Updated Article type to remove old Body field 2023-08-27 15:47:52 +10:00
da866be634 Removed body field from Article form.
Added block quote and image resize
2023-08-04 22:12:44 +10:00
c013672b81 Update to Strapi
Added new plugin
Added new RichText field that is easier to mod
2023-08-02 21:46:56 +10:00
68457f226e Updated to strapi 4.10 2023-05-20 20:08:10 +10:00
50377a336f Updated version of Stapi 2022-12-22 15:08:10 +11:00
8cfe3007d6 GalleryImage changes 2022-09-08 16:44:04 +10:00
71 changed files with 40038 additions and 48826 deletions

26
.strapi/client/app.js Normal file
View file

@ -0,0 +1,26 @@
/**
* This file was automatically generated by Strapi.
* Any modifications made will be discarded.
*/
import ckeditor5 from "@_sh/strapi-plugin-ckeditor/strapi-admin";
import documentation from "@strapi/plugin-documentation/strapi-admin";
import i18N from "@strapi/plugin-i18n/strapi-admin";
import usersPermissions from "@strapi/plugin-users-permissions/strapi-admin";
import menus from "strapi-plugin-menus/strapi-admin";
import navigation from "strapi-plugin-navigation/strapi-admin";
import responsiveImage from "strapi-plugin-responsive-image/strapi-admin";
import activitypubIntegration from "../../src/plugins/activitypub-integration/strapi-admin";
import { renderAdmin } from "@strapi/strapi/admin";
renderAdmin(document.getElementById("strapi"), {
plugins: {
ckeditor5: ckeditor5,
documentation: documentation,
i18n: i18N,
"users-permissions": usersPermissions,
menus: menus,
navigation: navigation,
"responsive-image": responsiveImage,
"activitypub-integration": activitypubIntegration,
},
});

62
.strapi/client/index.html Normal file
View file

@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<!--
This file was automatically generated by Strapi.
Any modifications made will be discarded.
-->
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, viewport-fit=cover"
/>
<meta name="robots" content="noindex" />
<meta name="referrer" content="same-origin" />
<title>Strapi Admin</title>
<style>
html,
body,
#strapi {
height: 100%;
}
body {
margin: 0;
-webkit-font-smoothing: antialiased;
}
</style>
</head>
<body>
<div id="strapi"></div>
<noscript
><div class="strapi--root">
<div class="strapi--no-js">
<style type="text/css">
.strapi--root {
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: #fff;
}
.strapi--no-js {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
font-family: helvetica, arial, sans-serif;
}
</style>
<h1>JavaScript disabled</h1>
<p>
Please
<a href="https://www.enable-javascript.com/">enable JavaScript</a>
in your browser and reload the page to proceed.
</p>
</div>
</div></noscript
>
</body>
</html>

783
.yarn/releases/yarn-3.2.3.cjs vendored Normal file

File diff suppressed because one or more lines are too long

3
.yarnrc.yml Normal file
View file

@ -0,0 +1,3 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.2.3.cjs

177
config/ckeditor.txt Normal file
View file

@ -0,0 +1,177 @@
globalThis.CKEditorConfig = {
/* By default configs and theme
objects will be spread with
default configs and theme
these two properties specified below
allow you to redefine
default objects completely: */
//configsOverwrite:true,
//themeOverwrite:true,
/* Here you can redefine default configs
or add completely new ones.
Each config includes:
"styles", "field" and "editorConfig" properties.
Property "field" is required. */
configs:{
toolbar:{
// styles:``,
// field:{},
// editorConfig:{}
},
custom:{
/* Styles for this specific editor.
This will be passed into the editor's parent container. */
styles:`
// --ck-focus-ring:3px dashed #5CB176;
// .ck.ck-content.ck-editor__editable {
// &.ck-focused:not(.ck-editor__nested-editable) {
// border: var(--ck-focus-ring) !important;
// }
// }
// .ck.ck-content.ck-editor__editable.ck-rounded-corners.ck-editor__editable_inline.ck-blurred{
// min-height: 400px;
// max-height: 400px;
// }
// .ck.ck-content.ck-editor__editable.ck-rounded-corners.ck-editor__editable_inline.ck-focused{
// min-height: 400px;
// max-height: 1700px;
// }
`,
/* Custom field option */
field: {
key: "custom",
value: "custom",
metadatas: {
intlLabel: {
id: "ckeditor5.preset.custom.label",
defaultMessage: "Custom version",
},
},
},
/* CKEditor configuration */
editorConfig:{
/* All available built-in plugins
you can find in admin/src/components/Input/CKEditor/configs/base.js */
plugins: [
CKEditor5.autoformat.Autoformat,
CKEditor5.basicStyles.Bold,
CKEditor5.basicStyles.Italic,
CKEditor5.blockQuote.BlockQuote,
CKEditor5.essentials.Essentials,
CKEditor5.heading.Heading,
CKEditor5.image.Image,
CKEditor5.image.ImageCaption,
CKEditor5.image.ImageStyle,
CKEditor5.image.ImageToolbar,
CKEditor5.image.ImageUpload,
CKEditor5.image.ImageResizeEditing,
CKEditor5.image.ImageResizeHandles,
CKEditor5.indent.Indent,
CKEditor5.link.Link,
CKEditor5.list.List,
CKEditor5.mediaEmbed.MediaEmbed,
CKEditor5.paragraph.Paragraph,
CKEditor5.pasteFromOffice.PasteFromOffice,
CKEditor5.sourceEditing.SourceEditing,
CKEditor5.table.Table,
CKEditor5.table.TableToolbar,
CKEditor5.table.TableColumnResize,
CKEditor5.table.TableCaption,
CKEditor5.strapiPlugins.StrapiMediaLib,
CKEditor5.strapiPlugins.StrapiUploadAdapter,
],
/* By default, for plugin's UI will use
the language defined in this file
or the preferred language from strapi's user config
and 'en' as a fallback.
language.ui -> preferred language -> 'en' */
/* For content it will use language based on i18n (if! ignorei18n)
or language.content defined here
and it will use UI language as a fallback.
ignorei18n ? language.content : i18n; -> language.ui */
language:{
// ignorei18n: true,
// ui:'he',
// content:'he'
},
mediaEmbed: {
previewsInData: true
},
toolbar: [
'heading',
'|',
'bold', 'italic', 'link', 'bulletedList', 'numberedList',
'|',
'uploadImage', 'strapiMediaLib', 'insertTable','mediaEmbed',
'|',
'blockQuote',
'sourceEditing',
'|',
'undo', 'redo'
],
link : {
addTargetToExternalLinks: true,
decorators: [
{
mode: 'manual',
label: 'External Link',
attributes: {
target: '_blank',
}
}
]
},
heading: {
options: [
{ model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
{ model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
{ model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
{ model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
{ model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
]
},
image: {
toolbar: [
'imageStyle:inline',
'imageStyle:block',
'imageStyle:side',
'|',
'toggleImageCaption',
'imageTextAlternative'
]
},
table: {
contentToolbar: [
'tableColumn',
'tableRow',
'mergeTableCells',
'|',
'toggleTableCaption'
]
}
}
}
},
/* Here you can customize the plugin's theme.
This will be passed as "createGlobalStyle". */
theme:{
// common:``,
// light:``,
// dark:``,
// additional:``
}
}

View file

@ -9,8 +9,8 @@ module.exports = ({ env }) => ({
database: env('DATABASE_NAME', 'strapi'),
user: env('DATABASE_USERNAME', 'strapi'),
password: env('DATABASE_PASSWORD', 'strapi'),
ssl: {
rejectUnauthorized: env.bool('DATABASE_SSL_SELF', false), // For self-signed certificates
},
// ssl: {
// rejectUnauthorized: env.bool('DATABASE_SSL_SELF', false), // For self-signed certificates
// },
},
}});

View file

@ -1,5 +1,11 @@
module.exports = () => {
return {
ckeditor: true
ckeditor5: {
enabled: true,
},
'activitypub-integration': {
enabled: true,
resolve: './src/plugins/activitypub-integration' // path to plugin folder
}
}
}

35696
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
{
"name": "angrybeanie-cms",
"private": true,
"version": "0.1.0",
"version": "0.2.0",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
@ -10,15 +10,22 @@
"strapi": "strapi"
},
"dependencies": {
"@_sh/strapi-plugin-ckeditor": "^1.1.0",
"@strapi/plugin-documentation": "^4.1.12",
"@strapi/plugin-i18n": "4.1.12",
"@strapi/plugin-users-permissions": "4.1.12",
"@strapi/strapi": "4.1.12",
"@_sh/strapi-plugin-ckeditor": "^2.0.4",
"@ckeditor/ckeditor5-block-quote": "^39.0.0",
"@strapi/plugin-documentation": "^4.25.17",
"@strapi/plugin-i18n": "4.25.17",
"@strapi/plugin-users-permissions": "4.25.17",
"@strapi/strapi": "4.25.17",
"better-sqlite3": "7.4.6",
"mysql": "^2.18.1",
"strapi-plugin-menus": "^0.3.2",
"strapi-plugin-navigation": "^2.0.13"
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^5.2.0",
"strapi-plugin-local-image-sharp": "^1.7.0",
"strapi-plugin-menus": "^1.6.1",
"strapi-plugin-navigation": "^2.4.0",
"strapi-plugin-responsive-image": "^1.2.0",
"styled-components": "^5.2.1"
},
"author": {
"name": "A Strapi developer"
@ -27,8 +34,12 @@
"uuid": "5f15c671-9d39-448f-ad09-9c67c7e50dea"
},
"engines": {
"node": ">=12.x.x <=16.x.x",
"node": ">=12.x.x <=20.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
"license": "MIT",
"packageManager": "yarn@3.2.3",
"devDependencies": {
"ajv": "^8.17.1"
}
}

View file

@ -17,10 +17,6 @@
"required": true,
"unique": true
},
"Body": {
"type": "richtext",
"required": true
},
"FeatureImage": {
"type": "media",
"multiple": false,
@ -52,6 +48,17 @@
"relation": "manyToOne",
"target": "api::project.project",
"inversedBy": "articles"
},
"FeaturedImageCaption": {
"type": "string",
"required": true
},
"FullBody": {
"type": "customField",
"options": {
"preset": "custom"
},
"customField": "plugin::ckeditor5.CKEditor"
}
}
}

View file

@ -80,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -146,6 +146,28 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object",
"additionalProperties": true
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/articles"
@ -305,7 +327,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -385,7 +407,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -476,7 +498,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -33,6 +33,10 @@
"relation": "manyToMany",
"target": "api::gallery.gallery",
"mappedBy": "gallery_images"
},
"Slug": {
"type": "uid",
"targetField": "Title"
}
}
}

View file

@ -80,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -146,6 +146,28 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object",
"additionalProperties": true
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/gallery-images"
@ -305,7 +327,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -385,7 +407,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -476,7 +498,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -80,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -146,6 +146,28 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object",
"additionalProperties": true
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/galleries"
@ -305,7 +327,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -385,7 +407,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -476,7 +498,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -80,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -146,6 +146,28 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object",
"additionalProperties": true
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/pages"
@ -305,7 +327,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -385,7 +407,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -476,7 +498,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -20,9 +20,6 @@
"type": "richtext",
"required": true
},
"Transcript": {
"type": "richtext"
},
"Audio_MP3": {
"type": "media",
"multiple": false,
@ -48,6 +45,20 @@
"allowedTypes": [
"audios"
]
},
"Transcript": {
"type": "customField",
"options": {
"preset": "custom"
},
"customField": "plugin::ckeditor5.CKEditor"
},
"Subtitles": {
"allowedTypes": [
"files"
],
"type": "media",
"multiple": false
}
}
}

View file

@ -80,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -146,6 +146,28 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object",
"additionalProperties": true
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/podcast-episodes"
@ -305,7 +327,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -385,7 +407,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -476,7 +498,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -80,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -146,6 +146,28 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object",
"additionalProperties": true
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/podcast-series"
@ -305,7 +327,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -385,7 +407,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -476,7 +498,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -80,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -146,6 +146,28 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object",
"additionalProperties": true
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/projects"
@ -305,7 +327,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -385,7 +407,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -476,7 +498,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -80,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -146,6 +146,28 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object",
"additionalProperties": true
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/tags"
@ -305,7 +327,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -385,7 +407,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -476,7 +498,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

File diff suppressed because one or more lines are too long

View file

@ -1,75 +1,4 @@
{
"/upload/files/count": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadFileResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"tags": [
"Upload - File"
],
"parameters": [],
"operationId": "get/upload/files/count"
}
},
"/upload/files": {
"get": {
"responses": {
@ -151,7 +80,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -217,6 +146,27 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object"
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/upload/files"
@ -297,7 +247,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -378,7 +328,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -0,0 +1,7 @@
const imageManipulation = require("strapi-plugin-responsive-image/server/services/image-manipulation");
module.exports = (plugin) => {
plugin.services["image-manipulation"] = imageManipulation;
return plugin;
};

View file

@ -145,7 +145,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -233,7 +233,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -299,6 +299,27 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object"
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/users-permissions/roles"
@ -458,7 +479,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -549,7 +570,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -708,7 +729,7 @@
{
"name": "pagination[withCount]",
"in": "query",
"description": "Retun page/pageSize (default: true)",
"description": "Return page/pageSize (default: true)",
"deprecated": false,
"required": false,
"schema": {
@ -774,6 +795,27 @@
"schema": {
"type": "string"
}
},
{
"name": "filters",
"in": "query",
"description": "Filters to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "object"
},
"style": "deepObject"
},
{
"name": "locale",
"in": "query",
"description": "Locale to apply",
"deprecated": false,
"required": false,
"schema": {
"type": "string"
}
}
],
"operationId": "get/users"
@ -1004,7 +1046,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -1084,7 +1126,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],
@ -1175,7 +1217,7 @@
"deprecated": false,
"required": true,
"schema": {
"type": "string"
"type": "number"
}
}
],

View file

@ -0,0 +1,3 @@
# Strapi plugin activitypub-integration
A quick description of activitypub-integration.

View file

@ -0,0 +1,24 @@
/**
*
* Initializer
*
*/
import { useEffect, useRef } from 'react';
import pluginId from '../../pluginId';
type InitializerProps = {
setPlugin: (id: string) => void;
};
const Initializer = ({ setPlugin }: InitializerProps) => {
const ref = useRef(setPlugin);
useEffect(() => {
ref.current(pluginId);
}, []);
return null;
};
export default Initializer;

View file

@ -0,0 +1,12 @@
/**
*
* PluginIcon
*
*/
import React from 'react';
import { Puzzle } from '@strapi/icons';
const PluginIcon = () => <Puzzle />;
export default PluginIcon;

View file

@ -0,0 +1,67 @@
import { prefixPluginTranslations } from '@strapi/helper-plugin';
import pluginPkg from '../../package.json';
import pluginId from './pluginId';
import Initializer from './components/Initializer';
import PluginIcon from './components/PluginIcon';
const name = pluginPkg.strapi.name;
export default {
register(app: any) {
app.addMenuLink({
to: `/plugins/${pluginId}`,
icon: PluginIcon,
intlLabel: {
id: `${pluginId}.plugin.name`,
defaultMessage: name,
},
Component: async () => {
const component = await import(/* webpackChunkName: "[request]" */ './pages/App');
return component;
},
permissions: [
// Uncomment to set the permissions of the plugin here
// {
// action: '', // the action name should be plugin::plugin-name.actionType
// subject: null,
// },
],
});
const plugin = {
id: pluginId,
initializer: Initializer,
isReady: false,
name,
};
app.registerPlugin(plugin);
},
bootstrap(app: any) {},
async registerTrads(app: any) {
const { locales } = app;
const importedTrads = await Promise.all(
(locales as any[]).map((locale) => {
return import(`./translations/${locale}.json`)
.then(({ default: data }) => {
return {
data: prefixPluginTranslations(data, pluginId),
locale,
};
})
.catch(() => {
return {
data: {},
locale,
};
});
})
);
return Promise.resolve(importedTrads);
},
};

View file

@ -0,0 +1,25 @@
/**
*
* This component is the skeleton around the actual pages, and should only
* contain code that should be seen on all pages. (e.g. navigation bar)
*
*/
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import { AnErrorOccurred } from '@strapi/helper-plugin';
import pluginId from '../../pluginId';
import HomePage from '../HomePage';
const App = () => {
return (
<div>
<Switch>
<Route path={`/plugins/${pluginId}`} component={HomePage} exact />
<Route component={AnErrorOccurred} />
</Switch>
</div>
);
};
export default App;

View file

@ -0,0 +1,19 @@
/*
*
* HomePage
*
*/
import React from 'react';
import pluginId from '../../pluginId';
const HomePage = () => {
return (
<div>
<h1>{pluginId}&apos;s HomePage</h1>
<p>Happy coding</p>
</div>
);
};
export default HomePage;

View file

@ -0,0 +1,5 @@
import pluginPkg from '../../package.json';
const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
export default pluginId;

View file

@ -0,0 +1,5 @@
import pluginId from '../pluginId';
const getTrad = (id: string) => `${pluginId}.${id}`;
export default getTrad;

View file

@ -0,0 +1,5 @@
declare module '@strapi/design-system/*';
declare module '@strapi/design-system';
declare module '@strapi/icons';
declare module '@strapi/icons/*';
declare module '@strapi/helper-plugin';

View file

@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ({ strapi }) => {
// bootstrap phase
};

View file

@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {
default: {},
validator() { },
};

View file

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {};

View file

@ -0,0 +1,9 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const my_controller_1 = __importDefault(require("./my-controller"));
exports.default = {
myController: my_controller_1.default,
};

View file

@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ({ strapi }) => ({
index(ctx) {
ctx.body = strapi
.plugin('activitypub-integration')
.service('myService')
.getWelcomeMessage();
},
});

View file

@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ({ strapi }) => {
// destroy phase
};

View file

@ -0,0 +1,27 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const register_1 = __importDefault(require("./register"));
const bootstrap_1 = __importDefault(require("./bootstrap"));
const destroy_1 = __importDefault(require("./destroy"));
const config_1 = __importDefault(require("./config"));
const content_types_1 = __importDefault(require("./content-types"));
const controllers_1 = __importDefault(require("./controllers"));
const routes_1 = __importDefault(require("./routes"));
const middlewares_1 = __importDefault(require("./middlewares"));
const policies_1 = __importDefault(require("./policies"));
const services_1 = __importDefault(require("./services"));
exports.default = {
register: register_1.default,
bootstrap: bootstrap_1.default,
destroy: destroy_1.default,
config: config_1.default,
controllers: controllers_1.default,
routes: routes_1.default,
services: services_1.default,
contentTypes: content_types_1.default,
policies: policies_1.default,
middlewares: middlewares_1.default,
};

View file

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {};

View file

@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = {};

View file

@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ({ strapi }) => {
// registeration phase
};

View file

@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = [
{
method: 'GET',
path: '/',
handler: 'myController.index',
config: {
policies: [],
},
},
];

View file

@ -0,0 +1,9 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const my_service_1 = __importDefault(require("./my-service"));
exports.default = {
myService: my_service_1.default,
};

View file

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ({ strapi }) => ({
getWelcomeMessage() {
return 'Welcome to Strapi 🚀';
},
});

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,51 @@
{
"name": "activitypub-integration",
"version": "0.0.0",
"description": "This is the description of the plugin.",
"strapi": {
"name": "activitypub-integration",
"description": "Description of activitypub-integration plugin",
"kind": "plugin"
},
"dependencies": {
"@strapi/design-system": "^1.6.3",
"@strapi/helper-plugin": "^4.6.0",
"@strapi/icons": "^1.6.3",
"prop-types": "^15.7.2"
},
"devDependencies": {
"@strapi/typescript-utils": "^4.6.0",
"@types/react": "^17.0.53",
"@types/react-dom": "^17.0.18",
"@types/react-router-dom": "^5.3.3",
"@types/styled-components": "^5.1.26",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.3.4",
"styled-components": "^5.3.6",
"typescript": "5.0.4"
},
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^5.3.4",
"styled-components": "^5.3.6"
},
"author": {
"name": "A Strapi developer"
},
"maintainers": [
{
"name": "A Strapi developer"
}
],
"engines": {
"node": ">=14.19.1 <=18.x.x",
"npm": ">=6.0.0"
},
"scripts": {
"develop": "tsc -p tsconfig.server.json -w",
"build": "tsc -p tsconfig.server.json"
},
"license": "MIT"
}

View file

@ -0,0 +1,5 @@
import { Strapi } from '@strapi/strapi';
export default ({ strapi }: { strapi: Strapi }) => {
// bootstrap phase
};

View file

@ -0,0 +1,4 @@
export default {
default: {},
validator() {},
};

View file

@ -0,0 +1 @@
export default {};

View file

@ -0,0 +1,5 @@
import myController from './my-controller';
export default {
myController,
};

View file

@ -0,0 +1,10 @@
import { Strapi } from '@strapi/strapi';
export default ({ strapi }: { strapi: Strapi }) => ({
index(ctx) {
ctx.body = strapi
.plugin('activitypub-integration')
.service('myService')
.getWelcomeMessage();
},
});

View file

@ -0,0 +1,5 @@
import { Strapi } from '@strapi/strapi';
export default ({ strapi }: { strapi: Strapi }) => {
// destroy phase
};

View file

@ -0,0 +1,23 @@
import register from './register';
import bootstrap from './bootstrap';
import destroy from './destroy';
import config from './config';
import contentTypes from './content-types';
import controllers from './controllers';
import routes from './routes';
import middlewares from './middlewares';
import policies from './policies';
import services from './services';
export default {
register,
bootstrap,
destroy,
config,
controllers,
routes,
services,
contentTypes,
policies,
middlewares,
};

View file

@ -0,0 +1 @@
export default {};

View file

@ -0,0 +1 @@
export default {};

View file

@ -0,0 +1,5 @@
import { Strapi } from '@strapi/strapi';
export default ({ strapi }: { strapi: Strapi }) => {
// registeration phase
};

View file

@ -0,0 +1,10 @@
export default [
{
method: 'GET',
path: '/',
handler: 'myController.index',
config: {
policies: [],
},
},
];

View file

@ -0,0 +1,5 @@
import myService from './my-service';
export default {
myService,
};

View file

@ -0,0 +1,7 @@
import { Strapi } from '@strapi/strapi';
export default ({ strapi }: { strapi: Strapi }) => ({
getWelcomeMessage() {
return 'Welcome to Strapi 🚀';
},
});

View file

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./admin/src').default;

View file

@ -0,0 +1,3 @@
'use strict';
module.exports = require('./dist/server');

View file

@ -0,0 +1,20 @@
{
"extends": "@strapi/typescript-utils/tsconfigs/admin",
"compilerOptions": {
"target": "ESNext",
"strict": true
},
"include": ["admin", "custom.d.ts"],
"exclude": [
"node_modules/",
"dist/",
// Do not include server files in the server compilation
"server/",
// Do not include test files
"**/*.test.ts"
]
}

View file

@ -0,0 +1,25 @@
{
"extends": "@strapi/typescript-utils/tsconfigs/server",
"compilerOptions": {
"outDir": "dist",
"rootDir": "."
},
"include": [
// Include the root directory
"server",
// Force the JSON files in the src folder to be included
"server/**/*.json"
],
"exclude": [
"node_modules/",
"dist/",
// Do not include admin files in the server compilation
"admin/",
// Do not include test files
"**/*.test.ts"
]
}

5
types/generated/components.d.ts vendored Normal file
View file

@ -0,0 +1,5 @@
import type { Attribute, Schema } from '@strapi/strapi';
declare module '@strapi/types' {
export module Shared {}
}

1459
types/generated/contentTypes.d.ts vendored Normal file

File diff suppressed because it is too large Load diff

12311
yarn.lock

File diff suppressed because it is too large Load diff