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

chore: template compat #6

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
File renamed without changes.
2 changes: 2 additions & 0 deletions strapi/.env.example → .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ API_TOKEN_SALT=tobemodified
ADMIN_JWT_SECRET=tobemodified
TRANSFER_TOKEN_SALT=tobemodified
JWT_SECRET=tobemodified
STRAPI_ADMIN_CLIENT_URL=http://localhost:1337/admin
STRAPI_ADMIN_CLIENT_PREVIEW_SECRET=tobemodified
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
48 changes: 30 additions & 18 deletions strapi/package.json → package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,31 @@
{
"name": "strapi",
"private": true,
"version": "0.1.0",
"private": true,
"description": "A Strapi application",
"license": "MIT",
"author": {
"name": "A Strapi developer"
},
"workspaces": [
"./",
"website"
],
"scripts": {
"develop": "strapi develop",
"start": "strapi start",
"build": "strapi build",
"strapi": "strapi",
"build": "npm-run-all -p build:*",
"build:strapi": "strapi build",
"build:website": "yarn workspace website build",
"deploy": "strapi deploy",
"dev": "npm-run-all develop",
"develop": "npm-run-all -p develop:*",
"develop:strapi": "strapi develop",
"develop:website": "yarn workspace website dev",
"postinstall": "node ./scripts/postinstall.js",
"seed": "strapi import -f ./data/export_20240916150535.tar.gz",
"postinstall": "node ./scripts/updateUuid.ts"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"typescript": "^5"
"start": "npm-run-all -p start:*",
"start:strapi": "strapi start",
"strapi": "strapi",
"strat:website": "yarn workspace website develop"
},
"dependencies": {
"@strapi/plugin-cloud": "5.0.0-rc.28",
Expand All @@ -30,15 +39,18 @@
"styled-components": "^6.0.0",
"uuid": "^10.0.0"
},
"author": {
"name": "A Strapi developer"
},
"strapi": {
"uuid": "LAUNCHPAD-LOCAL-b38c4028-6edf-45c1-9f09-7e8467af4066"
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"npm-run-all": "^4.1.5",
"typescript": "^5"
},
"engines": {
"node": ">=18.0.0 <=20.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
"strapi": {
"uuid": "LAUNCHPAD-LOCAL"
}
}
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions scripts/postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const fs = require("fs");
const path = require("path");
const { v4: uuidv4 } = require("uuid");

// This script will update the UUID of the demo project in order to get some random analytics on
// this demo usage.

const packageJsonPath = path.join(__dirname, "../package.json");

const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));

if (packageJson.strapi && packageJson.strapi.uuid === "LAUNCHPAD") {
const environment = process.env.NODE_ENV || "development";

if (environment === "development") {
packageJson.strapi.uuid = `LAUNCHPAD-LOCAL-${uuidv4()}`;
} else if (environment === "production") {
packageJson.strapi.uuid = `LAUNCHPAD-HOSTED-${uuidv4()}`;
} else {
}

fs.writeFileSync(
packageJsonPath,
JSON.stringify(packageJson, null, 2),
"utf-8"
);
} else {
}

fs.copyFileSync("./.env.example", "./.env");
fs.copyFileSync("./website/.env.sample", "./website/.env");
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 0 additions & 24 deletions strapi/scripts/updateUuid.ts

This file was deleted.

