@edgedev/create-edge-app 1.1.28 → 1.2.29

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.
@@ -188,11 +188,11 @@ const triggerTitle = computed(() => {
188
188
  variant="outline"
189
189
  role="combobox"
190
190
  :aria-expanded="open"
191
- class="w-[200px] justify-between text-foreground"
191
+ class="w-[200px] min-w-0 justify-between text-foreground"
192
192
  :class="props.class"
193
193
  :disabled="props.disabled"
194
194
  >
195
- {{ triggerTitle }}
195
+ <span class="min-w-0 flex-1 truncate text-left" :title="triggerTitle">{{ triggerTitle }}</span>
196
196
  <ChevronsUpDown class="ml-2 h-4 w-4 shrink-0 opacity-50" />
197
197
  </Button>
198
198
  </FormControl>
@@ -84,11 +84,11 @@ const numericValue = computed({
84
84
  :disabled="props.disabled"
85
85
  >
86
86
  <NumberFieldContent>
87
- <NumberFieldDecrement class="mt-5" />
87
+ <NumberFieldDecrement class="" />
88
88
  <FormControl>
89
89
  <NumberFieldInput />
90
90
  </FormControl>
91
- <NumberFieldIncrement class="mt-5" />
91
+ <NumberFieldIncrement class="" />
92
92
  </NumberFieldContent>
93
93
  </NumberField>
94
94
 
@@ -428,7 +428,7 @@ const allowMenuItem = (item: any, isAdmin: boolean) => {
428
428
  const isDev = process.dev || devOverrideEnabled()
429
429
  const adminOnly = toBool(item.adminOnly)
430
430
  const devOnly = toBool(item.devOnly)
431
- console.log('allowMenuItem', { item, isAdmin, isDev, adminOnly, devOnly })
431
+ // console.log('allowMenuItem', { item, isAdmin, isDev, adminOnly, devOnly })
432
432
  const override = toBool(item.override)
433
433
  if (item.override !== undefined)
434
434
  return override
@@ -451,7 +451,10 @@ const cmsCollectionData = async (edgeFirebase: any, value: any, meta: any, curre
451
451
  const findIndex = currentQuery.findIndex((q: any) => q.field === queryKey)
452
452
  const queryOption = meta[key]?.queryOptions?.find((o: any) => o.field === queryKey)
453
453
  const operator = queryOption?.operator || '=='
454
- const newQuery = { field: queryKey, operator, value: meta[key].queryItems[queryKey] }
454
+ let value = meta[key].queryItems[queryKey]
455
+ if (operator === 'array-contains-any' && !Array.isArray(value))
456
+ value = [value]
457
+ const newQuery = { field: queryKey, operator, value }
455
458
  if (findIndex > -1) {
456
459
  currentQuery[findIndex] = newQuery
457
460
  }
@@ -2,15 +2,16 @@ export const useStructuredDataTemplates = () => {
2
2
  const buildSiteStructuredData = () => JSON.stringify({
3
3
  '@context': 'https://schema.org',
4
4
  '@type': 'WebSite',
5
+ '@id': '{{cms-site}}#website',
5
6
  'name': '',
6
- 'url': '',
7
+ 'url': '{{cms-site}}',
7
8
  'description': '',
8
9
  'publisher': {
9
10
  '@type': 'Organization',
10
11
  'name': '',
11
12
  'logo': {
12
13
  '@type': 'ImageObject',
13
- 'url': '',
14
+ 'url': '{{cms-logo}}',
14
15
  },
15
16
  },
16
17
  'sameAs': [],
@@ -19,13 +20,12 @@ export const useStructuredDataTemplates = () => {
19
20
  const buildPageStructuredData = () => JSON.stringify({
20
21
  '@context': 'https://schema.org',
21
22
  '@type': 'WebPage',
23
+ '@id': '{{cms-url}}#webpage',
22
24
  'name': '',
23
- 'url': '',
25
+ 'url': '{{cms-url}}',
24
26
  'description': '',
25
27
  'isPartOf': {
26
- '@type': 'WebSite',
27
- 'name': '',
28
- 'url': '',
28
+ '@id': '{{cms-site}}#website',
29
29
  },
30
30
  }, null, 2)
31
31
 
package/firebase_init.sh CHANGED
@@ -1,3 +1,46 @@
1
+ # Install gcloud if missing (best-effort by platform)
2
+ ensure_gcloud() {
3
+ if command -v gcloud >/dev/null 2>&1; then
4
+ return 0
5
+ fi
6
+
7
+ echo "gcloud CLI not found. Attempting to install Google Cloud SDK..."
8
+
9
+ if command -v brew >/dev/null 2>&1; then
10
+ if ! brew list --cask google-cloud-sdk >/dev/null 2>&1; then
11
+ brew install --cask google-cloud-sdk || {
12
+ echo "Failed to install Google Cloud SDK with Homebrew."
13
+ exit 1
14
+ }
15
+ fi
16
+ elif command -v snap >/dev/null 2>&1; then
17
+ if [ "$(id -u)" -eq 0 ]; then
18
+ snap install google-cloud-cli --classic || {
19
+ echo "Failed to install Google Cloud SDK with Snap."
20
+ exit 1
21
+ }
22
+ elif command -v sudo >/dev/null 2>&1; then
23
+ sudo snap install google-cloud-cli --classic || {
24
+ echo "Failed to install Google Cloud SDK with Snap."
25
+ exit 1
26
+ }
27
+ else
28
+ echo "Snap install requires elevated privileges, but 'sudo' is unavailable."
29
+ exit 1
30
+ fi
31
+ else
32
+ echo "Unable to auto-install Google Cloud SDK on this system."
33
+ echo "Please install it manually: https://cloud.google.com/sdk/docs/install"
34
+ exit 1
35
+ fi
36
+
37
+ if ! command -v gcloud >/dev/null 2>&1; then
38
+ echo "gcloud is still not available in PATH after install."
39
+ echo "Open a new terminal and run this script again."
40
+ exit 1
41
+ fi
42
+ }
43
+
1
44
  # Prompt for the Firebase configuration values
2
45
  echo "Please enter your Firebase project ID:"
3
46
  read project_id
@@ -34,11 +77,29 @@ if [ -z "$project_id" ]; then
34
77
  fi
35
78
 
36
79
  # Check if firebase is installed
37
- if ! command -v firebase &> /dev/null; then
80
+ if ! command -v firebase >/dev/null 2>&1; then
38
81
  echo "Firebase CLI could not be found. Please install it and try again."
39
82
  exit 1
40
83
  fi
41
84
 
85
+ ensure_gcloud
86
+
87
+ # Initialize gcloud account/config if needed, then set active project
88
+ active_account="$(gcloud auth list --filter=status:ACTIVE --format='value(account)' 2>/dev/null)"
89
+ if [ -z "$active_account" ]; then
90
+ echo "No active gcloud account found. Running gcloud init..."
91
+ if ! gcloud init; then
92
+ echo "gcloud init failed."
93
+ exit 1
94
+ fi
95
+ fi
96
+
97
+ echo "Setting gcloud project to '$project_id'..."
98
+ if ! gcloud config set project "$project_id"; then
99
+ echo "Failed to set gcloud project to '$project_id'."
100
+ exit 1
101
+ fi
102
+
42
103
  # Backup firebase.json if it exists
43
104
  if [ -f ./firebase.json ]; then
44
105
  cp ./firebase.json ./firebase.json.temp
@@ -93,4 +154,4 @@ echo "VITE_FIREBASE_EMULATOR_FIRESTORE=8080" >> .env.dev
93
154
  echo "VITE_FIREBASE_EMULATOR_FUNCTIONS=5001" >> .env.dev
94
155
  echo "VITE_FIREBASE_EMULATOR_STORAGE=9199" >> .env.dev
95
156
  echo "REGISTRATION_CODE=organization-registration-template" >> .env.dev
96
- echo "DEVELOPMENT_MODE=true" >> .env.dev
157
+ echo "DEVELOPMENT_MODE=true" >> .env.dev
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgedev/create-edge-app",
3
- "version": "1.1.28",
3
+ "version": "1.2.29",
4
4
  "description": "Create Edge Starter App",
5
5
  "bin": {
6
6
  "create-edge-app": "./bin/cli.js"
@@ -0,0 +1,12 @@
1
+ # Optional shared deploy settings for all services.
2
+ # Copy to services/.deploy.shared.env and customize as needed.
3
+
4
+ # Defaults to .firebaserc project if omitted.
5
+ # PROJECT_ID=clearwater-hub
6
+
7
+ # Falls back to VITE_FIREBASE_FUNCTIONS_REGION from root .env if omitted.
8
+ # REGION=us-central1
9
+
10
+ # Comma-separated IAM members to grant Cloud Run Invoker when ALLOW_UNAUTHENTICATED=false.
11
+ # If member type is omitted, serviceAccount: is assumed by deploy-services.sh.
12
+ # INVOKER_MEMBERS=serviceAccount:201505998870-compute@developer.gserviceaccount.com