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

Remix and ts transition done #11

Merged
merged 50 commits into from
Jul 3, 2024
Merged

Remix and ts transition done #11

merged 50 commits into from
Jul 3, 2024

Conversation

sebpalluel
Copy link
Contributor

No description provided.

…ration

✨ (package.json): introduce development-specific build and start scripts for better dev environment handling
🔧 (shopify.app.staging.toml): update application_url to include /app for correct routing in staging environment
…ency

🔧 (shopify.app.staging.toml): update application_url to remove redundant path
…ntegration

✨ (app/libs/public-api): introduce new server modules for Shopify proxy requests and utilities

✨ Add new server utility to verify signatures with Cometh API
✨ Add new types for storefront and product gate requests
🔥 Remove redundant copy of app index page to clean up the codebase
🐛 Update public API connection to include authentication checks

✨ (public-api.get-product-gate.ts): add new route to fetch product gate details using GraphQL
🐛 (App.jsx, index.jsx): fix trailing commas in object literals for consistent syntax
🔧 (index.js): update API endpoints to use 'public-api' path for better API versioning and clarity
✨ (index.js): add console logs to debug and verify gate information on app initialization

♻️ (app-block.liquid): refactor product gate logic to use API for dynamic data fetching
🔧 (shopify.app.development.toml): update application_url and redirect_urls to new domain for consistency
🔧 Update .dockerignore to include extensions and remove prisma migrations

✨ Update .env.example to use PostgreSQL instead of SQLite

🔧 Add new docker-compose.yaml for PostgreSQL service configuration

🔧 Update package.json scripts to integrate Docker in development workflow

✨ Add new Prisma migration for Session table setup in PostgreSQL

🔧 Update Prisma schema to use PostgreSQL and remove separate production schema

🔧 Update application URLs and auth callbacks in shopify.app.development.toml

📝 Update API URL in extensions/offline-connect/assets/index.js to staging environment
…handling new customers

✨ (get-linked-customer.server.ts): add new API endpoint for fetching linked customer details
✨ (public-api.linked-customer.ts): add new route for linked customer API
✨ (public-api.product-gate.ts): add new route for product gate API
♻️ (gate.js, index.js): refactor API URL and method for fetching linked customer
🔧 (shopify.app.development.toml): update application and callback URLs to new domain
🔧 (app-block.liquid): update API route for fetching product gate details
…d improve payload structure

✨ (evaluate-gate.ts): add new file to handle gate evaluation logic
📝 (schema.ts): define new schemas for API validation
✨ (public-api.connect.ts): update action function to use new connect logic and schema validation
📝 (public-api.evaluate-gate.ts): create new route for gate evaluation
📝 (public-api.linked-customer.ts): add logging for debugging purposes
📝 (public-api.product-gate.ts): add logging to debug gate data retrieval
♻️ (App.jsx): refactor gate ID extraction to use configuration ID and remove redundant shopDomain

♻️ (gate.js, authMachine.js): refactor API function names and parameters for clarity and consistency

💡 (gate.js): update comments and logging statements to reflect current function behavior and responses

🔧 (authMachine.js): streamline imports and adjust machine configuration to new API changes

✨ (authMachine.js): enhance state machine logic to handle new authentication and wallet connection flows

♻️ (offKeyMachine.js): refactor terminology from 'offKey' to 'gate' to align with domain language
💡 (offKeyMachine.js): update comments and logging for clarity in gate evaluation logic

♻️ (index.js): refactor variable names and function calls for clarity and consistency
🔧 (index.js): update API URL for consistency with new infrastructure
💡 (index.js): update comments to reflect current implementation details and remove outdated ones
✨ (index.js): introduce environment variable support for dynamic port configuration in server setup

🐛 Remove unnecessary console.log from connectCustomerWallet function for cleaner code output

♻️ (index.js): refactor authMachine to remove shopDomain from context
🐛 (index.js): fix missing commas in object properties to ensure syntax correctness
✨ (index.js): update unlockAppUrl to use localhost for development environment
🔧 (index.js): adjust gateId extraction to use configuration id from gate settings