1 change: 1 addition & 0 deletions strapi/tsconfig.json → tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
],
"exclude": [
"node_modules/",
"website/",
"build/",
"dist/",
".cache/",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,84 @@
import type { Struct, Schema } from '@strapi/strapi';

export interface ItemsRayItems extends Struct.ComponentSchema {
collectionName: 'components_items_ray_items';
info: {
displayName: 'Ray_Card_Items';
icon: 'bulletList';
description: '';
};
attributes: {
item_1: Schema.Attribute.String;
item_2: Schema.Attribute.String;
item_3: Schema.Attribute.String;
};
}

export interface ItemsLeftNavbarItems extends Struct.ComponentSchema {
collectionName: 'components_items_left_navbar_items';
info: {
displayName: 'Left_Navbar_Items';
icon: 'bulletList';
};
attributes: {
name: Schema.Attribute.String;
URL: Schema.Attribute.String;
};
}

export interface ItemsInput extends Struct.ComponentSchema {
collectionName: 'components_items_inputs';
info: {
displayName: 'Input';
icon: 'apps';
description: '';
};
attributes: {
type: Schema.Attribute.Enumeration<
[
'text',
'email',
'password',
'submit',
'textarea',
'button',
'checkbox',
'color',
'date',
'datetime-local',
'file',
'hidden',
'image',
'month',
'number',
'radio',
'range',
'reset',
'search',
'tel',
'time',
'url',
'week',
]
> &
Schema.Attribute.DefaultTo<'text'>;
name: Schema.Attribute.String;
placeholder: Schema.Attribute.String;
};
}

export interface ItemsGraphCardTopItems extends Struct.ComponentSchema {
collectionName: 'components_items_graph_card_top_items';
info: {
displayName: 'Graph_Card_Top_Items';
icon: 'bulletList';
};
attributes: {
number: Schema.Attribute.String;
text: Schema.Attribute.String;
};
}

export interface SharedUser extends Struct.ComponentSchema {
collectionName: 'components_shared_users';
info: {
Expand Down Expand Up @@ -185,85 +264,6 @@ export interface GlobalFooter extends Struct.ComponentSchema {
};
}

export interface ItemsRayItems extends Struct.ComponentSchema {
collectionName: 'components_items_ray_items';
info: {
displayName: 'Ray_Card_Items';
icon: 'bulletList';
description: '';
};
attributes: {
item_1: Schema.Attribute.String;
item_2: Schema.Attribute.String;
item_3: Schema.Attribute.String;
};
}

export interface ItemsLeftNavbarItems extends Struct.ComponentSchema {
collectionName: 'components_items_left_navbar_items';
info: {
displayName: 'Left_Navbar_Items';
icon: 'bulletList';
};
attributes: {
name: Schema.Attribute.String;
URL: Schema.Attribute.String;
};
}

export interface ItemsInput extends Struct.ComponentSchema {
collectionName: 'components_items_inputs';
info: {
displayName: 'Input';
icon: 'apps';
description: '';
};
attributes: {
type: Schema.Attribute.Enumeration<
[
'text',
'email',
'password',
'submit',
'textarea',
'button',
'checkbox',
'color',
'date',
'datetime-local',
'file',
'hidden',
'image',
'month',
'number',
'radio',
'range',
'reset',
'search',
'tel',
'time',
'url',
'week',
]
> &
Schema.Attribute.DefaultTo<'text'>;
name: Schema.Attribute.String;
placeholder: Schema.Attribute.String;
};
}

export interface ItemsGraphCardTopItems extends Struct.ComponentSchema {
collectionName: 'components_items_graph_card_top_items';
info: {
displayName: 'Graph_Card_Top_Items';
icon: 'bulletList';
};
attributes: {
number: Schema.Attribute.String;
text: Schema.Attribute.String;
};
}

export interface DynamicZoneTestimonials extends Struct.ComponentSchema {
collectionName: 'components_dynamic_zone_testimonials';
info: {
Expand Down Expand Up @@ -508,6 +508,10 @@ export interface CardsGlobeCard extends Struct.ComponentSchema {
declare module '@strapi/strapi' {
export module Public {
export interface ComponentSchemas {
'items.ray-items': ItemsRayItems;
'items.left-navbar-items': ItemsLeftNavbarItems;
'items.input': ItemsInput;
'items.graph-card-top-items': ItemsGraphCardTopItems;
'shared.user': SharedUser;
'shared.steps': SharedSteps;
'shared.social-media-icon-links': SharedSocialMediaIconLinks;
Expand All @@ -520,10 +524,6 @@ declare module '@strapi/strapi' {
'shared.button': SharedButton;
'global.navbar': GlobalNavbar;
'global.footer': GlobalFooter;
'items.ray-items': ItemsRayItems;
'items.left-navbar-items': ItemsLeftNavbarItems;
'items.input': ItemsInput;
'items.graph-card-top-items': ItemsGraphCardTopItems;
'dynamic-zone.testimonials': DynamicZoneTestimonials;
'dynamic-zone.related-products': DynamicZoneRelatedProducts;
'dynamic-zone.related-articles': DynamicZoneRelatedArticles;
Expand Down
2 changes: 2 additions & 0 deletions next/.env.sample → website/.env.sample
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
WEBSITE_URL=http://localhost:3000 # Add the correct ENV var for this onto your hosting platform, point it to your production website.
PORT=3000
NEXT_PUBLIC_API_URL=http://localhost:1337
PREVIEW_SECRET=tobemodified
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion next/package.json → website/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nextjs",
"name": "website",
"version": "0.1.0",
"private": true,
"scripts": {
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading