@striae-org/striae 3.1.1 → 3.2.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.
Files changed (51) hide show
  1. package/.env.example +2 -0
  2. package/README.md +3 -32
  3. package/app/components/actions/case-export/data-processing.ts +49 -9
  4. package/app/components/actions/case-export/download-handlers.ts +125 -40
  5. package/app/components/actions/case-export/metadata-helpers.ts +31 -13
  6. package/app/components/actions/generate-pdf.ts +4 -0
  7. package/app/components/form/base-form.tsx +1 -1
  8. package/app/components/sidebar/case-export/case-export.tsx +15 -15
  9. package/app/components/sidebar/cases/case-sidebar.tsx +23 -16
  10. package/app/components/sidebar/sidebar-container.tsx +1 -1
  11. package/app/config-example/inactivity.ts +1 -1
  12. package/app/entry.client.tsx +12 -12
  13. package/app/entry.server.tsx +4 -4
  14. package/app/hooks/useInactivityTimeout.ts +1 -1
  15. package/app/root.tsx +3 -3
  16. package/app/routes/auth/emailActionHandler.tsx +1 -1
  17. package/app/routes/auth/emailVerification.tsx +1 -1
  18. package/app/routes/auth/login.tsx +1 -1
  19. package/app/routes/auth/passwordReset.tsx +1 -1
  20. package/app/routes/auth/route.ts +1 -1
  21. package/app/services/firebase.ts +4 -0
  22. package/app/types/exceljs-bare.d.ts +7 -0
  23. package/app/utils/auth.ts +5 -1
  24. package/functions/[[path]].ts +2 -2
  25. package/package.json +33 -18
  26. package/public/_routes.json +1 -0
  27. package/public/icon-256.png +0 -0
  28. package/public/vendor/exceljs.LICENSE +22 -0
  29. package/public/vendor/exceljs.bare.min.js +45 -0
  30. package/scripts/deploy-all.sh +52 -0
  31. package/scripts/deploy-config.sh +508 -3
  32. package/scripts/deploy-worker-secrets.sh +6 -2
  33. package/tsconfig.json +18 -8
  34. package/vite.config.ts +6 -22
  35. package/workers/audit-worker/package.json +8 -4
  36. package/workers/audit-worker/wrangler.jsonc.example +1 -1
  37. package/workers/data-worker/package.json +8 -4
  38. package/workers/data-worker/wrangler.jsonc.example +1 -1
  39. package/workers/image-worker/package.json +8 -4
  40. package/workers/image-worker/wrangler.jsonc.example +1 -1
  41. package/workers/keys-worker/package.json +8 -4
  42. package/workers/keys-worker/src/keys.example.ts +1 -0
  43. package/workers/keys-worker/wrangler.jsonc.example +1 -1
  44. package/workers/pdf-worker/package.json +9 -4
  45. package/workers/pdf-worker/src/format-striae.ts +2 -1
  46. package/workers/pdf-worker/src/generated-assets.ts +117 -0
  47. package/workers/pdf-worker/src/pdf-worker.example.ts +12 -1
  48. package/workers/pdf-worker/wrangler.jsonc.example +1 -1
  49. package/workers/user-worker/package.json +8 -4
  50. package/workers/user-worker/wrangler.jsonc.example +1 -1
  51. package/wrangler.toml.example +1 -1
@@ -10,6 +10,9 @@
10
10
  # 4. Worker secrets/environment variables
11
11
  # 5. Pages (frontend)
12
12
 
13
+ set -e
14
+ set -o pipefail
15
+
13
16
  # Colors for output
14
17
  RED='\033[0;31m'
15
18
  GREEN='\033[0;32m'
@@ -24,6 +27,54 @@ echo ""
24
27
 
25
28
  # Get the script directory
26
29
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
30
+ PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
31
+ cd "$PROJECT_ROOT"
32
+
33
+ trap 'echo -e "\n${RED}❌ deploy-all.sh failed near line ${LINENO}${NC}"' ERR
34
+
35
+ require_command() {
36
+ local cmd=$1
37
+ if ! command -v "$cmd" > /dev/null 2>&1; then
38
+ echo -e "${RED}❌ Error: required command '$cmd' is not installed or not in PATH${NC}"
39
+ exit 1
40
+ fi
41
+ }
42
+
43
+ assert_file_exists() {
44
+ local file_path=$1
45
+ if [ ! -f "$file_path" ]; then
46
+ echo -e "${RED}❌ Error: required file is missing: $file_path${NC}"
47
+ exit 1
48
+ fi
49
+ }
50
+
51
+ run_config_checkpoint() {
52
+ echo -e "${YELLOW}🧪 Running configuration checkpoint validation...${NC}"
53
+ if ! bash "$SCRIPT_DIR/deploy-config.sh" --validate-only; then
54
+ echo -e "${RED}❌ Configuration checkpoint validation failed!${NC}"
55
+ exit 1
56
+ fi
57
+ echo -e "${GREEN}✅ Configuration checkpoint validation passed${NC}"
58
+ }
59
+
60
+ echo -e "${BLUE}🔍 Running deployment preflight checks...${NC}"
61
+ require_command bash
62
+ require_command node
63
+ require_command npm
64
+ require_command wrangler
65
+
66
+ assert_file_exists "$SCRIPT_DIR/deploy-config.sh"
67
+ assert_file_exists "$SCRIPT_DIR/install-workers.sh"
68
+ assert_file_exists "$SCRIPT_DIR/deploy-worker-secrets.sh"
69
+ assert_file_exists "package.json"
70
+
71
+ if [ ! -f ".env" ] && [ ! -f ".env.example" ]; then
72
+ echo -e "${RED}❌ Error: neither .env nor .env.example was found in project root${NC}"
73
+ exit 1
74
+ fi
75
+
76
+ echo -e "${GREEN}✅ Preflight checks passed${NC}"
77
+ echo ""
27
78
 
28
79
  # Step 1: Configuration Setup
29
80
  echo -e "${PURPLE}Step 1/5: Configuration Setup${NC}"
@@ -35,6 +86,7 @@ if ! bash "$SCRIPT_DIR/deploy-config.sh"; then
35
86
  exit 1
36
87
  fi
37
88
  echo -e "${GREEN}✅ Configuration setup completed successfully${NC}"
89
+ run_config_checkpoint
38
90
  echo ""
39
91
 
40
92
  # Step 2: Install Worker Dependencies