Initial Integration of ActivityPub module
This commit is contained in:
parent
91419bd4ee
commit
ebb8a95624
59 changed files with 32207 additions and 30950 deletions
|
|
@ -9,8 +9,8 @@ module.exports = ({ env }) => ({
|
||||||
database: env('DATABASE_NAME', 'strapi'),
|
database: env('DATABASE_NAME', 'strapi'),
|
||||||
user: env('DATABASE_USERNAME', 'strapi'),
|
user: env('DATABASE_USERNAME', 'strapi'),
|
||||||
password: env('DATABASE_PASSWORD', 'strapi'),
|
password: env('DATABASE_PASSWORD', 'strapi'),
|
||||||
ssl: {
|
// ssl: {
|
||||||
rejectUnauthorized: env.bool('DATABASE_SSL_SELF', false), // For self-signed certificates
|
// rejectUnauthorized: env.bool('DATABASE_SSL_SELF', false), // For self-signed certificates
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
}});
|
}});
|
||||||
|
|
|
||||||
32693
package-lock.json
generated
32693
package-lock.json
generated
File diff suppressed because it is too large
Load diff
15
package.json
15
package.json
|
|
@ -12,10 +12,10 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@_sh/strapi-plugin-ckeditor": "^2.0.4",
|
"@_sh/strapi-plugin-ckeditor": "^2.0.4",
|
||||||
"@ckeditor/ckeditor5-block-quote": "^39.0.0",
|
"@ckeditor/ckeditor5-block-quote": "^39.0.0",
|
||||||
"@strapi/plugin-documentation": "^4.21.1",
|
"@strapi/plugin-documentation": "^4.25.17",
|
||||||
"@strapi/plugin-i18n": "4.21.1",
|
"@strapi/plugin-i18n": "4.25.17",
|
||||||
"@strapi/plugin-users-permissions": "4.21.1",
|
"@strapi/plugin-users-permissions": "4.25.17",
|
||||||
"@strapi/strapi": "4.21.1",
|
"@strapi/strapi": "4.25.17",
|
||||||
"better-sqlite3": "7.4.6",
|
"better-sqlite3": "7.4.6",
|
||||||
"mysql": "^2.18.1",
|
"mysql": "^2.18.1",
|
||||||
"react": "^18.0.0",
|
"react": "^18.0.0",
|
||||||
|
|
@ -34,9 +34,12 @@
|
||||||
"uuid": "5f15c671-9d39-448f-ad09-9c67c7e50dea"
|
"uuid": "5f15c671-9d39-448f-ad09-9c67c7e50dea"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.x.x <=16.x.x",
|
"node": ">=12.x.x <=20.x.x",
|
||||||
"npm": ">=6.0.0"
|
"npm": ">=6.0.0"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"packageManager": "yarn@3.2.3"
|
"packageManager": "yarn@3.2.3",
|
||||||
|
"devDependencies": {
|
||||||
|
"ajv": "^8.17.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
"name": "Apache 2.0",
|
"name": "Apache 2.0",
|
||||||
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
|
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||||
},
|
},
|
||||||
"x-generation-date": "2024-04-01T03:38:01.188Z"
|
"x-generation-date": "2024-12-29T01:57:01.263Z"
|
||||||
},
|
},
|
||||||
"x-strapi-config": {
|
"x-strapi-config": {
|
||||||
"path": "/documentation",
|
"path": "/documentation",
|
||||||
|
|
@ -10460,7 +10460,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
@ -10965,7 +10966,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
@ -11470,7 +11472,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
@ -11975,7 +11978,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
@ -12480,7 +12484,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
@ -12985,7 +12990,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
@ -13490,7 +13496,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
@ -13995,7 +14002,8 @@
|
||||||
"deprecated": false,
|
"deprecated": false,
|
||||||
"required": false,
|
"required": false,
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object"
|
"type": "object",
|
||||||
|
"additionalProperties": true
|
||||||
},
|
},
|
||||||
"style": "deepObject"
|
"style": "deepObject"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
70
src/extensions/documentation/public/index.html
Normal file
70
src/extensions/documentation/public/index.html
Normal file
File diff suppressed because one or more lines are too long
3
src/plugins/activitypub-integration/README.md
Normal file
3
src/plugins/activitypub-integration/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# Strapi plugin activitypub-integration
|
||||||
|
|
||||||
|
A quick description of activitypub-integration.
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* PluginIcon
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import { Puzzle } from '@strapi/icons';
|
||||||
|
|
||||||
|
const PluginIcon = () => <Puzzle />;
|
||||||
|
|
||||||
|
export default PluginIcon;
|
||||||
67
src/plugins/activitypub-integration/admin/src/index.tsx
Normal file
67
src/plugins/activitypub-integration/admin/src/index.tsx
Normal 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);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
@ -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;
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
/*
|
||||||
|
*
|
||||||
|
* HomePage
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import pluginId from '../../pluginId';
|
||||||
|
|
||||||
|
const HomePage = () => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h1>{pluginId}'s HomePage</h1>
|
||||||
|
<p>Happy coding</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default HomePage;
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
import pluginPkg from '../../package.json';
|
||||||
|
|
||||||
|
const pluginId = pluginPkg.name.replace(/^(@[^-,.][\w,-]+\/|strapi-)plugin-/i, '');
|
||||||
|
|
||||||
|
export default pluginId;
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
{}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
import pluginId from '../pluginId';
|
||||||
|
|
||||||
|
const getTrad = (id: string) => `${pluginId}.${id}`;
|
||||||
|
|
||||||
|
export default getTrad;
|
||||||
5
src/plugins/activitypub-integration/custom.d.ts
vendored
Normal file
5
src/plugins/activitypub-integration/custom.d.ts
vendored
Normal 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';
|
||||||
5
src/plugins/activitypub-integration/dist/server/bootstrap.js
vendored
Normal file
5
src/plugins/activitypub-integration/dist/server/bootstrap.js
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = ({ strapi }) => {
|
||||||
|
// bootstrap phase
|
||||||
|
};
|
||||||
6
src/plugins/activitypub-integration/dist/server/config/index.js
vendored
Normal file
6
src/plugins/activitypub-integration/dist/server/config/index.js
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = {
|
||||||
|
default: {},
|
||||||
|
validator() { },
|
||||||
|
};
|
||||||
3
src/plugins/activitypub-integration/dist/server/content-types/index.js
vendored
Normal file
3
src/plugins/activitypub-integration/dist/server/content-types/index.js
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = {};
|
||||||
9
src/plugins/activitypub-integration/dist/server/controllers/index.js
vendored
Normal file
9
src/plugins/activitypub-integration/dist/server/controllers/index.js
vendored
Normal 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,
|
||||||
|
};
|
||||||
10
src/plugins/activitypub-integration/dist/server/controllers/my-controller.js
vendored
Normal file
10
src/plugins/activitypub-integration/dist/server/controllers/my-controller.js
vendored
Normal 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();
|
||||||
|
},
|
||||||
|
});
|
||||||
5
src/plugins/activitypub-integration/dist/server/destroy.js
vendored
Normal file
5
src/plugins/activitypub-integration/dist/server/destroy.js
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = ({ strapi }) => {
|
||||||
|
// destroy phase
|
||||||
|
};
|
||||||
27
src/plugins/activitypub-integration/dist/server/index.js
vendored
Normal file
27
src/plugins/activitypub-integration/dist/server/index.js
vendored
Normal 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,
|
||||||
|
};
|
||||||
3
src/plugins/activitypub-integration/dist/server/middlewares/index.js
vendored
Normal file
3
src/plugins/activitypub-integration/dist/server/middlewares/index.js
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = {};
|
||||||
3
src/plugins/activitypub-integration/dist/server/policies/index.js
vendored
Normal file
3
src/plugins/activitypub-integration/dist/server/policies/index.js
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = {};
|
||||||
5
src/plugins/activitypub-integration/dist/server/register.js
vendored
Normal file
5
src/plugins/activitypub-integration/dist/server/register.js
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = ({ strapi }) => {
|
||||||
|
// registeration phase
|
||||||
|
};
|
||||||
12
src/plugins/activitypub-integration/dist/server/routes/index.js
vendored
Normal file
12
src/plugins/activitypub-integration/dist/server/routes/index.js
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = [
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
path: '/',
|
||||||
|
handler: 'myController.index',
|
||||||
|
config: {
|
||||||
|
policies: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
9
src/plugins/activitypub-integration/dist/server/services/index.js
vendored
Normal file
9
src/plugins/activitypub-integration/dist/server/services/index.js
vendored
Normal 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,
|
||||||
|
};
|
||||||
7
src/plugins/activitypub-integration/dist/server/services/my-service.js
vendored
Normal file
7
src/plugins/activitypub-integration/dist/server/services/my-service.js
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.default = ({ strapi }) => ({
|
||||||
|
getWelcomeMessage() {
|
||||||
|
return 'Welcome to Strapi 🚀';
|
||||||
|
},
|
||||||
|
});
|
||||||
1
src/plugins/activitypub-integration/dist/tsconfig.server.tsbuildinfo
vendored
Normal file
1
src/plugins/activitypub-integration/dist/tsconfig.server.tsbuildinfo
vendored
Normal file
File diff suppressed because one or more lines are too long
51
src/plugins/activitypub-integration/package.json
Normal file
51
src/plugins/activitypub-integration/package.json
Normal 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"
|
||||||
|
}
|
||||||
5
src/plugins/activitypub-integration/server/bootstrap.ts
Normal file
5
src/plugins/activitypub-integration/server/bootstrap.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { Strapi } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default ({ strapi }: { strapi: Strapi }) => {
|
||||||
|
// bootstrap phase
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
export default {
|
||||||
|
default: {},
|
||||||
|
validator() {},
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
export default {};
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
import myController from './my-controller';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
myController,
|
||||||
|
};
|
||||||
|
|
@ -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();
|
||||||
|
},
|
||||||
|
});
|
||||||
5
src/plugins/activitypub-integration/server/destroy.ts
Normal file
5
src/plugins/activitypub-integration/server/destroy.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { Strapi } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default ({ strapi }: { strapi: Strapi }) => {
|
||||||
|
// destroy phase
|
||||||
|
};
|
||||||
23
src/plugins/activitypub-integration/server/index.ts
Normal file
23
src/plugins/activitypub-integration/server/index.ts
Normal 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,
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
export default {};
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
export default {};
|
||||||
5
src/plugins/activitypub-integration/server/register.ts
Normal file
5
src/plugins/activitypub-integration/server/register.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { Strapi } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default ({ strapi }: { strapi: Strapi }) => {
|
||||||
|
// registeration phase
|
||||||
|
};
|
||||||
10
src/plugins/activitypub-integration/server/routes/index.ts
Normal file
10
src/plugins/activitypub-integration/server/routes/index.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
export default [
|
||||||
|
{
|
||||||
|
method: 'GET',
|
||||||
|
path: '/',
|
||||||
|
handler: 'myController.index',
|
||||||
|
config: {
|
||||||
|
policies: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
import myService from './my-service';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
myService,
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { Strapi } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default ({ strapi }: { strapi: Strapi }) => ({
|
||||||
|
getWelcomeMessage() {
|
||||||
|
return 'Welcome to Strapi 🚀';
|
||||||
|
},
|
||||||
|
});
|
||||||
3
src/plugins/activitypub-integration/strapi-admin.js
Normal file
3
src/plugins/activitypub-integration/strapi-admin.js
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = require('./admin/src').default;
|
||||||
3
src/plugins/activitypub-integration/strapi-server.js
Normal file
3
src/plugins/activitypub-integration/strapi-server.js
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
module.exports = require('./dist/server');
|
||||||
20
src/plugins/activitypub-integration/tsconfig.json
Normal file
20
src/plugins/activitypub-integration/tsconfig.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
||||||
25
src/plugins/activitypub-integration/tsconfig.server.json
Normal file
25
src/plugins/activitypub-integration/tsconfig.server.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
||||||
2
types/generated/components.d.ts
vendored
2
types/generated/components.d.ts
vendored
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Schema, Attribute } from '@strapi/strapi';
|
import type { Attribute, Schema } from '@strapi/strapi';
|
||||||
|
|
||||||
declare module '@strapi/types' {
|
declare module '@strapi/types' {
|
||||||
export module Shared {}
|
export module Shared {}
|
||||||
|
|
|
||||||
2243
types/generated/contentTypes.d.ts
vendored
2243
types/generated/contentTypes.d.ts
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue