Skip to content

Commit 3792b63

Browse files
author
saulpatinojr
committed
PreDeploy v0.2
1 parent d092fab commit 3792b63

File tree

1,290 files changed

+8743
-80355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,290 files changed

+8743
-80355
lines changed

.firebase/hosting.b3V0.cache

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
security.txt,1758943332064,42ef2fd448fa50360f57b10533832e062fd81fbed7cf19d8b993f9d17c5e5da1
2+
security.html,1758943332064,cf07cdd5e104ed28a691184f39fc7111908be9ca0dcba914b15551193b92cf24
3+
reliability.txt,1758943332064,bca24e7c97965ed53a8f3a42fdd14287ccfe1543136b5f5ccdfddb7d1ba63b87
4+
reliability.html,1758943332064,029d83fb0e792f8216e195fccadf61839205de3f7f6bc3ffe280e320392fcf79
5+
performance-efficiency.txt,1758943332064,3708db7d1e90050f1f6303c9fb6c8beec1a12f8793d9ebe0628593b9814cf056
6+
performance-efficiency.html,1758943332064,79315d306307b7c81f37d122bb2d305051f7b3cd0376add4800f063a3e5232d3
7+
operational-excellence.txt,1758943332066,bc62e6acc46d8c2d56cd30c20ca95673a6a30072d5f71db1e1d7b3fbbdc9951c
8+
operational-excellence.html,1758943332065,e0725d795b8afa22de9c8de493acc5d0a6c83ac95c5e54f2ac975382717ce7e7
9+
index.txt,1758943332064,248f6eb41e1ab362b17c08c613fe3dc4883370427bf82cacf6ccb17046c30e92
10+
index.html,1758943332062,59e046bc99e2f7a962f7ea4c5e21bbaad608a92c1c59bccc14eb42b158c8be0d
11+
favicon.ico,1758943332062,4cc07c033692d3869acb6d0e8e3dc34fd1fb50de5ed2bade791848b081072385
12+
cost-optimization.txt,1758943332064,8608d6b4d581f39d0a43f34771e5ec34b4fc17d29e65353c1b6a046c69df424f
13+
cost-optimization.html,1758943332062,df31a77db188a7dbde950bbd4f5c7ea070468ca720a2b5a76f86902ec5f05565
14+
404.html,1758943332046,b6a2951f8256544ef118454555b6400aa0b665c4d3f5d9e211a19d8580f018e0
15+
_next/static/so6jeXDGJg0BycWDGTzrH/_ssgManifest.js,1758943331533,d8d8790f4e673a23bec506f00699bed8a258ac0e4965bb1ca8598172cfc0ec97
16+
_next/static/so6jeXDGJg0BycWDGTzrH/_buildManifest.js,1758943331533,fb5b7e3f65ed86ded0316f13649e5385e8a103773b8dc6dd98f8feca3c70ac34
17+
_next/static/media/f3f7e95f2dbc4fe4-s.p.woff2,1758943331533,11a8758a707be370eb7fc2a43afbef73d84203f30927d8441e47b3eacdaef481
18+
_next/static/media/e4af272ccee01ff0-s.p.woff2,1758943331533,027fdc4d8db7a53cb76ecb17a96cee4075a04d262150fe1693666eeb2814db78
19+
_next/static/media/df0a9ae256c0569c-s.woff2,1758943331536,452e9417356ae0f138dead31eec404c2777d810cfb8a1b7934f7a4a619de5992
20+
_next/static/media/c5fe6dc8356a8c31-s.woff2,1758943331533,85a49f18c048badcfe02e379fad4c9e9f49474ed05f94500ee59ebd181b25a4d
21+
_next/static/media/ba9851c3c22cd980-s.woff2,1758943331530,72535d44c180c92b31d20cfe624fe87a34a6e7da7adc9dc9aaf275510b6d9446
22+
_next/static/media/8e9860b6e62d6359-s.woff2,1758943331530,d1cad80ebae6cf0cc7386b80bf18cb229589548ca5c5d1ffaba4c5c3ea9230f8
23+
_next/static/media/21350d82a1f187e9-s.woff2,1758943331530,9dc6b4b81f1e76d386ca312594d1b6ac7d97b0dc420fd9727dac245069fab9ea
24+
_next/static/media/1d4eaed977255102-s.woff2,1758943331530,eaaee53804bb944c3cd0db7145202d77046518329629803c87ac72985f38858e
25+
_next/static/media/19cfc7226ec3afaa-s.woff2,1758943331504,6a36126035a3ba40d24f41f4be67c15be98aff88ca03ca9a9afa20b7c51797a6
26+
_next/static/css/2fa24a0cd142b232.css,1758943331504,f78e6caf9a219398b10ad0f3f339a2134dfbdd9d1cb18850b740b87ab62a898b
27+
_next/static/chunks/webpack-0a07e2c608cc0412.js,1758943331536,9392d224ae5a25fff2a92d34fb522945f05b960821e72fe259eafd2dc08abf21
28+
_next/static/chunks/polyfills-42372ed130431b0a.js,1758943331533,16c0f345b71fe8e15659e330817da31529a0b752ea1d0115262d9de75fa7c618
29+
_next/static/chunks/main-app-9f5a8efb309cbb86.js,1758943331481,165f557285c4210fc6259c3c2279bcccd186a9f359647cb76fccc11f5ae684c7
30+
_next/static/chunks/main-00791038573573eb.js,1758943331481,7c67e372300ce2d742cbbc190f9d95e3cdef75b8318f23ae328933d2ba38b58b
31+
_next/static/chunks/framework-1ce91eb6f9ecda85.js,1758943331482,966f0ce90dba6d991acc50486ef8e9798c3a43305bc4a1599814445708cb3999
32+
_next/static/chunks/bc9e92e6-e5a8eb6c5aeb6f6c.js,1758943331480,6edc15b66546f45190ef7ed07eb89a74e2e83cdd7462aa191fcb76976356084d
33+
_next/static/chunks/708-3684f6003bc2bae3.js,1758943331480,2ce352a9311cc7f73f0068b435c3e87af0142cf3e9e6cf3c38db948605e3d50e
34+
_next/static/chunks/706-6f8171a0c87f36dd.js,1758943331530,d658629cc0358d1e6656f9b88e12a8e76c2b122ad96f72b4114c20adee4c460b
35+
_next/static/chunks/684-58ba01be16c6657a.js,1758943331479,d6a8d758c2f4a4e962297aef46a5beecbaa386fb0fde470806cb36c95ecded5c
36+
_next/static/chunks/639.0b08718c7354bca0.js,1758943331477,eedf96abd94d6710a5494e226bd2a5ac9dd5a1e0e2941913642bec72ad4f2548
37+
_next/static/chunks/4bd1b696-1c88c00269cf164c.js,1758943331477,118dc42566a81cb201b14d1b13978316bc32d695940b8a5301dee6fb97c8d747
38+
_next/static/chunks/255-4cceed8b1bd9a85c.js,1758943331476,5eaf3096a456758f0d32effeb9772feaad1286e1873fe0d4b342b70758933fbc
39+
_next/static/chunks/228.f826b94a7e02201e.js,1758943331475,3e94d43ba3b1b0e78d8ee22ed0937243e400d3eca910250423f2d90a0eebebc3
40+
_next/static/chunks/pages/_error-022e4ac7bbb9914f.js,1758943331535,e071fcb46b2a286f4d972ea228f3a05821b3c32fd8931a6bc944e6adc833cd75
41+
_next/static/chunks/pages/_app-5addca2b3b969fde.js,1758943331535,1fbe15b1e6d8e216b4927cb9799c6b84c5c1b2b550bcffbd3c0fc31601265213
42+
_next/static/chunks/app/page-d3747681f2c45f48.js,1758943331535,1b07428338c5cb5156bfe35f6ff1ac57acc4f4b125d9acda9b5d845688bc44ff
43+
_next/static/chunks/app/layout-ceec2b90d7e4c7af.js,1758943331535,23b612bfd97f4b708b715a510ac65a1f38c15268848ddb1b91478a2467dab43a
44+
_next/static/chunks/app/security/page-8f8cbb759fd14ad9.js,1758943331537,40cb1747073bb5d6a4a82beae478ac7fa3a55714499678d19f4a28d3bd0eb801
45+
_next/static/chunks/app/reliability/page-8f8cbb759fd14ad9.js,1758943331537,40cb1747073bb5d6a4a82beae478ac7fa3a55714499678d19f4a28d3bd0eb801
46+
_next/static/chunks/app/performance-efficiency/page-8f8cbb759fd14ad9.js,1758943331537,40cb1747073bb5d6a4a82beae478ac7fa3a55714499678d19f4a28d3bd0eb801
47+
_next/static/chunks/app/operational-excellence/page-8f8cbb759fd14ad9.js,1758943331537,40cb1747073bb5d6a4a82beae478ac7fa3a55714499678d19f4a28d3bd0eb801
48+
_next/static/chunks/app/cost-optimization/page-8f8cbb759fd14ad9.js,1758943331537,40cb1747073bb5d6a4a82beae478ac7fa3a55714499678d19f4a28d3bd0eb801
49+
_next/static/chunks/app/_not-found/page-c680e34fdbec582e.js,1758943331536,d2abdd20508be115268e897eb638242c53a54bae2bc124242c44a80d63ec603d

.firebaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"projects": {
3-
"default": "waflens-7c15e"
3+
"default": "hybridcloudworks-61e8d"
44
}
55
}

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# CHANGELOG
22

3+
## Change 6: Upgraded ESLint to v9 and Refactored Configuration
4+
- **Date:** 2024-09-20
5+
- **Description:** Upgraded ESLint to version 9 in the `functions` directory to align with modern JavaScript standards and improve code quality enforcement. This involved a significant refactoring of the ESLint configuration from the legacy `.eslintrc.js` format to the new flat `eslint.config.js` file.
6+
- **Key Steps:**
7+
- Updated all `devDependencies` in `functions/package.json` to their latest versions to support ESLint v9.
8+
- Created a new `eslint.config.js` with a modern, flat configuration structure.
9+
- Resolved multiple dependency and configuration issues that arose during the upgrade, including module resolution errors and incorrect file path targeting.
10+
- Performed a clean installation of `node_modules` to ensure a stable dependency tree.
11+
- **Notes:** This upgrade modernizes the linting process, improves maintainability, and ensures the project follows the latest best practices for code quality.
12+
313
## Change 5: Fixed React Hydration Mismatch Error
414
- **Date:** 2024-09-20
515
- **Description:** Fixed a React hydration mismatch error on the main page. The error was caused by the `PillarObservanceChart` component, which was generating random IDs on the server and client, leading to a mismatch. The fix involved dynamically importing the component with SSR disabled in `src/app/page.tsx`, ensuring it only renders on the client-side.

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This project is a web application built with Next.js, TypeScript, and Firebase.
55
## 🚀 Project Setup
66

