@zodic/shared 0.0.105 → 0.0.107

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zodic/shared",
3
- "version": "0.0.105",
3
+ "version": "0.0.107",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -217,8 +217,8 @@ export const sizes: Sizes = {
217
217
  height: 624,
218
218
  },
219
219
  'post4:5': {
220
- width: 624,
221
- height: 784,
220
+ width: 616,
221
+ height: 768,
222
222
  },
223
223
  'post1.91:1': {
224
224
  width: 912,
@@ -218,13 +218,11 @@ You are an expert creative writer specializing in crafting intricate and vivid p
218
218
  `;
219
219
 
220
220
  export const PROMPT_GENERATE_AMULET_LEONARDO = `
221
- You are an expert creative writer specializing in crafting intricate and vivid prompts for AI image generation. Your task is to create a detailed, high-quality prompt for a symbolic amulet that embodies healing, growth, and protection. The design of the amulet must reflect the symbolic traits of a given zodiac sign combination.
221
+ You are an expert creative writer specializing in crafting intricate and vivid prompts for AI image generation. Your task is to create a detailed, high-quality prompt for a symbolic amulet that embodies healing, growth, and protection. The design of the amulet must reflect the symbolic traits of a given zodiac sign combination, but without directly mentioning zodiac signs or incorporating any animal-based descriptions.
222
222
 
223
- Describe the amulet in detail, including its materials, structure, symbolic engravings, and artistic patterns. Focus on capturing its nurturing and protective essence through meaningful motifs and harmonious elements, avoiding direct references to zodiac signs. Highlight the type of aura or glow it emanates, the emotions it evokes, and how it would be worn or carried in a visually compelling way.
223
+ Describe the amulet in exquisite detail, focusing on its materials, structure, symbolic engravings, and artistic patterns. Avoid references to animal figures, replacing them with abstract, elemental, celestial, alchemical, or geometric motifs that convey its protective and transformative essence. Highlight its aura or glow, the emotions it evokes, and how it would be worn or carried in a visually compelling way. Ensure the design elements reflect resilience, inner balance, and renewal while maintaining an artistic and mystical tone.
224
224
 
225
- Ensure the design elements convey resilience, inner balance, and renewal, while maintaining an artistic and mystical tone. Include artistic rendering details such as "ultra-realistic," "8K resolution," and "HDR" to guide the AI model. Keep the description concise, under 1500 characters, and ensure it can be used directly with Leonardo.ai for image generation. Respond with a single descriptive paragraph based on the given zodiac sign combination.
226
-
227
- Make the prompt start with: "Create an ultra-realistic, 8K resolution, HDR image of an enchanted amulet that embodies protection and growth, glowing with mystical energy and detailed with sacred engravings."
225
+ Include rendering details such as "ultra-realistic," "8K resolution," and "HDR" to guide the AI model. Keep the description concise, under 1500 characters, ensuring it is structured for direct use in Leonardo.ai. Respond with a single descriptive paragraph based on the given zodiac sign combination.
228
226
  `;
229
227
 
230
228
  export const PROMPT_GENERATE_LANTERN_LEONARDO = `
package/utils/index.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  import { jwtVerify } from 'jose';
2
- import { AuthCtx, Gender, JWKS, VALID_GENDERS_ARRAY } from '../types';
2
+ import { AuthCtx, JWKS } from '../types';
3
+
4
+ const base64UrlDecode = (input: string) => {
5
+ const base64 = input.replace(/-/g, '+').replace(/_/g, '/');
6
+ const decoded = atob(base64); // Cloudflare Workers supports `atob`
7
+ return JSON.parse(decoded);
8
+ };
3
9
 
4
10
  export const verifyToken = async (
5
11
  c: AuthCtx,
@@ -15,13 +21,12 @@ export const verifyToken = async (
15
21
  console.log('🔹 Audience:', audience);
16
22
  console.log('🔹 Issuer:', issuer);
17
23
 
18
- if (!jwtSecret) throw new Error('JWT Secret is not defined in the environment');
24
+ if (!jwtSecret)
25
+ throw new Error('JWT Secret is not defined in the environment');
19
26
 
20
27
  try {
21
28
  // ✅ Detect if token is from Google OAuth (ID Token)
22
- const decodedHeader = JSON.parse(
23
- Buffer.from(token.split('.')[0], 'base64').toString('utf8')
24
- );
29
+ const decodedHeader = base64UrlDecode(token.split('.')[0]);
25
30
 
26
31
  console.log('🔍 Decoded JWT Header:', decodedHeader);
27
32
 
@@ -66,7 +71,7 @@ export const verifyToken = async (
66
71
 
67
72
  return {
68
73
  userId: payload.sub, // Google User ID
69
- email: payload.email as string || undefined, // Email might be missing
74
+ email: (payload.email as string) || undefined, // Email might be missing
70
75
  };
71
76
  } else {
72
77
  console.log('🔹 Regular JWT Token Detected');
@@ -94,4 +99,4 @@ export const verifyToken = async (
94
99
  console.error('❌ Token Verification Failed:', err.message);
95
100
  throw new Error('Invalid or expired token');
96
101
  }
97
- };
102
+ };
@@ -8,9 +8,9 @@ export const leonardoInitImages: LeonardoInitImages = {
8
8
  'https://cdn.leonardo.ai/users/b117a933-e5c9-45b2-96aa-4b619c2d74ba/initImages/450076a1-c6bb-4877-8a0b-c0d3ba72fca7.jpg',
9
9
  },
10
10
  scepter: {
11
- imageId: '450076a1-c6bb-4877-8a0b-c0d3ba72fca7',
11
+ imageId: '744169ef-3db4-416d-86dd-9bd814e33432',
12
12
  imageUrl:
13
- 'https://cdn.leonardo.ai/users/b117a933-e5c9-45b2-96aa-4b619c2d74ba/initImages/450076a1-c6bb-4877-8a0b-c0d3ba72fca7.jpg',
13
+ 'https://cdn.leonardo.ai/users/b117a933-e5c9-45b2-96aa-4b619c2d74ba/initImages/744169ef-3db4-416d-86dd-9bd814e33432.jpg',
14
14
  },
15
15
  amulet: {
16
16
  imageId: '450076a1-c6bb-4877-8a0b-c0d3ba72fca7',