🔧 (shopify.app.development.toml): update application_url and related URLs to new domain for consistent access points
…tion logic

✨ Add shared-functions.server.ts to centralize common functionality across modules
💡 Update comments and clean up code for better readability and maintenance
…nment

♻️ (unlockIframeMachine.js): refactor status and message types to improve code readability and maintainability

✨ Update API and redirect URLs across multiple environments for consistency

♻️ Refactor JavaScript code formatting for better readability and maintainability

🔧 Update configuration files with new client IDs and URLs to align with staging environment changes
…xes and performance improvements

💡 (App.jsx): comment out unused UNLOCK_APP_URL and checkOrigin logic for future reference and potential use

⬆️ (index.js): upgrade iframe-resizer/core module from 5.0.2 to 5.1.4 to incorporate latest fixes and features
🐛 (index.js): correct variable name from index$2 to index$1 for consistency and to prevent reference errors

♻️ (index.js): remove unused code and constants to simplify and clean up the codebase

♻️ Refactor message handling and iframe interaction logic for clarity and maintainability

♻️ Refactor iframe management and event handling for clarity and maintainability

🚀 (iFrameResizer): enhance security and functionality by updating logging and configuration settings

- Implement enhanced logging functions to improve debuggability.
- Introduce environment-based port configuration to increase deployment flexibility.
- Update iframe resizer settings for better integration and security checks.

♻️ Refactor deprecated onInit() to onReady() in iFrame Resizer for future compatibility
💡 Update comments and clean up event handling logic in iFrame Resizer script

♻️ Refactor event listener setup to use a once function for efficiency

⬆️ (index.js): update iframe-resizer dependency to version 5.1.4 for improved stability and features
♻️ (index.js): refactor IframeResizer function to use updated variable naming for clarity
📝 (index.js): update source code line numbers in debug information to reflect changes after refactoring

🔧 (shopify.app.development.toml): update application_url and related URLs to new Cloudflare domain for consistency and to reflect the new deployment environment
…roduction

🔧 Update build commands in shopify.extension.toml files to use new scripts

✨ Implement advanced security and business logic in main.rs for offline-exclusive extension

🔥 Remove 'run.rs' in 'offline-exclusive' extension as it's deprecated
🔧 Update script and deployment commands in 'package.json' for clarity and consistency
🔧 Update application URLs in 'shopify.app.development.toml' to reflect new staging environment
…flow for deploying Shopify app on staging and main branches
…nd to use `pnpm run` for better script handling
…o 'Build app' step to support new app unlock feature
…able setting step to streamline CI process

♻️ (extensions/offline-connect-src/src/gate.js): refactor API URL to use app proxy for better security and maintainability

🔧 (extensions/offline-connect-src/vite.config.js): ensure UNLOCK_APP_URL is set and refactor to use consistent string quotes and error handling for better code quality
…nv to vars for consistency in GitHub Actions workflow

🚀 (deploy-shopify-app.yml): update deployment command to use vars for better variable management in GitHub Actions
…ty feature

♻️ (vite.config.js): refactor config, remove unused dependencies and simplify build setup
🔧 (offline-connect/.gitignore): update .gitignore to exclude assets directory from version control
🔧 Remove .env.development, .env.example, and .env.staging to centralize configuration management
…elopment experience

🔧 (shopify.app.*.toml): update client_id, app name, handle, URLs, and scopes to align with new development and production settings
🔧 (.env.example): update OFFLINE_WEB_API_URL to remove extra space in URL
🔧 (.env.example): add comments for local testing instructions
♻️ (package.json): remove unused devDependencies to clean up project setup
✨ (src/AppConnect.tsx, src/AppUnlock.jsx, src/connect.tsx): add new React components for handling app connectivity and unlock functionality
📝 (src/AppUnlock.jsx): add extensive comments to clarify the logic within the component
✨ (src/connect.tsx): implement ReactDOM rendering logic for AppConnect component based on dataset attributes

