decoupled-cli 2.0.3 → 2.1.0

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.
@@ -145,14 +145,19 @@ class ConfigManager {
145
145
  async getToken(profileName) {
146
146
  const profile = profileName || this.config.currentProfile;
147
147
  const profileConfig = this.config.profiles[profile];
148
- // Check if profile is configured for OAuth
148
+ // Priority 1: Check for PAT in environment variable (for CI/CD, automated scripts)
149
+ const envToken = process.env.DECOUPLED_CLI_TOKEN;
150
+ if (envToken && envToken.startsWith('dc_tok_')) {
151
+ return envToken;
152
+ }
153
+ // Priority 2: Check if profile is configured for OAuth
149
154
  if (profileConfig?.useOAuth) {
150
155
  const oauthToken = await this.getOAuthTokenFromEnv();
151
156
  if (oauthToken) {
152
157
  return oauthToken;
153
158
  }
154
159
  }
155
- // Try keytar first if available
160
+ // Priority 3: Try keytar if available
156
161
  if (keytarAvailable) {
157
162
  try {
158
163
  const token = await keytar.getPassword(SERVICE_NAME, profile);
@@ -164,7 +169,7 @@ class ConfigManager {
164
169
  console.warn(chalk_1.default.yellow(`Warning: Failed to retrieve token from keychain: ${error}`));
165
170
  }
166
171
  }
167
- // Fallback to config file stored token hash
172
+ // Priority 4: Fallback to config file stored token hash
168
173
  if (profileConfig?.tokenHash) {
169
174
  try {
170
175
  return Buffer.from(profileConfig.tokenHash, 'base64').toString();
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,kDAA0B;AAC1B,mCAAgD;AAChD,4DAA+B;AAE/B,oFAAoF;AACpF,IAAI,MAAM,GAAQ,IAAI,CAAC;AACvB,IAAI,eAAe,GAAG,KAAK,CAAC;AAE5B,IAAI,CAAC;IACH,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC3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,IAAI,CAAC,eAAK,CAAC,MAAM,CAAC,8BAA8B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;YACnH,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;OAEG;IACI,mBAAmB;QACxB,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB;YACpC,OAAO,CAAC,GAAG,CAAC,oBAAoB;YAChC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAC7C,CAAC;IAED;;OAEG;IACI,gBAAgB;QACrB,OAAO,OAAO,CAAC,GAAG,CAAC,2BAA2B,IAAI,IAAI,CAAC;IACzD,CAAC;IAED;;OAEG;IACI,eAAe,CAAC,WAAmB,EAAE,QAAiB;QAC3D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,YAAY,WAAW,kBAAkB,CAAC,CAAC;QAC7D,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACtD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACI,qBAAqB;QAC1B,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAChD,OAAO,cAAc,EAAE,QAAQ,IAAI,KAAK,CAAC;IAC3C,CAAC;CACF;AA7RD,sCA6RC;AAEY,QAAA,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -2,7 +2,7 @@ You are the Cursor AI working in a Next.js + Drupal monorepo. Follow these rules
2
2
 
3
3
  # Project Overview
4
4
  - Architecture: Headless Drupal backend with Next.js frontend
5
- - Backend: Drupal 11 with GraphQL Compose and DCloud Import API
5
+ - Backend: Drupal 11 with GraphQL Compose and DC Import API
6
6
  - Frontend: Next.js 15 with TypeScript, Tailwind CSS, Apollo GraphQL
7
7
  - Environment: DDEV local development
8
8
 
@@ -13,14 +13,14 @@ You are the Cursor AI working in a Next.js + Drupal monorepo. Follow these rules
13
13
  - `DRUPAL_REVALIDATE_SECRET` – On-demand revalidation secret
14
14
  - `NODE_TLS_REJECT_UNAUTHORIZED=0` – Allow self-signed certs (dev)
15
15
 
16
- # DCloud CLI Usage
17
- **CRITICAL**: Use DCloud CLI instead of direct API calls.
16
+ # DC CLI Usage
17
+ **CRITICAL**: Use DC CLI instead of direct API calls.
18
18
 
19
19
  First-time setup:
20
20
  ```bash
21
- dcloud auth login # Authenticate with platform
22
- dcloud spaces use <id> # Set default space (optional)
23
- dcloud spaces current # Verify setup
21
+ decoupled-cli auth login # Authenticate with platform
22
+ decoupled-cli spaces use <id> # Set default space (optional)
23
+ decoupled-cli spaces current # Verify setup
24
24
  ```
25
25
 
26
26
  # End-to-End Workflow
@@ -28,9 +28,9 @@ When asked to implement a new content type (e.g., “create a product page”),
28
28
 
29
29
  1) Verify CLI authentication
30
30
  ```bash
31
- dcloud auth status # Check if authenticated
32
- dcloud spaces list # List available spaces
33
- dcloud spaces use <id> # Set default space if needed
31
+ decoupled-cli auth status # Check if authenticated
32
+ decoupled-cli spaces list # List available spaces
33
+ decoupled-cli spaces use <id> # Set default space if needed
34
34
  ```
35
35
 
36
36
  2) Plan content type
@@ -38,8 +38,8 @@ dcloud spaces use <id> # Set default space if needed
38
38
  - List fields and types
39
39
  - Determine components, routes, display needs
40
40
 
41
- 3) Create DCloud Import JSON
42
- - Get example format: `dcloud spaces content-import --example`
41
+ 3) Create DC Import JSON
42
+ - Get example format: `decoupled-cli spaces content-import --example`
43
43
  - Include model definition and sample content
44
44
  - Important: In `values`, use field ID directly, never with `field_` prefix
45
45
  - For image fields: Use full URLs with Drupal domain from `.env.local`, not relative paths
@@ -68,7 +68,7 @@ Template:
68
68
  "body": "<p>Body content</p>",
69
69
  "field_name": "field_value",
70
70
  "image_field": {
71
- "uri": "${DRUPAL_BASE_URL}/modules/custom/dcloud_import/resources/placeholder.png",
71
+ "uri": "${DRUPAL_BASE_URL}/modules/custom/dc_import/resources/placeholder.png",
72
72
  "alt": "Image description",
73
73
  "title": "Image title"
74
74
  }
@@ -78,14 +78,14 @@ Template:
78
78
  }
