Skip to content

Commit

Permalink
chore: rename sami-admin plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Nov 13, 2023
1 parent bd661bf commit 7fcdc40
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions backend/config/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ module.exports = ({ env }) => ({
"import-export-entries": {
enabled: true,
},
"sami-website-deploy": {
"sami-admin": {
enabled: true,
resolve: "./src/plugins/sami-website-deploy",
resolve: "./src/plugins/sami-admin",
},
});
4 changes: 2 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"start": "strapi develop",
"start:prod": "strapi start",
"build": "yarn plugins:build && strapi build",
"plugins:build": "cd src/plugins/sami-website-deploy && npm run build",
"plugins:dev": "cd src/plugins/sami-website-deploy && npm run develop",
"plugins:build": "cd src/plugins/sami-admin && npm run build",
"plugins:dev": "cd src/plugins/sami-admin && npm run develop",
"strapi": "strapi"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"type": "string",
"required": true,
"unique": true
},
"Status": {
"type": "enumeration",
"enum": ["Ongoing", "Completed"]
}
}
}
4 changes: 2 additions & 2 deletions backend/src/plugins/sami-admin/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Strapi plugin sami-website-deploy
# Strapi plugin sami-admin

A quick description of sami-website-deploy.
A quick description of sami-admin.

Build plugin and backend

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const HomePage = () => {
setDeployDisabled(true);
setUpdates([]);
setShowOutput(true);
const io = socket("http://localhost:1337", { path: "/sami-website-deploy/" }); //Connecting to Socket.io backend
const io = socket("http://localhost:1337", { path: "/sami-admin/" }); //Connecting to Socket.io backend

io.on("message", async (data: string, error) => {
//Listening for a message connection
Expand Down Expand Up @@ -93,7 +93,7 @@ export default HomePage;

// const triggerDeploy = () => {
// console.log("triggering deploy");
// fetch("/sami-website-deploy/deploy", {
// fetch("/sami-admin/deploy", {
// method: "GET", // default, so we can ignore
// })
// .then((response) => response.json())
Expand Down
6 changes: 3 additions & 3 deletions backend/src/plugins/sami-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "sami-website-deploy",
"name": "sami-admin",
"version": "0.0.0",
"description": "This is the description of the plugin.",
"strapi": {
"name": "sami-website-deploy",
"description": "Description of sami-website-deploy plugin",
"name": "sami-admin",
"description": "Description of sami-admin plugin",
"kind": "plugin"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/plugins/sami-admin/server/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default ({ strapi }: { strapi: Strapi }) => {
allowedHeaders: ["my-custom-header"],
credentials: true,
},
path: "/sami-website-deploy/",
path: "/sami-admin/",
});
// register deployment service websocket handler
new DeployWebsocketService(io).register();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Strapi } from "@strapi/strapi";
export default ({ strapi }: { strapi: Strapi }) => ({
index(ctx) {
ctx.body = "Plugin Loaded";
// ctx.body = strapi.plugin("sami-website-deploy").service("myService").getWelcomeMessage();
// ctx.body = strapi.plugin("sami-admin").service("myService").getWelcomeMessage();
},
// async deploy(ctx) {
// ctx.body = await strapi.plugin("sami-website-deploy").service("myService").deploy();
// ctx.body = await strapi.plugin("sami-admin").service("myService").deploy();
// },
});
4 changes: 2 additions & 2 deletions backend/src/plugins/sami-admin/server/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default [
// http://localhost:1337/sami-website-deploy
// http://localhost:1337/sami-admin
// {
// method: "GET",
// path: "/",
Expand All @@ -9,7 +9,7 @@ export default [
// auth: false,
// },
// },
// http://localhost:1337/sami-website-deploy/deploy
// http://localhost:1337/sami-admin/deploy
// {
// method: "GET",
// path: "/deploy",
Expand Down

0 comments on commit 7fcdc40

Please sign in to comment.