✨ Rename index.jsx to unlock.tsx and update component references to reflect new unlock functionality
🔧 Add TypeScript configuration files to support TypeScript in the project
🚀 Configure Vite to build the project with environment-specific settings
✨ Create connect.liquid for new Offline Connect block with customizable settings

✨ (unlock.liquid): add new 'Offline Unlock' block for product templates with customizable settings
…ampaign.tsx): refactor enums to use centralized types from 'types'

🔧 (.vscode/settings.json): add TypeScript SDK path for better dev experience
🐛 (app._index.tsx): fix perk type display logic using centralized GateReactionType
✨ (public-api.product-gate.ts): add orderLimit to product gate query for enhanced data retrieval
📝 (AppConnect.tsx): update imports to use centralized type definitions for cleaner code

✨ Add new React components and types for offline connectivity feature

✨ Implement dynamic rendering based on environment and user data in unlock.tsx

🔧 Update unlock.liquid to pass new product price data attribute

📝 Update GraphQL queries to fetch additional configuration details for offline gates

⬆️ (package.json): upgrade TypeScript from 5.2.2 to 5.5.2 for improved type checking and latest features
✨ (tsconfig.json, types.d.ts): add types.d.ts to project for defining enums and types used across the app
…h new schema organization

✨ (gate.ts, schema.ts): add new gate management functionality and corresponding schemas for robust gate handling

♻️ (offline-connect-src): remove unused types to simplify type definitions
🔧 (offline-connect-src): update tsconfig to include global types from root directory
♻️ (schema.ts): Refactor schema imports and definitions for clarity and maintenance

🔥 (gate.ts): Remove unused mintLoyaltyCard function to clean up codebase

💡 (gate.ts): Update comments and logging to reflect new validation logic
…ement

♻️ (offline-connect-src/package.json): remove iframe-resizer dependency
✨ (offline-connect-src/package.json): add @types/iframe-resizer to devDependencies for better type support

✨ (unlockIframeMachine.ts): add new state machine for managing iframe interactions

✨ (types.d.ts): add enums for iframe and Shopify customer statuses to standardize state management
✨ (colors.ts): introduce utility functions for converting HEX to HSLA and HSL color formats to enhance color manipulation capabilities
…type safety

♻️ (gate.ts): refactor connectWallet function parameters to be optional, enhancing flexibility in function calls

♻️ Remove authMachine.js as part of refactoring authentication logic

♻️ Remove extensive state management and actor logic from authMachine for simplification

✨ (authMachine.ts): add new state machine for authentication handling in offline-connect extension

✨ Add new state management and session handling functions for customer wallet connections

✨ (tsconfig.json): enable strictNullChecks to enhance type safety in TypeScript code
…d usage for clarity and maintainability

💡 (AppUnlock.tsx): update comments and type annotations to improve code readability

🔧 (authMachine.ts): adjust optional parameters in authMachine setup to enhance flexibility in configuration handling

✨ (authMachine.ts): introduce new types and update import paths to align with project structure changes

♻️ Remove offKeyMachine.js as its functionality is consolidated elsewhere

✨ (offKeyMachine.ts): add new state machine for managing off-key operations

♻️ (unlockIframeMachine.ts): refactor imports and function parameters for clarity and efficiency
💡 (unlockIframeMachine.ts): update comments and types to improve code readability and maintainability

♻️ Refactor sendMessageMachine for clarity and type safety in unlockIframeMachine module

💡 (code): add @ts-ignore to bypass TypeScript checks for specific line
✨ (feature): enhance message sending by spawning child machine with dynamic input configuration

✨ (unlockIframeMachine.ts): refactor unlockIframeMachine to use createMachine API for better state management and modularity

♻️ (types.d.ts): refactor to import SettingsCssVariables from a shared types file to reduce redundancy
🔥 (types.d.ts): remove ShopifyCustomerStatus enum as it is no longer used in the project
…better maintainability

