eas-cli 20.3.0 → 20.4.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.
- package/README.md +136 -113
- package/build/commandUtils/new/templates/AGENTS.md +25 -146
- package/build/commandUtils/new/templates/CLAUDE.md +1 -9
- package/build/commands/observe/session.d.ts +18 -0
- package/build/commands/observe/session.js +65 -0
- package/build/graphql/generated.d.ts +51 -74
- package/build/graphql/generated.js +1 -1
- package/build/graphql/types/Observe.js +1 -0
- package/build/observe/fetchCustomEvents.d.ts +2 -2
- package/build/observe/fetchCustomEvents.js +2 -2
- package/build/observe/fetchEvents.d.ts +4 -3
- package/build/observe/fetchEvents.js +4 -3
- package/build/observe/fetchSessions.d.ts +51 -0
- package/build/observe/fetchSessions.js +86 -0
- package/build/observe/formatEvents.d.ts +1 -0
- package/build/observe/formatEvents.js +1 -0
- package/build/observe/formatSessions.d.ts +15 -0
- package/build/observe/formatSessions.js +100 -0
- package/build/update/getBranchFromChannelNameAndCreateAndLinkIfNotExistsAsync.js +23 -26
- package/oclif.manifest.json +1438 -1343
- package/package.json +4 -3
|
@@ -1,162 +1,41 @@
|
|
|
1
|
-
# AGENTS.md
|
|
2
|
-
|
|
3
|
-
## Project Overview
|
|
4
|
-
|
|
5
1
|
This is an Expo/React Native mobile application. Prioritize mobile-first patterns, performance, and cross-platform compatibility.
|
|
6
2
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
When working on this project, **always consult the official Expo documentation** available at:
|
|
10
|
-
|
|
11
|
-
- **https://docs.expo.dev/llms.txt** - Index of all available documentation files
|
|
12
|
-
- **https://docs.expo.dev/llms-full.txt** - Complete Expo documentation including Expo Router, Expo Modules API, development process
|
|
13
|
-
- **https://docs.expo.dev/llms-eas.txt** - Complete EAS (Expo Application Services) documentation
|
|
14
|
-
- **https://docs.expo.dev/llms-sdk.txt** - Complete Expo SDK documentation
|
|
15
|
-
- **https://reactnative.dev/docs/getting-started** - Complete React Native documentation
|
|
16
|
-
|
|
17
|
-
These documentation files are specifically formatted for AI agents and should be your **primary reference** for:
|
|
3
|
+
## Expo has changed — do not trust your training data
|
|
18
4
|
|
|
19
|
-
|
|
20
|
-
- Expo Router navigation patterns
|
|
21
|
-
- EAS Build, Submit, and Update workflows
|
|
22
|
-
- Expo SDK modules and their usage
|
|
23
|
-
- Development and deployment processes
|
|
5
|
+
Expo ships breaking changes every SDK release. APIs you remember are likely renamed, moved, or removed. Before writing any code that touches an Expo, EAS, or React Native API:
|
|
24
6
|
|
|
25
|
-
|
|
7
|
+
1. Read the major version of the `expo` package in `package.json`.
|
|
8
|
+
2. Fetch the matching versioned docs: `https://docs.expo.dev/versions/v<major>.0.0/`
|
|
9
|
+
3. For anything else, fetch https://docs.expo.dev/llms.txt — an index of all Expo docs with corrections to common LLM misconceptions. Follow its links to the specific page you need; never answer from memory.
|
|
26
10
|
|
|
27
|
-
|
|
28
|
-
/
|
|
29
|
-
├── app/ # Expo Router file-based routing
|
|
30
|
-
│ ├── (tabs)/ # Tab-based navigation screens
|
|
31
|
-
│ │ ├── index.tsx # Home screen
|
|
32
|
-
│ │ ├── explore.tsx # Explore screen
|
|
33
|
-
│ │ └── _layout.tsx # Tabs layout
|
|
34
|
-
│ ├── _layout.tsx # Root layout with theme provider
|
|
35
|
-
│ └── modal.tsx # Modal screen example
|
|
36
|
-
├── components/ # Reusable React components
|
|
37
|
-
│ ├── ui/ # UI primitives (IconSymbol, Collapsible)
|
|
38
|
-
│ └── ... # Feature components (themed, haptic, parallax)
|
|
39
|
-
├── constants/ # App-wide constants (theme, colors)
|
|
40
|
-
├── hooks/ # Custom React hooks (color scheme, theme)
|
|
41
|
-
├── assets/ # Static assets (images, fonts)
|
|
42
|
-
├── scripts/ # Utility scripts (reset-project)
|
|
43
|
-
├── .eas/workflows/ # EAS Workflows (CI/CD automation)
|
|
44
|
-
├── app.json # Expo configuration
|
|
45
|
-
├── eas.json # EAS Build/Submit configuration
|
|
46
|
-
└── package.json # Dependencies and scripts
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Essential Commands
|
|
11
|
+
## Commands
|
|
50
12
|
|
|
51
|
-
|
|
13
|
+
Use `bunx` instead of `npx` if the project uses bun (`bun.lock` present).
|
|
52
14
|
|
|
53
15
|
```bash
|
|
54
|
-
npx expo
|
|
55
|
-
npx expo start
|
|
56
|
-
npx expo
|
|
57
|
-
npx
|
|
58
|
-
npx expo
|
|
59
|
-
|
|
60
|
-
npm run reset-project # Reset to blank template
|
|
16
|
+
npx expo install <package> # ALWAYS use instead of npm/yarn/pnpm/bun add — resolves SDK-compatible versions
|
|
17
|
+
npx expo start # start the dev server
|
|
18
|
+
npx expo lint # lint
|
|
19
|
+
npx tsc --noEmit # typecheck
|
|
20
|
+
npx expo-doctor # diagnose dependency and config issues
|
|
21
|
+
npx expo install --fix # fix incompatible package versions
|
|
61
22
|
```
|
|
62
23
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
npx expo doctor # Check project health and dependencies
|
|
67
|
-
npx expo lint # Run ESLint
|
|
68
|
-
npm run draft # Publish preview update and website (workflow)
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### Production
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
npx eas-cli@latest build --platform ios -s # Use EAS to build for iOS platform and submit to App Store
|
|
75
|
-
npx eas-cli@latest build --platform android -s # Use EAS to build for Android platform and submit to Google Play Store
|
|
76
|
-
npm run deploy # Deploy to production (workflow)
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Development Guidelines
|
|
80
|
-
|
|
81
|
-
### Code Style & Standards
|
|
82
|
-
|
|
83
|
-
- **TypeScript First**: Use TypeScript for all new code with strict type checking
|
|
84
|
-
- **Naming Conventions**: Use meaningful, descriptive names for variables, functions, and components
|
|
85
|
-
- **Self-Documenting Code**: Write clear, readable code that explains itself; only add comments for complex business logic or design decisions
|
|
86
|
-
- **React 19 Patterns**: Follow modern React patterns including:
|
|
87
|
-
- Function components with hooks
|
|
88
|
-
- Enable React Compiler
|
|
89
|
-
- Proper dependency arrays in useEffect
|
|
90
|
-
- Memoization when appropriate (useMemo, useCallback)
|
|
91
|
-
- Error boundaries for better error handling
|
|
92
|
-
|
|
93
|
-
### Navigation & Routing
|
|
94
|
-
|
|
95
|
-
- Use **Expo Router** for all navigation
|
|
96
|
-
- Import `Link`, `router`, and `useLocalSearchParams` from `expo-router`
|
|
97
|
-
- Docs: https://docs.expo.dev/router/introduction/
|
|
98
|
-
|
|
99
|
-
### Recommended Libraries
|
|
100
|
-
|
|
101
|
-
- **Navigation**: `expo-router` for navigation
|
|
102
|
-
- **Images**: `expo-image` for optimized image handling and caching
|
|
103
|
-
- **Animations**: `react-native-reanimated` for performant animations on native thread
|
|
104
|
-
- **Gestures**: `react-native-gesture-handler` for native gesture recognition
|
|
105
|
-
- **Storage**: Use `expo-sqlite` for persistent storage, `expo-sqlite/kv-store` for simple key-value storage
|
|
106
|
-
|
|
107
|
-
## Debugging & Development Tools
|
|
108
|
-
|
|
109
|
-
### DevTools Integration
|
|
110
|
-
|
|
111
|
-
- **React Native DevTools**: Use MCP `open_devtools` command to launch debugging tools
|
|
112
|
-
- **Network Inspection**: Monitor API calls and network requests in DevTools
|
|
113
|
-
- **Element Inspector**: Debug component hierarchy and styles
|
|
114
|
-
- **Performance Profiler**: Identify performance bottlenecks
|
|
115
|
-
- **Logging**: Use `console.log` for debugging (remove before production), `console.warn` for deprecation notices, `console.error` for actual errors, and implement error boundaries for production error handling
|
|
116
|
-
|
|
117
|
-
### Testing & Quality Assurance
|
|
118
|
-
|
|
119
|
-
#### Automated Testing with MCP Tools
|
|
120
|
-
|
|
121
|
-
Developers can configure the Expo MCP server with the following doc: https://docs.expo.dev/eas/ai/mcp/
|
|
122
|
-
|
|
123
|
-
- **Component Testing**: Add `testID` props to components for automation
|
|
124
|
-
- **Visual Testing**: Use MCP `automation_take_screenshot` to verify UI appearance
|
|
125
|
-
- **Interaction Testing**: Use MCP `automation_tap_by_testid` to simulate user interactions
|
|
126
|
-
- **View Verification**: Use MCP `automation_find_view_by_testid` to validate component rendering
|
|
127
|
-
|
|
128
|
-
## EAS Workflows CI/CD
|
|
129
|
-
|
|
130
|
-
This project is pre-configured with **EAS Workflows** for automating development and release processes. Workflows are defined in `.eas/workflows/` directory.
|
|
131
|
-
|
|
132
|
-
When working with EAS Workflows, **always refer to**:
|
|
133
|
-
|
|
134
|
-
- https://docs.expo.dev/eas/workflows/ for workflow examples
|
|
135
|
-
- The `.eas/workflows/` directory for existing workflow configurations
|
|
136
|
-
- You can check that a workflow YAML is valid using the workflows schema: https://exp.host/--/api/v2/workflows/schema
|
|
137
|
-
|
|
138
|
-
### Build Profiles (eas.json)
|
|
139
|
-
|
|
140
|
-
- **development**: Development builds with dev client
|
|
141
|
-
- **development-simulator**: Development builds for iOS simulator
|
|
142
|
-
- **preview**: Internal distribution preview builds
|
|
143
|
-
- **production**: Production builds with auto-increment
|
|
144
|
-
|
|
145
|
-
## Troubleshooting
|
|
146
|
-
|
|
147
|
-
### Expo Go Errors & Development Builds
|
|
24
|
+
Run lint and typecheck before declaring any task done.
|
|
148
25
|
|
|
149
|
-
|
|
26
|
+
## Navigation & Routing
|
|
150
27
|
|
|
151
|
-
|
|
28
|
+
- Use **Expo Router** for all navigation. Routes live in `src/app/` — every file there is a screen, `_layout.tsx` files define navigators. Keep non-route code (components, hooks, utils) outside `src/app/`.
|
|
29
|
+
- Import `Link`, `router`, and `useLocalSearchParams` from `expo-router`.
|
|
30
|
+
- Docs: https://docs.expo.dev/router/introduction.md
|
|
152
31
|
|
|
153
|
-
|
|
32
|
+
## Building with EAS
|
|
154
33
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
- For EAS/deployment questions: https://docs.expo.dev/llms-eas.txt
|
|
158
|
-
- For SDK/API questions: https://docs.expo.dev/llms-sdk.txt
|
|
34
|
+
Use EAS to build, sign, and submit the app in the cloud (`eas build`, `eas submit`) and to ship over-the-air updates (`eas update`) — no local Xcode or Android Studio required. Run EAS CLI as `bunx eas-cli <command>` in Bun projects, or `npx eas-cli@latest <command>` otherwise; substitute that for bare `eas` in docs examples.
|
|
35
|
+
Docs: https://docs.expo.dev/eas/index.md
|
|
159
36
|
|
|
160
|
-
|
|
37
|
+
## Rules
|
|
161
38
|
|
|
162
|
-
|
|
39
|
+
- If `ios/` and `android/` directories do not exist, they are generated (Continuous Native Generation). Never create or edit them by hand — configure native behavior in `app.json` and config plugins.
|
|
40
|
+
- Expo Go only includes its bundled native modules. After adding a library with native code, the app needs a development build: `npx expo run:ios|android` locally, or `eas build --profile development`.
|
|
41
|
+
- Prefer recommended Expo modules over third-party libraries, and check your available skills before adding dependencies. Docs: https://docs.expo.dev/versions/latest/index.md
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
-
|
|
5
|
-
**Note**: This project uses `AGENTS.md` files for detailed guidance.
|
|
6
|
-
|
|
7
|
-
## Primary Reference
|
|
8
|
-
|
|
9
|
-
Please see `AGENTS.md` in this same directory for the main project documentation and guidance.
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import EasCommand from '../../commandUtils/EasCommand';
|
|
2
|
+
export default class ObserveSession extends EasCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
sessionId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
'non-interactive': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
'project-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
static contextDefinition: {
|
|
13
|
+
loggedIn: import("../../commandUtils/context/LoggedInContextField").default;
|
|
14
|
+
projectId: import("../../commandUtils/context/ProjectIdContextField").ProjectIdContextField;
|
|
15
|
+
};
|
|
16
|
+
private static loggedInOnlyContextDefinition;
|
|
17
|
+
runAsync(): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const EasCommand_1 = tslib_1.__importDefault(require("../../commandUtils/EasCommand"));
|
|
6
|
+
const flags_1 = require("../../commandUtils/flags");
|
|
7
|
+
const log_1 = tslib_1.__importDefault(require("../../log"));
|
|
8
|
+
const fetchSessions_1 = require("../../observe/fetchSessions");
|
|
9
|
+
const flags_2 = require("../../observe/flags");
|
|
10
|
+
const formatSessions_1 = require("../../observe/formatSessions");
|
|
11
|
+
const resolveProjectContext_1 = require("../../observe/resolveProjectContext");
|
|
12
|
+
const json_1 = require("../../utils/json");
|
|
13
|
+
// Fixed at 100 — the maximum page size accepted by the underlying events and
|
|
14
|
+
// customEventList queries. Until there's a dedicated sessions query, this
|
|
15
|
+
// command pulls one page of each and merges client-side.
|
|
16
|
+
const SESSION_PAGE_SIZE = 100;
|
|
17
|
+
class ObserveSession extends EasCommand_1.default {
|
|
18
|
+
static description = 'display the timeline of metric and log events for a specific session';
|
|
19
|
+
static args = {
|
|
20
|
+
sessionId: core_1.Args.string({
|
|
21
|
+
description: 'Session ID to inspect',
|
|
22
|
+
required: true,
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
static flags = {
|
|
26
|
+
...flags_2.ObserveProjectIdFlag,
|
|
27
|
+
...flags_1.EasNonInteractiveAndJsonFlags,
|
|
28
|
+
};
|
|
29
|
+
static contextDefinition = {
|
|
30
|
+
...this.ContextOptions.ProjectId,
|
|
31
|
+
...this.ContextOptions.LoggedIn,
|
|
32
|
+
};
|
|
33
|
+
static loggedInOnlyContextDefinition = {
|
|
34
|
+
...this.ContextOptions.LoggedIn,
|
|
35
|
+
};
|
|
36
|
+
async runAsync() {
|
|
37
|
+
const { flags, args } = await this.parse(ObserveSession);
|
|
38
|
+
const { projectId, graphqlClient } = await (0, resolveProjectContext_1.resolveObserveCommandContextAsync)({
|
|
39
|
+
command: this,
|
|
40
|
+
commandClass: ObserveSession,
|
|
41
|
+
loggedInOnlyContextDefinition: ObserveSession.loggedInOnlyContextDefinition,
|
|
42
|
+
projectIdOverride: flags['project-id'],
|
|
43
|
+
nonInteractive: flags['non-interactive'],
|
|
44
|
+
});
|
|
45
|
+
if (flags.json) {
|
|
46
|
+
(0, json_1.enableJsonOutput)();
|
|
47
|
+
}
|
|
48
|
+
const { entries, metadata, hasMoreMetricEvents, hasMoreLogEvents } = await (0, fetchSessions_1.fetchObserveSessionEventsAsync)(graphqlClient, projectId, {
|
|
49
|
+
sessionId: args.sessionId,
|
|
50
|
+
limit: SESSION_PAGE_SIZE,
|
|
51
|
+
});
|
|
52
|
+
if (flags.json) {
|
|
53
|
+
(0, json_1.printJsonOnlyOutput)((0, formatSessions_1.buildObserveSessionEventsJson)(entries, args.sessionId, metadata, hasMoreMetricEvents, hasMoreLogEvents));
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
log_1.default.addNewLineIfNone();
|
|
57
|
+
log_1.default.log((0, formatSessions_1.buildObserveSessionEventsTable)(entries, {
|
|
58
|
+
metadata,
|
|
59
|
+
hasMoreMetricEvents,
|
|
60
|
+
hasMoreLogEvents,
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.default = ObserveSession;
|