@aetherpush/cli 0.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.
- package/LICENSE +21 -0
- package/README.md +112 -0
- package/bin/script/acquisition-sdk.js +178 -0
- package/bin/script/acquisition-sdk.js.map +1 -0
- package/bin/script/cli.js +20 -0
- package/bin/script/cli.js.map +1 -0
- package/bin/script/command-executor.js +1301 -0
- package/bin/script/command-executor.js.map +1 -0
- package/bin/script/command-parser.js +1103 -0
- package/bin/script/command-parser.js.map +1 -0
- package/bin/script/commands/debug.js +127 -0
- package/bin/script/commands/debug.js.map +1 -0
- package/bin/script/errors.js +16 -0
- package/bin/script/errors.js.map +1 -0
- package/bin/script/hash-utils.js +183 -0
- package/bin/script/hash-utils.js.map +1 -0
- package/bin/script/index.js +5 -0
- package/bin/script/index.js.map +1 -0
- package/bin/script/management-sdk.js +360 -0
- package/bin/script/management-sdk.js.map +1 -0
- package/bin/script/react-native-utils.js +264 -0
- package/bin/script/react-native-utils.js.map +1 -0
- package/bin/script/sign.js +74 -0
- package/bin/script/sign.js.map +1 -0
- package/bin/script/types/cli.js +39 -0
- package/bin/script/types/cli.js.map +1 -0
- package/bin/script/types/index.js +18 -0
- package/bin/script/types/index.js.map +1 -0
- package/bin/script/types/rest-definitions.js +3 -0
- package/bin/script/types/rest-definitions.js.map +1 -0
- package/bin/script/types.js +4 -0
- package/bin/script/types.js.map +1 -0
- package/bin/script/utils/file-utils.js +50 -0
- package/bin/script/utils/file-utils.js.map +1 -0
- package/package.json +92 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aether
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Aether CLI
|
|
2
|
+
|
|
3
|
+
> **Push React Native updates without the App Store.**
|
|
4
|
+
|
|
5
|
+
The command-line interface for [Aether](https://aetherpush.com) — over-the-air JavaScript bundle updates for React Native apps.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@aetherpush/cli)
|
|
8
|
+
[](./LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
|
|
11
|
+
> ⚠️ **Pre-release.** Aether is in active development. APIs and behavior may change before the first stable release.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Why Aether
|
|
16
|
+
|
|
17
|
+
Microsoft retired App Center CodePush in March 2025, leaving thousands of React Native apps without an OTA update solution. Aether is a drop-in successor: same workflow, same client SDK contract, run by a small team focused on shipping.
|
|
18
|
+
|
|
19
|
+
- **App Store-free deployments** — push bug fixes and updates directly to installed apps
|
|
20
|
+
- **Compatible with `react-native-code-push`** today; first-party Aether SDK ships next
|
|
21
|
+
- **Channel-based releases** — Staging, Production, Beta, whatever you need
|
|
22
|
+
- **Rollouts and rollbacks** — percentage-based rollouts, instant rollback to any previous label
|
|
23
|
+
- **Multi-collaborator** — own your apps, share access with your team
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm install -g @aetherpush/cli
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Requires Node.js 22 or later.
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
# Create an account (interactive: prompts for email, name, password)
|
|
37
|
+
aether register
|
|
38
|
+
|
|
39
|
+
# Verify your email by clicking the link sent to you, then log in
|
|
40
|
+
aether login
|
|
41
|
+
|
|
42
|
+
# Create your first app (auto-provisions Staging and Production deployments)
|
|
43
|
+
aether app add my-react-native-app
|
|
44
|
+
|
|
45
|
+
# Inspect the deployment keys to wire into your app binary
|
|
46
|
+
aether deployment ls my-react-native-app -k
|
|
47
|
+
|
|
48
|
+
# Release an update (auto-detects entry file and target binary version)
|
|
49
|
+
aether release-react my-react-native-app ios
|
|
50
|
+
|
|
51
|
+
# Roll out to 25% of users
|
|
52
|
+
aether patch my-react-native-app Staging -r 25
|
|
53
|
+
|
|
54
|
+
# Promote a release from Staging to Production
|
|
55
|
+
aether promote my-react-native-app Staging Production
|
|
56
|
+
|
|
57
|
+
# Roll back if something goes wrong
|
|
58
|
+
aether rollback my-react-native-app Production
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Commands
|
|
62
|
+
|
|
63
|
+
| Command | What it does |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `register` | Create a new Aether account |
|
|
66
|
+
| `login`, `logout` | Session management |
|
|
67
|
+
| `whoami` | Show the current account |
|
|
68
|
+
| `app add\|ls\|rm\|rename\|transfer` | Manage apps |
|
|
69
|
+
| `deployment add\|ls\|rm\|rename\|history\|clear` | Manage deployment channels |
|
|
70
|
+
| `release`, `release-react` | Upload a new release |
|
|
71
|
+
| `patch` | Update metadata of an existing release (rollout %, mandatory, disabled, description) |
|
|
72
|
+
| `promote` | Promote a release between deployments |
|
|
73
|
+
| `rollback` | Roll a deployment back to a previous release |
|
|
74
|
+
| `collaborator add\|ls\|rm` | Manage app collaborators |
|
|
75
|
+
| `access-key add\|ls\|patch\|rm` | Manage session-style CLI keys |
|
|
76
|
+
| `session ls\|rm` | Manage active login sessions |
|
|
77
|
+
| `debug ios\|android` | Stream Aether logs from a running app |
|
|
78
|
+
|
|
79
|
+
Full reference and flags: `aether <command> --help`.
|
|
80
|
+
|
|
81
|
+
## Configuration
|
|
82
|
+
|
|
83
|
+
Session and server config are stored in `~/.aether/config.json`. Created on `aether login`, deleted on `aether logout`.
|
|
84
|
+
|
|
85
|
+
To target a non-default server (e.g. local development):
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
aether login --serverUrl http://localhost:3000
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
To run non-interactively (CI/CD):
|
|
92
|
+
|
|
93
|
+
```sh
|
|
94
|
+
aether login --accessKey <your-access-key> --serverUrl https://api.aetherpush.com
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## CI/CD
|
|
98
|
+
|
|
99
|
+
Dedicated GitHub Action, GitLab CI / CircleCI / Jenkins templates, and a CLI `--ci` auto-detect flag are coming in the next release. For now, use `aether login --accessKey` with a long-lived access key.
|
|
100
|
+
|
|
101
|
+
## Migrating from CodePush
|
|
102
|
+
|
|
103
|
+
If you're coming from `appcenter-cli` and `react-native-code-push`, a migration tool and step-by-step guide are on the way. Until then, your existing `react-native-code-push` SDK works against Aether servers unchanged — just swap your deployment key for one issued by `aether deployment ls -k`.
|
|
104
|
+
|
|
105
|
+
## Links
|
|
106
|
+
|
|
107
|
+
- Website: [aetherpush.com](https://aetherpush.com)
|
|
108
|
+
- Issues: [GitHub](https://github.com/Monoradioactivo/aether-cli/issues)
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Aether. All rights reserved.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AcquisitionManager = exports.AcquisitionStatus = void 0;
|
|
5
|
+
class AcquisitionStatus {
|
|
6
|
+
static DeploymentSucceeded = "DeploymentSucceeded";
|
|
7
|
+
static DeploymentFailed = "DeploymentFailed";
|
|
8
|
+
}
|
|
9
|
+
exports.AcquisitionStatus = AcquisitionStatus;
|
|
10
|
+
class AcquisitionManager {
|
|
11
|
+
_appVersion;
|
|
12
|
+
_clientUniqueId;
|
|
13
|
+
_deploymentKey;
|
|
14
|
+
_httpRequester;
|
|
15
|
+
_ignoreAppVersion;
|
|
16
|
+
_serverUrl;
|
|
17
|
+
constructor(httpRequester, configuration) {
|
|
18
|
+
this._httpRequester = httpRequester;
|
|
19
|
+
this._serverUrl = configuration.serverUrl;
|
|
20
|
+
if (this._serverUrl.slice(-1) !== "/") {
|
|
21
|
+
this._serverUrl += "/";
|
|
22
|
+
}
|
|
23
|
+
this._appVersion = configuration.appVersion;
|
|
24
|
+
this._clientUniqueId = configuration.clientUniqueId;
|
|
25
|
+
this._deploymentKey = configuration.deploymentKey;
|
|
26
|
+
this._ignoreAppVersion = configuration.ignoreAppVersion;
|
|
27
|
+
}
|
|
28
|
+
queryUpdateWithCurrentPackage(currentPackage, callback) {
|
|
29
|
+
if (!currentPackage || !currentPackage.appVersion) {
|
|
30
|
+
throw new Error("Calling common acquisition SDK with incorrect package"); // Unexpected; indicates error in our implementation
|
|
31
|
+
}
|
|
32
|
+
const updateRequest = {
|
|
33
|
+
deploymentKey: this._deploymentKey,
|
|
34
|
+
appVersion: currentPackage.appVersion,
|
|
35
|
+
packageHash: currentPackage.packageHash,
|
|
36
|
+
isCompanion: this._ignoreAppVersion,
|
|
37
|
+
label: currentPackage.label,
|
|
38
|
+
clientUniqueId: this._clientUniqueId,
|
|
39
|
+
};
|
|
40
|
+
const requestUrl = this._serverUrl + "updateCheck?" + queryStringify(updateRequest);
|
|
41
|
+
this._httpRequester.request(0 /* Http.Verb.GET */, requestUrl, (error, response) => {
|
|
42
|
+
if (error) {
|
|
43
|
+
callback(error, /*remotePackage=*/ null);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (response.statusCode !== 200) {
|
|
47
|
+
callback(new Error(response.statusCode + ": " + response.body), /*remotePackage=*/ null);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
let updateInfo;
|
|
51
|
+
try {
|
|
52
|
+
const responseObject = JSON.parse(response.body);
|
|
53
|
+
updateInfo = responseObject.updateInfo;
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
callback(error, /*remotePackage=*/ null);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (!updateInfo) {
|
|
60
|
+
callback(error, /*remotePackage=*/ null);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
else if (updateInfo.updateAppVersion) {
|
|
64
|
+
callback(/*error=*/ null, {
|
|
65
|
+
updateAppVersion: true,
|
|
66
|
+
appVersion: updateInfo.appVersion,
|
|
67
|
+
});
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
else if (!updateInfo.isAvailable) {
|
|
71
|
+
callback(/*error=*/ null, /*remotePackage=*/ null);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const remotePackage = {
|
|
75
|
+
deploymentKey: this._deploymentKey,
|
|
76
|
+
description: updateInfo.description,
|
|
77
|
+
label: updateInfo.label,
|
|
78
|
+
appVersion: updateInfo.appVersion,
|
|
79
|
+
isMandatory: updateInfo.isMandatory,
|
|
80
|
+
packageHash: updateInfo.packageHash,
|
|
81
|
+
packageSize: updateInfo.packageSize,
|
|
82
|
+
downloadUrl: updateInfo.downloadURL,
|
|
83
|
+
};
|
|
84
|
+
callback(/*error=*/ null, remotePackage);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
reportStatusDeploy(deployedPackage, status, previousLabelOrAppVersion, previousDeploymentKey, callback) {
|
|
88
|
+
const url = this._serverUrl + "reportStatus/deploy";
|
|
89
|
+
const body = {
|
|
90
|
+
appVersion: this._appVersion,
|
|
91
|
+
deploymentKey: this._deploymentKey,
|
|
92
|
+
};
|
|
93
|
+
if (this._clientUniqueId) {
|
|
94
|
+
body.clientUniqueId = this._clientUniqueId;
|
|
95
|
+
}
|
|
96
|
+
if (deployedPackage) {
|
|
97
|
+
body.label = deployedPackage.label;
|
|
98
|
+
body.appVersion = deployedPackage.appVersion;
|
|
99
|
+
switch (status) {
|
|
100
|
+
case AcquisitionStatus.DeploymentSucceeded:
|
|
101
|
+
case AcquisitionStatus.DeploymentFailed:
|
|
102
|
+
body.status = status;
|
|
103
|
+
break;
|
|
104
|
+
default:
|
|
105
|
+
if (callback) {
|
|
106
|
+
if (!status) {
|
|
107
|
+
callback(new Error("Missing status argument."), /*not used*/ null);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
callback(new Error('Unrecognized status "' + status + '".'), /*not used*/ null);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (previousLabelOrAppVersion) {
|
|
117
|
+
body.previousLabelOrAppVersion = previousLabelOrAppVersion;
|
|
118
|
+
}
|
|
119
|
+
if (previousDeploymentKey) {
|
|
120
|
+
body.previousDeploymentKey = previousDeploymentKey;
|
|
121
|
+
}
|
|
122
|
+
callback = typeof arguments[arguments.length - 1] === "function" && arguments[arguments.length - 1];
|
|
123
|
+
this._httpRequester.request(2 /* Http.Verb.POST */, url, JSON.stringify(body), (error, response) => {
|
|
124
|
+
if (callback) {
|
|
125
|
+
if (error) {
|
|
126
|
+
callback(error, /*not used*/ null);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (response.statusCode !== 200) {
|
|
130
|
+
callback(new Error(response.statusCode + ": " + response.body), /*not used*/ null);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
callback(/*error*/ null, /*not used*/ null);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
reportStatusDownload(downloadedPackage, callback) {
|
|
138
|
+
const url = this._serverUrl + "reportStatus/download";
|
|
139
|
+
const body = {
|
|
140
|
+
clientUniqueId: this._clientUniqueId,
|
|
141
|
+
deploymentKey: this._deploymentKey,
|
|
142
|
+
label: downloadedPackage.label,
|
|
143
|
+
};
|
|
144
|
+
this._httpRequester.request(2 /* Http.Verb.POST */, url, JSON.stringify(body), (error, response) => {
|
|
145
|
+
if (callback) {
|
|
146
|
+
if (error) {
|
|
147
|
+
callback(error, /*not used*/ null);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (response.statusCode !== 200) {
|
|
151
|
+
callback(new Error(response.statusCode + ": " + response.body), /*not used*/ null);
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
callback(/*error*/ null, /*not used*/ null);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
exports.AcquisitionManager = AcquisitionManager;
|
|
160
|
+
function queryStringify(object) {
|
|
161
|
+
let queryString = "";
|
|
162
|
+
let isFirst = true;
|
|
163
|
+
for (const property in object) {
|
|
164
|
+
if (object.hasOwnProperty(property)) {
|
|
165
|
+
const value = object[property];
|
|
166
|
+
if (!isFirst) {
|
|
167
|
+
queryString += "&";
|
|
168
|
+
}
|
|
169
|
+
queryString += encodeURIComponent(property) + "=";
|
|
170
|
+
if (value !== null && typeof value !== "undefined") {
|
|
171
|
+
queryString += encodeURIComponent(value);
|
|
172
|
+
}
|
|
173
|
+
isFirst = false;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return queryString;
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=acquisition-sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acquisition-sdk.js","sourceRoot":"","sources":["../../script/acquisition-sdk.ts"],"names":[],"mappings":";AAAA,6CAA6C;;;AAiE7C,MAAa,iBAAiB;IACrB,MAAM,CAAC,mBAAmB,GAAG,qBAAqB,CAAC;IACnD,MAAM,CAAC,gBAAgB,GAAG,kBAAkB,CAAC;;AAFtD,8CAGC;AAED,MAAa,kBAAkB;IACrB,WAAW,CAAS;IACpB,eAAe,CAAS;IACxB,cAAc,CAAS;IACvB,cAAc,CAAiB;IAC/B,iBAAiB,CAAU;IAC3B,UAAU,CAAS;IAE3B,YAAY,aAA6B,EAAE,aAA4B;QACrE,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QAEpC,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC;QAC1C,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;YACrC,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;SACxB;QAED,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,UAAU,CAAC;QAC5C,IAAI,CAAC,eAAe,GAAG,aAAa,CAAC,cAAc,CAAC;QACpD,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC,aAAa,CAAC;QAClD,IAAI,CAAC,iBAAiB,GAAG,aAAa,CAAC,gBAAgB,CAAC;IAC1D,CAAC;IAEM,6BAA6B,CAAC,cAAuB,EAAE,QAA6D;QACzH,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;YACjD,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC,CAAC,oDAAoD;SAC/H;QAED,MAAM,aAAa,GAAuB;YACxC,aAAa,EAAE,IAAI,CAAC,cAAc;YAClC,UAAU,EAAE,cAAc,CAAC,UAAU;YACrC,WAAW,EAAE,cAAc,CA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,KAAK,WAAW,EAAE;gBAClD,WAAW,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;aAC1C;YAED,OAAO,GAAG,KAAK,CAAC;SACjB;KACF;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
// Copyright (c) Aether. All rights reserved.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const parser = require("./command-parser");
|
|
6
|
+
const execute = require("./command-executor");
|
|
7
|
+
const chalk = require("chalk");
|
|
8
|
+
function run() {
|
|
9
|
+
const command = parser.createCommand();
|
|
10
|
+
if (!command) {
|
|
11
|
+
parser.showHelp(/*showRootDescription*/ false);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
execute.execute(command).catch((error) => {
|
|
15
|
+
console.error(chalk.red(`[Error] ${error.message}`));
|
|
16
|
+
process.exit(1);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
run();
|
|
20
|
+
//# sourceMappingURL=cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../script/cli.ts"],"names":[],"mappings":";;AAEA,6CAA6C;;AAE7C,2CAA2C;AAC3C,8CAA8C;AAC9C,+BAA+B;AAE/B,SAAS,GAAG;IACV,MAAM,OAAO,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC;IAEvC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;QAC/C,OAAO;IACT,CAAC;IAED,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAQ,EAAE;QAClD,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,GAAG,EAAE,CAAC"}
|