create-prisma-php-app 1.22.0 → 1.22.501

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.
@@ -5,4 +5,5 @@ module.exports = {
5
5
  notify: false,
6
6
  open: false,
7
7
  ghostMode: false,
8
+ codeSync: true, // Disable synchronization of code changes across clients
8
9
  };
@@ -0,0 +1,61 @@
1
+ import { readdirSync, statSync, existsSync, writeFileSync } from "fs";
2
+ import path, { dirname } from "path";
3
+ import { fileURLToPath } from "url";
4
+
5
+ // Define __dirname equivalent in ES modules
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = dirname(__filename);
8
+
9
+ const dirPath = path.join(__dirname, "..", "src", "app");
10
+ const jsonFilePath = path.join(__dirname, "files-list.json");
11
+
12
+ // Function to get all files in the directory
13
+ const getAllFiles = (dirPath) => {
14
+ const files = [];
15
+
16
+ // Check if directory exists before reading
17
+ if (!existsSync(dirPath)) {
18
+ console.error(`Directory not found: ${dirPath}`);
19
+ return files; // Return an empty array if the directory doesn't exist
20
+ }
21
+
22
+ const items = readdirSync(dirPath);
23
+ items.forEach((item) => {
24
+ const fullPath = path.join(dirPath, item);
25
+ if (statSync(fullPath).isDirectory()) {
26
+ files.push(...getAllFiles(fullPath)); // Recursive call for subdirectories
27
+ } else {
28
+ // Generate the relative path and ensure it starts with ./src
29
+ const relativePath = `.${path.sep}${path.relative(
30
+ path.join(__dirname, ".."),
31
+ fullPath
32
+ )}`;
33
+ // Replace only the root backslashes with forward slashes and leave inner ones
34
+ files.push(relativePath.replace(/\\/g, "\\").replace(/^\.\.\//, ""));
35
+ }
36
+ });
37
+
38
+ return files;
39
+ };
40
+
41
+ // Function to generate the files-list.json
42
+ const generateFileListJson = () => {
43
+ const files = getAllFiles(dirPath);
44
+
45
+ // If files exist, generate JSON file
46
+ if (files.length > 0) {
47
+ writeFileSync(jsonFilePath, JSON.stringify(files, null, 2));
48
+ console.log(
49
+ `File list has been saved to: settings/files-list.json`
50
+ );
51
+ } else {
52
+ console.error("No files found to save in the JSON file.");
53
+ }
54
+ };
55
+
56
+ // Main function
57
+ async function processDirectory() {
58
+ generateFileListJson();
59
+ }
60
+
61
+ processDirectory();
@@ -148,10 +148,10 @@ async function startDev() {
148
148
  console.error(`Failed to start browserSync process: ${err.message}`);
149
149
  });
150
150
 
151
- // Function to start _dev process
151
+ // Function to start npmRunAll process
152
152
  function startDevProcess() {
153
- console.log("Starting _dev...");
154
- devProcess = spawn("npm", ["run", "_dev"], { shell: true });
153
+ console.log("Starting npmRunAll...");
154
+ devProcess = spawn("npm", ["run", "npmRunAll"], { shell: true });
155
155
 
156
156
  devProcess.stdout.on("data", (data) => {
157
157
  process.stdout.write(data);
@@ -72,6 +72,19 @@ class Boom
72
72
  return new self(401, $message, $details);
73
73
  }
74
74
 
75
+ /**
76
+ * Factory method for 402 Payment Required.
77
+ *
78
+ * @param string $message Error message.
79
+ * @param array $details Additional error details.
80
+ *
81
+ * @return self
82
+ */
83
+ public static function paymentRequired(string $message = 'Payment Required', array $details = []): self
84
+ {
85
+ return new self(402, $message, $details);
86
+ }
87
+
75
88
  /**
76
89
  * Factory method for 403 Forbidden.
77
90
  *
@@ -98,6 +111,32 @@ class Boom
98
111
  return new self(404, $message, $details);
99
112
  }
100
113
 
114
+ /**
115
+ * Factory method for 405 Method Not Allowed.
116
+ *
117
+ * @param string $message Error message.
118
+ * @param array $details Additional error details.
119
+ *
120
+ * @return self
121
+ */
122
+ public static function methodNotAllowed(string $message = 'Method Not Allowed', array $details = []): self
123
+ {
124
+ return new self(405, $message, $details);
125
+ }
126
+
127
+ /**
128
+ * Factory method for 406 Not Acceptable.
129
+ *
130
+ * @param string $message Error message.
131
+ * @param array $details Additional error details.
132
+ *
133
+ * @return self
134
+ */
135
+ public static function notAcceptable(string $message = 'Not Acceptable', array $details = []): self
136
+ {
137
+ return new self(406, $message, $details);
138
+ }
139
+
101
140
  /**
102
141
  * Factory method for 500 Internal Server Error.
103
142
  *
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
7
  <meta name="pp-description" content="<?= htmlspecialchars($metadata['description']); ?>">
8
8
  <title><?= htmlspecialchars($metadata['title']); ?></title>
9
- <link rel="icon" href="<?= $baseUrl; ?>\favicon.ico" type="image/x-icon">
9
+ <link rel="icon" href="<?= $baseUrl; ?>/favicon.ico" type="image/x-icon">
10
10
  </head>
11
11
 
12
12
  <body>
@@ -1,11 +1,8 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
- export default {
3
- content: [
4
- "./src/app/**/*.{html,js,php}"
5
- ],
2
+ module.exports = {
3
+ content: ["./src/**/*.{html,js,php}"],
6
4
  theme: {
7
5
  extend: {},
8
6
  },
9
7
  plugins: [],
10
- }
11
-
8
+ };
@@ -11,7 +11,7 @@
11
11
  // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
12
 
13
13
  /* Language and Environment */
14
- "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
14
+ "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
15
  // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
16
  // "jsx": "preserve", /* Specify what JSX code is generated. */
17
17
  // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
@@ -25,7 +25,7 @@
25
25
  // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
26
 
27
27
  /* Modules */
28
- "module": "commonjs", /* Specify what module code is generated. */
28
+ "module": "NodeNext" /* Specify what module code is generated. */,
29
29
  // "rootDir": "./", /* Specify the root folder within your source files. */
30
30
  // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
31
31
  // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
@@ -39,7 +39,7 @@
39
39
  // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
40
40
  // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
41
41
  // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42
- // "resolveJsonModule": true, /* Enable importing .json files. */
42
+ "resolveJsonModule": true /* Enable importing .json files. */,
43
43
  // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
44
44
  // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45
45
 
@@ -77,12 +77,12 @@
77
77
  // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
78
78
  // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
79
79
  // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
80
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
80
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
81
81
  // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
82
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
82
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
83
83
 
84
84
  /* Type Checking */
85
- "strict": true, /* Enable all strict type-checking options. */
85
+ "strict": true /* Enable all strict type-checking options. */,
86
86
  // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
87
87
  // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
88
88
  // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
@@ -104,8 +104,8 @@
104
104
 
105
105
  /* Completeness */
106
106
  // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
107
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
108
108
  },
109
- "include": ["src/**/*.ts"],
110
- "exclude": ["node_modules"]
109
+ "include": ["src/**/*.ts", "settings/**/*.ts"],
110
+ "exclude": ["node_modules", "vendor"]
111
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "1.22.0",
3
+ "version": "1.22.501",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",