79
79
  ```
80
80
 
81
- 4) Import via DCloud CLI
81
+ 4) Import via DC CLI
82
82
  ```bash
83
83
  # Import content type and sample content
84
- dcloud spaces content-import --file content-type-import.json --preview # Preview first
85
- dcloud spaces content-import --file content-type-import.json # Apply changes
84
+ decoupled-cli spaces content-import --file content-type-import.json --preview # Preview first
85
+ decoupled-cli spaces content-import --file content-type-import.json # Apply changes
86
86
 
87
87
  # Generate example if needed
88
- dcloud spaces content-import --example > content-type-import.json
88
+ decoupled-cli spaces content-import --example > content-type-import.json
89
89
  ```
90
90
  - **CRITICAL**: Immediately run schema generation:
91
91
  ```bash
@@ -112,7 +112,7 @@ lib/
112
112
  - Components: card + renderer; use `dangerouslySetInnerHTML` for processed HTML
113
113
  - Routing: handle in dynamic route switch by `__typename`
114
114
  - Navigation: add link in `app/components/Header.tsx`; update `navigationItems` and active detection with `pathname.startsWith('/route/')`
115
- - DCloud GraphQL fields return simple types (`string`, `string[]`, `bool`, etc.), not `{ processed }` objects — probe schema with a quick query before typing components
115
+ - DC GraphQL fields return simple types (`string`, `string[]`, `bool`, etc.), not `{ processed }` objects — probe schema with a quick query before typing components
116
116
 
117
117
  5) Build and test
118
118
  - `npm run build` → fix TypeScript/build errors
@@ -120,7 +120,7 @@ lib/
120
120
  - Check URLs: `/[content-type]`, `/[content-type]/[slug]`
121
121
 
122
122
  Checklist:
123
- - [ ] DCloud import succeeds
123
+ - [ ] DC import succeeds
124
124
  - [ ] **Schema generation runs (`npm run generate-schema`)**
125
125
  - [ ] GraphQL schema exposes fields
126
126
  - [ ] Types compile
@@ -145,28 +145,28 @@ Checklist:
145
145
 
146
146
  # Common Patterns
147
147
  - Product: `price (string)`, `product_images (image[])`, `in_stock (bool)`, `features (string[])`
148
- - Image URI: `{"uri": "${DRUPAL_BASE_URL}/modules/custom/dcloud_import/resources/placeholder.png", "alt": "Product image", "title": "Product"}`
148
+ - Image URI: `{"uri": "${DRUPAL_BASE_URL}/modules/custom/dc_import/resources/placeholder.png", "alt": "Product image", "title": "Product"}`
149
149
  - Event: `event_date (datetime)`, `location (string)`, `speakers (string[])`
