create-prisma-php-app 1.28.7 → 2.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composer.json +8 -6
- package/dist/bootstrap.php +652 -682
- package/dist/index.js +51 -30
- package/dist/postcss.config.js +1 -3
- package/dist/prisma/seed.ts +2 -2
- package/dist/prisma-php.js +2 -42
- package/dist/settings/prisma-sdk.ts +4 -0
- package/dist/settings/project-name.ts +26 -2
- package/dist/src/Lib/AI/ChatGPTClient.php +32 -103
- package/dist/src/Lib/CacheHandler.php +121 -0
- package/dist/src/Lib/ErrorHandler.php +123 -0
- package/dist/src/Lib/MainLayout.php +23 -22
- package/dist/src/Lib/PHPX/TemplateCompiler.php +47 -24
- package/dist/src/Lib/PHPX/TwMerge.php +7 -1
- package/dist/src/Lib/Prisma/Classes/PPHPUtility.php +234 -105
- package/dist/src/Lib/Prisma/Model/IModel.php +15 -11
- package/dist/src/Lib/PrismaPHPSettings.php +44 -9
- package/dist/src/Lib/Request.php +1 -1
- package/dist/src/Lib/Validator.php +35 -7
- package/dist/src/app/css/tailwind.css +1 -3
- package/dist/src/app/index.php +2 -2
- package/dist/src/app/js/index.js +12 -1
- package/dist/src/app/layout.php +4 -7
- package/dist/src/app/not-found.php +1 -1
- package/package.json +1 -1
- package/tsconfig.json +5 -6
- package/dist/prisma-client-php/index.enc +0 -1
- package/dist/prisma-client-php/index.js +0 -19
- package/dist/prisma-client-php/key.enc +0 -1
- package/dist/tailwind.config.js +0 -8
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import*as fs from"fs";import{exec}from"child_process";import path from"path";import{fileURLToPath}from"url";import CryptoJS from"crypto-js";import chalk from"chalk";const __filename=fileURLToPath(import.meta.url),__dirname=path.dirname(__filename),getSecretKey=()=>{const r=fs.readFileSync(`${__dirname}/key.enc`,"utf8");if(r.length<400)throw new Error("File content is less than 400 characters.");return r.substring(247,289)},decryptData=(r,t)=>CryptoJS.AES.decrypt(r,t).toString(CryptoJS.enc.Utf8);
|
|
2
|
-
const executePHP = (command) => {
|
|
3
|
-
exec(command, (error, stdout, stderr) => {
|
|
4
|
-
if (error) {
|
|
5
|
-
console.error(`Execution error: ${error}`);
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
if (stderr) {
|
|
9
|
-
console.error(`Standard error: ${stderr}`);
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
if (stdout.includes("Result: Prisma schema is valid.")) {
|
|
13
|
-
console.error(chalk.blue(stdout));
|
|
14
|
-
} else {
|
|
15
|
-
console.log(`Standard output...\n${stdout}`);
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
const main=async()=>{try{const e=process.cwd(),n=path.join(e,"prisma-php.json"),a=fs.readFileSync(n,{encoding:"utf8"}),c=JSON.parse(a),t=c.phpGenerateClassPath,i=`${__dirname}/index.php`,p=`${__dirname}/index.enc`,s=getSecretKey(),r=fs.readFileSync(p,{encoding:"utf8"}),d=decryptData(r,s);fs.writeFileSync(`${__dirname}/index.php`,d);const h=`${c.phpRootPathExe} ${i} ${t}`;executePHP(h)}catch(e){}};main().catch((e=>{}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
U2FsdGVkX1+lsKHxlJWvsEJCxC/cKMFrJFTk4kLWs+6xXSZur4i8T8vsHsb+w84kGj5g1Ogol85/RUqyeyYwYSB02CgRGJsOeVLC1BbEMUXnyCGei6WC50xaz/xZ9vAvfqt3gs9ne/RuWkuzn5Quf0cdIVMTA+Wbn+nxpGo8Inyt23I33tiBGsoKs0a3Oj8cSGKY2RZIX439yTSKsh1RAaP4f+h1gby8EN41gaaTgOzUaROQX2yyXB6IV1617RnWCbT74zOnbQDLCF7IETZ1bH7Pni05xfUAg3jMJisEkqkh7UNk+CVSE7qKMaXcyu/uqOoILEnwfSvXxzXvw9kpNVRvFQKrXAc3Jvdx5NzVWut/inITo1+TLuAJlPx7r+Skbfcyr1e+9+NI42Bgk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