@jetshop/template-trend 6.3.5 → 6.3.8-alpha.16

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/deploy.sh ADDED
@@ -0,0 +1,53 @@
1
+ #!/bin/bash
2
+
3
+ # Deployment script for Cloudflare Workers + R2
4
+ # Usage: ./deploy.sh [staging|production]
5
+
6
+ set -e
7
+
8
+ ENV=${1:-staging}
9
+
10
+ echo "🚀 Deploying to $ENV environment..."
11
+
12
+ # Step 1: Build the application
13
+ echo "📦 Building application..."
14
+ yarn build
15
+
16
+ # Step 2: Deploy assets to R2
17
+ echo "📤 Uploading assets to R2..."
18
+
19
+ BUCKET_NAME="core-workout-assets-$ENV"
20
+
21
+ # Upload static directory (JS, CSS, fonts, images)
22
+ echo " ↳ Uploading static files..."
23
+ wrangler r2 object put "$BUCKET_NAME/static" \
24
+ --file=build/client/static \
25
+ --recursive \
26
+ --content-type-detect
27
+
28
+ # Upload root files
29
+ echo " ↳ Uploading manifest and favicon..."
30
+ wrangler r2 object put "$BUCKET_NAME/manifest.json" \
31
+ --file=build/client/manifest.json \
32
+ --content-type="application/json"
33
+
34
+ wrangler r2 object put "$BUCKET_NAME/favicon.ico" \
35
+ --file=build/client/favicon.ico \
36
+ --content-type="image/x-icon"
37
+
38
+ if [ -f "build/client/robots.txt" ]; then
39
+ wrangler r2 object put "$BUCKET_NAME/robots.txt" \
40
+ --file=build/client/robots.txt \
41
+ --content-type="text/plain"
42
+ fi
43
+
44
+ # Step 3: Deploy worker
45
+ echo "🌐 Deploying worker..."
46
+ wrangler deploy --env "$ENV"
47
+
48
+ echo "✅ Deployment complete!"
49
+ echo ""
50
+ echo "Worker URL: https://core-workout-worker-$ENV.your-subdomain.workers.dev"
51
+ echo ""
52
+ echo "To set up custom domain, run:"
53
+ echo " wrangler domains add your-domain.com --env $ENV"
package/index.html CHANGED
@@ -1,9 +1,8 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en">
2
+ <html lang="ep">
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <slot name="title" />
6
- <slot name="polyfill" />
7
6
  <slot name="preloadLinks" />
8
7
 
9
8
  <meta
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@jetshop/template-trend",
3
- "version": "6.3.5",
3
+ "version": "6.3.8-alpha.16+4cb9237f7",
4
4
  "license": "MIT",
5
5
  "scripts": {
6
+ "preview": "wrangler dev build/worker/worker.js --no-bundle",
7
+ "deploy": "wrangler deploy --no-bundle",
6
8
  "build": "react-scripts build",
7
9
  "build:analyze": "ANALYZE=web yarn build",
8
10
  "cypress": "cypress run",
@@ -43,11 +45,11 @@
43
45
  ]
44
46
  },
45
47
  "dependencies": {
46
- "@jetshop/core": "^6.3.5",
48
+ "@jetshop/core": "^6.3.7",
47
49
  "@jetshop/flight-shortcodes": "^2.0.10",
48
- "@jetshop/intl": "^6.3.5",
49
- "@jetshop/react-scripts": "^6.3.5",
50
- "@jetshop/ui": "^6.3.5",
50
+ "@jetshop/intl": "^6.3.7",
51
+ "@jetshop/react-scripts": "^6.3.7",
52
+ "@jetshop/ui": "^6.3.7",
51
53
  "@react-google-maps/api": "~2.18.1",
52
54
  "prop-types": "^15.6.2",
53
55
  "react": "^18",
@@ -66,11 +68,12 @@
66
68
  "lint-staged": "^8.1.5",
67
69
  "prettier": "^2.3.2",
68
70
  "typescript": "^4.8.3",
71
+ "wrangler": "^4.51.0",
69
72
  "yargs": "16.0.3"
70
73
  },
71
74
  "resolutions": {
72
75
  "format-message-estree-util": "npm:@jetshop/format-message-estree-util",
73
76
  "**/@babel/helper-module-transforms": "7.22.5"
74
77
  },
75
- "gitHead": "451005761243a71138a835d35d9d5084721b1e54"
78
+ "gitHead": "4cb9237f7c70e7fc05119c191f1c039ea0248670"
76
79
  }
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { createWorkerApp } from '@jetshop/core/boot/worker';
3
+ import Shop from './components/Shop';
4
+ import config from './shop.config';
5
+
6
+ // Initialize the worker handler once (async)
7
+ const handlerPromise = createWorkerApp(<Shop />, config);
8
+
9
+ // Export default handler for Cloudflare Workers
10
+ // eslint-disable-next-line import/no-anonymous-default-export
11
+ export default {
12
+ async fetch(request, env, ctx) {
13
+ const handler = await handlerPromise;
14
+ return handler(request, env, ctx);
15
+ }
16
+ };
@@ -1,6 +1,5 @@
1
1
  import * as translations from '../translations';
2
2
  import channelsQuery from './ChannelsQuery.gql';
3
- import homeCategoriesQuery from './components/Layout/Header/HomeCategoriesQuery.gql';
4
3
  import routeQuery from './components/RouteQuery.gql';
5
4
  import {
6
5
  LoadableStandardCategoryPage,
@@ -23,20 +22,9 @@ const config = {
23
22
  engineApiKey: process.env.ENGINE_API_KEY || '',
24
23
  enableGateway: false,
25
24
  channelsQuery,
26
- persistedQueries: [
27
- {
28
- query: homeCategoriesQuery,
29
- variables: { levels: 1 }
30
- }
31
- ]
32
25
  },
33
26
  additionalGtagTrackingIds: [],
34
27
  relewareEnabled: true,
35
- sentry: {
36
- clientDSN: process.env.FLIGHT_SENTRY_CLIENT_DSN,
37
- serverDSN: process.env.FLIGHT_SENTRY_SERVER_DSN,
38
- ignoreErrors: []
39
- },
40
28
  intl: {
41
29
  translations,
42
30
  defaultLocale: 'en',
@@ -104,9 +104,6 @@
104
104
  "currency_d6b3d5f6": {
105
105
  "message": "Currency"
106
106
  },
107
- "current_price_3f582d1e": {
108
- "message": "Current price"
109
- },
110
107
  "customercommentname_is_required_f5c2f377": {
111
108
  "message": "{ customerCommentName } is required"
112
109
  },
@@ -479,9 +476,6 @@
479
476
  "prev_f82cbc48": {
480
477
  "message": "Prev"
481
478
  },
482
- "previous_price_3ea1215f": {
483
- "message": "Previous price"
484
- },
485
479
  "price_ffd8b80": {
486
480
  "message": "Price"
487
481
  },
@@ -805,5 +799,11 @@
805
799
  },
806
800
  "z_to_a_75ce9568": {
807
801
  "message": "Z to A"
802
+ },
803
+ "current_price_3f582d1e": {
804
+ "message": "Current price"
805
+ },
806
+ "previous_price_3ea1215f": {
807
+ "message": "Previous price"
808
808
  }
809
- }
809
+ }
package/wrangler.jsonc ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "../../node_modules/wrangler/config-schema.json",
3
+ "name": "core-workout",
4
+ "main": "build/worker/worker.js",
5
+ "compatibility_date": "2024-09-23",
6
+ "compatibility_flags": ["nodejs_compat"],
7
+ "observability": {
8
+ "enabled": true
9
+ },
10
+ "upload_source_maps": false,
11
+ "assets": {
12
+ "binding": "ASSETS",
13
+ "directory": "./build/client"
14
+ },
15
+ "build": {
16
+ "command": "yarn build",
17
+ "cwd": ".",
18
+ "watch_dir": "src"
19
+ },
20
+ "vars": {
21
+ "REACT_APP_SHOP_ID": "scorett",
22
+ }
23
+ }
@@ -1,5 +0,0 @@
1
- diff a/packages/template-trend/src/shop.config.js b/packages/template-trend/src/shop.config.js (rejected hunks)
2
- @@ -73 +73,2 @@ const config = {
3
- - useIndefinitelySavedCart: process.env.REACT_APP_USE_INDEFINITELY_SAVED_CART || true,
4
- + useIndefinitelySavedCart:
5
- + process.env.REACT_APP_USE_INDEFINITELY_SAVED_CART || true,