150
150
  - Team: `position (string)`, `profile_image (image)`, `bio (text)`
151
- - Image URI: `{"uri": "${DRUPAL_BASE_URL}/modules/custom/dcloud_import/resources/placeholder.png", "alt": "Team member photo", "title": "Profile"}`
151
+ - Image URI: `{"uri": "${DRUPAL_BASE_URL}/modules/custom/dc_import/resources/placeholder.png", "alt": "Team member photo", "title": "Profile"}`
152
152
  - Case Study: `project_url (string)`, `technologies (string[])`, `project_images (image[])`
153
- - Image URI: `{"uri": "${DRUPAL_BASE_URL}/modules/custom/dcloud_import/resources/placeholder.png", "alt": "Project screenshot", "title": "Interface"}`
153
+ - Image URI: `{"uri": "${DRUPAL_BASE_URL}/modules/custom/dc_import/resources/placeholder.png", "alt": "Project screenshot", "title": "Interface"}`
154
154
 
155
155
  # Troubleshooting
156
- - DCloud import fails: check OAuth, JSON structure, no `field_` in values
157
- - **Schema not updated**: ALWAYS run `npm run generate-schema` after DCloud imports
156
+ - DC import fails: check OAuth, JSON structure, no `field_` in values
157
+ - **Schema not updated**: ALWAYS run `npm run generate-schema` after DC imports
158
158
  - GraphQL errors: confirm content type exists, clear GraphQL cache, regenerate schema
159
159
  - Build errors: verify types, imports, query syntax
160
160
  - Content not showing: confirm field names match GraphQL schema; for HTML use `dangerouslySetInnerHTML={{ __html: field.processed }}`
161
- - **Field name mismatches**: DCloud field IDs may transform (e.g., `in_stock` → `inStock` in GraphQL)
161
+ - **Field name mismatches**: DC field IDs may transform (e.g., `in_stock` → `inStock` in GraphQL)
162
162
 
163
163
  Debug commands:
164
164
  ```bash
165
- dcloud auth status # Check authentication
166
- dcloud spaces list # List available spaces
167
- dcloud spaces current # Show default space
168
- dcloud health check # Platform status
169
- dcloud spaces content-import --file test.json --preview # Preview import
165
+ decoupled-cli auth status # Check authentication
166
+ decoupled-cli spaces list # List available spaces
167
+ decoupled-cli spaces current # Show default space
168
+ decoupled-cli health check # Platform status
169
+ decoupled-cli spaces content-import --file test.json --preview # Preview import
170
170
  # MOST IMPORTANT: Generate fresh schema after any import
171
171
  npm run generate-schema
172
172
  # Check schema includes your content type
@@ -175,10 +175,10 @@ grep -i [content_type] schema/schema.graphql
175
175
  ```
176
176
 
177
177
  # Best Practices
178
- 1. **ALWAYS run `npm run generate-schema` immediately after DCloud imports**
178
+ 1. **ALWAYS run `npm run generate-schema` immediately after DC imports**
179
179
  2. Create sample content for immediate testing
180
180
  3. Prefer `string[]` for simple lists; use `text[]` only when necessary
181
- 4. Verify GraphQL field names against the actual schema (may differ from DCloud field IDs)
181
+ 4. Verify GraphQL field names against the actual schema (may differ from DC field IDs)
182
182
  5. Handle empty/missing data gracefully
183
183
  6. Keep TypeScript types accurate and complete
184
184
  7. Use semantic HTML and ensure responsive design
@@ -5,7 +5,7 @@ This document provides Claude Code with comprehensive instructions for building
5
5
  ## Project Overview
6
6
 
7
7
  **Architecture**: Headless Drupal backend with Next.js frontend
8
- **Backend**: Drupal 11 with GraphQL Compose and DCloud Import API
8
+ **Backend**: Drupal 11 with GraphQL Compose and DC Import API
9
9
  **Frontend**: Next.js 15 with TypeScript, Tailwind CSS, and Apollo GraphQL
10
10
  **Environment**: DDEV local development
11
11
 
@@ -18,7 +18,7 @@ This document provides Claude Code with comprehensive instructions for building
18
18
  - `DRUPAL_REVALIDATE_SECRET` - Secret for on-demand revalidation
