@dbos-inc/dbos-sdk 1.20.12-preview.g6123518221 → 1.20.14-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/dbos-runtime/cli.d.ts.map +1 -1
- package/dist/src/dbos-runtime/cli.js +1 -4
- package/dist/src/dbos-runtime/cli.js.map +1 -1
- package/dist/src/dbos-runtime/config.d.ts +12 -1
- package/dist/src/dbos-runtime/config.d.ts.map +1 -1
- package/dist/src/dbos-runtime/config.js +33 -9
- package/dist/src/dbos-runtime/config.js.map +1 -1
- package/dist/src/dbos-runtime/configure.js +5 -5
- package/dist/src/dbos-runtime/configure.js.map +1 -1
- package/dist/src/dbos-runtime/migrate.d.ts.map +1 -1
- package/dist/src/dbos-runtime/migrate.js +0 -4
- package/dist/src/dbos-runtime/migrate.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAuD,MAAM,UAAU,CAAC;AAK3F,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAcjD,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAwKD,wBAAsB,SAAS,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAuD,MAAM,UAAU,CAAC;AAK3F,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAcjD,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAwKD,wBAAsB,SAAS,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,iBAwBjH"}
|
@@ -158,11 +158,8 @@ if (!process.argv.slice(2).length) {
|
|
158
158
|
//Finally, terminates the program with the exit code.
|
159
159
|
async function runAndLog(action) {
|
160
160
|
let logger = new logs_1.GlobalLogger();
|
161
|
+
const _ = (0, config_1.parseConfigFile)(); // Validate config file
|
161
162
|
const configFile = (0, config_1.loadConfigFile)(config_1.dbosConfigFilePath);
|
162
|
-
if (!configFile) {
|
163
|
-
logger.error(`Failed to parse ${config_1.dbosConfigFilePath}`);
|
164
|
-
process.exit(1);
|
165
|
-
}
|
166
163
|
let terminate = undefined;
|
167
164
|
if (configFile.telemetry?.OTLPExporter) {
|
168
165
|
logger = new logs_1.GlobalLogger(new collector_1.TelemetryCollector(new exporters_1.TelemetryExporter(configFile.telemetry.OTLPExporter)), configFile.telemetry?.logs);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cli.js","s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AAU,CAAC,CAAC;AACxB,CAAC;AAxBD,8BAwBC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { DBOSConfig } from "../dbos-executor";
|
2
2
|
import { PoolConfig } from "pg";
|
3
|
+
import YAML from "yaml";
|
3
4
|
import { DBOSRuntimeConfig } from "./runtime";
|
4
5
|
import { UserDatabaseName } from "../user_database";
|
5
6
|
import { TelemetryConfig } from "../telemetry";
|
@@ -32,8 +33,18 @@ export interface ConfigFile {
|
|
32
33
|
runtimeConfig?: DBOSRuntimeConfig;
|
33
34
|
}
|
34
35
|
export declare function substituteEnvVars(content: string): string;
|
36
|
+
/**
|
37
|
+
* Loads config file as a ConfigFile.
|
38
|
+
* @param {string} configFilePath - The path to the config file to be loaded.
|
39
|
+
* @returns
|
40
|
+
*/
|
35
41
|
export declare function loadConfigFile(configFilePath: string): ConfigFile;
|
36
|
-
|
42
|
+
/**
|
43
|
+
* Writes a YAML.Document object to configFilePath.
|
44
|
+
* @param {YAML.Document} configFile - The config file to be written.
|
45
|
+
* @param {string} configFilePath - The path to the config file to be written to.
|
46
|
+
*/
|
47
|
+
export declare function writeConfigFile(configFile: YAML.Document, configFilePath: string): void;
|
37
48
|
export declare function constructPoolConfig(configFile: ConfigFile): PoolConfig;
|
38
49
|
export interface ParseOptions {
|
39
50
|
port?: number;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,IAAI,MAAM,MAAM,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IG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,QAWhF;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,cA6BzD;AAgBD,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAMD,wBAAgB,eAAe,CAAC,UAAU,CAAC,EAAE,YAAY,EAAE,QAAQ,GAAE,OAAe,GAAG,CAAC,UAAU,EAAE,iBAAiB,CAAC,CA8FrH"}
|
@@ -12,6 +12,7 @@ const user_database_1 = require("../user_database");
|
|
12
12
|
const fs_1 = require("fs");
|
13
13
|
const ajv_1 = __importDefault(require("ajv"));
|
14
14
|
const path_1 = __importDefault(require("path"));
|
15
|
+
const validator_1 = __importDefault(require("validator"));
|
15
16
|
exports.dbosConfigFilePath = "dbos-config.yaml";
|
16
17
|
const dbosConfigSchemaPath = path_1.default.join((0, utils_1.findPackageRoot)(__dirname), 'dbos-config.schema.json');
|
17
18
|
const dbosConfigSchema = utils_1.DBOSJSON.parse((0, utils_1.readFileSync)(dbosConfigSchemaPath));
|
@@ -28,6 +29,11 @@ function substituteEnvVars(content) {
|
|
28
29
|
});
|
29
30
|
}
|
30
31
|
exports.substituteEnvVars = substituteEnvVars;
|
32
|
+
/**
|
33
|
+
* Loads config file as a ConfigFile.
|
34
|
+
* @param {string} configFilePath - The path to the config file to be loaded.
|
35
|
+
* @returns
|
36
|
+
*/
|
31
37
|
function loadConfigFile(configFilePath) {
|
32
38
|
try {
|
33
39
|
const configFileContent = (0, utils_1.readFileSync)(configFilePath);
|
@@ -45,9 +51,14 @@ function loadConfigFile(configFilePath) {
|
|
45
51
|
}
|
46
52
|
}
|
47
53
|
exports.loadConfigFile = loadConfigFile;
|
54
|
+
/**
|
55
|
+
* Writes a YAML.Document object to configFilePath.
|
56
|
+
* @param {YAML.Document} configFile - The config file to be written.
|
57
|
+
* @param {string} configFilePath - The path to the config file to be written to.
|
58
|
+
*/
|
48
59
|
function writeConfigFile(configFile, configFilePath) {
|
49
60
|
try {
|
50
|
-
const configFileContent =
|
61
|
+
const configFileContent = configFile.toString();
|
51
62
|
(0, fs_1.writeFileSync)(configFilePath, configFileContent);
|
52
63
|
}
|
53
64
|
catch (e) {
|
@@ -70,7 +81,7 @@ function constructPoolConfig(configFile) {
|
|
70
81
|
database: configFile.database.app_db_name,
|
71
82
|
};
|
72
83
|
if (!poolConfig.database) {
|
73
|
-
throw new error_1.DBOSInitializationError(`DBOS configuration (
|
84
|
+
throw new error_1.DBOSInitializationError(`DBOS configuration (${exports.dbosConfigFilePath}) does not contain application database name`);
|
74
85
|
}
|
75
86
|
// Details on Postgres SSL/TLS modes: https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-PROTECTION
|
76
87
|
if (configFile.database.ssl === false) {
|
@@ -121,7 +132,7 @@ function parseConfigFile(cliOptions, useProxy = false) {
|
|
121
132
|
}
|
122
133
|
// Database field must exist
|
123
134
|
if (!configFile.database) {
|
124
|
-
throw new error_1.DBOSInitializationError(`DBOS configuration (
|
135
|
+
throw new error_1.DBOSInitializationError(`DBOS configuration (${configFilePath}) does not contain database config`);
|
125
136
|
}
|
126
137
|
// Check for the database password
|
127
138
|
if (!configFile.database.password) {
|
@@ -134,17 +145,20 @@ function parseConfigFile(cliOptions, useProxy = false) {
|
|
134
145
|
configFile.database.password = pgPassword;
|
135
146
|
}
|
136
147
|
else {
|
137
|
-
throw new error_1.DBOSInitializationError(`DBOS configuration (
|
148
|
+
throw new error_1.DBOSInitializationError(`DBOS configuration (${configFilePath}) does not contain database password`);
|
138
149
|
}
|
139
150
|
}
|
140
151
|
}
|
141
|
-
const
|
142
|
-
if (!
|
143
|
-
const errorMessages = prettyPrintAjvErrors(
|
144
|
-
throw new error_1.DBOSInitializationError(
|
152
|
+
const schemaValidator = ajv.compile(dbosConfigSchema);
|
153
|
+
if (!schemaValidator(configFile)) {
|
154
|
+
const errorMessages = prettyPrintAjvErrors(schemaValidator);
|
155
|
+
throw new error_1.DBOSInitializationError(`${configFilePath} failed schema validation. ${errorMessages}`);
|
145
156
|
}
|
146
157
|
if (configFile.language && configFile.language !== "node") {
|
147
|
-
throw new error_1.DBOSInitializationError(
|
158
|
+
throw new error_1.DBOSInitializationError(`${configFilePath} specifies invalid language ${configFile.language}`);
|
159
|
+
}
|
160
|
+
if (!isValidDBname(configFile.database.app_db_name)) {
|
161
|
+
throw new error_1.DBOSInitializationError(`${configFilePath} specifies invalid app_db_name ${configFile.database.app_db_name}. Must be between 3 and 31 characters long and contain only lowercase letters, underscores, and digits (cannot begin with a digit).`);
|
148
162
|
}
|
149
163
|
/*******************************/
|
150
164
|
/* Handle user database config */
|
@@ -204,4 +218,14 @@ function getAppVersion(appVersion) {
|
|
204
218
|
}
|
205
219
|
return process.env.DBOS__APPVERSION;
|
206
220
|
}
|
221
|
+
function isValidDBname(dbName) {
|
222
|
+
if (dbName.length < 3 || dbName.length > 31) {
|
223
|
+
return false;
|
224
|
+
}
|
225
|
+
if (dbName.match(/^\d/)) {
|
226
|
+
// Cannot start with a digit
|
227
|
+
return false;
|
228
|
+
}
|
229
|
+
return validator_1.default.matches(dbName, "^[a-z0-9_]+$");
|
230
|
+
}
|
207
231
|
//# sourceMappingURL=config.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dbos-runtime/config.ts"],"names":[],"mappings":";;;;;;AAAA,oCAAmD;AACnD,oCAAmE;AAGnE,gDAAwB;AACxB,uCAAiE;AACjE,oDAAoD;AAEpD,2BAAmC;AACnC,8CAA4C;AAC5C,gDAAwB;
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/dbos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AE,CAAC;QAAC,OAAO,UAAU,CAAC;IAAC,CAAC;IAC1D,IAAI,UAAU,KAAK,KAAK,EAAE,CAAC;QAAC,OAAO,SAAS,CAAC;IAAC,CAAC;IAC/C,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;AACtC,CAAC;AAED,SAAS,aAAa,CAAC,MAAc;IACnC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QAC5C,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACxB,4BAA4B;QAC5B,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,mBAAS,CAAC,OAAO,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AACnD,CAAC"}
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.configure = void 0;
|
7
7
|
const prompts_1 = require("@inquirer/prompts");
|
8
|
+
const yaml_1 = __importDefault(require("yaml"));
|
8
9
|
const utils_1 = require("../utils");
|
9
10
|
const config_1 = require("./config");
|
10
|
-
const yaml_1 = __importDefault(require("yaml"));
|
11
11
|
async function configure(host, port, username) {
|
12
12
|
const configFileContent = (0, utils_1.readFileSync)(config_1.dbosConfigFilePath);
|
13
|
-
const config = yaml_1.default.
|
13
|
+
const config = yaml_1.default.parseDocument(configFileContent);
|
14
14
|
if (!host) {
|
15
15
|
host = await (0, prompts_1.input)({
|
16
16
|
message: 'What is the hostname of your Postgres server?',
|
@@ -33,9 +33,9 @@ async function configure(host, port, username) {
|
|
33
33
|
default: 'postgres',
|
34
34
|
});
|
35
35
|
}
|
36
|
-
config.database
|
37
|
-
config.database
|
38
|
-
config.database
|
36
|
+
config.setIn(['database', 'hostname'], host);
|
37
|
+
config.setIn(['database', 'port'], port);
|
38
|
+
config.setIn(['database', 'username'], username);
|
39
39
|
(0, config_1.writeConfigFile)(config, config_1.dbosConfigFilePath);
|
40
40
|
}
|
41
41
|
exports.configure = configure;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../../src/dbos-runtime/configure.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA0C;AAC1C,oCAAwC;AACxC,
|
1
|
+
{"version":3,"file":"configure.js","sourceRoot":"","sources":["../../../src/dbos-runtime/configure.ts"],"names":[],"mappings":";;;;;;AAAA,+CAA0C;AAC1C,gDAAwB;AACxB,oCAAwC;AACxC,qCAA+D;AAExD,KAAK,UAAU,SAAS,CAAC,IAAwB,EAAE,IAAwB,EAAE,QAA4B;IAC9G,MAAM,iBAAiB,GAAG,IAAA,oBAAY,EAAC,2BAAkB,CAAC,CAAC;IAC3D,MAAM,MAAM,GAAG,cAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAErD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,MAAM,IAAA,eAAK,EAChB;YACE,OAAO,EAAE,+CAA+C;YACxD,4BAA4B;YAC5B,OAAO,EAAE,WAAW;SACrB,CAAC,CAAC;IACP,CAAC;IAED,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,MAAM,GAAG,MAAM,IAAA,eAAK,EACxB;YACE,OAAO,EAAE,2CAA2C;YACpD,4BAA4B;YAC5B,OAAO,EAAE,MAAM;SAChB,CAAC,CAAC;QACL,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;IAED,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,QAAQ,GAAG,MAAM,IAAA,eAAK,EAAC;YACnB,OAAO,EAAE,iCAAiC;YAC1C,4BAA4B;YAC5B,OAAO,EAAE,UAAU;SACpB,CAAC,CAAC;IACP,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;IAC7C,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC;IAEjD,IAAA,wBAAe,EAAC,MAAM,EAAE,2BAAkB,CAAC,CAAC;AAC9C,CAAC;AApCD,8BAoCC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/migrate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAuB,MAAM,UAAU,CAAC;AAM3D,wBAAsB,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../../src/dbos-runtime/migrate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAuB,MAAM,UAAU,CAAC;AAM3D,wBAAsB,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,kBAwDzE;AAED,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,oBAarF;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,SAqB7E"}
|
@@ -9,10 +9,6 @@ const user_db_schema_1 = require("../../schemas/user_db_schema");
|
|
9
9
|
const system_database_1 = require("../system_database");
|
10
10
|
const user_database_1 = require("../user_database");
|
11
11
|
async function migrate(configFile, logger) {
|
12
|
-
if (!configFile.database.password) {
|
13
|
-
logger.error(`DBOS configuration does not contain database password, please check your config file and retry!`);
|
14
|
-
return 1;
|
15
|
-
}
|
16
12
|
const userDBName = configFile.database.app_db_name;
|
17
13
|
logger.info(`Starting migration: creating database ${userDBName} if it does not exist`);
|
18
14
|
if (!(await checkDatabaseExists(configFile, logger))) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../src/dbos-runtime/migrate.ts"],"names":[],"mappings":";;;AAAA,iDAA2D;AAC3D,4CAAiD;AACjD,qCAA2D;AAC3D,2BAAwC;AACxC,iEAA6F;AAC7F,wDAA2E;AAC3E,oDAA2G;AAEpG,KAAK,UAAU,OAAO,CAAC,UAAsB,EAAE,MAAoB;IACxE,
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../../src/dbos-runtime/migrate.ts"],"names":[],"mappings":";;;AAAA,iDAA2D;AAC3D,4CAAiD;AACjD,qCAA2D;AAC3D,2BAAwC;AACxC,iEAA6F;AAC7F,wDAA2E;AAC3E,oDAA2G;AAEpG,KAAK,UAAU,OAAO,CAAC,UAAsB,EAAE,MAAoB;IACxE,MAAM,UAAU,GAAG,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC;IACnD,MAAM,CAAC,IAAI,CAAC,yCAAyC,UAAU,uBAAuB,CAAC,CAAC;IAExF,IAAI,CAAC,CAAC,MAAM,mBAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;QACrD,MAAM,cAAc,GAAe,IAAA,4BAAmB,EAAC,UAAU,CAAC,CAAA;QAClE,cAAc,CAAC,QAAQ,GAAG,UAAU,CAAA;QACpC,MAAM,cAAc,GAAG,IAAI,WAAM,CAAC,cAAc,CAAC,CAAC;QAClD,IAAI,iBAAiB,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC;YACH,MAAM,cAAc,CAAC,OAAO,EAAE,CAAA;YAC9B,iBAAiB,GAAG,KAAK,CAAC;YAC1B,MAAM,cAAc,CAAC,KAAK,CAAC,mBAAmB,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;QACnF,CAAC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