@adobe-commerce/aio-toolkit 1.0.14 → 1.0.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/CHANGELOG.md +90 -0
- package/README.md +218 -13
- package/dist/aio-toolkit-cursor-context/bin/cli.js +1168 -0
- package/dist/aio-toolkit-cursor-context/bin/cli.js.map +1 -0
- package/dist/aio-toolkit-onboard-events/bin/cli.js +14611 -0
- package/dist/aio-toolkit-onboard-events/bin/cli.js.map +1 -0
- package/files/cursor-context/commands/aio-toolkit-create-event-consumer-action.md +562 -0
- package/files/cursor-context/commands/aio-toolkit-create-graphql-action.md +531 -0
- package/files/cursor-context/commands/aio-toolkit-create-runtime-action.md +293 -0
- package/files/cursor-context/commands/aio-toolkit-create-webhook-action.md +439 -0
- package/files/cursor-context/rules/aio-toolkit-create-adobe-commerce-client.mdc +1321 -0
- package/files/cursor-context/rules/aio-toolkit-oop-best-practices.mdc +331 -0
- package/files/cursor-context/rules/aio-toolkit-setup-new-relic-telemetry.mdc +354 -0
- package/onboard.config.default.yaml +31 -0
- package/package.json +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,96 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.16] - 2026-02-23
|
|
9
|
+
|
|
10
|
+
### ✨ Features
|
|
11
|
+
|
|
12
|
+
- **feat(cli):** New Adobe I/O Events Onboarding CLI (`aio-toolkit-onboard-events`)
|
|
13
|
+
- Command-line tool for managing Adobe I/O Events and Commerce event integrations
|
|
14
|
+
- Three sub-commands: `execute`, `cleanup`, and `help`
|
|
15
|
+
- Automated provider, registration, and event subscription management
|
|
16
|
+
- Support for both OAuth 1.0a and IMS authentication
|
|
17
|
+
- Configuration-driven approach using YAML files
|
|
18
|
+
- Comprehensive environment variable validation
|
|
19
|
+
- Structured logging with detailed progress tracking
|
|
20
|
+
- Cleanup command for removing test/development resources
|
|
21
|
+
- Respects dependency order during cleanup (registrations → metadata → providers)
|
|
22
|
+
- 100% test coverage with comprehensive test suites
|
|
23
|
+
|
|
24
|
+
### 🔧 Refactoring
|
|
25
|
+
|
|
26
|
+
- **refactor(commands):** Framework command architecture refactoring (#132)
|
|
27
|
+
- Abstract command base class for consistent CLI structure
|
|
28
|
+
- Command registry pattern for extensible command management
|
|
29
|
+
- AI-agent friendly base commands (base-apply, base-check)
|
|
30
|
+
- Standardized help command implementation
|
|
31
|
+
- Improved code organization and maintainability
|
|
32
|
+
- Enhanced type safety with TypeScript interfaces
|
|
33
|
+
|
|
34
|
+
- **refactor(helpers):** New helper utilities for CLI commands
|
|
35
|
+
- `ApplicationName` helper for extracting app names from config
|
|
36
|
+
- `AdobeAuthToken` helper for centralized token generation
|
|
37
|
+
- `AdobeCommerceClient` helper for Commerce API integration
|
|
38
|
+
- IO Events authentication and environment helpers
|
|
39
|
+
- Commerce helper utilities following DRY principle
|
|
40
|
+
- 100% test coverage for all helper functions
|
|
41
|
+
|
|
42
|
+
### 💡 Usage Examples
|
|
43
|
+
|
|
44
|
+
**Execute Adobe I/O Events onboarding**:
|
|
45
|
+
```bash
|
|
46
|
+
npx aio-toolkit-onboard-events execute
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Cleanup development resources**:
|
|
50
|
+
```bash
|
|
51
|
+
npx aio-toolkit-onboard-events cleanup
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Display help**:
|
|
55
|
+
```bash
|
|
56
|
+
npx aio-toolkit-onboard-events help
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## [1.0.15] - 2026-02-09
|
|
62
|
+
|
|
63
|
+
### ✨ Features
|
|
64
|
+
|
|
65
|
+
- **feat(cli):** New Cursor IDE Context Management CLI (`aio-toolkit-cursor-context`)
|
|
66
|
+
- Command-line tool for managing Cursor IDE context files in Adobe App Builder projects
|
|
67
|
+
- Three sub-commands: `check`, `apply`, and `help`
|
|
68
|
+
- Automatic IDE detection (macOS, Windows, Linux)
|
|
69
|
+
- Model Context Protocol (MCP) server configuration
|
|
70
|
+
- Force mode for CI/CD pipelines
|
|
71
|
+
- Multi-directory support (`.cursor/rules` and `.cursor/commands`)
|
|
72
|
+
- Comprehensive error handling and user feedback
|
|
73
|
+
|
|
74
|
+
### 💡 Usage Examples
|
|
75
|
+
|
|
76
|
+
**Check context setup**:
|
|
77
|
+
```bash
|
|
78
|
+
npx aio-toolkit-cursor-context check
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Apply contexts (standard mode)**:
|
|
82
|
+
```bash
|
|
83
|
+
npx aio-toolkit-cursor-context apply
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Apply contexts (force mode)**:
|
|
87
|
+
```bash
|
|
88
|
+
npx aio-toolkit-cursor-context apply -f
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Display help**:
|
|
92
|
+
```bash
|
|
93
|
+
npx aio-toolkit-cursor-context help
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
8
98
|
## [1.0.14] - 2026-01-20
|
|
9
99
|
|
|
10
100
|
### ✨ Features
|
package/README.md
CHANGED
|
@@ -1487,30 +1487,205 @@ const registrations = await manager.list();
|
|
|
1487
1487
|
await manager.delete('your-registration-id');
|
|
1488
1488
|
```
|
|
1489
1489
|
|
|
1490
|
+
### 🛠️ CLI Tools
|
|
1491
|
+
|
|
1492
|
+
#### `aio-toolkit-cursor-context`
|
|
1493
|
+
|
|
1494
|
+
Command-line tool for managing Cursor IDE context files (rules and commands) in your Adobe App Builder projects. This CLI automatically sets up Cursor IDE-specific contexts and configures the Model Context Protocol (MCP) server for enhanced development experience.
|
|
1495
|
+
|
|
1496
|
+
##### Commands
|
|
1497
|
+
|
|
1498
|
+
###### `check`
|
|
1499
|
+
Validates that Cursor contexts are properly set up in your project.
|
|
1500
|
+
|
|
1501
|
+
```bash
|
|
1502
|
+
npx aio-toolkit-cursor-context check
|
|
1503
|
+
```
|
|
1504
|
+
|
|
1505
|
+
**Features:**
|
|
1506
|
+
- ✅ Checks for `.cursor/rules` and `.cursor/commands` directories
|
|
1507
|
+
- ✅ Validates MCP server configuration
|
|
1508
|
+
- ✅ Detects if running in Cursor IDE
|
|
1509
|
+
- ✅ Reports missing files or configurations
|
|
1510
|
+
|
|
1511
|
+
**Output Example:**
|
|
1512
|
+
```
|
|
1513
|
+
✅ Cursor IDE detected
|
|
1514
|
+
✅ MCP server configured
|
|
1515
|
+
✅ Found 3 context files in .cursor/rules
|
|
1516
|
+
✅ Found 4 context files in .cursor/commands
|
|
1517
|
+
✅ Cursor contexts are properly set up
|
|
1518
|
+
```
|
|
1519
|
+
|
|
1520
|
+
###### `apply`
|
|
1521
|
+
Copies Cursor context files from the package to your project.
|
|
1522
|
+
|
|
1523
|
+
```bash
|
|
1524
|
+
# Standard mode - copies missing files only
|
|
1525
|
+
npx aio-toolkit-cursor-context apply
|
|
1526
|
+
|
|
1527
|
+
# Force mode - overwrites existing files and bypasses IDE detection
|
|
1528
|
+
npx aio-toolkit-cursor-context apply -f
|
|
1529
|
+
npx aio-toolkit-cursor-context apply --force
|
|
1530
|
+
```
|
|
1531
|
+
|
|
1532
|
+
**Features:**
|
|
1533
|
+
- 📁 Copies context files to `.cursor/rules` and `.cursor/commands`
|
|
1534
|
+
- 🔄 Creates MCP configuration in `.cursor/mcp.json`
|
|
1535
|
+
- 🛡️ IDE detection prevents accidental application in non-Cursor environments
|
|
1536
|
+
- ⚡ Force mode for CI/CD pipelines or when IDE detection fails
|
|
1537
|
+
- 📊 Reports copied, skipped, and overwritten files
|
|
1538
|
+
|
|
1539
|
+
**Standard Mode Output:**
|
|
1540
|
+
```
|
|
1541
|
+
Copied 3 new context files to .cursor/rules
|
|
1542
|
+
Skipped 2 files (already exist)
|
|
1543
|
+
✅ MCP server configured
|
|
1544
|
+
✅ All cursor contexts applied successfully
|
|
1545
|
+
```
|
|
1546
|
+
|
|
1547
|
+
**Force Mode Output:**
|
|
1548
|
+
```
|
|
1549
|
+
Overwritten 5 existing files in .cursor/rules
|
|
1550
|
+
Copied 4 new files to .cursor/commands
|
|
1551
|
+
✅ MCP server configured
|
|
1552
|
+
✅ All cursor contexts applied successfully (force mode)
|
|
1553
|
+
```
|
|
1554
|
+
|
|
1555
|
+
###### `help`
|
|
1556
|
+
Displays help information for the CLI.
|
|
1557
|
+
|
|
1558
|
+
```bash
|
|
1559
|
+
npx aio-toolkit-cursor-context help
|
|
1560
|
+
```
|
|
1561
|
+
|
|
1562
|
+
##### Context Files Included
|
|
1563
|
+
|
|
1564
|
+
The CLI provides the following context files:
|
|
1565
|
+
|
|
1566
|
+
**Rules (`.cursor/rules/`):**
|
|
1567
|
+
- `aio-toolkit-create-adobe-commerce-client.mdc` - Creating Adobe Commerce client operations
|
|
1568
|
+
- `aio-toolkit-oop-best-practices.mdc` - Object-oriented programming best practices
|
|
1569
|
+
- `aio-toolkit-setup-new-relic-telemetry.mdc` - Setting up New Relic telemetry
|
|
1570
|
+
|
|
1571
|
+
**Commands (`.cursor/commands/`):**
|
|
1572
|
+
- `aio-toolkit-create-event-consumer-action.md` - Create event consumer actions
|
|
1573
|
+
- `aio-toolkit-create-graphql-action.md` - Create GraphQL actions
|
|
1574
|
+
- `aio-toolkit-create-runtime-action.md` - Create runtime actions
|
|
1575
|
+
- `aio-toolkit-create-webhook-action.md` - Create webhook actions
|
|
1576
|
+
|
|
1577
|
+
##### Use Cases
|
|
1578
|
+
|
|
1579
|
+
1. **Initial Project Setup**: Run `apply` to set up all Cursor contexts
|
|
1580
|
+
2. **Continuous Integration**: Use `apply -f` in CI/CD pipelines
|
|
1581
|
+
3. **Verification**: Run `check` to ensure contexts are properly configured
|
|
1582
|
+
4. **Updates**: Run `apply -f` after toolkit updates to get latest contexts
|
|
1583
|
+
|
|
1584
|
+
#### `aio-toolkit-onboard-events`
|
|
1585
|
+
|
|
1586
|
+
Command-line tool for managing Adobe I/O Events and Commerce event integrations. This CLI automates the process of onboarding event providers, registrations, and subscriptions, as well as cleaning up resources from test/development environments.
|
|
1587
|
+
|
|
1588
|
+
##### Commands
|
|
1589
|
+
|
|
1590
|
+
###### `execute`
|
|
1591
|
+
Onboards Adobe I/O Events providers, registrations, and Commerce event subscriptions based on configuration file.
|
|
1592
|
+
|
|
1593
|
+
```bash
|
|
1594
|
+
# Execute with default config (onboard.config.yaml)
|
|
1595
|
+
npx aio-toolkit-onboard-events execute
|
|
1596
|
+
```
|
|
1597
|
+
|
|
1598
|
+
**Features:**
|
|
1599
|
+
- ✅ Creates Adobe I/O Events providers with automatic duplicate detection
|
|
1600
|
+
- ✅ Sets up event metadata for custom events
|
|
1601
|
+
- ✅ Configures event registrations with webhook or journal delivery
|
|
1602
|
+
- ✅ Subscribes to Adobe Commerce events (supports both OAuth and IMS authentication)
|
|
1603
|
+
- ✅ Validates environment variables upfront with clear error messages
|
|
1604
|
+
- ✅ Structured logging with detailed progress tracking
|
|
1605
|
+
|
|
1606
|
+
###### `cleanup`
|
|
1607
|
+
Removes Adobe I/O Events resources and Commerce event subscriptions defined in configuration file.
|
|
1608
|
+
|
|
1609
|
+
```bash
|
|
1610
|
+
# Cleanup with default config
|
|
1611
|
+
npx aio-toolkit-onboard-events cleanup
|
|
1612
|
+
```
|
|
1613
|
+
|
|
1614
|
+
**Features:**
|
|
1615
|
+
- 🗑️ Deletes event registrations
|
|
1616
|
+
- 🗑️ Removes event metadata
|
|
1617
|
+
- 🗑️ Deletes event providers
|
|
1618
|
+
- 🗑️ Unsubscribes from Commerce events and removes providers
|
|
1619
|
+
- ⚡ Respects dependency order (registrations → metadata → providers)
|
|
1620
|
+
- 📊 Provides detailed cleanup summary
|
|
1621
|
+
|
|
1622
|
+
###### `help`
|
|
1623
|
+
Displays help information for the CLI.
|
|
1624
|
+
|
|
1625
|
+
```bash
|
|
1626
|
+
npx aio-toolkit-onboard-events help
|
|
1627
|
+
```
|
|
1628
|
+
|
|
1629
|
+
##### Configuration File
|
|
1630
|
+
|
|
1631
|
+
The CLI uses `onboard.config.yaml` to define resources. Default template:
|
|
1632
|
+
|
|
1633
|
+
```yaml
|
|
1634
|
+
# Configuration file version
|
|
1635
|
+
version: "1.0"
|
|
1636
|
+
|
|
1637
|
+
# Application metadata
|
|
1638
|
+
application:
|
|
1639
|
+
name: "My App Builder Application"
|
|
1640
|
+
# Description is optional
|
|
1641
|
+
# description: "My App Builder Application for Adobe Commerce"
|
|
1642
|
+
|
|
1643
|
+
# Events configuration
|
|
1644
|
+
events:
|
|
1645
|
+
# Adobe I/O Events configuration
|
|
1646
|
+
io:
|
|
1647
|
+
config: io-events.json # File path to I/O events configuration
|
|
1648
|
+
|
|
1649
|
+
# Adobe Commerce Events configuration
|
|
1650
|
+
commerce:
|
|
1651
|
+
providerKey: commerce
|
|
1652
|
+
config: commerce-events.json # File path to Commerce events configuration
|
|
1653
|
+
|
|
1654
|
+
# Deployment settings
|
|
1655
|
+
deployment:
|
|
1656
|
+
# Instance type: paas | cloud
|
|
1657
|
+
# paas = Adobe Commerce Cloud/On-premise (OAuth)
|
|
1658
|
+
# cloud = Adobe Commerce as Cloud Service (IMS)
|
|
1659
|
+
type: paas
|
|
1660
|
+
|
|
1661
|
+
# Authentication type (optional, auto-detected from type if not specified)
|
|
1662
|
+
# Allowed values: oauth | ims
|
|
1663
|
+
# Auto-detection: paas → oauth, cloud → ims
|
|
1664
|
+
# authType: oauth
|
|
1665
|
+
```
|
|
1666
|
+
|
|
1667
|
+
##### Use Cases
|
|
1668
|
+
|
|
1669
|
+
1. **Development Onboarding**: Run `execute` to quickly set up event integrations
|
|
1670
|
+
2. **Environment Cleanup**: Run `cleanup` to remove test resources before production deployment
|
|
1671
|
+
3. **CI/CD Integration**: Automate event configuration in deployment pipelines
|
|
1672
|
+
4. **Multi-Environment Setup**: Use different config files for dev/staging/production environments
|
|
1673
|
+
|
|
1490
1674
|
## Environment Variables
|
|
1491
1675
|
|
|
1492
1676
|
Common environment variables used across components:
|
|
1493
1677
|
|
|
1494
1678
|
```bash
|
|
1495
|
-
# Adobe
|
|
1496
|
-
COMMERCE_BASE_URL=commerce-base-url
|
|
1497
|
-
COMMERCE_CONSUMER_KEY=commerce-consumer-key
|
|
1498
|
-
COMMERCE_CONSUMER_SECRET=commerce-consumer-secret
|
|
1499
|
-
COMMERCE_ACCESS_TOKEN=commerce-access-token
|
|
1500
|
-
COMMERCE_ACCESS_TOKEN_SECRET=commerce-access-token-secret
|
|
1501
|
-
# Environment from DIST file
|
|
1502
|
-
OAUTH_BASE_URL=https://ims-na1.adobelogin.com/ims/token/
|
|
1503
|
-
IO_MANAGEMENT_BASE_URL=https://api.adobe.io/events/
|
|
1504
|
-
# OAuth configs
|
|
1679
|
+
# Adobe I/O Events OAuth (Required for aio-toolkit-onboard-events)
|
|
1505
1680
|
# The following values can be copied from the Credential details page in AppBuilder under Organization > Project > Workspace > OAuth Server-to-Server
|
|
1506
1681
|
OAUTH_CLIENT_ID=client-id
|
|
1507
1682
|
OAUTH_CLIENT_SECRET=client-secret
|
|
1508
1683
|
OAUTH_TECHNICAL_ACCOUNT_ID=technical-account-id
|
|
1509
1684
|
OAUTH_TECHNICAL_ACCOUNT_EMAIL=technical-account-email
|
|
1510
1685
|
OAUTH_ORG_ID=org-id
|
|
1511
|
-
OAUTH_SCOPES=
|
|
1512
|
-
|
|
1513
|
-
# Workspace
|
|
1686
|
+
OAUTH_SCOPES=openid, AdobeID, adobeio_api
|
|
1687
|
+
|
|
1688
|
+
# Adobe I/O Workspace (Required for aio-toolkit-onboard-events)
|
|
1514
1689
|
# The following values can be copied from the JSON downloadable in AppBuilder from Organization > Project > Workspace
|
|
1515
1690
|
# IO_CONSUMER corresponds to project.org.id
|
|
1516
1691
|
# IO_PROJECT_ID corresponds to project.id
|
|
@@ -1518,6 +1693,36 @@ OAUTH_SCOPES=scopes
|
|
|
1518
1693
|
IO_CONSUMER_ID=consumer-id
|
|
1519
1694
|
IO_PROJECT_ID=project-id
|
|
1520
1695
|
IO_WORKSPACE_ID=workspace-id
|
|
1696
|
+
|
|
1697
|
+
# Workspace Configuration (Required for aio-toolkit-onboard-events)
|
|
1698
|
+
IO_WORKSPACE_CONFIG=path/to/onboard.config.yaml
|
|
1699
|
+
|
|
1700
|
+
# Adobe Commerce Base Configuration (Required for Commerce events)
|
|
1701
|
+
COMMERCE_BASE_URL=https://your-commerce-store.com
|
|
1702
|
+
COMMERCE_ADOBE_IO_EVENTS_MERCHANT_ID=merchant-id
|
|
1703
|
+
COMMERCE_ADOBE_IO_EVENTS_ENVIRONMENT_ID=environment-id
|
|
1704
|
+
|
|
1705
|
+
# Commerce OAuth 1.0a Authentication (Use when authType is "oauth1a")
|
|
1706
|
+
COMMERCE_OAUTH_CONSUMER_KEY=consumer-key
|
|
1707
|
+
COMMERCE_OAUTH_CONSUMER_SECRET=consumer-secret
|
|
1708
|
+
COMMERCE_OAUTH_ACCESS_TOKEN=access-token
|
|
1709
|
+
COMMERCE_OAUTH_ACCESS_TOKEN_SECRET=access-token-secret
|
|
1710
|
+
|
|
1711
|
+
# Commerce IMS Authentication (Use when authType is "ims")
|
|
1712
|
+
COMMERCE_IMS_CLIENT_ID=client-id
|
|
1713
|
+
COMMERCE_IMS_CLIENT_SECRET=client-secret
|
|
1714
|
+
COMMERCE_IMS_TECHNICAL_ACCOUNT_ID=tech-account-id
|
|
1715
|
+
COMMERCE_IMS_TECHNICAL_ACCOUNT_EMAIL=tech-email
|
|
1716
|
+
COMMERCE_IMS_ORG_ID=org-id
|
|
1717
|
+
COMMERCE_IMS_SCOPES=openid, AdobeID, adobeio_api
|
|
1718
|
+
|
|
1719
|
+
# Legacy Environment Variables (Still supported for backward compatibility)
|
|
1720
|
+
OAUTH_BASE_URL=https://ims-na1.adobelogin.com/ims/token/
|
|
1721
|
+
IO_MANAGEMENT_BASE_URL=https://api.adobe.io/events/
|
|
1722
|
+
COMMERCE_CONSUMER_KEY=commerce-consumer-key
|
|
1723
|
+
COMMERCE_CONSUMER_SECRET=commerce-consumer-secret
|
|
1724
|
+
COMMERCE_ACCESS_TOKEN=commerce-access-token
|
|
1725
|
+
COMMERCE_ACCESS_TOKEN_SECRET=commerce-access-token-secret
|
|
1521
1726
|
```
|
|
1522
1727
|
|
|
1523
1728
|
## License
|