19
19
  - `NODE_TLS_REJECT_UNAUTHORIZED=0` - Allow self-signed certificates (development)
20
20
 
21
- ## DCloud CLI Setup
21
+ ## DC CLI Setup
22
22
 
23
23
  **First-time CLI setup:**
24
24
  ```bash
@@ -40,7 +40,7 @@ npx decoupled-cli spaces use <space_id>
40
40
  npx decoupled-cli spaces current
41
41
  ```
42
42
 
43
- **OAuth Prerequisites (for `dcloud auth oauth`):**
43
+ **OAuth Prerequisites (for `decoupled-cli auth oauth`):**
44
44
  Your `.env.local` must contain:
45
45
  - `NEXT_PUBLIC_DRUPAL_BASE_URL=https://your-space.decoupled.io`
46
46
  - `DRUPAL_CLIENT_ID=your_oauth_client_id`
@@ -48,7 +48,7 @@ Your `.env.local` must contain:
48
48
 
49
49
  **Authentication Method Differences:**
50
50
  - **OAuth** → Works with your Drupal site API (content import, Drupal operations)
51
- - **Personal Access Token** → Works with DrupalCloud platform API (spaces, users, organizations)
51
+ - **Personal Access Token** → Works with Decoupled Drupal platform API (spaces, users, organizations)
52
52
 
53
53
  **If CLI is not available locally:**
54
54
  - For projects with decoupled-cli in package.json: Run `npm install` then use `npx decoupled-cli`
@@ -73,8 +73,8 @@ Use OAuth authentication for direct Drupal content import, then frontend develop
73
73
 
74
74
  **Create a todo list for tracking progress:**
75
75
  ```markdown
76
- 1. Verify DCloud CLI authentication (npx decoupled-cli auth status)
77
- 2. Create DCloud Import JSON for [content_type]
76
+ 1. Verify DC CLI authentication (npx decoupled-cli auth status)
77
+ 2. Create DC Import JSON for [content_type]
78
78
  3. Import content type and sample content to Drupal (npx decoupled-cli content import)
79
79
  4. **CRITICAL**: Run schema generation (`npm run generate-schema`) to update GraphQL schema
80
80
  5. Create TypeScript types and GraphQL queries
@@ -84,11 +84,11 @@ Use OAuth authentication for direct Drupal content import, then frontend develop
84
84
  9. Validate end-to-end functionality
85
85
  ```
86
86
 
87
- **Legacy Platform Workflow (PAT + DrupalCloud Platform):**
87
+ **Legacy Platform Workflow (PAT + Decoupled Drupal Platform):**
88
88
  ```markdown
89
- 1. Verify DCloud CLI authentication (npx decoupled-cli auth status)
89
+ 1. Verify DC CLI authentication (npx decoupled-cli auth status)
90
90
  2. Set default space if needed (npx decoupled-cli spaces use <id>)
91
- 3. Create DCloud Import JSON for [content_type]
91
+ 3. Create DC Import JSON for [content_type]
92
92
  4. Import content type and sample content via platform (npx decoupled-cli spaces content-import)
93
93
  5. **CRITICAL**: Run schema generation (`npm run generate-schema`) to update GraphQL schema
94
94
  6. Create TypeScript types and GraphQL queries
@@ -119,7 +119,7 @@ npx decoupled-cli spaces use <space_id>
119
119
 
120
120
  **If CLI authentication fails:**
121
121
  - For OAuth: Verify `.env.local` contains `NEXT_PUBLIC_DRUPAL_BASE_URL`, `DRUPAL_CLIENT_ID`, `DRUPAL_CLIENT_SECRET`
122
- - For personal tokens: Check that DCloud platform is accessible
122
+ - For personal tokens: Check that DC platform is accessible
123
123
  - Ensure user has proper permissions for the operations you're trying to perform
124
124
 
125
125
  **Important: Command Availability by Authentication Method**
@@ -127,7 +127,7 @@ npx decoupled-cli spaces use <space_id>
127
127
  - **PAT-only commands**: `spaces list`, `spaces use`, `usage`, `org info`
128
128
  - **Universal commands**: `auth login`, `auth oauth`, `auth test`
129
129
 
130
- ### 2. DCloud Import JSON Creation
130
+ ### 2. DC Import JSON Creation
131
131
 
132
132
  **Get example format with CLI:**
133
133
  ```bash
@@ -186,14 +186,14 @@ npx decoupled-cli spaces content-import --example > my-content-type.json
186
186
  - **For image fields**: Use full URLs with the Drupal domain from `.env.local`, not relative paths:
187
187
  ```json
188
188
  "featured_image": {
189
- "uri": "${DRUPAL_BASE_URL}/modules/custom/dcloud_import/resources/placeholder.png",
189
+ "uri": "${DRUPAL_BASE_URL}/modules/custom/dc_import/resources/placeholder.png",
190
190
  "alt": "Description of the image",
191
191
  "title": "Image title"
192
192
  }
193
193
  ```
194
194
  Always read the `NEXT_PUBLIC_DRUPAL_BASE_URL` from `.env.local` and use that as the base for image URIs to ensure images load correctly from the Drupal backend.
195
195
 
196
- ### 3. Import via DCloud CLI
196
+ ### 3. Import via DC CLI
197
197
 
198
198
  **Import Content Type:**
199
199
  ```bash
@@ -203,7 +203,7 @@ npx decoupled-cli content import --file content-type-import.json
203
203
  # Or preview first to see what will be imported
204
204
  npx decoupled-cli content import --file content-type-import.json --preview
205
205
 
206
- # LEGACY: Import via DrupalCloud platform (requires PAT authentication and space setup)
206
+ # LEGACY: Import via Decoupled Drupal platform (requires PAT authentication and space setup)
207
207
  npx decoupled-cli spaces content-import --file content-type-import.json
208
208
  npx decoupled-cli spaces content-import <space_id> --file content-type-import.json
209
209
  ```
@@ -220,7 +220,7 @@ npx decoupled-cli content import --example > content-type-import.json
220
220
  - Field machine names (auto-generated)
221
221
  - Node IDs created
222
222
  - GraphQL schema updates
223
- - **Important**: GraphQL field names may differ from DCloud field IDs (check actual schema)
223
+ - **Important**: GraphQL field names may differ from DC field IDs (check actual schema)
224
224
 
225
225
  **CRITICAL: Immediately Update GraphQL Schema After Import:**
226
226
  ```bash
@@ -500,7 +500,7 @@ npm run dev
500
500
  ### 6. Testing Checklist
501
501
 
502
502
  **Verify each step:**
503
- - [ ] DCloud import successful with no errors
503
+ - [ ] DC import successful with no errors
504
504
  - [ ] GraphQL schema includes new content type
505
505
  - [ ] TypeScript types are properly defined
506
506
  - [ ] Build process completes without errors
@@ -540,7 +540,7 @@ npm run dev
540
540
  ```json
541
541
  "product_images": [
542
542
  {
543
- "uri": "${DRUPAL_BASE_URL}/modules/custom/dcloud_import/resources/placeholder.png",
543
+ "uri": "${DRUPAL_BASE_URL}/modules/custom/dc_import/resources/placeholder.png",
544
544
  "alt": "Product showcase image",
545
545
  "title": "Product Image"
546
546
  }
@@ -588,7 +588,7 @@ npm run dev
588
588
  **Sample content with image URI:**
589
589
  ```json
590
590
  "profile_image": {
591
- "uri": "${DRUPAL_BASE_URL}/modules/custom/dcloud_import/resources/placeholder.png",
591
+ "uri": "${DRUPAL_BASE_URL}/modules/custom/dc_import/resources/placeholder.png",
592
592
  "alt": "Team member headshot",
593
593
  "title": "Profile Photo"
594
594
  }
@@ -617,7 +617,7 @@ npm run dev
617
617
  ```json
618
618
  "project_images": [
619
619
  {
620
- "uri": "${DRUPAL_BASE_URL}/modules/custom/dcloud_import/resources/placeholder.png",
620
+ "uri": "${DRUPAL_BASE_URL}/modules/custom/dc_import/resources/placeholder.png",
621
621
  "alt": "Project screenshot showing main interface",
622
622
  "title": "Project Interface"
623
623
  }
@@ -628,7 +628,7 @@ npm run dev
628
628
 
629
629
  ### Common Issues
630
630
 
631
- **1. DCloud Import Fails**
631
+ **1. DC Import Fails**
632
632
  - Check OAuth token expiration
633
633
  - Verify JSON structure matches `schema/sample.json` format
634
634
  - Ensure field IDs don't start with `field_`
@@ -645,15 +645,15 @@ npm run dev
645
645
  - Verify GraphQL query syntax
646
646
 
647
647
  **4. Content Not Displaying**
648
- - Check GraphQL query field names match Drupal fields (may not match DCloud field IDs)
648
+ - Check GraphQL query field names match Drupal fields (may not match DC field IDs)
649
649
  - Verify content was created and published
650
650
  - Check query variables and pagination
651
651
  - For HTML content showing raw tags, use `dangerouslySetInnerHTML={{ __html: field.processed }}`
652
652
 
653
- **5. GraphQL Schema Not Updated After DCloud Import**
654
- - **Critical Issue**: DCloud imports create content types successfully but GraphQL schema may not update immediately
653
+ **5. GraphQL Schema Not Updated After DC Import**
654
+ - **Critical Issue**: DC imports create content types successfully but GraphQL schema may not update immediately
655
655
  - Content exists in Drupal but `nodeProducts` query returns "field not found" errors
656
- - This is the most common issue with DCloud imports
656
+ - This is the most common issue with DC imports
657
657
 
658
658
  **Solution Process**:
659
659
  1. Clear Drupal caches (if you have admin access)
@@ -663,7 +663,7 @@ npm run dev
663
663
 
664
664
  ### Essential Schema Generation Workflow
665
665
 
666
- **CRITICAL**: Always run schema generation after DCloud imports to ensure GraphQL integration works properly.
666
+ **CRITICAL**: Always run schema generation after DC imports to ensure GraphQL integration works properly.
667
667
 
668
668
  ```bash
669
669
  # Generate updated GraphQL schema after content type imports
@@ -677,7 +677,7 @@ This command:
677
677
  - Validates that new content types are available in GraphQL
678
678
 
679
679
  **Add this to your workflow**:
680
- 1. Import content type via DCloud API
680
+ 1. Import content type via DC API
681
681
  2. **Immediately run**: `npm run generate-schema`
682
682
  3. Check generated schema includes your new content type
683
683
  4. Test GraphQL queries
@@ -709,7 +709,7 @@ npx decoupled-cli spaces list
709
709
  # Check current default space
710
710
  npx decoupled-cli spaces current
711
711
 
712
- # Get health status of DCloud platform
712
+ # Get health status of DC platform
713
713
  npx decoupled-cli health check
714
714
 
715
715
  # Check organization info
@@ -774,7 +774,7 @@ npx decoupled-cli content import --file your-content.json
774
774
  7. **Include proper TypeScript types** for all data structures
775
775
  8. **Test the full user journey** from listing to detail pages
776
776
  9. **Use `dangerouslySetInnerHTML`** for processed HTML content from Drupal to avoid raw tag display
777
- 10. **Verify GraphQL field names** match actual schema, not DCloud field IDs
777
+ 10. **Verify GraphQL field names** match actual schema, not DC field IDs
778
778
 
779
779
  ## Success Criteria
780
780
 
@@ -792,7 +792,7 @@ A successful end-to-end implementation should:
792
792
 
793
793
  Based on successful product catalog implementation, here are critical learnings to avoid common pitfalls:
794
794
 
795
- ### DCloud Import Format Issues
795
+ ### DC Import Format Issues
796
796
 
797
797
  **Problem**: Field values incorrectly formatted with "field_" prefix
798
798
  ```json
@@ -813,14 +813,14 @@ Based on successful product catalog implementation, here are critical learnings
813
813
 
814
814
  ### GraphQL Field Name Mapping
815
815
 
816
- **Problem**: Assuming GraphQL field names match DCloud field IDs
816
+ **Problem**: Assuming GraphQL field names match DC field IDs
817
817
  ```typescript
818
818
  // WRONG - Field names may be transformed
819
- price: string // DCloud field ID
819
+ price: string // DC field ID
820
820
  fieldPrice: string // What you might expect in GraphQL
821
821
 
822
822
  // CORRECT - Check actual schema
823
- price: string // Actual GraphQL field name (can match DCloud ID)
823
+ price: string // Actual GraphQL field name (can match DC ID)
824
824
  inStock: boolean // camelCase transformation
825
825
  productImages: object // snake_case to camelCase
826
826
  ```
@@ -829,7 +829,7 @@ productImages: object // snake_case to camelCase
829
829
 
830
830
  ### GraphQL Field Value Structure Discovery
831
831
 
832
- **Critical Learning**: GraphQL field values from DCloud imports return as simple types, not objects:
832
+ **Critical Learning**: GraphQL field values from DC imports return as simple types, not objects:
833
833
 
834
834
  ```typescript
835
835
  // WRONG - Assuming field values are objects with .processed
@@ -840,7 +840,7 @@ fieldFeatures?: Array<{
840
840
  processed: string
841
841
  }>
842
842
 
843
- // CORRECT - DCloud imports create simple value fields
843
+ // CORRECT - DC imports create simple value fields
844
844
  price?: string
845
845
  features?: string[]
846
846
  ```
@@ -953,29 +953,29 @@ npm run dev # Test in development mode
953
953
 
954
954
  The most important learning from the product catalog implementation is the **mandatory schema generation step**:
955
955
 
956
- **Problem**: DCloud imports successfully create content types and content, but GraphQL schema doesn't update automatically.
956
+ **Problem**: DC imports successfully create content types and content, but GraphQL schema doesn't update automatically.
957
957
  **Symptoms**:
958
958
  - `nodeProducts` query returns "field not found" errors
959
959
  - Content exists in Drupal but not accessible via GraphQL
960
960
  - Route queries work but content type queries fail
961
961
 
962
- **Solution**: **ALWAYS run schema generation immediately after DCloud imports**:
962
+ **Solution**: **ALWAYS run schema generation immediately after DC imports**:
963
963
 
964
964
  ```bash
965
- # After any DCloud import, immediately run:
965
+ # After any DC import, immediately run:
966
966
  npm run generate-schema
967
967
 
968
968
  # This step is MANDATORY for GraphQL integration to work
969
969
  ```
970
970
 
971
971
  **Why this is critical**:
972
- - DCloud API creates Drupal content types but doesn't trigger GraphQL schema rebuilds
972
+ - DC API creates Drupal content types but doesn't trigger GraphQL schema rebuilds
973
973
  - The `generate-schema` script performs fresh introspection and updates local schema files
974
974
  - Without this step, frontend development will fail with "type not found" errors
975
975
  - This step bridges the gap between Drupal content type creation and Next.js GraphQL integration
976
976
 
977
977
  **Workflow Integration**:
978
- 1. Import via DCloud API ✅
978
+ 1. Import via DC API ✅
979
979
  2. **Run `npm run generate-schema`** ✅ ← CRITICAL STEP
980
980
  3. Verify schema includes new content type ✅
981
981
  4. Proceed with frontend development ✅
@@ -984,7 +984,7 @@ This learning transforms the development workflow from "sometimes works" to "rel
984
984
 
985
985
  ### GraphQL Schema Field Name Discovery
986
986
 
987
- **Critical Process**: Always verify actual GraphQL field names after DCloud import - they may differ from field IDs used in import JSON.
987
+ **Critical Process**: Always verify actual GraphQL field names after DC import - they may differ from field IDs used in import JSON.
988
988
 
989
989
  **Discovery Method**:
990
990
  ```bash
@@ -994,7 +994,7 @@ grep -A 10 -B 5 nodeProducts schema/schema.graphql
994
994
  # This shows the actual field names and types available
995
995
  ```
996
996
 
997
- **Key Learning**: DCloud field IDs may transform in GraphQL schema:
997
+ **Key Learning**: DC field IDs may transform in GraphQL schema:
998
998
  - `in_stock` becomes `inStock` (camelCase)
999
999
  - `product_images` becomes `productImages` (camelCase)
1000
1000
  - Simple field types work reliably (string, boolean, string[])
@@ -1048,7 +1048,7 @@ Based on successful product catalog implementation:
1048
1048
 
1049
1049
  **Essential Commands Sequence**:
1050
1050
  ```bash
1051
- # After DCloud import, always run:
1051
+ # After DC import, always run:
1052
1052
  npm run generate-schema # Updates GraphQL schema
1053
1053
  npm run build # Validates TypeScript and builds
1054
1054
  npm run dev # Test in development
@@ -1062,9 +1062,9 @@ npm run dev # Test in development
1062
1062
 
1063
1063
  ### Deployment Field Mapping Reference
1064
1064
 
1065
- **DCloud Import → GraphQL Schema Mapping**:
1065
+ **DC Import → GraphQL Schema Mapping**:
1066
1066
  ```json
1067
- // DCloud import format:
1067
+ // DC import format:
1068
1068
  {
1069
1069
  "in_stock": true, // → GraphQL: inStock
1070
1070
  "product_images": [...], // → GraphQL: productImages