🔧 (offline-connect-src): update tsconfig and vite.config to support new import alias '~'
… resolution

🔧 (shopify.app.development.toml, vite.config.ts): Update application URLs and add resolve options in Vite config for enhanced project structure management
♻️ (AuthMachineProvider.tsx, authMachine.ts): Refactor auth state management for improved readability and maintainability
💡 (authMachine.ts): Add detailed logging for debugging customer ID assignment in auth machine
…clarity

💡 (authMachine.ts): remove assertEvent to simplify sendConnectedStateToIframe function
🐛 (authMachine.ts): fix TypeScript errors by casting event properties with 'any' type
…er production build

✨ (gate.ts): enhance disconnect logic with detailed data reset
💡 (gate.ts): add logging for better traceability of gate context operations
♻️ (authMachine.ts): refactor disconnectCustomerWallet to accept linkedCustomer
🐛 (authMachine.ts): fix input data handling in disconnectCustomerWallet action
📝 (schema.ts): remove unused base schemas for cleaner code structure
…aluateGateParamsSchema for clarity

⬆️ (offline-connect-src/package.json): upgrade xstate to v5.14.0 for latest features
💡 (offline-connect-src/src/AuthMachineProvider.tsx): enable statelyai/inspect for better debugging
✨ (offline-connect-src/src/gate.ts): add logging for evaluateGate json response to aid debugging
♻️ (offline-connect-src/src/machines/offKeyMachine.ts): simplify gate evaluation logic and improve error handling
📝 (offline-connect-src/src/machines/unlockIframeMachine.ts): update xstate-layout metadata for clarity in state visualization
♻️ (offline-connect-src/src/schema.ts): redefine evaluateGateSchema for stricter validation with vaults array

🔧 (shopify.app.development.toml): update application_url and related callback URLs to new domain for consistent access points
…artial updates

✨ (gate.ts): update import statements to include new GateContectWrite type for clarity and future use
…react-query for better iframe handling and state management

♻️ (authMachine.ts): modify condition to spawn brandOffKeyRef only when gateId and productId are present
🔧 (shopify.app.development.toml): update application and callback URLs to new cloudflare domain for consistency and reliability
💡 (AppConnect.tsx, AppUnlock.tsx): remove unused imports and commented code for cleaner and more maintainable codebase
…ck-with-separation-for-connection-and-reaction

2 create new theme extension block with separation for connection and reaction
✨ (AppConnect.tsx): add isConnected state and log to enhance connection status visibility
♻️ (AuthMachineProvider.tsx): comment out createBrowserInspector for cleaner initialization
✨ (authMachine.ts): implement polling for connection state and handle updates
✨ (schema.ts): define connectedSchema for structured connection state validation
🔧 (shopify.app.development.toml): update application and callback URLs for consistency with new deployment
…b.toml): switch from npm to pnpm for better performance and efficiency

🔧 (shopify.app.development.toml): update application and callback URLs to new Cloudflare domain for consistency and to reflect environment changes
…ck-with-separation-for-connection-and-reaction

2 create new theme extension block with separation for connection and reaction
…ove step

📝 (Dockerfile): update comments to reflect changes and cleanup in Dockerfile setup
… build and prune afterwards for optimized production image
…d for better layer caching

⬆️ (package.json): update @vitejs/plugin-react to v4.3.1 in offline-connect-src
♻️ (vite.config.ts): remove nodePolyfills plugin to simplify build process
⬇️ (package.json): remove unused vite-plugin-node-stdlib-browser dependency
…tension

♻️ (main.rs): refactor error handling and simplify purchase limit checks in run function
🔧 (tests.rs): improve readability and assertions in test cases for offline-exclusive extension
@sebpalluel sebpalluel merged commit 469ee9e into main Jul 3, 2024
1 check passed
sebpalluel added a commit that referenced this pull request Sep 16, 2024
Remix and ts transition done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant