@hsuite/smart-engines-cli 1.6.0 → 1.8.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 +59 -9
- package/dist/__tests__/helpers/fixtures-image-hygiene.d.ts +18 -0
- package/dist/__tests__/helpers/fixtures-image-hygiene.d.ts.map +1 -0
- package/dist/__tests__/helpers/fixtures-image-hygiene.js +42 -0
- package/dist/__tests__/helpers/fixtures-image-hygiene.js.map +1 -0
- package/dist/_lib/baas.d.ts +12 -17
- package/dist/_lib/baas.d.ts.map +1 -1
- package/dist/_lib/baas.js +13 -1
- package/dist/_lib/baas.js.map +1 -1
- package/dist/_lib/cluster-convergence.d.ts +8 -0
- package/dist/_lib/cluster-convergence.d.ts.map +1 -1
- package/dist/_lib/cluster-convergence.js +2 -0
- package/dist/_lib/cluster-convergence.js.map +1 -1
- package/dist/_lib/cluster.d.ts +16 -10
- package/dist/_lib/cluster.d.ts.map +1 -1
- package/dist/_lib/cluster.js +23 -4
- package/dist/_lib/cluster.js.map +1 -1
- package/dist/_lib/framework.js +2 -2
- package/dist/_lib/image-hygiene.d.ts +36 -0
- package/dist/_lib/image-hygiene.d.ts.map +1 -0
- package/dist/_lib/image-hygiene.js +233 -0
- package/dist/_lib/image-hygiene.js.map +1 -0
- package/dist/_lib/run-fn.d.ts +34 -0
- package/dist/_lib/run-fn.d.ts.map +1 -0
- package/dist/_lib/run-fn.js +15 -0
- package/dist/_lib/run-fn.js.map +1 -0
- package/dist/_lib/subscription-client.d.ts +20 -0
- package/dist/_lib/subscription-client.d.ts.map +1 -1
- package/dist/_lib/subscription-client.js +23 -1
- package/dist/_lib/subscription-client.js.map +1 -1
- package/dist/_lib/transport.d.ts +62 -0
- package/dist/_lib/transport.d.ts.map +1 -0
- package/dist/_lib/transport.js +120 -0
- package/dist/_lib/transport.js.map +1 -0
- package/dist/commands/customer-scope.d.ts +48 -0
- package/dist/commands/customer-scope.d.ts.map +1 -0
- package/dist/commands/customer-scope.js +89 -0
- package/dist/commands/customer-scope.js.map +1 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +3 -2
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/governance.d.ts.map +1 -1
- package/dist/commands/governance.js +13 -2
- package/dist/commands/governance.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +37 -7
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/personhood.d.ts.map +1 -1
- package/dist/commands/personhood.js +9 -4
- package/dist/commands/personhood.js.map +1 -1
- package/dist/commands/redeploy.d.ts.map +1 -1
- package/dist/commands/redeploy.js +3 -2
- package/dist/commands/redeploy.js.map +1 -1
- package/dist/commands/status.d.ts +45 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +149 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/transactions.d.ts.map +1 -1
- package/dist/commands/transactions.js +2 -1
- package/dist/commands/transactions.js.map +1 -1
- package/dist/commands/verify.d.ts +4 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +37 -22
- package/dist/commands/verify.js.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,10 +36,11 @@ showcase smart-app expects.
|
|
|
36
36
|
```bash
|
|
37
37
|
hsuite init # writes ./.env.local (testnet)
|
|
38
38
|
hsuite init --out smart-app/.env.local # custom output path
|
|
39
|
-
hsuite init --network devnet #
|
|
39
|
+
hsuite init --network devnet # XRPL faucet chain: devnet instead of testnet
|
|
40
|
+
hsuite init --hsuite-network devnet # HSUITE cluster: devnet instead of testnet (orthogonal to --network; or $HSUITE_NETWORK)
|
|
40
41
|
hsuite init --no-fund # generate wallet only, skip faucet
|
|
41
42
|
hsuite init --force # overwrite an existing .env.local
|
|
42
|
-
hsuite init --gateway https://... #
|
|
43
|
+
hsuite init --gateway https://... # explicit gateway URL, overrides --hsuite-network
|
|
43
44
|
```
|
|
44
45
|
|
|
45
46
|
The generated `.env.local`:
|
|
@@ -98,6 +99,42 @@ After this, your smart-app boots in cluster-mode automatically.
|
|
|
98
99
|
|
|
99
100
|
---
|
|
100
101
|
|
|
102
|
+
## Plaintext transport: HTTPS by default, one explicit opt-in
|
|
103
|
+
|
|
104
|
+
The CLI mints and carries credentials (`hsuite init`, `hsuite subscribe`), so it
|
|
105
|
+
does not talk plaintext `http://` to a public host. Every command that takes a
|
|
106
|
+
`--server` / `--gateway` — or reaches the validator through
|
|
107
|
+
`_lib/subscription-client.ts` — routes through ONE resolver
|
|
108
|
+
(`src/_lib/transport.ts`); no call site derives the flag from the URL scheme.
|
|
109
|
+
|
|
110
|
+
| Target | Behaviour |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `https://…` | Accepted |
|
|
113
|
+
| `http://localhost`, `http://127.0.0.1`, `http://[::1]` | Accepted — the local-dev flow needs no flag |
|
|
114
|
+
| `http://<cluster-service>.svc[.cluster.local]` | Deferred to the SDK transport policy (which admits it) |
|
|
115
|
+
| any other `http://…` | **Refused** before the client is built |
|
|
116
|
+
|
|
117
|
+
A refusal names the opt-in:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
✗ refusing to send credentials over plaintext http:// to gateway.example.com: the
|
|
121
|
+
smart-engines transport policy admits plain http:// only toward an in-cluster
|
|
122
|
+
service name (*.svc, *.cluster.local). Use https://, or re-run with --insecure
|
|
123
|
+
(or HSUITE_ALLOW_INSECURE=1) to allow it — local development only.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The opt-in is one mechanism, either spelling:
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
hsuite --insecure deploy --manifest ./app.json # global flag, before or after the subcommand
|
|
130
|
+
HSUITE_ALLOW_INSECURE=1 hsuite deploy --manifest ./app.json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
It is global (`--insecure` is registered once on the root program, not per
|
|
134
|
+
command) and applies to every command in the same invocation. The flag sets
|
|
135
|
+
`HSUITE_ALLOW_INSECURE=1`; only the exact value `1` counts. Use it only against
|
|
136
|
+
a host you operate yourself.
|
|
137
|
+
|
|
101
138
|
## Deployment commands
|
|
102
139
|
|
|
103
140
|
Eight commands take a smart-app from a manifest to a running, manageable
|
|
@@ -110,10 +147,11 @@ deployment on the cluster. They all share base flags:
|
|
|
110
147
|
| `--app-id <id>` | `DEPLOYED_APP_ID` → `SUBSCRIPTION_APP_ID` | App to act on |
|
|
111
148
|
|
|
112
149
|
Every command constructs exactly **one** `BaasClient`
|
|
113
|
-
(`{ hostUrl, appId, pathPrefix: '/host', allowInsecure, timeout }
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
150
|
+
(`{ hostUrl, appId, pathPrefix: '/host', allowInsecure, timeout }`, where
|
|
151
|
+
`allowInsecure` comes from the shared resolver above — `undefined` unless the
|
|
152
|
+
target is loopback or opted in) and authenticates it with the env XRPL signer —
|
|
153
|
+
connecting straight to the public round-robin gateway (no cluster-discovery
|
|
154
|
+
factory, whose per-cluster hostnames aren't reachable from a dev machine).
|
|
117
155
|
|
|
118
156
|
### The manifest (one canonical shape)
|
|
119
157
|
|
|
@@ -165,8 +203,8 @@ same set the smart-app's env schema reads (`XRPL_*`, `SUBSCRIPTION_APP_ID`,
|
|
|
165
203
|
deploy-time / CLI-only knobs (e.g. `SUBSCRIPTION_NFT_SERIAL`, `VALIDATOR_API_KEY`)
|
|
166
204
|
are **not** forwarded. The list lives in
|
|
167
205
|
`packages/hsuite-cli/src/_lib/runtime-env.ts` (`RUNTIME_ENV_KEYS`), mirroring the
|
|
168
|
-
smart-app schema (`
|
|
169
|
-
|
|
206
|
+
smart-app schema (`smart-app/src/config/env-validation.ts` in the
|
|
207
|
+
`HSuiteNetwork/showcase-smart-app` repo).
|
|
170
208
|
|
|
171
209
|
**Precedence:** the forwarded `.env.local` values are the base;
|
|
172
210
|
**`manifest.backend.env` is overlaid last and WINS** for any key it sets. Use
|
|
@@ -263,6 +301,17 @@ The `strategy` field on the manifest/deploy request is **advisory**: a
|
|
|
263
301
|
`recreate` request is coerced to `RollingUpdate` for multi-replica apps (with a
|
|
264
302
|
warning).
|
|
265
303
|
|
|
304
|
+
### Image-hygiene gate (HSUITEPT-5)
|
|
305
|
+
|
|
306
|
+
Right after `docker build` — and before any tag / login / push, also with
|
|
307
|
+
`--skip-build` — `hsuite deploy` scans the built image's compiled output
|
|
308
|
+
(`dist/`, `build/`, `lib/` under the image `WorkingDir`) and **aborts** if it
|
|
309
|
+
ships `.map`, `.d.ts` or `.tsbuildinfo` files: a pentest pulled a customer image
|
|
310
|
+
whose `dist/` read like source. Not skippable. Build the backend with
|
|
311
|
+
`sourceMap` / `declaration` off and `removeComments` on (a production tsconfig),
|
|
312
|
+
or keep those files out of the image (`.dockerignore`). `node_modules/` is never
|
|
313
|
+
scanned.
|
|
314
|
+
|
|
266
315
|
### `hsuite deploy` — THE canonical deploy path
|
|
267
316
|
|
|
268
317
|
`hsuite deploy --manifest <file>` is the **single, canonical path** to deploy a
|
|
@@ -403,7 +452,8 @@ hsuite subscribe --env .env.local --tier builder
|
|
|
403
452
|
## Companion packages
|
|
404
453
|
|
|
405
454
|
- **[`@hsuite/smart-engines-sdk`](https://www.npmjs.com/package/@hsuite/smart-engines-sdk)** — the underlying SDK that `hsuite` wraps. Use it directly when you need finer-grained control over auth, BaaS calls, or chain operations.
|
|
406
|
-
- **[
|
|
455
|
+
- **[showcase-smart-app](https://github.com/HSuiteNetwork/showcase-smart-app)** — a reference NestJS backend + Ionic dApp that demonstrate the full integration.
|
|
456
|
+
- **[boilerplate-smart-app](https://github.com/HSuiteNetwork/boilerplate-smart-app)** — the fork-and-go starting point for a new smart-app.
|
|
407
457
|
|
|
408
458
|
---
|
|
409
459
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canned answers for the image-hygiene gate legs every `buildAndPush` runs
|
|
3
|
+
* (HSUITEPT-5): `docker inspect` → WorkingDir, `docker create` → container id,
|
|
4
|
+
* `docker cp` → the current {@link hygieneTar}, `docker rm` → nothing.
|
|
5
|
+
*
|
|
6
|
+
* Fold into any fake `execFileSync` / `runFn` as its fallthrough
|
|
7
|
+
* (`return hygieneLeg(file, args)`), so the gate sees a CLEAN image by default
|
|
8
|
+
* and the suite under test keeps asserting only its own legs. Plant an
|
|
9
|
+
* offending file with `hygieneTar = tarWith('dist/main.js.map')`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const HYGIENE_CID: string;
|
|
12
|
+
/** Empty archive = clean image. Reassign per test; reset in `beforeEach` where it matters. */
|
|
13
|
+
export declare let hygieneTar: Buffer;
|
|
14
|
+
export declare function setHygieneTar(tar: Buffer): void;
|
|
15
|
+
export declare function hygieneLeg(file: string, args: string[]): unknown;
|
|
16
|
+
/** One-entry ustar archive (enough to plant an offending file). */
|
|
17
|
+
export declare function tarWith(name: string): Buffer;
|
|
18
|
+
//# sourceMappingURL=fixtures-image-hygiene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures-image-hygiene.d.ts","sourceRoot":"","sources":["../../../src/__tests__/helpers/fixtures-image-hygiene.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,QAAiB,CAAC;AAE1C,8FAA8F;AAC9F,eAAO,IAAI,UAAU,EAAE,MAA2B,CAAC;AAEnD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAMhE;AAED,mEAAmE;AACnE,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM5C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hygieneTar = exports.HYGIENE_CID = void 0;
|
|
4
|
+
exports.setHygieneTar = setHygieneTar;
|
|
5
|
+
exports.hygieneLeg = hygieneLeg;
|
|
6
|
+
exports.tarWith = tarWith;
|
|
7
|
+
/**
|
|
8
|
+
* Canned answers for the image-hygiene gate legs every `buildAndPush` runs
|
|
9
|
+
* (HSUITEPT-5): `docker inspect` → WorkingDir, `docker create` → container id,
|
|
10
|
+
* `docker cp` → the current {@link hygieneTar}, `docker rm` → nothing.
|
|
11
|
+
*
|
|
12
|
+
* Fold into any fake `execFileSync` / `runFn` as its fallthrough
|
|
13
|
+
* (`return hygieneLeg(file, args)`), so the gate sees a CLEAN image by default
|
|
14
|
+
* and the suite under test keeps asserting only its own legs. Plant an
|
|
15
|
+
* offending file with `hygieneTar = tarWith('dist/main.js.map')`.
|
|
16
|
+
*/
|
|
17
|
+
exports.HYGIENE_CID = 'c'.repeat(64);
|
|
18
|
+
/** Empty archive = clean image. Reassign per test; reset in `beforeEach` where it matters. */
|
|
19
|
+
exports.hygieneTar = Buffer.alloc(1024);
|
|
20
|
+
function setHygieneTar(tar) {
|
|
21
|
+
exports.hygieneTar = tar;
|
|
22
|
+
}
|
|
23
|
+
function hygieneLeg(file, args) {
|
|
24
|
+
if (file !== 'docker')
|
|
25
|
+
return undefined;
|
|
26
|
+
if (args[0] === 'inspect')
|
|
27
|
+
return '/app\n';
|
|
28
|
+
if (args[0] === 'create')
|
|
29
|
+
return `${exports.HYGIENE_CID}\n`;
|
|
30
|
+
if (args[0] === 'cp')
|
|
31
|
+
return exports.hygieneTar;
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
/** One-entry ustar archive (enough to plant an offending file). */
|
|
35
|
+
function tarWith(name) {
|
|
36
|
+
const header = Buffer.alloc(512);
|
|
37
|
+
header.write(name, 0, 100, 'utf8');
|
|
38
|
+
header.write('00000000000\0', 124, 12, 'ascii');
|
|
39
|
+
header.write('0', 156, 1, 'ascii');
|
|
40
|
+
return Buffer.concat([header, Buffer.alloc(1024)]);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=fixtures-image-hygiene.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures-image-hygiene.js","sourceRoot":"","sources":["../../../src/__tests__/helpers/fixtures-image-hygiene.ts"],"names":[],"mappings":";;;AAeA,sCAEC;AAED,gCAMC;AAGD,0BAMC;AAlCD;;;;;;;;;GASG;AACU,QAAA,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE1C,8FAA8F;AACnF,QAAA,UAAU,GAAW,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAEnD,SAAgB,aAAa,CAAC,GAAW;IACvC,kBAAU,GAAG,GAAG,CAAC;AACnB,CAAC;AAED,SAAgB,UAAU,CAAC,IAAY,EAAE,IAAc;IACrD,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC3C,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;QAAE,OAAO,GAAG,mBAAW,IAAI,CAAC;IACpD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;QAAE,OAAO,kBAAU,CAAC;IACxC,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,mEAAmE;AACnE,SAAgB,OAAO,CAAC,IAAY;IAClC,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IACnC,MAAM,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
package/dist/_lib/baas.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaasClient } from '@hsuite/smart-engines-sdk';
|
|
2
2
|
import type { EnvMap } from './env';
|
|
3
|
+
import type { RunFn } from './run-fn';
|
|
3
4
|
/** Default per-app deploy timeout — `init` runs the smart-app entity DKG ceremony. */
|
|
4
5
|
export declare const DEFAULT_DEPLOY_TIMEOUT_MS = 240000;
|
|
5
6
|
/**
|
|
@@ -18,23 +19,11 @@ export type RegistryCreds = {
|
|
|
18
19
|
repository: string;
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
-
* `
|
|
23
|
-
*
|
|
24
|
-
* The return value MATTERS for stdout-capturing invocations (the `docker push`
|
|
25
|
-
* and `docker inspect` legs in {@link buildAndPush}): `execFileSync` returns the
|
|
26
|
-
* child's stdout, and with `encoding: 'utf8'` that is a `string`. We parse the
|
|
27
|
-
* push summary / `RepoDigests` out of it to recover the pushed manifest digest.
|
|
28
|
-
* Legs run with inherited stdio (build/tag/login) return nothing meaningful.
|
|
29
|
-
* Unit tests supply a fake that returns canned push/inspect stdout.
|
|
22
|
+
* The shell-out seam. Declared in `./run-fn` so `image-hygiene.ts` can take it
|
|
23
|
+
* without importing this module back (dependency-cruiser `no-circular`), and
|
|
24
|
+
* re-exported here because every existing caller imports it from `baas`.
|
|
30
25
|
*/
|
|
31
|
-
export type RunFn
|
|
32
|
-
input?: string;
|
|
33
|
-
stdio?: unknown;
|
|
34
|
-
env?: NodeJS.ProcessEnv;
|
|
35
|
-
cwd?: string;
|
|
36
|
-
encoding?: BufferEncoding;
|
|
37
|
-
}) => unknown;
|
|
26
|
+
export type { RunFn } from './run-fn';
|
|
38
27
|
export type ConnectAndAuthOpts = {
|
|
39
28
|
/** Public gateway/host URL. */
|
|
40
29
|
gateway: string;
|
|
@@ -51,7 +40,7 @@ export type ConnectAndAuthOpts = {
|
|
|
51
40
|
clientFactory?: (config: {
|
|
52
41
|
hostUrl: string;
|
|
53
42
|
appId: string;
|
|
54
|
-
allowInsecure: boolean;
|
|
43
|
+
allowInsecure: boolean | undefined;
|
|
55
44
|
pathPrefix: string;
|
|
56
45
|
timeout: number;
|
|
57
46
|
}) => BaasClient;
|
|
@@ -88,6 +77,8 @@ export type BuildAndPushOpts = {
|
|
|
88
77
|
platform?: string;
|
|
89
78
|
/** Test seam — defaults to `execFileSync`. */
|
|
90
79
|
runFn?: RunFn;
|
|
80
|
+
/** Progress sink for the image-hygiene gate (defaults to silent). */
|
|
81
|
+
log?: (message: string) => void;
|
|
91
82
|
/** Push retry attempts (round-robin robot-auth can need a couple). Default 6. */
|
|
92
83
|
pushAttempts?: number;
|
|
93
84
|
/**
|
|
@@ -125,6 +116,10 @@ export declare function imageTarget(registry: RegistryCreds, tag: string): strin
|
|
|
125
116
|
* - optional `<build>` (shell command) in `context`
|
|
126
117
|
* - `docker build --platform linux/amd64 --provenance=false --sbom=false
|
|
127
118
|
* -t hsuite-local/<name>:<tag> -f <dockerfile> <context>`
|
|
119
|
+
* - image-hygiene gate ({@link assertImageHygiene}, HSUITEPT-5): the built
|
|
120
|
+
* image's compiled output must ship no source maps / declarations — runs
|
|
121
|
+
* even with `--skip-build` (the image is about to be deployed either way)
|
|
122
|
+
* and ABORTS before any tag / login / push
|
|
128
123
|
* - `docker tag <local> <server>/<repo>:<tag>`
|
|
129
124
|
* - `docker login <server> -u <username> --password-stdin` ← username a
|
|
130
125
|
* DISCRETE argv element; password on stdin
|
package/dist/_lib/baas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baas.d.ts","sourceRoot":"","sources":["../../src/_lib/baas.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,KAAK,EAAE,MAA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HANGED
|
@@ -55,6 +55,8 @@ const child_process_1 = require("child_process");
|
|
|
55
55
|
const smart_engines_sdk_1 = require("@hsuite/smart-engines-sdk");
|
|
56
56
|
const env_1 = require("./env");
|
|
57
57
|
const docker_1 = require("./docker");
|
|
58
|
+
const image_hygiene_1 = require("./image-hygiene");
|
|
59
|
+
const transport_1 = require("./transport");
|
|
58
60
|
/** Default per-app deploy timeout — `init` runs the smart-app entity DKG ceremony. */
|
|
59
61
|
exports.DEFAULT_DEPLOY_TIMEOUT_MS = 240_000;
|
|
60
62
|
/**
|
|
@@ -75,7 +77,7 @@ async function connectAndAuth(opts) {
|
|
|
75
77
|
const config = {
|
|
76
78
|
hostUrl: opts.gateway,
|
|
77
79
|
appId: opts.appId ?? 'pending',
|
|
78
|
-
allowInsecure: opts.gateway
|
|
80
|
+
allowInsecure: (0, transport_1.resolveAllowInsecure)(opts.gateway),
|
|
79
81
|
pathPrefix: '/host',
|
|
80
82
|
timeout: opts.timeout ?? exports.DEFAULT_DEPLOY_TIMEOUT_MS,
|
|
81
83
|
};
|
|
@@ -104,6 +106,10 @@ function imageTarget(registry, tag) {
|
|
|
104
106
|
* - optional `<build>` (shell command) in `context`
|
|
105
107
|
* - `docker build --platform linux/amd64 --provenance=false --sbom=false
|
|
106
108
|
* -t hsuite-local/<name>:<tag> -f <dockerfile> <context>`
|
|
109
|
+
* - image-hygiene gate ({@link assertImageHygiene}, HSUITEPT-5): the built
|
|
110
|
+
* image's compiled output must ship no source maps / declarations — runs
|
|
111
|
+
* even with `--skip-build` (the image is about to be deployed either way)
|
|
112
|
+
* and ABORTS before any tag / login / push
|
|
107
113
|
* - `docker tag <local> <server>/<repo>:<tag>`
|
|
108
114
|
* - `docker login <server> -u <username> --password-stdin` ← username a
|
|
109
115
|
* DISCRETE argv element; password on stdin
|
|
@@ -187,6 +193,12 @@ function buildAndPush(opts) {
|
|
|
187
193
|
env: dockerEnv,
|
|
188
194
|
});
|
|
189
195
|
}
|
|
196
|
+
// HSUITEPT-5: never push (or deploy an already-pushed) image whose compiled
|
|
197
|
+
// output reads like source. Throws `ImageHygieneError` with the offending
|
|
198
|
+
// entries; nothing below runs. Not skippable — this is the platform-owned
|
|
199
|
+
// choke point for customer image hygiene, and app-side build config is
|
|
200
|
+
// never relied on.
|
|
201
|
+
(0, image_hygiene_1.assertImageHygiene)({ image: localTag, run, env: dockerEnv, log: opts.log });
|
|
190
202
|
// #1679: aim the whole docker sequence at ONE origin when the caller resolved
|
|
191
203
|
// a pin. `opts.registry` itself is left alone — see `pushHost`'s docblock for
|
|
192
204
|
// why collapsing it breaks the downstream fan-out.
|
package/dist/_lib/baas.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baas.js","sourceRoot":"","sources":["../../src/_lib/baas.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"baas.js","sourceRoot":"","sources":["../../src/_lib/baas.ts"],"names":[],"mappings":";;;AA6GA,wCAiBC;AAyDD,kCAEC;AAwCD,oCAmIC;AAyED,kCAIC;AAjbD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,iDAA6C;AAC7C,iEAAuD;AAEvD,+BAA2C;AAC3C,qCAAkE;AAElE,mDAAqD;AACrD,2CAAmD;AAEnD,sFAAsF;AACzE,QAAA,yBAAyB,GAAG,OAAO,CAAC;AAEjD;;;;;;GAMG;AACU,QAAA,sBAAsB,GAAG,aAAa,CAAC;AAuCpD;;;;GAIG;AACI,KAAK,UAAU,cAAc,CAAC,IAAwB;IAC3D,MAAM,MAAM,GAAG,IAAA,wBAAkB,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG;QACb,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,SAAS;QAC9B,aAAa,EAAE,IAAA,gCAAoB,EAAC,IAAI,CAAC,OAAO,CAAC;QACjD,UAAU,EAA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|
|
58
58
|
runtimeState?: string;
|
|
59
|
+
/**
|
|
60
|
+
* #2927 — replica count as THIS cluster's k8s ACTUALLY has running, per its
|
|
61
|
+
* own runtime record. This is the field the testnet incident exposed: the
|
|
62
|
+
* round-robin `hsuite status` reported `replicas=1` while sn2 was at 0 for
|
|
63
|
+
* hours — a per-cluster read is what makes that divergence visible instead
|
|
64
|
+
* of averaged away by whichever cluster answered the round-robin call.
|
|
65
|
+
*/
|
|
66
|
+
replicas?: number;
|
|
59
67
|
/** Image ref THIS cluster has pinned — the field that exposes the divergence. */
|
|
60
68
|
image?: string;
|
|
61
69
|
/** This cluster's own reconcile error (carries the digest MISMATCH text). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluster-convergence.d.ts","sourceRoot":"","sources":["../../src/_lib/cluster-convergence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,mBAAmB,CAAC;AAK3B,8CAA8C;AAC9C,MAAM,MAAM,yBAAyB,GAAG;IACtC,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,0FAA0F;IAC1F,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,oEAAoE;IACpE,SAAS,EAAE,OAAO,CAAC;IACnB,wDAAwD;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,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H,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,wBAAwB,GAC7B,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAUtC;AA+HD,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,mFAAmF;IACnF,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;;;OAOG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,yBAAyB,EAAE,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,GAAG,IAAI,CA0DvE;AAED,MAAM,MAAM,6BAA6B,GAAG,wBAAwB,GAAG;IACrE,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAqDtC"}
|
|
@@ -145,6 +145,8 @@ async function probeOne(ip, opts) {
|
|
|
145
145
|
obs.runtimeState = body.runtime.runtimeState;
|
|
146
146
|
if (body.runtime?.lastError)
|
|
147
147
|
obs.lastError = body.runtime.lastError;
|
|
148
|
+
if (typeof body.runtime?.replicas === 'number')
|
|
149
|
+
obs.replicas = body.runtime.replicas;
|
|
148
150
|
return obs;
|
|
149
151
|
}
|
|
150
152
|
catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluster-convergence.js","sourceRoot":"","sources":["../../src/_lib/cluster-convergence.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"cluster-convergence.js","sourceRoot":"","sources":["../../src/_lib/cluster-convergence.ts"],"names":[],"mappings":";;AA+IA,oDAYC;AA4LD,0DA0DC;AAkCD,8DAuDC;AA1eD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,uDAS2B;AAE3B,4FAA4F;AAC5F,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAsEjC;;;;;;;;;;;;;;;GAeG;AACI,KAAK,UAAU,oBAAoB,CACxC,IAA8B;IAE9B,MAAM,IAAI,GAAG,IAAA,gCAAc,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAA,kCAAgB,EAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,0CAAwB,CAAC;IAE7D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,IAAA,yCAAuB,EAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEzF,OAAO,OAAO,CAAC,GAAG,CAChB,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC,CACvE,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,QAAQ,CACrB,EAAU,EACV,IAAoF;IAEpF,MAAM,IAAI,GAAG,CAAC,GAAoB,EAA6B,EAAE,CAC/D,IAAA,oCAA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AAI,CAAC,CAA4B;IACxC,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACpD,4CAA4C;IAC5C,MAAM,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,+BAA+B,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACxE,OAAO,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC;AACzE,CAAC;AAED,6DAA6D;AAC7D,SAAS,SAAS,CAAC,GAAqB;IACtC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/_lib/cluster.d.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Public SDK-bootstrap host for the Smart Engines network the CLI targets.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* `
|
|
6
|
-
*
|
|
4
|
+
* Resolved from the `HSUITE_NETWORK` env var (via the SDK's
|
|
5
|
+
* `networkFromEnv`) — defaults to testnet, the only live public network
|
|
6
|
+
* today, when unset or set to an unknown name. This is the SAME `network`
|
|
7
|
+
* axis the SDK's `network-presets.ts` documents (which HSUITE cluster/
|
|
8
|
+
* gateway to talk to); it is UNRELATED to `hsuite init --network`, which
|
|
9
|
+
* picks the XRPL chain (testnet | devnet) the faucet funds from.
|
|
7
10
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
11
|
+
* Resolved ONCE at module load, so this only sees a REAL environment
|
|
12
|
+
* variable — shell-exported, or otherwise present in `process.env` before
|
|
13
|
+
* the CLI process starts. `index.ts`'s `dotenv.config()` call runs AFTER
|
|
14
|
+
* every command module (including this one, transitively) has already been
|
|
15
|
+
* imported, so a `.env`-file-only `HSUITE_NETWORK` is too late to affect
|
|
16
|
+
* this constant. `hsuite init --hsuite-network <name>` resolves at ACTION
|
|
17
|
+
* time instead (after dotenv has run), so it sees both sources — see
|
|
18
|
+
* `commands/init.ts`.
|
|
12
19
|
*/
|
|
13
|
-
|
|
14
|
-
export declare const DEFAULT_GATEWAY = "https://gateway.testnet.hsuite.network";
|
|
20
|
+
export declare const DEFAULT_GATEWAY: string;
|
|
15
21
|
//# sourceMappingURL=cluster.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluster.d.ts","sourceRoot":"","sources":["../../src/_lib/cluster.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cluster.d.ts","sourceRoot":"","sources":["../../src/_lib/cluster.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,eAAe,EAAE,MACuC,CAAC"}
|
package/dist/_lib/cluster.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_GATEWAY = void 0;
|
|
2
4
|
/**
|
|
3
5
|
* Cluster bootstrap constants.
|
|
4
6
|
*
|
|
@@ -11,8 +13,25 @@
|
|
|
11
13
|
* `@hsuite/smart-engines-sdk`; the CLI consumes that factory rather than
|
|
12
14
|
* maintaining a parallel discovery path.
|
|
13
15
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const smart_engines_sdk_1 = require("@hsuite/smart-engines-sdk");
|
|
17
|
+
/**
|
|
18
|
+
* Public SDK-bootstrap host for the Smart Engines network the CLI targets.
|
|
19
|
+
*
|
|
20
|
+
* Resolved from the `HSUITE_NETWORK` env var (via the SDK's
|
|
21
|
+
* `networkFromEnv`) — defaults to testnet, the only live public network
|
|
22
|
+
* today, when unset or set to an unknown name. This is the SAME `network`
|
|
23
|
+
* axis the SDK's `network-presets.ts` documents (which HSUITE cluster/
|
|
24
|
+
* gateway to talk to); it is UNRELATED to `hsuite init --network`, which
|
|
25
|
+
* picks the XRPL chain (testnet | devnet) the faucet funds from.
|
|
26
|
+
*
|
|
27
|
+
* Resolved ONCE at module load, so this only sees a REAL environment
|
|
28
|
+
* variable — shell-exported, or otherwise present in `process.env` before
|
|
29
|
+
* the CLI process starts. `index.ts`'s `dotenv.config()` call runs AFTER
|
|
30
|
+
* every command module (including this one, transitively) has already been
|
|
31
|
+
* imported, so a `.env`-file-only `HSUITE_NETWORK` is too late to affect
|
|
32
|
+
* this constant. `hsuite init --hsuite-network <name>` resolves at ACTION
|
|
33
|
+
* time instead (after dotenv has run), so it sees both sources — see
|
|
34
|
+
* `commands/init.ts`.
|
|
35
|
+
*/
|
|
36
|
+
exports.DEFAULT_GATEWAY = smart_engines_sdk_1.KNOWN_NETWORKS[(0, smart_engines_sdk_1.networkFromEnv)(undefined, process.env)].bootstrap[0];
|
|
18
37
|
//# sourceMappingURL=cluster.js.map
|
package/dist/_lib/cluster.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cluster.js","sourceRoot":"","sources":["../../src/_lib/cluster.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cluster.js","sourceRoot":"","sources":["../../src/_lib/cluster.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;GAWG;AACH,iEAA2E;AAE3E;;;;;;;;;;;;;;;;;;GAkBG;AACU,QAAA,eAAe,GAC1B,kCAAc,CAAC,IAAA,kCAAc,EAAC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/_lib/framework.js
CHANGED
|
@@ -15,8 +15,8 @@ exports.resolveSdkVersion = resolveSdkVersion;
|
|
|
15
15
|
*
|
|
16
16
|
* Detection is dependency-driven (reads the project's `package.json`), matching
|
|
17
17
|
* the real showcase apps:
|
|
18
|
-
* - backend (`
|
|
19
|
-
* - frontend (`
|
|
18
|
+
* - backend (`smart-app/` in showcase-smart-app): `@hsuite/smart-engines-sdk` + `@nestjs/core`
|
|
19
|
+
* - frontend (`ionic-dapp/` in showcase-smart-app): `@hsuite/native-connect-*` + `@ionic/angular`
|
|
20
20
|
*
|
|
21
21
|
* This module is PURE I/O-at-the-edge: it reads one file and classifies. No
|
|
22
22
|
* network, no clock.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { RunFn } from './run-fn';
|
|
2
|
+
/** Compiled-output directories a smart-app image conventionally ships under its `WorkingDir`. */
|
|
3
|
+
export declare const IMAGE_HYGIENE_SCAN_DIRS: readonly ["dist", "build", "lib"];
|
|
4
|
+
/** Entry suffixes that must never ship in a customer image. */
|
|
5
|
+
export declare const IMAGE_HYGIENE_FORBIDDEN_SUFFIXES: readonly [".map", ".d.ts", ".tsbuildinfo"];
|
|
6
|
+
/** Thrown when the built image ships source maps / declarations. `violations` lists every entry. */
|
|
7
|
+
export declare class ImageHygieneError extends Error {
|
|
8
|
+
readonly image: string;
|
|
9
|
+
readonly violations: string[];
|
|
10
|
+
constructor(image: string, violations: string[]);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Entry names of a (ustar / PAX / GNU) tar archive. Contents are skipped by
|
|
14
|
+
* size; only names are returned. Tolerant: stops at the first zero block or a
|
|
15
|
+
* truncated header, so a non-archive buffer yields `[]`.
|
|
16
|
+
*/
|
|
17
|
+
export declare function listTarEntries(tar: Buffer): string[];
|
|
18
|
+
/** Entries that must never ship in a customer image. */
|
|
19
|
+
export declare function findImageHygieneViolations(entries: readonly string[]): string[];
|
|
20
|
+
export type AssertImageHygieneOpts = {
|
|
21
|
+
/** Local image ref to scan (the freshly built `hsuite-local/<name>:<tag>`). */
|
|
22
|
+
image: string;
|
|
23
|
+
/** `execFileSync`-shaped seam (see {@link RunFn}). */
|
|
24
|
+
run: RunFn;
|
|
25
|
+
/** Env threaded to every docker leg (carries `DOCKER_HOST`). */
|
|
26
|
+
env: NodeJS.ProcessEnv;
|
|
27
|
+
/** Progress / warning sink. */
|
|
28
|
+
log?: (message: string) => void;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Scan the built image's compiled output and THROW {@link ImageHygieneError}
|
|
32
|
+
* if it ships source maps, declaration files or tsbuildinfo. See the module
|
|
33
|
+
* header for the mechanism and the fail-closed contract.
|
|
34
|
+
*/
|
|
35
|
+
export declare function assertImageHygiene(opts: AssertImageHygieneOpts): void;
|
|
36
|
+
//# sourceMappingURL=image-hygiene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-hygiene.d.ts","sourceRoot":"","sources":["../../src/_lib/image-hygiene.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,iGAAiG;AACjG,eAAO,MAAM,uBAAuB,mCAAoC,CAAC;AAEzE,+DAA+D;AAC/D,eAAO,MAAM,gCAAgC,4CAA6C,CAAC;AAqB3F,oGAAoG;AACpG,qBAAa,iBAAkB,SAAQ,KAAK;IAExC,QAAQ,CAAC,KAAK,EAAE,MAAM;IACtB,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE;gBADpB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAAE;CAWhC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CA0BpD;AAED,wDAAwD;AACxD,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAE/E;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,GAAG,EAAE,KAAK,CAAC;IACX,gEAAgE;IAChE,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAyCrE"}
|