@sap-ux/environment-check 0.16.86 → 0.17.2

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.
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
22
  __setModuleDefault(result, mod);
23
23
  return result;
24
24
  };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
25
  var __importDefault = (this && this.__importDefault) || function (mod) {
35
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
36
27
  };
@@ -52,42 +43,40 @@ const formatter_1 = require("../formatter");
52
43
  * @param options.targetFileName - optional file name, defaults to project folder + timestamp + .zip
53
44
  * @returns {*} {Promise<{ path: string; size: string }>}
54
45
  */
55
- function archiveProject({ projectRoot, targetFolder, targetFileName }) {
56
- return __awaiter(this, void 0, void 0, function* () {
57
- if (!(0, fs_1.existsSync)(projectRoot)) {
58
- return Promise.reject(new Error((0, i18n_1.t)('error.noProjectRoot', { projectRoot })));
59
- }
60
- const fileList = yield getFileList(projectRoot);
61
- return new Promise((resolve, reject) => {
62
- try {
63
- const zip = archiver.default('zip', { zlib: { level: 9 } });
64
- let targetName = '';
65
- if (typeof targetFileName === 'string') {
66
- targetName = targetFileName.toLocaleLowerCase().endsWith('.zip')
67
- ? targetFileName
68
- : targetFileName + '.zip';
69
- }
70
- else {
71
- targetName = `${(0, path_1.basename)(projectRoot)}-${new Date()
72
- .toISOString()
73
- .replace('T', '')
74
- .replace(':', '')
75
- .substring(0, 14)}.zip`;
76
- }
77
- const targetPath = targetFolder ? (0, path_1.join)(targetFolder, targetName) : (0, path_1.join)((0, path_1.dirname)(projectRoot), targetName);
78
- const writeStream = (0, fs_1.createWriteStream)(targetPath);
79
- zip.pipe(writeStream);
80
- zip.on('error', (error) => reject(error));
81
- for (const file of fileList) {
82
- zip.file((0, path_1.join)(projectRoot, file), { name: file });
83
- }
84
- writeStream.on('close', () => resolve({ path: targetPath, size: (0, formatter_1.byteNumberToSizeString)(zip.pointer()) }));
85
- zip.finalize().catch((error) => reject(error));
46
+ async function archiveProject({ projectRoot, targetFolder, targetFileName }) {
47
+ if (!(0, fs_1.existsSync)(projectRoot)) {
48
+ return Promise.reject(new Error((0, i18n_1.t)('error.noProjectRoot', { projectRoot })));
49
+ }
50
+ const fileList = await getFileList(projectRoot);
51
+ return new Promise((resolve, reject) => {
52
+ try {
53
+ const zip = archiver.default('zip', { zlib: { level: 9 } });
54
+ let targetName = '';
55
+ if (typeof targetFileName === 'string') {
56
+ targetName = targetFileName.toLocaleLowerCase().endsWith('.zip')
57
+ ? targetFileName
58
+ : targetFileName + '.zip';
86
59
  }
87
- catch (error) {
88
- reject(error);
60
+ else {
61
+ targetName = `${(0, path_1.basename)(projectRoot)}-${new Date()
62
+ .toISOString()
63
+ .replace('T', '')
64
+ .replace(':', '')
65
+ .substring(0, 14)}.zip`;
89
66
  }
90
- });
67
+ const targetPath = targetFolder ? (0, path_1.join)(targetFolder, targetName) : (0, path_1.join)((0, path_1.dirname)(projectRoot), targetName);
68
+ const writeStream = (0, fs_1.createWriteStream)(targetPath);
69
+ zip.pipe(writeStream);
70
+ zip.on('error', (error) => reject(error));
71
+ for (const file of fileList) {
72
+ zip.file((0, path_1.join)(projectRoot, file), { name: file });
73
+ }
74
+ writeStream.on('close', () => resolve({ path: targetPath, size: (0, formatter_1.byteNumberToSizeString)(zip.pointer()) }));
75
+ zip.finalize().catch((error) => reject(error));
76
+ }
77
+ catch (error) {
78
+ reject(error);
79
+ }
91
80
  });
92
81
  }
93
82
  exports.archiveProject = archiveProject;
@@ -98,24 +87,22 @@ exports.archiveProject = archiveProject;
98
87
  * @param cwd - working directory, usually the project root
99
88
  * @returns - list of files to add to the archive, relative to cwd
100
89
  */
101
- function getFileList(cwd) {
102
- return __awaiter(this, void 0, void 0, function* () {
103
- const gitignorePath = (0, path_1.join)(cwd, '.gitignore');
104
- const hasGitignore = (0, fs_1.existsSync)(gitignorePath);
105
- const globPattern = hasGitignore ? ['**'] : ['**', '.cdsrc.json', '.extconfig.json'];
106
- const dot = hasGitignore;
107
- const ignores = hasGitignore
108
- ? `${(yield fs_1.promises.readFile(gitignorePath)).toString()}\n**/.git`
109
- : ['**/.env', '**/.git', '**/node_modules'];
110
- const skip = hasGitignore ? undefined : ['**/node_modules/**'];
111
- const files = yield (0, glob_gitignore_1.glob)(globPattern, {
112
- cwd,
113
- dot,
114
- ignore: (0, ignore_1.default)().add(ignores),
115
- mark: true,
116
- skip
117
- });
118
- return files;
90
+ async function getFileList(cwd) {
91
+ const gitignorePath = (0, path_1.join)(cwd, '.gitignore');
92
+ const hasGitignore = (0, fs_1.existsSync)(gitignorePath);
93
+ const globPattern = hasGitignore ? ['**'] : ['**', '.cdsrc.json', '.extconfig.json'];
94
+ const dot = hasGitignore;
95
+ const ignores = hasGitignore
96
+ ? `${(await fs_1.promises.readFile(gitignorePath)).toString()}\n**/.git`
97
+ : ['**/.env', '**/.git', '**/node_modules'];
98
+ const skip = hasGitignore ? undefined : ['**/node_modules/**'];
99
+ const files = await (0, glob_gitignore_1.glob)(globPattern, {
100
+ cwd,
101
+ dot,
102
+ ignore: (0, ignore_1.default)().add(ignores),
103
+ mark: true,
104
+ skip
119
105
  });
106
+ return files;
120
107
  }
121
108
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/archive/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA6D;AAC7D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AG;QACH,MAAM,EAAE,IAAA,gBAAM,GAAE,CAAC,GAAG,CAAC,OAAO,CAAC;QAC7B,IAAI,EAAE,IAAI;QACV,IAAI;KACP,CAAC,CAAC;IACH,OAAO,KAAK,CAAC;AACjB,CAAC"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -26,29 +17,27 @@ const service_checks_1 = require("./service-checks");
26
17
  * @param password - password
27
18
  * @returns messages and destination results
28
19
  */
29
- function checkBASDestination(destination, username, password) {
30
- return __awaiter(this, void 0, void 0, function* () {
31
- const logger = (0, logger_1.getLogger)();
32
- const abapServiceProvider = (0, service_checks_1.getServiceProvider)(destination, username, password);
33
- // catalog service request
34
- const { messages: catalogMsgs, result: catalogServiceResult } = yield (0, service_checks_1.checkCatalogServices)(abapServiceProvider, destination.Name);
35
- logger.push(...catalogMsgs);
36
- const html5DynamicDestination = !!destination['HTML5.DynamicDestination'];
37
- if (!html5DynamicDestination) {
38
- logger.push({
39
- severity: "error" /* Severity.Error */,
40
- text: (0, i18n_1.t)('error.missingDynamicDestProperty', { destination: destination.Name })
41
- });
42
- }
43
- const destinationResults = {
44
- catalogService: catalogServiceResult,
45
- HTML5DynamicDestination: html5DynamicDestination
46
- };
47
- return {
48
- messages: logger.getMessages(),
49
- destinationResults
50
- };
51
- });
20
+ async function checkBASDestination(destination, username, password) {
21
+ const logger = (0, logger_1.getLogger)();
22
+ const abapServiceProvider = (0, service_checks_1.getServiceProvider)(destination, username, password);
23
+ // catalog service request
24
+ const { messages: catalogMsgs, result: catalogServiceResult } = await (0, service_checks_1.checkCatalogServices)(abapServiceProvider, destination.Name);
25
+ logger.push(...catalogMsgs);
26
+ const html5DynamicDestination = !!destination['HTML5.DynamicDestination'];
27
+ if (!html5DynamicDestination) {
28
+ logger.push({
29
+ severity: "error" /* Severity.Error */,
30
+ text: (0, i18n_1.t)('error.missingDynamicDestProperty', { destination: destination.Name })
31
+ });
32
+ }
33
+ const destinationResults = {
34
+ catalogService: catalogServiceResult,
35
+ HTML5DynamicDestination: html5DynamicDestination
36
+ };
37
+ return {
38
+ messages: logger.getMessages(),
39
+ destinationResults
40
+ };
52
41
  }
53
42
  exports.checkBASDestination = checkBASDestination;
54
43
  /**
@@ -66,52 +55,50 @@ exports.needsUsernamePassword = needsUsernamePassword;
66
55
  *
67
56
  * @returns messages, destinations
68
57
  */
69
- function checkBASDestinations() {
70
- return __awaiter(this, void 0, void 0, function* () {
71
- const logger = (0, logger_1.getLogger)();
72
- const destinations = [];
73
- let url;
74
- // Reload request
75
- try {
76
- yield axios_1.default.get((0, btp_utils_1.getAppStudioProxyURL)() + '/reload');
77
- }
78
- catch (error) {
79
- logger.warn((0, i18n_1.t)('warning.reloadFailure'));
80
- logger.debug((0, i18n_1.t)('info.urlRequestFailure', {
81
- url: `${(0, btp_utils_1.getAppStudioProxyURL)() + '/reload'}`,
82
- error: error.message,
83
- errorObj: error.toJSON ? JSON.stringify(error.toJSON(), null, 4) : error
84
- }));
58
+ async function checkBASDestinations() {
59
+ const logger = (0, logger_1.getLogger)();
60
+ const destinations = [];
61
+ let url;
62
+ // Reload request
63
+ try {
64
+ await axios_1.default.get((0, btp_utils_1.getAppStudioProxyURL)() + '/reload');
65
+ }
66
+ catch (error) {
67
+ logger.warn((0, i18n_1.t)('warning.reloadFailure'));
68
+ logger.debug((0, i18n_1.t)('info.urlRequestFailure', {
69
+ url: `${(0, btp_utils_1.getAppStudioProxyURL)() + '/reload'}`,
70
+ error: error.message,
71
+ errorObj: error.toJSON ? JSON.stringify(error.toJSON(), null, 4) : error
72
+ }));
73
+ }
74
+ // Destinations request
75
+ try {
76
+ const basDestinations = await (0, btp_utils_1.listDestinations)();
77
+ for (const basDest in basDestinations) {
78
+ const destination = basDestinations[basDest];
79
+ destination.UrlServiceType = getUrlServiceTypeForDest(destination);
80
+ destinations.push(destination);
85
81
  }
86
- // Destinations request
87
- try {
88
- const basDestinations = yield (0, btp_utils_1.listDestinations)();
89
- for (const basDest in basDestinations) {
90
- const destination = basDestinations[basDest];
91
- destination.UrlServiceType = getUrlServiceTypeForDest(destination);
92
- destinations.push(destination);
93
- }
94
- const destinationNumber = Object.keys(destinations).length;
95
- if (destinationNumber > 0) {
96
- logger.info((0, i18n_1.t)('info.numDestinationsFound', { destinationNumber }));
97
- }
98
- else {
99
- logger.warn((0, i18n_1.t)('warning.noDestinationsFound'));
100
- }
82
+ const destinationNumber = Object.keys(destinations).length;
83
+ if (destinationNumber > 0) {
84
+ logger.info((0, i18n_1.t)('info.numDestinationsFound', { destinationNumber }));
101
85
  }
102
- catch (error) {
103
- logger.error((0, i18n_1.t)('error.retrievingDestinations', { error: error.message }));
104
- logger.debug((0, i18n_1.t)('info.urlRequestFailure', {
105
- url: url,
106
- error: error.message,
107
- errorObj: error.toJSON ? JSON.stringify(error.toJSON(), null, 4) : error
108
- }));
86
+ else {
87
+ logger.warn((0, i18n_1.t)('warning.noDestinationsFound'));
109
88
  }
110
- return {
111
- messages: logger.getMessages(),
112
- destinations
113
- };
114
- });
89
+ }
90
+ catch (error) {
91
+ logger.error((0, i18n_1.t)('error.retrievingDestinations', { error: error.message }));
92
+ logger.debug((0, i18n_1.t)('info.urlRequestFailure', {
93
+ url: url,
94
+ error: error.message,
95
+ errorObj: error.toJSON ? JSON.stringify(error.toJSON(), null, 4) : error
96
+ }));
97
+ }
98
+ return {
99
+ messages: logger.getMessages(),
100
+ destinations
101
+ };
115
102
  }
116
103
  exports.checkBASDestinations = checkBASDestinations;
117
104
  /**
@@ -121,10 +108,9 @@ exports.checkBASDestinations = checkBASDestinations;
121
108
  * @returns - URL service type, like 'Full Service URL', 'Catalog Service', 'Partial URL'
122
109
  */
123
110
  function getUrlServiceTypeForDest(destination) {
124
- var _a, _b;
125
111
  let urlServiceType = "Invalid URL" /* UrlServiceType.InvalidUrl */;
126
- const odataGen = !!((_a = destination.WebIDEUsage) === null || _a === void 0 ? void 0 : _a.split(',').find((entry) => entry.trim() === 'odata_gen'));
127
- const odataAbap = !!((_b = destination.WebIDEUsage) === null || _b === void 0 ? void 0 : _b.split(',').find((entry) => entry.trim() === 'odata_abap'));
112
+ const odataGen = !!destination.WebIDEUsage?.split(',').find((entry) => entry.trim() === 'odata_gen');
113
+ const odataAbap = !!destination.WebIDEUsage?.split(',').find((entry) => entry.trim() === 'odata_abap');
128
114
  const fullUrl = destination.WebIDEAdditionalData === 'full_url';
129
115
  if (odataGen && fullUrl && !odataAbap) {
130
116
  urlServiceType = "Full Service URL" /* UrlServiceType.FullServiceUrl */;
@@ -1 +1 @@
1
- {"version":3,"file":"destination.js","sourceRoot":"","sources":["../../src/checks/destination.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA0B;AAC1B,iDAA2E;AAC3E,sCAAsC;AAEtC,kCAA4B;AAC5B,qDAA4E;AAE5E;;;;;;;GAOG;AACH,SAAsB,mBAAmB,CACrC,WAAqB,EACrB,QAA6B,EAC7B,QAA6B;;QAE7B,MAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;QAE3B,MAAM,mBAAmB,GAAG,IAAA,mCAAkB,EAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAEhF,0BAA0B;QAC1B,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,IAAA,qCAAoB,E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SAAS,EAAE,CAAC;QACpC,cAAc,yDAAgC,CAAC;IACnD,CAAC;SAAM,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,IAAI,SAAS,EAAE,CAAC;QAC5C,cAAc,2DAAmC,CAAC;IACtD,CAAC;SAAM,IAAI,QAAQ,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5C,cAAc,gDAA4B,CAAC;IAC/C,CAAC;IACD,OAAO,cAAc,CAAC;AAC1B,CAAC;AAdD,4DAcC"}
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.checkEndpoint = exports.checkEndpoints = void 0;
13
4
  const logger_1 = require("../logger");
@@ -20,25 +11,23 @@ const i18n_1 = require("../i18n");
20
11
  *
21
12
  * @returns messages, SAP systems
22
13
  */
23
- function checkEndpoints() {
24
- return __awaiter(this, void 0, void 0, function* () {
25
- const logger = (0, logger_1.getLogger)();
26
- let endpoints = [];
27
- if ((0, btp_utils_1.isAppStudio)()) {
28
- const { messages: basDestMsgs, destinations } = yield (0, destination_1.checkBASDestinations)();
29
- endpoints = destinations;
30
- logger.push(...basDestMsgs);
31
- }
32
- else {
33
- const { messages: storedSysMsgs, storedSystems } = yield (0, stored_system_1.checkStoredSystems)();
34
- endpoints = storedSystems;
35
- logger.push(...storedSysMsgs);
36
- }
37
- return {
38
- messages: logger.getMessages(),
39
- endpoints: endpoints
40
- };
41
- });
14
+ async function checkEndpoints() {
15
+ const logger = (0, logger_1.getLogger)();
16
+ let endpoints = [];
17
+ if ((0, btp_utils_1.isAppStudio)()) {
18
+ const { messages: basDestMsgs, destinations } = await (0, destination_1.checkBASDestinations)();
19
+ endpoints = destinations;
20
+ logger.push(...basDestMsgs);
21
+ }
22
+ else {
23
+ const { messages: storedSysMsgs, storedSystems } = await (0, stored_system_1.checkStoredSystems)();
24
+ endpoints = storedSystems;
25
+ logger.push(...storedSysMsgs);
26
+ }
27
+ return {
28
+ messages: logger.getMessages(),
29
+ endpoints: endpoints
30
+ };
42
31
  }
43
32
  exports.checkEndpoints = checkEndpoints;
44
33
  /**
@@ -49,28 +38,29 @@ exports.checkEndpoints = checkEndpoints;
49
38
  * @param password - destination password
50
39
  * @returns messages and sapSystem results
51
40
  */
52
- function checkEndpoint(endpoint, username, password) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- const logger = (0, logger_1.getLogger)();
55
- logger.info((0, i18n_1.t)('info.checkingSapSystem', { sapSystem: endpoint.Name }));
56
- let destinationResults;
57
- let storedSystemResults;
58
- if ((0, btp_utils_1.isAppStudio)()) {
59
- const checkBASDestinationResult = yield (0, destination_1.checkBASDestination)(endpoint, username, password);
60
- destinationResults = checkBASDestinationResult.destinationResults;
61
- logger.push(...checkBASDestinationResult.messages);
62
- }
63
- else {
64
- const checkStoredSystemResult = yield (0, stored_system_1.checkStoredSystem)(endpoint);
65
- storedSystemResults = checkStoredSystemResult.storedSystemResults;
66
- logger.push(...checkStoredSystemResult.messages);
67
- }
68
- const endpointResults = Object.assign(Object.assign({}, destinationResults), storedSystemResults);
69
- return {
70
- messages: logger.getMessages(),
71
- endpointResults
72
- };
73
- });
41
+ async function checkEndpoint(endpoint, username, password) {
42
+ const logger = (0, logger_1.getLogger)();
43
+ logger.info((0, i18n_1.t)('info.checkingSapSystem', { sapSystem: endpoint.Name }));
44
+ let destinationResults;
45
+ let storedSystemResults;
46
+ if ((0, btp_utils_1.isAppStudio)()) {
47
+ const checkBASDestinationResult = await (0, destination_1.checkBASDestination)(endpoint, username, password);
48
+ destinationResults = checkBASDestinationResult.destinationResults;
49
+ logger.push(...checkBASDestinationResult.messages);
50
+ }
51
+ else {
52
+ const checkStoredSystemResult = await (0, stored_system_1.checkStoredSystem)(endpoint);
53
+ storedSystemResults = checkStoredSystemResult.storedSystemResults;
54
+ logger.push(...checkStoredSystemResult.messages);
55
+ }
56
+ const endpointResults = {
57
+ ...destinationResults,
58
+ ...storedSystemResults
59
+ };
60
+ return {
61
+ messages: logger.getMessages(),
62
+ endpointResults
63
+ };
74
64
  }
75
65
  exports.checkEndpoint = checkEndpoint;
76
66
  //# sourceMappingURL=endpoint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"endpoint.js","sourceRoot":"","sources":["../../src/checks/endpoint.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sCAAsC;AACtC,iDAAgD;AAChD,+CAA0E;AAC1E,mDAAwE;AACxE,kCAA4B;AAE5B;;;;GAIG;AACH,SAAsB,cAAc;;QAIhC,MAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;QAC3B,IAAI,SAAS,GAAe,EAAE,CAAC;QAE/B,IAAI,IAAA,uBAAW,GAAE,EAAE,CAAC;YAChB,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,MAAM,IAAA,kCAAoB,GAAE,CAAC;YAC7E,SAAS,GAAG,YAAY,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACJ,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,MAAM,IAAA,kCAAkB,GAAE,CAAC;YAC9E,SAAS,GAAG,aAAa,CAAC;YAC1B,MAAM,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QAClC,CAAC;QAED,OAAO;YACH,QAAQ,EAAE,MAAM,CAAC,WAAW,EAAE;YAC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