77
### Prerequisites
8-
- [Node.js](https://nodejs.org/) (v18 or later recommended)
8+
- [Node.js](https://nodejs.org/) (v20 or later recommended)
99
- [npm](https://www.npmjs.com/)
1010
- [Firebase CLI](https://firebase.google.com/docs/cli) (`npm install -g firebase-tools`)
1111

@@ -70,6 +70,8 @@ This project uses Genkit to interact with Google's Gemini models, which requires
7070
- `npm run lint`: Lints the codebase for errors.
7171

7272
### Firebase Functions Scripts (from the `functions/` directory)
73+
- `npm run build`: Compiles the TypeScript source code.
74+
- `npm run lint`: Lints the TypeScript code using ESLint v9 to ensure code quality.
7375
- `npm run serve`: Emulates functions locally for testing.
7476
- `npm run deploy`: Deploys only the functions to your Firebase project.
7577

@@ -104,11 +106,10 @@ For the deployment to work, you must configure secrets in your GitHub repository
104106
105107
## 💿 Data Connect
106108
107-
This project uses Firebase Data Connect to interact with your database. The generated SDK for the `example` connector is located in `src/dataconnect-generated`.
109+
This project uses Firebase Data Connect to interact with your database. The generated SDK for the `example` connector is located in `waflens-code/src/dataconnect-generated`.
108110
109-
For detailed information on how to use the generated SDK to call your Data Connect queries and mutations, please refer to the auto-generated documentation:
110-
- **TypeScript/JavaScript SDK**: [`src/dataconnect-generated/README.md`](src/dataconnect-generated/README.md)
111-
- **React Hooks SDK**: [`src/dataconnect-generated/react/README.md`](src/dataconnect-generated/react/README.md)
111+
For detailed information on how to use the generated SDK, please refer to the auto-generated documentation in that directory:
112+
- **TypeScript/JavaScript SDK**: [`waflens-code/src/dataconnect-generated/README.md`](waflens-code/src/dataconnect-generated/README.md)
112113
113114
---
114115
@@ -133,6 +134,7 @@ This is a starting point. You should update these rules to match your applicatio
133134

134135
## Important Notes
135136

137+
- **ESLint v9 in Functions**: The `functions` directory has been upgraded to use ESLint v9 with a modern, flat configuration (`eslint.config.js`). This helps enforce code quality and consistency.
136138
- **Performance Note**: A significant page load delay was resolved by embedding an inline SVG favicon in the main layout. This prevents a blocking request for a missing `favicon.ico` file.
137139
- **Next.js `devIndicators.buildActivity` Deprecation**: The `devIndicators.buildActivity` option in `next.config.ts` is deprecated and has been removed. Please ensure your `next.config.ts` does not contain this property to avoid warnings or errors. The current configuration has been updated to reflect this change.
138140
- **Port Configuration**: To avoid conflicts between the Next.js development server and the Firebase emulator, the default Next.js port has been changed to `3001`. The Firebase emulators will run on their default ports (e.g., UI on 4000, Auth on 9099, Firestore on 8080).

apphosting.yaml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1-
# Settings to manage and configure a Firebase App Hosting backend.
2-
# https://firebase.google.com/docs/app-hosting/configure
3-
1+
# Settings for Backend (on Cloud Run).
2+
# See https://firebase.google.com/docs/app-hosting/configure#cloud-run
43
runConfig:
5-
# Increase this value if you'd like to automatically spin up
6-
# more instances in response to increased traffic.
7-
maxInstances: 1
4+
minInstances: 0
5+
# maxInstances: 100
6+
# concurrency: 80
7+
# cpu: 1
8+
# memoryMiB: 512
9+
10+
# Environment variables and secrets.
11+
# env:
12+
# Configure environment variables.
13+
# See https://firebase.google.com/docs/app-hosting/configure#user-defined-environment
14+
# - variable: MESSAGE
15+
# value: Hello world!
16+
# availability:
17+
# - BUILD
18+
# - RUNTIME
19+
20+
# Grant access to secrets in Cloud Secret Manager.
21+
# See https://firebase.google.com/docs/app-hosting/configure#secret-parameters
22+
# - variable: MY_SECRET
23+
# secret: mySecretRef

eslint.config.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
import globals from "globals";
3+
import tseslint from "typescript-eslint";
4+
import pluginImport from "eslint-plugin-import";
5+
6+
export default [
7+
{
8+
files: ["src/**/*.ts", "waflens-code/src/**/*.ts"],
9+
languageOptions: {
10+
globals: {
11+
...globals.node,
12+
...globals.es2021,
13+
},
14+
parser: tseslint.parser,
15+
parserOptions: {
16+
project: "tsconfig.json",
17+
},
18+
},
19+
plugins: {
20+
"@typescript-eslint": tseslint.plugin,
21+
"import": pluginImport,
22+
},
23+
rules: {
24+
...tseslint.configs.recommended.rules,
25+
"quotes": ["error", "double"],
26+
"@typescript-eslint/no-unused-vars": "warn",
27+
"import/no-duplicates": "warn",
28+
"indent": ["error", 2],
29+
"object-curly-spacing": ["error", "always"],
30+
"max-len": ["warn", { "code": 120 }],
31+
"comma-dangle": ["error", "always-multiline"],
32+
"semi": ["error", "always"],
33+
"require-jsdoc": "off",
34+
},
35+
},
36+
{
37+
ignores: ["waflens-code/src/dataconnect-generated/**"],
38+
},
39+
];

firebase.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"hosting": {
3+
"public": "out",
4+
"ignore": [
5+
"firebase.json",
6+
"**/.*",
7+
"**/node_modules/**"
8+
],
9+
"rewrites": [
10+
{
11+
"source": "**",
12+
"destination": "/index.html"
13+
}
14+
]
15+
},
16+
"functions": [
17+
{
18+
"codebase": "default",
19+
"predeploy": [
20+
"npm --prefix \"$RESOURCE_DIR\" run lint",
21+
"npm --prefix \"$RESOURCE_DIR\" run build"
22+
],
23+
"source": "functions"
24+
},
25+
{
26+
"source": "waflens-code",
27+
"codebase": "waflens-code",
28+
"predeploy": [
29+
"npm --prefix \"$RESOURCE_DIR\" run lint",
30+
"npm --prefix \"$RESOURCE_DIR\" run build"
31+
]
32+
}
33+
],
34+
"firestore": {
35+
"database": "(default)",
36+
"location": "us-central1",
37+
"rules": "firestore.rules",
38+
"indexes": "firestore.indexes.json"
39+
},
40+
"emulators": {
41+
"dataconnect": {
42+
"dataDir": "dataconnect/.dataconnect/pgliteData"
43+
}
44+
},
45+
"dataconnect": {
46+
"source": "dataconnect"
47+
},
48+
"apphosting": [
49+
{
50+
"backendId": "waflens-backend",
51+
"rootDir": "/",
52+
"ignore": [
53+
"node_modules",
54+
".git",
55+
"firebase-debug.log",
56+
"firebase-debug.*.log",
57+
"functions"
58+
]
59+
},
60+
{
61+
"backendId": "cloudcreatorai-backend",
62+
"rootDir": "/",
63+
"ignore": [
64+
"node_modules",
65+
".git",
66+
"firebase-debug.log",
67+
"firebase-debug.*.log",
68+
"functions"
69+
]
70+
}
71+
]
72+
}

firestore.indexes.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
// Example (Standard Edition):
3+
//
4+
// "indexes": [
5+
// {
6+
// "collectionGroup": "widgets",
7+
// "queryScope": "COLLECTION",
8+
// "fields": [
9+
// { "fieldPath": "foo", "arrayConfig": "CONTAINS" },
10+
// { "fieldPath": "bar", "mode": "DESCENDING" }
11+
// ]
12+
// },
13+
//
14+
// "fieldOverrides": [
15+
// {
16+
// "collectionGroup": "widgets",
17+
// "fieldPath": "baz",
18+
// "indexes": [
19+
// { "order": "ASCENDING", "queryScope": "COLLECTION" }
20+
// ]
21+
// },
22+
// ]
23+
// ]
24+
//
25+
// Example (Enterprise Edition):
26+
//
27+
// "indexes": [
28+
// {
29+
// "collectionGroup": "reviews",
30+
// "queryScope": "COLLECTION_GROUP",
31+
// "apiScope": "MONGODB_COMPATIBLE_API",
32+
// "density": "DENSE",
33+
// "multikey": false,
34+
// "fields": [
35+
// { "fieldPath": "baz", "mode": "ASCENDING" }
36+
// ]
37+
// },
38+
// {
39+
// "collectionGroup": "items",
40+
// "queryScope": "COLLECTION_GROUP",
41+
// "apiScope": "MONGODB_COMPATIBLE_API",
42+
// "density": "SPARSE_ANY",
43+
// "multikey": true,
44+
// "fields": [
45+
// { "fieldPath": "baz", "mode": "ASCENDING" }
46+
// ]
47+
// },
48+
// ]
49+
"indexes": [],
50+
"fieldOverrides": []
51+
}

firestore.rules

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
rules_version = '2';
1+
rules_version='2'
22

33
service cloud.firestore {
44
match /databases/{database}/documents {
5-
// By default, allow read/write access only to authenticated users.
6-
// This is a starting point. You should refine these rules based on your app's needs.
75
match /{document=**} {
8-
allow read, write: if request.auth != null;
9-
}
10-
11-
// Example: Secure a 'users' collection where users can only read/write their own data.
12-
match /users/{userId} {
13-
allow read, update, delete: if request.auth != null && request.auth.uid == userId;
14-
allow create: if request.auth != null;
6+
// This rule allows anyone with your database reference to view, edit,
7+
// and delete all data in your database. It is useful for getting
8+
// started, but it is configured to expire after 30 days because it
9+
// leaves your app open to attackers. At that time, all client
10+
// requests to your database will be denied.
11+
//
12+
// Make sure to write security rules for your app before that time, or
13+
// else all client requests to your database will be denied until you
14+
// update your rules.
15+
allow read, write: if request.time < timestamp.date(2025, 10, 27);
1516
}
1617
}
1718
}

functions/eslint.config.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import globals from "globals";
2+
import tseslint from "typescript-eslint";
3+
import pluginImport from "eslint-plugin-import";
4+
5+
export default [
6+
{
7+
files: ["src/**/*.ts"],
8+
languageOptions: {
9+
globals: {
10+
...globals.node,
11+
...globals.es2021,
12+
},
13+
parser: tseslint.parser,
14+
parserOptions: {
15+
project: "tsconfig.json",
16+
},
17+
},
18+
plugins: {
19+
"@typescript-eslint": tseslint.plugin,
20+
"import": pluginImport,
21+
},
22+
rules: {
23+
...tseslint.configs.recommended.rules,
24+
"quotes": ["error", "double"],
25+
},
26+
},
27+
];

0 commit comments

Comments
 (0)