@sap/ux-ui5-tooling 1.12.3 → 1.12.4

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.
@@ -49,7 +49,7 @@ var require_package = __commonJS({
49
49
  "../lib/telemetry/dist/package.json"(exports2, module2) {
50
50
  module2.exports = {
51
51
  name: "@sap/ux-telemetry",
52
- version: "1.12.3",
52
+ version: "1.12.4",
53
53
  description: "SAP Fiori tools telemetry library",
54
54
  main: "dist/src/index.js",
55
55
  author: "SAP SE",
@@ -74,10 +74,10 @@ var require_package = __commonJS({
74
74
  },
75
75
  dependencies: {
76
76
  "@sap-ux/store": "0.4.0",
77
- "@sap/ux-cds": "1.12.3",
78
- "@sap/ux-common-utils": "1.12.3",
79
- "@sap/ux-feature-toggle": "1.12.3",
80
- "@sap/ux-project-access": "1.12.3",
77
+ "@sap/ux-cds": "1.12.4",
78
+ "@sap/ux-common-utils": "1.12.4",
79
+ "@sap/ux-feature-toggle": "1.12.4",
80
+ "@sap/ux-project-access": "1.12.4",
81
81
  applicationinsights: "1.4.1",
82
82
  axios: "1.6.1",
83
83
  "performance-now": "2.1.0",
@@ -41621,9 +41621,9 @@ var require_contants = __commonJS({
41621
41621
  }
41622
41622
  });
41623
41623
 
41624
- // ../../node_modules/i18next-fs-backend/cjs/utils.js
41624
+ // ../lib/store/node_modules/i18next-fs-backend/cjs/utils.js
41625
41625
  var require_utils = __commonJS({
41626
- "../../node_modules/i18next-fs-backend/cjs/utils.js"(exports2) {
41626
+ "../lib/store/node_modules/i18next-fs-backend/cjs/utils.js"(exports2) {
41627
41627
  "use strict";
41628
41628
  Object.defineProperty(exports2, "__esModule", {
41629
41629
  value: true
@@ -41705,9 +41705,9 @@ var require_utils = __commonJS({
41705
41705
  }
41706
41706
  });
41707
41707
 
41708
- // ../../node_modules/i18next-fs-backend/cjs/formats/json5.js
41708
+ // ../lib/store/node_modules/i18next-fs-backend/cjs/formats/json5.js
41709
41709
  var require_json5 = __commonJS({
41710
- "../../node_modules/i18next-fs-backend/cjs/formats/json5.js"(exports2, module2) {
41710
+ "../lib/store/node_modules/i18next-fs-backend/cjs/formats/json5.js"(exports2, module2) {
41711
41711
  "use strict";
41712
41712
  Object.defineProperty(exports2, "__esModule", {
41713
41713
  value: true
@@ -42877,9 +42877,9 @@ var require_json5 = __commonJS({
42877
42877
  }
42878
42878
  });
42879
42879
 
42880
- // ../../node_modules/i18next-fs-backend/cjs/formats/yaml.js
42880
+ // ../lib/store/node_modules/i18next-fs-backend/cjs/formats/yaml.js
42881
42881
  var require_yaml = __commonJS({
42882
- "../../node_modules/i18next-fs-backend/cjs/formats/yaml.js"(exports2) {
42882
+ "../lib/store/node_modules/i18next-fs-backend/cjs/formats/yaml.js"(exports2) {
42883
42883
  "use strict";
42884
42884
  Object.defineProperty(exports2, "__esModule", {
42885
42885
  value: true
@@ -45501,9 +45501,9 @@ var require_yaml = __commonJS({
45501
45501
  }
45502
45502
  });
45503
45503
 
45504
- // ../../node_modules/i18next-fs-backend/cjs/fs.js
45504
+ // ../lib/store/node_modules/i18next-fs-backend/cjs/fs.js
45505
45505
  var require_fs = __commonJS({
45506
- "../../node_modules/i18next-fs-backend/cjs/fs.js"(exports2, module2) {
45506
+ "../lib/store/node_modules/i18next-fs-backend/cjs/fs.js"(exports2, module2) {
45507
45507
  if (typeof require !== "undefined") {
45508
45508
  f = require("fs");
45509
45509
  if (f.default)
@@ -45515,9 +45515,9 @@ var require_fs = __commonJS({
45515
45515
  }
45516
45516
  });
45517
45517
 
45518
- // ../../node_modules/i18next-fs-backend/cjs/extname.js
45518
+ // ../lib/store/node_modules/i18next-fs-backend/cjs/extname.js
45519
45519
  var require_extname = __commonJS({
45520
- "../../node_modules/i18next-fs-backend/cjs/extname.js"(exports2, module2) {
45520
+ "../lib/store/node_modules/i18next-fs-backend/cjs/extname.js"(exports2, module2) {
45521
45521
  "use strict";
45522
45522
  Object.defineProperty(exports2, "__esModule", {
45523
45523
  value: true
@@ -45533,9 +45533,9 @@ var require_extname = __commonJS({
45533
45533
  }
45534
45534
  });
45535
45535
 
45536
- // ../../node_modules/i18next-fs-backend/cjs/readFile.js
45536
+ // ../lib/store/node_modules/i18next-fs-backend/cjs/readFile.js
45537
45537
  var require_readFile = __commonJS({
45538
- "../../node_modules/i18next-fs-backend/cjs/readFile.js"(exports, module) {
45538
+ "../lib/store/node_modules/i18next-fs-backend/cjs/readFile.js"(exports, module) {
45539
45539
  "use strict";
45540
45540
  function _typeof(obj) {
45541
45541
  "@babel/helpers - typeof";
@@ -45748,9 +45748,9 @@ var require_readFile = __commonJS({
45748
45748
  }
45749
45749
  });
45750
45750
 
45751
- // ../../node_modules/i18next-fs-backend/cjs/writeFile.js
45751
+ // ../lib/store/node_modules/i18next-fs-backend/cjs/writeFile.js
45752
45752
  var require_writeFile = __commonJS({
45753
- "../../node_modules/i18next-fs-backend/cjs/writeFile.js"(exports2, module2) {
45753
+ "../lib/store/node_modules/i18next-fs-backend/cjs/writeFile.js"(exports2, module2) {
45754
45754
  "use strict";
45755
45755
  function _typeof3(obj) {
45756
45756
  "@babel/helpers - typeof";
@@ -45974,9 +45974,9 @@ var require_writeFile = __commonJS({
45974
45974
  }
45975
45975
  });
45976
45976
 
45977
- // ../../node_modules/i18next-fs-backend/cjs/index.js
45977
+ // ../lib/store/node_modules/i18next-fs-backend/cjs/index.js
45978
45978
  var require_cjs = __commonJS({
45979
- "../../node_modules/i18next-fs-backend/cjs/index.js"(exports2, module2) {
45979
+ "../lib/store/node_modules/i18next-fs-backend/cjs/index.js"(exports2, module2) {
45980
45980
  "use strict";
45981
45981
  Object.defineProperty(exports2, "__esModule", {
45982
45982
  value: true
@@ -68124,226 +68124,6 @@ var require_oDataClient = __commonJS({
68124
68124
  }
68125
68125
  });
68126
68126
 
68127
- // ../lib/odata-client/dist/constants.js
68128
- var require_constants4 = __commonJS({
68129
- "../lib/odata-client/dist/constants.js"(exports2) {
68130
- "use strict";
68131
- Object.defineProperty(exports2, "__esModule", { value: true });
68132
- exports2.DEFAULT_SERVICE_PATH = exports2.abapUrlReplaceMap = exports2.API_HUB_API_KEY = void 0;
68133
- exports2.API_HUB_API_KEY = "API_HUB_API_KEY";
68134
- exports2.abapUrlReplaceMap = /* @__PURE__ */ new Map([
68135
- [/\.abap\./, ".abap-web."],
68136
- [/-api.s4hana.ondemand.com/, ".s4hana.ondemand.com"],
68137
- [/-api.saps4hanacloud.cn/, ".saps4hanacloud.cn"]
68138
- ]);
68139
- exports2.DEFAULT_SERVICE_PATH = "/sap/opu/odata/UI5/ABAP_REPOSITORY_SRV";
68140
- }
68141
- });
68142
-
68143
- // ../lib/odata-client/dist/client/ui5AbapRepository.js
68144
- var require_ui5AbapRepository = __commonJS({
68145
- "../lib/odata-client/dist/client/ui5AbapRepository.js"(exports2) {
68146
- "use strict";
68147
- Object.defineProperty(exports2, "__esModule", { value: true });
68148
- exports2.Ui5AbapRepository = void 0;
68149
- var oDataClient_1 = require_oDataClient();
68150
- var fs_1 = require("fs");
68151
- var message_1 = require_message();
68152
- var constants_1 = require_constants4();
68153
- var xmlReplaceMap = {
68154
- "&": "&",
68155
- '"': """,
68156
- "'": "'",
68157
- "<": "&lt;",
68158
- ">": "&gt;"
68159
- };
68160
- var xmlReplaceRegex = /[<>&"']/g;
68161
- function encodeXmlValue(xmlValue) {
68162
- return xmlValue.replace(xmlReplaceRegex, (c) => xmlReplaceMap[c]);
68163
- }
68164
- var Ui5AbapRepository = class extends oDataClient_1.ODataClient {
68165
- constructor({ system, credentials = void 0, log: log3 = console, connection = void 0, ignoreCertError, postConnectionCallback }) {
68166
- system.service = system.service ?? constants_1.DEFAULT_SERVICE_PATH;
68167
- super({ system, credentials, log: log3, connection, ignoreCertError, postConnectionCallback });
68168
- }
68169
- /**
68170
- * Get information about a deployed application. Returns undefined if the application cannot be found.
68171
- * @param app application id (BSP application name)
68172
- */
68173
- async getInfo(app) {
68174
- try {
68175
- return await this.get(`/Repositories('${encodeURIComponent(app)}')`);
68176
- } catch (error3) {
68177
- return void 0;
68178
- }
68179
- }
68180
- /**
68181
- * Deploy the given archive either by creating a new BSP or updating an existing one
68182
- * @param archivePath path to a zip archive containing the application files
68183
- * @param app application configuration
68184
- * @param testMode if set to true, all requests will be sent, the service checks them, but no actual deployment will happen
68185
- * @param safeMode default to true, if set to false, no check for different app ID that already exists
68186
- */
68187
- async deploy(archivePath, app, testMode = false, safeMode = true) {
68188
- var _a2, _b, _c;
68189
- const httpClient = await this.getClient();
68190
- const info = await this.getInfo(app.name);
68191
- const payload = this.createPayload(archivePath, app.name, app.description || "Deployed with SAP Fiori tools", info ? info.Package : app.package, httpClient);
68192
- const config = this.createConfig(app.transport, testMode, safeMode);
68193
- const frontendUrl = this.getAbapFrontendUrl(this.system.originalUrl || this.system.url);
68194
- try {
68195
- const response = await this.updateRepoRequest(!!info, app.name, httpClient, payload, config);
68196
- if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["sap-message"]) {
68197
- const message = JSON.parse(response.headers["sap-message"]);
68198
- message["longtextUrl"] = message["longtext_url"];
68199
- (0, message_1.prettyPrintMessage)(message, this.log, { frontendUrl });
68200
- const path2 = "/sap/bc/ui5_ui5" + (!app.name.startsWith("/") ? "/sap/" : "") + app.name.toLowerCase();
68201
- const query = this.system.client ? "?sap-client=" + this.system.client : "";
68202
- this.log.info(`App available at ${frontendUrl}${path2}${query}`);
68203
- } else if (testMode) {
68204
- (0, message_1.printErrorDetails)((_c = (_b = response == null ? void 0 : response.data.error) == null ? void 0 : _b.innererror) == null ? void 0 : _c.errordetails, this.log, {
68205
- frontendUrl
68206
- });
68207
- }
68208
- return response;
68209
- } catch (error3) {
68210
- this.logError(error3, { frontendUrl });
68211
- throw error3;
68212
- }
68213
- }
68214
- async undeploy(app, testMode = false) {
68215
- var _a2;
68216
- const httpClient = await this.getClient();
68217
- const config = this.createConfig(app.transport, testMode);
68218
- try {
68219
- const response = await this.deleteRepoRequest(app.name, httpClient, config);
68220
- if ((_a2 = response == null ? void 0 : response.headers) == null ? void 0 : _a2["sap-message"]) {
68221
- const message = JSON.parse(response.headers["sap-message"]);
68222
- (0, message_1.prettyPrintMessage)(message, this.log);
68223
- }
68224
- return response;
68225
- } catch (error3) {
68226
- this.logError(error3);
68227
- throw error3;
68228
- }
68229
- }
68230
- /**
68231
- * Translate the technical SCP ABAP URL to the frontend URL
68232
- *
68233
- * @param technicalUrl Technical URL of the ABAP system from service keys
68234
- */
68235
- getAbapFrontendUrl(technicalUrl) {
68236
- constants_1.abapUrlReplaceMap.forEach((value, key) => {
68237
- technicalUrl = technicalUrl.replace(key, value);
68238
- });
68239
- return technicalUrl;
68240
- }
68241
- /**
68242
- * Internal helper method to generate a request configuration (headers, parameters)
68243
- * @param transport optional transport request id
68244
- * @param testMode test mode enabled or not
68245
- * @param safeMode safe mode enabled or not
68246
- */
68247
- createConfig(transport, testMode = false, safeMode = true) {
68248
- const headers = {
68249
- "Content-Type": "application/atom+xml",
68250
- type: "entry",
68251
- charset: "UTF8"
68252
- };
68253
- const params = {
68254
- CodePage: "'UTF8'",
68255
- CondenseMessagesInHttpResponseHeader: "X",
68256
- format: "json"
68257
- };
68258
- if (transport) {
68259
- params.TransportRequest = transport;
68260
- }
68261
- params.TestMode = testMode;
68262
- params.SafeMode = safeMode;
68263
- const maxBodyLength = Infinity;
68264
- const maxContentLength = Infinity;
68265
- return { headers, params, maxBodyLength, maxContentLength };
68266
- }
68267
- /**
68268
- * Create the request payload for a deploy request
68269
- * @param archive archive file path
68270
- * @param name application name
68271
- * @param description description for the deployed app
68272
- * @param abapPackage ABAP package containing the app
68273
- */
68274
- createPayload(archive, name, description, abapPackage, httpClient) {
68275
- const base64Data = (0, fs_1.readFileSync)(archive, { encoding: "base64" });
68276
- const time = (/* @__PURE__ */ new Date()).toISOString();
68277
- const escapedName = encodeXmlValue(name);
68278
- return `<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="${httpClient.defaults.baseURL}"> <id>${httpClient.defaults.baseURL}/Repositories('${escapedName}')</id> <title type="text">Repositories('${escapedName}')</title> <updated>${time}</updated> <category term="/UI5/ABAP_REPOSITORY_SRV.Repository" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/> <link href="Repositories('${escapedName}')" rel="edit" title="Repository"/> <content type="application/xml"> <m:properties> <d:Name>${escapedName}</d:Name> <d:Package>${abapPackage == null ? void 0 : abapPackage.toUpperCase()}</d:Package> <d:Description>${encodeXmlValue(description)}</d:Description> <d:ZipArchive>${base64Data}</d:ZipArchive> <d:Info/> </m:properties> </content></entry>`;
68279
- }
68280
- /**
68281
- * Sometimes a repo request fails with a known timeout issue
68282
- *
68283
- * @param isExisting - app has already been deployed
68284
- * @param appName
68285
- * @param httpClient
68286
- * @param payload
68287
- * @param config
68288
- * @param tryCount
68289
- * @protected
68290
- */
68291
- async updateRepoRequest(isExisting, appName, httpClient, payload, config, tryCount = 1) {
68292
- var _a2, _b;
68293
- try {
68294
- if (tryCount === 2) {
68295
- this.log.warn("Warning: The application was deployed despite a time out response from the backend. Increasing the value of the HTML5.Timeout property for the destination may solve the issue");
68296
- }
68297
- if (tryCount !== 1 && !isExisting && await this.getInfo(appName) !== void 0) {
68298
- return;
68299
- }
68300
- return isExisting ? await httpClient.put(`/Repositories('${encodeURIComponent(appName)}')`, payload, config) : await httpClient.post("/Repositories", payload, config);
68301
- } catch (error3) {
68302
- if ([504, 408].includes((_a2 = error3 == null ? void 0 : error3.response) == null ? void 0 : _a2.status)) {
68303
- if (tryCount >= 3) {
68304
- throw error3;
68305
- }
68306
- return await this.updateRepoRequest(isExisting, appName, httpClient, payload, config, ++tryCount);
68307
- } else if ((_b = config == null ? void 0 : config.params) == null ? void 0 : _b.TestMode) {
68308
- return error3.response;
68309
- } else {
68310
- throw error3;
68311
- }
68312
- }
68313
- }
68314
- /**
68315
- * Sometimes a repo request fails with a known 400 bad request issue,
68316
- * but succeeds in the retry
68317
- *
68318
- * @param appName
68319
- * @param httpClient
68320
- * @param config
68321
- * @param tryCount
68322
- * @protected
68323
- */
68324
- async deleteRepoRequest(appName, httpClient, config, tryCount = 1) {
68325
- var _a2;
68326
- try {
68327
- if (tryCount === 2) {
68328
- this.log.warn("Warning: retry undeploy to handle a backend rejection...");
68329
- }
68330
- return await httpClient.delete(`/Repositories('${encodeURIComponent(appName)}')`, config);
68331
- } catch (error3) {
68332
- if (((_a2 = error3 == null ? void 0 : error3.response) == null ? void 0 : _a2.status) === 400) {
68333
- if (tryCount >= 2) {
68334
- throw error3;
68335
- }
68336
- return await this.deleteRepoRequest(appName, httpClient, config, ++tryCount);
68337
- } else {
68338
- throw error3;
68339
- }
68340
- }
68341
- }
68342
- };
68343
- exports2.Ui5AbapRepository = Ui5AbapRepository;
68344
- }
68345
- });
68346
-
68347
68127
  // ../lib/odata-client/dist/client/catalog/common.js
68348
68128
  var require_common7 = __commonJS({
68349
68129
  "../lib/odata-client/dist/client/catalog/common.js"(exports2) {
@@ -68718,13 +68498,22 @@ var require_client2 = __commonJS({
68718
68498
  };
68719
68499
  Object.defineProperty(exports2, "__esModule", { value: true });
68720
68500
  __exportStar(require_oDataClient(), exports2);
68721
- __exportStar(require_ui5AbapRepository(), exports2);
68722
68501
  __exportStar(require_catalog(), exports2);
68723
68502
  __exportStar(require_message(), exports2);
68724
68503
  __exportStar(require_patchTls(), exports2);
68725
68504
  }
68726
68505
  });
68727
68506
 
68507
+ // ../lib/odata-client/dist/constants.js
68508
+ var require_constants4 = __commonJS({
68509
+ "../lib/odata-client/dist/constants.js"(exports2) {
68510
+ "use strict";
68511
+ Object.defineProperty(exports2, "__esModule", { value: true });
68512
+ exports2.API_HUB_API_KEY = void 0;
68513
+ exports2.API_HUB_API_KEY = "API_HUB_API_KEY";
68514
+ }
68515
+ });
68516
+
68728
68517
  // ../lib/odata-client/dist/api-hub/index.js
68729
68518
  var require_api_hub = __commonJS({
68730
68519
  "../lib/odata-client/dist/api-hub/index.js"(exports2) {
@@ -69097,28 +68886,6 @@ var require_sapSystem = __commonJS({
69097
68886
  return catalog;
69098
68887
  }
69099
68888
  }
69100
- async getUi5Repository(log3 = console, ignoreCertError) {
69101
- const system = deepClone(this.config);
69102
- if (this.connection) {
69103
- return new client_1.Ui5AbapRepository({
69104
- system,
69105
- connection: this.connection,
69106
- log: log3,
69107
- ignoreCertError,
69108
- postConnectionCallback: this.postConnectionCallback()
69109
- });
69110
- } else {
69111
- const repo = new client_1.Ui5AbapRepository({
69112
- system,
69113
- credentials: this.credentials,
69114
- log: log3,
69115
- ignoreCertError,
69116
- postConnectionCallback: this.postConnectionCallback()
69117
- });
69118
- this.connection = await repo.getConnection();
69119
- return repo;
69120
- }
69121
- }
69122
68889
  setCredentials(credentials) {
69123
68890
  this.credentials = credentials;
69124
68891
  }
@@ -70783,7 +70550,7 @@ var require_constants5 = __commonJS({
70783
70550
  "../../node_modules/@sap-ux/project-access/dist/constants.js"(exports2) {
70784
70551
  "use strict";
70785
70552
  Object.defineProperty(exports2, "__esModule", { value: true });
70786
- exports2.FileName = void 0;
70553
+ exports2.DirName = exports2.FileName = void 0;
70787
70554
  exports2.FileName = {
70788
70555
  AdaptationConfig: "config.json",
70789
70556
  CapJavaApplicationYaml: "application.yaml",
@@ -70799,6 +70566,9 @@ var require_constants5 = __commonJS({
70799
70566
  Ui5MockYaml: "ui5-mock.yaml",
70800
70567
  UI5DeployYaml: "ui5-deploy.yaml"
70801
70568
  };
70569
+ exports2.DirName = {
70570
+ Changes: "changes"
70571
+ };
70802
70572
  }
70803
70573
  });
70804
70574
 
@@ -71543,6 +71313,125 @@ var require_cap = __commonJS({
71543
71313
  }
71544
71314
  });
71545
71315
 
71316
+ // ../../node_modules/@sap-ux/project-access/dist/project/i18n/i18n.js
71317
+ var require_i18n4 = __commonJS({
71318
+ "../../node_modules/@sap-ux/project-access/dist/project/i18n/i18n.js"(exports2) {
71319
+ "use strict";
71320
+ var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
71321
+ function adopt(value) {
71322
+ return value instanceof P ? value : new P(function(resolve) {
71323
+ resolve(value);
71324
+ });
71325
+ }
71326
+ return new (P || (P = Promise))(function(resolve, reject) {
71327
+ function fulfilled(value) {
71328
+ try {
71329
+ step(generator.next(value));
71330
+ } catch (e) {
71331
+ reject(e);
71332
+ }
71333
+ }
71334
+ function rejected(value) {
71335
+ try {
71336
+ step(generator["throw"](value));
71337
+ } catch (e) {
71338
+ reject(e);
71339
+ }
71340
+ }
71341
+ function step(result2) {
71342
+ result2.done ? resolve(result2.value) : adopt(result2.value).then(fulfilled, rejected);
71343
+ }
71344
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
71345
+ });
71346
+ };
71347
+ Object.defineProperty(exports2, "__esModule", { value: true });
71348
+ exports2.getRelativeI18nPropertiesPaths = exports2.getI18nPropertiesPaths = void 0;
71349
+ var path_1 = require("path");
71350
+ var file_1 = require_file4();
71351
+ function getI18nPropertiesPaths(manifestPath, manifest) {
71352
+ return __awaiter(this, void 0, void 0, function* () {
71353
+ const parsedManifest = manifest !== null && manifest !== void 0 ? manifest : yield (0, file_1.readJSON)(manifestPath);
71354
+ const manifestFolder = (0, path_1.dirname)(manifestPath);
71355
+ const relativeI18nPropertiesPaths = getRelativeI18nPropertiesPaths(parsedManifest);
71356
+ const i18nPropertiesPaths = {
71357
+ "sap.app": (0, path_1.join)(manifestFolder, relativeI18nPropertiesPaths["sap.app"]),
71358
+ models: {}
71359
+ };
71360
+ for (const modelKey in relativeI18nPropertiesPaths.models) {
71361
+ i18nPropertiesPaths.models[modelKey] = {
71362
+ path: (0, path_1.join)(manifestFolder, relativeI18nPropertiesPaths.models[modelKey].path)
71363
+ };
71364
+ }
71365
+ return i18nPropertiesPaths;
71366
+ });
71367
+ }
71368
+ exports2.getI18nPropertiesPaths = getI18nPropertiesPaths;
71369
+ function getRelativeI18nPropertiesPaths(manifest) {
71370
+ return {
71371
+ "sap.app": getI18nAppPath(manifest),
71372
+ models: getI18nModelPaths(manifest)
71373
+ };
71374
+ }
71375
+ exports2.getRelativeI18nPropertiesPaths = getRelativeI18nPropertiesPaths;
71376
+ function getI18nAppPath(manifest) {
71377
+ var _a2, _b;
71378
+ const defaultPath = (0, path_1.join)("i18n/i18n.properties");
71379
+ if (typeof ((_a2 = manifest === null || manifest === void 0 ? void 0 : manifest["sap.app"]) === null || _a2 === void 0 ? void 0 : _a2.i18n) === "string") {
71380
+ return (0, path_1.join)(manifest["sap.app"].i18n);
71381
+ }
71382
+ if (typeof ((_b = manifest === null || manifest === void 0 ? void 0 : manifest["sap.app"]) === null || _b === void 0 ? void 0 : _b.i18n) === "object") {
71383
+ if ("bundleName" in manifest["sap.app"].i18n) {
71384
+ const withoutAppId = manifest["sap.app"].i18n.bundleName.replace(manifest["sap.app"].id, "");
71385
+ const i18nPath = `${(0, path_1.join)(...withoutAppId.split("."))}.properties`;
71386
+ return (0, path_1.join)(i18nPath);
71387
+ }
71388
+ if ("bundleUrl" in manifest["sap.app"].i18n) {
71389
+ return (0, path_1.join)(manifest["sap.app"].i18n.bundleUrl);
71390
+ }
71391
+ }
71392
+ return defaultPath;
71393
+ }
71394
+ function getI18nModelPaths(manifest) {
71395
+ var _a2, _b;
71396
+ const result2 = {};
71397
+ const models = (_b = (_a2 = manifest === null || manifest === void 0 ? void 0 : manifest["sap.ui5"]) === null || _a2 === void 0 ? void 0 : _a2.models) !== null && _b !== void 0 ? _b : {};
71398
+ const resourceModelKeys = Object.keys(models).filter((key) => models[key].type === "sap.ui.model.resource.ResourceModel");
71399
+ for (const modelKey of resourceModelKeys) {
71400
+ const i18nModel = models[modelKey];
71401
+ if (i18nModel.settings) {
71402
+ if (i18nModel.settings.bundleName) {
71403
+ const withoutAppId = i18nModel.settings.bundleName.replace(manifest["sap.app"].id, "");
71404
+ const i18nPath = `${(0, path_1.join)(...withoutAppId.split("."))}.properties`;
71405
+ result2[modelKey] = { path: (0, path_1.join)(i18nPath) };
71406
+ continue;
71407
+ }
71408
+ if (i18nModel.settings.bundleUrl) {
71409
+ result2[modelKey] = { path: (0, path_1.join)(i18nModel.settings.bundleUrl) };
71410
+ continue;
71411
+ }
71412
+ }
71413
+ if (i18nModel.uri) {
71414
+ result2[modelKey] = { path: (0, path_1.join)(i18nModel.uri) };
71415
+ }
71416
+ }
71417
+ return result2;
71418
+ }
71419
+ }
71420
+ });
71421
+
71422
+ // ../../node_modules/@sap-ux/project-access/dist/project/i18n/index.js
71423
+ var require_i18n5 = __commonJS({
71424
+ "../../node_modules/@sap-ux/project-access/dist/project/i18n/index.js"(exports2) {
71425
+ "use strict";
71426
+ Object.defineProperty(exports2, "__esModule", { value: true });
71427
+ exports2.getI18nPropertiesPaths = void 0;
71428
+ var i18n_1 = require_i18n4();
71429
+ Object.defineProperty(exports2, "getI18nPropertiesPaths", { enumerable: true, get: function() {
71430
+ return i18n_1.getI18nPropertiesPaths;
71431
+ } });
71432
+ }
71433
+ });
71434
+
71546
71435
  // ../../node_modules/lodash/_listCacheClear.js
71547
71436
  var require_listCacheClear = __commonJS({
71548
71437
  "../../node_modules/lodash/_listCacheClear.js"(exports2, module2) {
@@ -74371,18 +74260,20 @@ var require_search = __commonJS({
74371
74260
  if ((yield (0, cap_1.getCapProjectType)(appRoot)) !== void 0) {
74372
74261
  return null;
74373
74262
  }
74374
- if ((yield (0, file_1.fileExists)((0, path_1.join)(appRoot, constants_1.FileName.Ui5LocalYaml))) && (0, dependencies_1.hasDependency)(appPckJson, "@sap/ux-ui5-tooling")) {
74375
- return {
74376
- appRoot,
74377
- projectRoot: appRoot
74378
- };
74379
- }
74380
74263
  const projectRoot = yield findCapProjectRoot(appRoot);
74381
74264
  if (projectRoot) {
74382
74265
  return {
74383
74266
  appRoot,
74384
74267
  projectRoot
74385
74268
  };
74269
+ } else if (
74270
+ // Check for freestyle non CAP
74271
+ (yield (0, file_1.fileExists)((0, path_1.join)(appRoot, constants_1.FileName.Ui5LocalYaml))) && (0, dependencies_1.hasDependency)(appPckJson, "@sap/ux-ui5-tooling")
74272
+ ) {
74273
+ return {
74274
+ appRoot,
74275
+ projectRoot: appRoot
74276
+ };
74386
74277
  }
74387
74278
  } catch (_a2) {
74388
74279
  }
@@ -74580,6 +74471,93 @@ var require_search = __commonJS({
74580
74471
  }
74581
74472
  });
74582
74473
 
74474
+ // ../../node_modules/@sap-ux/project-access/dist/project/service.js
74475
+ var require_service = __commonJS({
74476
+ "../../node_modules/@sap-ux/project-access/dist/project/service.js"(exports2) {
74477
+ "use strict";
74478
+ var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
74479
+ function adopt(value) {
74480
+ return value instanceof P ? value : new P(function(resolve) {
74481
+ resolve(value);
74482
+ });
74483
+ }
74484
+ return new (P || (P = Promise))(function(resolve, reject) {
74485
+ function fulfilled(value) {
74486
+ try {
74487
+ step(generator.next(value));
74488
+ } catch (e) {
74489
+ reject(e);
74490
+ }
74491
+ }
74492
+ function rejected(value) {
74493
+ try {
74494
+ step(generator["throw"](value));
74495
+ } catch (e) {
74496
+ reject(e);
74497
+ }
74498
+ }
74499
+ function step(result2) {
74500
+ result2.done ? resolve(result2.value) : adopt(result2.value).then(fulfilled, rejected);
74501
+ }
74502
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
74503
+ });
74504
+ };
74505
+ Object.defineProperty(exports2, "__esModule", { value: true });
74506
+ exports2.getServicesAndAnnotations = exports2.getMainService = void 0;
74507
+ var path_1 = require("path");
74508
+ var file_1 = require_file4();
74509
+ function getMainService(manifest) {
74510
+ var _a2, _b, _c, _d;
74511
+ const model = typeof ((_a2 = manifest === null || manifest === void 0 ? void 0 : manifest["sap.ovp"]) === null || _a2 === void 0 ? void 0 : _a2.globalFilterModel) === "string" ? manifest["sap.ovp"].globalFilterModel : "";
74512
+ return typeof ((_d = (_c = (_b = manifest === null || manifest === void 0 ? void 0 : manifest["sap.ui5"]) === null || _b === void 0 ? void 0 : _b.models) === null || _c === void 0 ? void 0 : _c[model]) === null || _d === void 0 ? void 0 : _d.dataSource) === "string" ? manifest["sap.ui5"].models[model].dataSource : void 0;
74513
+ }
74514
+ exports2.getMainService = getMainService;
74515
+ function getServicesAndAnnotations(manifestPath, manifest) {
74516
+ var _a2, _b;
74517
+ return __awaiter(this, void 0, void 0, function* () {
74518
+ const parsedManifest = manifest !== null && manifest !== void 0 ? manifest : yield (0, file_1.readJSON)(manifestPath);
74519
+ const manifestFolder = (0, path_1.dirname)(manifestPath);
74520
+ const services = {};
74521
+ const dataSources = (_b = (_a2 = parsedManifest === null || parsedManifest === void 0 ? void 0 : parsedManifest["sap.app"]) === null || _a2 === void 0 ? void 0 : _a2.dataSources) !== null && _b !== void 0 ? _b : {};
74522
+ for (const name in dataSources) {
74523
+ if (dataSources[name].type !== "OData") {
74524
+ continue;
74525
+ }
74526
+ services[name] = getServiceSpecification(manifestFolder, name, dataSources);
74527
+ }
74528
+ return services;
74529
+ });
74530
+ }
74531
+ exports2.getServicesAndAnnotations = getServicesAndAnnotations;
74532
+ function getServiceSpecification(webappFolder, name, dataSources) {
74533
+ var _a2, _b, _c, _d, _e;
74534
+ const dataSource = dataSources[name];
74535
+ const uri = dataSource.uri;
74536
+ const local = typeof ((_a2 = dataSource.settings) === null || _a2 === void 0 ? void 0 : _a2.localUri) === "string" ? (0, path_1.join)(webappFolder, dataSource.settings.localUri) : "";
74537
+ const odataVersion = (_c = (_b = dataSource.settings) === null || _b === void 0 ? void 0 : _b.odataVersion) !== null && _c !== void 0 ? _c : "2.0";
74538
+ const annotations = [];
74539
+ const annotationNames = (_d = dataSource.settings) === null || _d === void 0 ? void 0 : _d.annotations;
74540
+ if (Array.isArray(annotationNames)) {
74541
+ for (const annotationName of annotationNames) {
74542
+ const annotation = dataSources[annotationName];
74543
+ if (annotation) {
74544
+ annotations.push({
74545
+ uri: annotation.uri,
74546
+ local: ((_e = annotation.settings) === null || _e === void 0 ? void 0 : _e.localUri) ? (0, path_1.join)(webappFolder, annotation.settings.localUri) : void 0
74547
+ });
74548
+ }
74549
+ }
74550
+ }
74551
+ return {
74552
+ uri,
74553
+ local,
74554
+ odataVersion,
74555
+ annotations
74556
+ };
74557
+ }
74558
+ }
74559
+ });
74560
+
74583
74561
  // ../../node_modules/@sap-ux/project-access/dist/project/info.js
74584
74562
  var require_info = __commonJS({
74585
74563
  "../../node_modules/@sap-ux/project-access/dist/project/info.js"(exports2) {
@@ -74612,13 +74590,68 @@ var require_info = __commonJS({
74612
74590
  });
74613
74591
  };
74614
74592
  Object.defineProperty(exports2, "__esModule", { value: true });
74615
- exports2.getProjectType = exports2.getAppType = exports2.getAppProgrammingLanguage = void 0;
74593
+ exports2.getProjectType = exports2.getAppType = exports2.getAppProgrammingLanguage = exports2.getProject = void 0;
74616
74594
  var path_1 = require("path");
74617
74595
  var constants_1 = require_constants5();
74618
74596
  var file_1 = require_file4();
74619
74597
  var cap_1 = require_cap();
74620
- var ui5_config_1 = require_ui5_config();
74598
+ var i18n_1 = require_i18n4();
74621
74599
  var search_1 = require_search();
74600
+ var service_1 = require_service();
74601
+ var ui5_config_1 = require_ui5_config();
74602
+ function getProject(root) {
74603
+ return __awaiter(this, void 0, void 0, function* () {
74604
+ const checkCapType = yield (0, cap_1.getCapProjectType)(root);
74605
+ const projectType = checkCapType !== null && checkCapType !== void 0 ? checkCapType : "EDMXBackend";
74606
+ const packageJson = yield (0, file_1.readJSON)((0, path_1.join)(root, constants_1.FileName.Package));
74607
+ const appFolders = getAppFolders(packageJson);
74608
+ const apps = yield getApps(root, appFolders);
74609
+ return {
74610
+ root,
74611
+ projectType,
74612
+ apps
74613
+ };
74614
+ });
74615
+ }
74616
+ exports2.getProject = getProject;
74617
+ function getAppFolders(packageJson) {
74618
+ return Array.isArray(packageJson.sapux) ? packageJson.sapux.map((appFolder) => (0, path_1.join)(...appFolder.split(/[/\\]/))) : [""];
74619
+ }
74620
+ function getApps(root, appFolders) {
74621
+ return __awaiter(this, void 0, void 0, function* () {
74622
+ const apps = {};
74623
+ for (const appFolder of appFolders) {
74624
+ const applicationStructure = yield getApplicationStructure(root, appFolder);
74625
+ if (applicationStructure) {
74626
+ apps[appFolder] = applicationStructure;
74627
+ }
74628
+ }
74629
+ return apps;
74630
+ });
74631
+ }
74632
+ function getApplicationStructure(root, appFolder) {
74633
+ return __awaiter(this, void 0, void 0, function* () {
74634
+ const appRoot = (0, path_1.join)(root, appFolder);
74635
+ const absoluteWebappPath = yield (0, ui5_config_1.getWebappPath)(appRoot);
74636
+ const manifest = (0, path_1.join)(absoluteWebappPath, constants_1.FileName.Manifest);
74637
+ if (!(yield (0, file_1.fileExists)(manifest))) {
74638
+ return void 0;
74639
+ }
74640
+ const manifestObject = yield (0, file_1.readJSON)(manifest);
74641
+ const changes = (0, path_1.join)(absoluteWebappPath, constants_1.DirName.Changes);
74642
+ const i18n = yield (0, i18n_1.getI18nPropertiesPaths)(manifest, manifestObject);
74643
+ const mainService = (0, service_1.getMainService)(manifestObject);
74644
+ const services = yield (0, service_1.getServicesAndAnnotations)(manifest, manifestObject);
74645
+ return {
74646
+ appRoot,
74647
+ manifest,
74648
+ changes,
74649
+ i18n,
74650
+ mainService,
74651
+ services
74652
+ };
74653
+ });
74654
+ }
74622
74655
  function getAppProgrammingLanguage(appRoot, memFs) {
74623
74656
  return __awaiter(this, void 0, void 0, function* () {
74624
74657
  const ignoreFolders = ["node_modules", ".git"];
@@ -74751,7 +74784,7 @@ var require_project2 = __commonJS({
74751
74784
  "../../node_modules/@sap-ux/project-access/dist/project/index.js"(exports2) {
74752
74785
  "use strict";
74753
74786
  Object.defineProperty(exports2, "__esModule", { value: true });
74754
- exports2.getMtaPath = exports2.readUi5Yaml = exports2.getWebappPath = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findCapProjects = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getProjectType = exports2.getAppType = exports2.getAppProgrammingLanguage = exports2.getNodeModulesPath = exports2.readCapServiceMetadataEdmx = exports2.getCapEnvironment = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getCdsServices = exports2.getCdsRoots = exports2.getCdsFiles = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapCustomPaths = void 0;
74787
+ exports2.getMtaPath = exports2.readUi5Yaml = exports2.getWebappPath = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findCapProjects = exports2.findAllApps = exports2.loadModuleFromProject = exports2.getProjectType = exports2.getProject = exports2.getAppType = exports2.getAppProgrammingLanguage = exports2.getI18nPropertiesPaths = exports2.getNodeModulesPath = exports2.readCapServiceMetadataEdmx = exports2.getCapEnvironment = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getCdsServices = exports2.getCdsRoots = exports2.getCdsFiles = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapCustomPaths = void 0;
74755
74788
  var cap_1 = require_cap();
74756
74789
  Object.defineProperty(exports2, "getCapCustomPaths", { enumerable: true, get: function() {
74757
74790
  return cap_1.getCapCustomPaths;
@@ -74787,6 +74820,10 @@ var require_project2 = __commonJS({
74787
74820
  Object.defineProperty(exports2, "getNodeModulesPath", { enumerable: true, get: function() {
74788
74821
  return dependencies_1.getNodeModulesPath;
74789
74822
  } });
74823
+ var i18n_1 = require_i18n5();
74824
+ Object.defineProperty(exports2, "getI18nPropertiesPaths", { enumerable: true, get: function() {
74825
+ return i18n_1.getI18nPropertiesPaths;
74826
+ } });
74790
74827
  var info_1 = require_info();
74791
74828
  Object.defineProperty(exports2, "getAppProgrammingLanguage", { enumerable: true, get: function() {
74792
74829
  return info_1.getAppProgrammingLanguage;
@@ -74794,6 +74831,9 @@ var require_project2 = __commonJS({
74794
74831
  Object.defineProperty(exports2, "getAppType", { enumerable: true, get: function() {
74795
74832
  return info_1.getAppType;
74796
74833
  } });
74834
+ Object.defineProperty(exports2, "getProject", { enumerable: true, get: function() {
74835
+ return info_1.getProject;
74836
+ } });
74797
74837
  Object.defineProperty(exports2, "getProjectType", { enumerable: true, get: function() {
74798
74838
  return info_1.getProjectType;
74799
74839
  } });
@@ -74938,11 +74978,15 @@ var require_dist10 = __commonJS({
74938
74978
  __createBinding(exports3, m, p);
74939
74979
  };
74940
74980
  Object.defineProperty(exports2, "__esModule", { value: true });
74941
- exports2.getFilePaths = exports2.readUi5Yaml = exports2.readCapServiceMetadataEdmx = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getWebappPath = exports2.getProjectType = exports2.getNodeModulesPath = exports2.getMtaPath = exports2.getCdsServices = exports2.getCdsRoots = exports2.getCdsFiles = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppType = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findCapProjects = exports2.findAllApps = exports2.FileName = void 0;
74981
+ exports2.readUi5Yaml = exports2.readCapServiceMetadataEdmx = exports2.loadModuleFromProject = exports2.isCapNodeJsProject = exports2.isCapJavaProject = exports2.getWebappPath = exports2.getProjectType = exports2.getProject = exports2.getNodeModulesPath = exports2.getMtaPath = exports2.getI18nPropertiesPaths = exports2.getCdsServices = exports2.getCdsRoots = exports2.getCdsFiles = exports2.getCapProjectType = exports2.getCapModelAndServices = exports2.getCapEnvironment = exports2.getCapCustomPaths = exports2.getAppType = exports2.getAppProgrammingLanguage = exports2.getAppRootFromWebappPath = exports2.findProjectRoot = exports2.findFioriArtifacts = exports2.findCapProjects = exports2.findAllApps = exports2.getFilePaths = exports2.FileName = void 0;
74942
74982
  var constants_1 = require_constants5();
74943
74983
  Object.defineProperty(exports2, "FileName", { enumerable: true, get: function() {
74944
74984
  return constants_1.FileName;
74945
74985
  } });
74986
+ var file_1 = require_file4();
74987
+ Object.defineProperty(exports2, "getFilePaths", { enumerable: true, get: function() {
74988
+ return file_1.getFilePaths;
74989
+ } });
74946
74990
  var project_1 = require_project2();
74947
74991
  Object.defineProperty(exports2, "findAllApps", { enumerable: true, get: function() {
74948
74992
  return project_1.findAllApps;
@@ -74986,12 +75030,18 @@ var require_dist10 = __commonJS({
74986
75030
  Object.defineProperty(exports2, "getCdsServices", { enumerable: true, get: function() {
74987
75031
  return project_1.getCdsServices;
74988
75032
  } });
75033
+ Object.defineProperty(exports2, "getI18nPropertiesPaths", { enumerable: true, get: function() {
75034
+ return project_1.getI18nPropertiesPaths;
75035
+ } });
74989
75036
  Object.defineProperty(exports2, "getMtaPath", { enumerable: true, get: function() {
74990
75037
  return project_1.getMtaPath;
74991
75038
  } });
74992
75039
  Object.defineProperty(exports2, "getNodeModulesPath", { enumerable: true, get: function() {
74993
75040
  return project_1.getNodeModulesPath;
74994
75041
  } });
75042
+ Object.defineProperty(exports2, "getProject", { enumerable: true, get: function() {
75043
+ return project_1.getProject;
75044
+ } });
74995
75045
  Object.defineProperty(exports2, "getProjectType", { enumerable: true, get: function() {
74996
75046
  return project_1.getProjectType;
74997
75047
  } });
@@ -75013,10 +75063,6 @@ var require_dist10 = __commonJS({
75013
75063
  Object.defineProperty(exports2, "readUi5Yaml", { enumerable: true, get: function() {
75014
75064
  return project_1.readUi5Yaml;
75015
75065
  } });
75016
- var file_1 = require_file4();
75017
- Object.defineProperty(exports2, "getFilePaths", { enumerable: true, get: function() {
75018
- return file_1.getFilePaths;
75019
- } });
75020
75066
  __exportStar(require_types6(), exports2);
75021
75067
  }
75022
75068
  });
@@ -75061,7 +75107,7 @@ var require_utils9 = __commonJS({
75061
75107
  return mod && mod.__esModule ? mod : { "default": mod };
75062
75108
  };
75063
75109
  Object.defineProperty(exports2, "__esModule", { value: true });
75064
- exports2.isReuseLib = exports2.getAdditionalEntitySetsFromManifest = exports2.isAdaptationProject = exports2.tryGetEdmxAppMockServiceMockdataDir = exports2.getEdmxAppDefaultMockdataDirPath = exports2.getCapAppMockdataDirPath = exports2.getApplicationId = exports2.deleteCapApp = exports2.isOVPProject = exports2.getAppIdForFile = exports2.checkServeLocalConfig = exports2.getUI5Version = exports2.getLocalUI5Version = exports2.getUi5CustomMiddleware = exports2.getBackendConfigByPath = exports2.getVersionFromManifest = exports2.getProjectType = exports2.getProjectTypeFromProjectFiles = exports2.findI18nProperty = exports2.updateI18nProperties = exports2.updateI18nProperty = exports2.getI18nProperties = exports2.mergeI18nProperties = exports2.getI18nPaths = exports2.readAppJson = exports2.getAppConfig = exports2.fillServiceSpecificationForApp = exports2.createApplicationStructureConfig = exports2.getMainService = exports2.findProjectRootsByDependency = exports2.isFioriToolsProject = exports2.checkPackageJson = exports2.findRunnableProjects = exports2.findRootsForPath = exports2.getDetailedProjectType = exports2.getAppType = exports2.findAllProjectRoots = exports2.findAllManifest = exports2.getAppProgrammingLanguage = exports2.hasDependency = exports2.findExtensionFiles = exports2.findAll = exports2.findLibrary = exports2.findProjectRoot = exports2.scriptsRegEx = void 0;
75110
+ exports2.isReuseLib = exports2.getAdditionalEntitySetsFromManifest = exports2.isAdaptationProject = exports2.tryGetEdmxAppMockServiceMockdataDir = exports2.getEdmxAppDefaultMockdataDirPath = exports2.getCapAppMockdataDirPath = exports2.getApplicationId = exports2.deleteCapApp = exports2.isOVPProject = exports2.getAppIdForFile = exports2.checkServeLocalConfig = exports2.getUI5Version = exports2.getLocalUI5Version = exports2.getUi5CustomMiddleware = exports2.getBackendConfigByPath = exports2.getVersionFromManifest = exports2.getProjectType = exports2.getProjectTypeFromProjectFiles = exports2.findI18nProperty = exports2.updateI18nProperties = exports2.updateI18nProperty = exports2.getI18nProperties = exports2.mergeI18nProperties = exports2.getI18nPaths = exports2.readAppJson = exports2.getAppConfig = exports2.getMainService = exports2.findProjectRootsByDependency = exports2.isFioriToolsProject = exports2.checkPackageJson = exports2.findRunnableProjects = exports2.findRootsForPath = exports2.getDetailedProjectType = exports2.getAppType = exports2.findAllProjectRoots = exports2.findAllManifest = exports2.getAppProgrammingLanguage = exports2.hasDependency = exports2.findExtensionFiles = exports2.findAll = exports2.findLibrary = exports2.findProjectRoot = exports2.scriptsRegEx = void 0;
75065
75111
  var fs_1 = require("fs");
75066
75112
  var findit2_1 = __importDefault(require_findit2());
75067
75113
  var fast_xml_parser_1 = require_fxp();
@@ -75401,58 +75447,6 @@ var require_utils9 = __commonJS({
75401
75447
  return manifest["sap.ui5"] && manifest["sap.ui5"].models && manifest["sap.ui5"].models[model] ? manifest["sap.ui5"].models[model].dataSource : void 0;
75402
75448
  }
75403
75449
  exports2.getMainService = getMainService;
75404
- function createApplicationStructureConfig(appFolder, manifest, sync) {
75405
- return {
75406
- manifest: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.FileName.Manifest),
75407
- changes: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Changes),
75408
- app: sync ? (0, path_1.join)(appFolder, project_spec_1.DirName.Sapux, project_spec_1.FileName.App) : void 0,
75409
- i18n: getI18nPaths((0, path_1.join)(appFolder, project_spec_1.DirName.Webapp), manifest),
75410
- mainService: getMainService(manifest),
75411
- services: {},
75412
- annotations: {},
75413
- ext: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext),
75414
- controller: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.Controller),
75415
- view: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.View),
75416
- fragment: (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, project_spec_1.DirName.Ext, project_spec_1.DirName.Fragment)
75417
- };
75418
- }
75419
- exports2.createApplicationStructureConfig = createApplicationStructureConfig;
75420
- function fillServiceSpecificationForApp(project, appFolder, manifest) {
75421
- var _a2;
75422
- const services = manifest["sap.app"].dataSources;
75423
- for (const name in services) {
75424
- if (services[name].type === project_spec_1.DataSourceType.OData) {
75425
- project.apps[appFolder].services[name] = {
75426
- uri: services[name].uri
75427
- };
75428
- const appServices = project.apps[appFolder].services;
75429
- if (services[name].settings) {
75430
- appServices[name].local = ((_a2 = services[name].settings) == null ? void 0 : _a2.localUri) ? (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, services[name].settings.localUri) : "";
75431
- if (services[name].settings.annotations) {
75432
- project.apps[appFolder].annotations[name] = project.apps[appFolder].annotations[name] || [];
75433
- for (const id of services[name].settings.annotations) {
75434
- const annotation = services[id];
75435
- if (annotation) {
75436
- if (!annotation.uri || annotation.settings && annotation.uri === annotation.settings.localUri) {
75437
- project.apps[appFolder].annotations[name].push((0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, annotation.settings.localUri));
75438
- } else {
75439
- appServices[name].annotations = {
75440
- uri: annotation.uri,
75441
- local: annotation.settings && annotation.settings.localUri ? (0, path_1.join)(appFolder, project_spec_1.DirName.Webapp, annotation.settings.localUri) : void 0
75442
- };
75443
- if (appServices[name].annotations.local) {
75444
- project.apps[appFolder].annotations[name].push(appServices[name].annotations.local);
75445
- }
75446
- }
75447
- }
75448
- }
75449
- }
75450
- appServices[name].odataVersion = services[name].settings.odataVersion ?? "2.0";
75451
- }
75452
- }
75453
- }
75454
- }
75455
- exports2.fillServiceSpecificationForApp = fillServiceSpecificationForApp;
75456
75450
  function getAppConfig(project, appId) {
75457
75451
  let errorMessage;
75458
75452
  if (appId === void 0) {
@@ -78723,9 +78717,9 @@ var init_i18next2 = __esm({
78723
78717
  }
78724
78718
  });
78725
78719
 
78726
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/utils.js
78720
+ // ../../node_modules/i18next-fs-backend/cjs/utils.js
78727
78721
  var require_utils10 = __commonJS({
78728
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/utils.js"(exports2) {
78722
+ "../../node_modules/i18next-fs-backend/cjs/utils.js"(exports2) {
78729
78723
  "use strict";
78730
78724
  Object.defineProperty(exports2, "__esModule", {
78731
78725
  value: true
@@ -78807,9 +78801,9 @@ var require_utils10 = __commonJS({
78807
78801
  }
78808
78802
  });
78809
78803
 
78810
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/formats/json5.js
78804
+ // ../../node_modules/i18next-fs-backend/cjs/formats/json5.js
78811
78805
  var require_json52 = __commonJS({
78812
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/formats/json5.js"(exports2, module2) {
78806
+ "../../node_modules/i18next-fs-backend/cjs/formats/json5.js"(exports2, module2) {
78813
78807
  "use strict";
78814
78808
  Object.defineProperty(exports2, "__esModule", {
78815
78809
  value: true
@@ -79974,9 +79968,9 @@ var require_json52 = __commonJS({
79974
79968
  }
79975
79969
  });
79976
79970
 
79977
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/formats/yaml.js
79971
+ // ../../node_modules/i18next-fs-backend/cjs/formats/yaml.js
79978
79972
  var require_yaml2 = __commonJS({
79979
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/formats/yaml.js"(exports2) {
79973
+ "../../node_modules/i18next-fs-backend/cjs/formats/yaml.js"(exports2) {
79980
79974
  "use strict";
79981
79975
  Object.defineProperty(exports2, "__esModule", {
79982
79976
  value: true
@@ -82612,9 +82606,9 @@ var require_yaml2 = __commonJS({
82612
82606
  }
82613
82607
  });
82614
82608
 
82615
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/fs.js
82609
+ // ../../node_modules/i18next-fs-backend/cjs/fs.js
82616
82610
  var require_fs2 = __commonJS({
82617
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/fs.js"(exports2, module2) {
82611
+ "../../node_modules/i18next-fs-backend/cjs/fs.js"(exports2, module2) {
82618
82612
  if (typeof require !== "undefined") {
82619
82613
  f = require("fs");
82620
82614
  if (f.default)
@@ -82626,9 +82620,9 @@ var require_fs2 = __commonJS({
82626
82620
  }
82627
82621
  });
82628
82622
 
82629
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/path.js
82623
+ // ../../node_modules/i18next-fs-backend/cjs/path.js
82630
82624
  var require_path = __commonJS({
82631
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/path.js"(exports2, module2) {
82625
+ "../../node_modules/i18next-fs-backend/cjs/path.js"(exports2, module2) {
82632
82626
  if (typeof require !== "undefined") {
82633
82627
  path2 = require("path");
82634
82628
  if (path2.default)
@@ -82640,9 +82634,9 @@ var require_path = __commonJS({
82640
82634
  }
82641
82635
  });
82642
82636
 
82643
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/extname.js
82637
+ // ../../node_modules/i18next-fs-backend/cjs/extname.js
82644
82638
  var require_extname2 = __commonJS({
82645
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/extname.js"(exports2, module2) {
82639
+ "../../node_modules/i18next-fs-backend/cjs/extname.js"(exports2, module2) {
82646
82640
  "use strict";
82647
82641
  Object.defineProperty(exports2, "__esModule", {
82648
82642
  value: true
@@ -82658,9 +82652,9 @@ var require_extname2 = __commonJS({
82658
82652
  }
82659
82653
  });
82660
82654
 
82661
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/readFile.js
82655
+ // ../../node_modules/i18next-fs-backend/cjs/readFile.js
82662
82656
  var require_readFile2 = __commonJS({
82663
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/readFile.js"(exports, module) {
82657
+ "../../node_modules/i18next-fs-backend/cjs/readFile.js"(exports, module) {
82664
82658
  "use strict";
82665
82659
  function _typeof(obj) {
82666
82660
  "@babel/helpers - typeof";
@@ -82880,9 +82874,9 @@ var require_readFile2 = __commonJS({
82880
82874
  }
82881
82875
  });
82882
82876
 
82883
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/writeFile.js
82877
+ // ../../node_modules/i18next-fs-backend/cjs/writeFile.js
82884
82878
  var require_writeFile2 = __commonJS({
82885
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/writeFile.js"(exports2, module2) {
82879
+ "../../node_modules/i18next-fs-backend/cjs/writeFile.js"(exports2, module2) {
82886
82880
  "use strict";
82887
82881
  function _typeof3(obj) {
82888
82882
  "@babel/helpers - typeof";
@@ -83101,9 +83095,9 @@ var require_writeFile2 = __commonJS({
83101
83095
  }
83102
83096
  });
83103
83097
 
83104
- // ../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/index.js
83098
+ // ../../node_modules/i18next-fs-backend/cjs/index.js
83105
83099
  var require_cjs2 = __commonJS({
83106
- "../../node_modules/@sap-ux/store/node_modules/i18next-fs-backend/cjs/index.js"(exports2, module2) {
83100
+ "../../node_modules/i18next-fs-backend/cjs/index.js"(exports2, module2) {
83107
83101
  "use strict";
83108
83102
  Object.defineProperty(exports2, "__esModule", {
83109
83103
  value: true
@@ -83327,7 +83321,7 @@ var require_cjs2 = __commonJS({
83327
83321
  });
83328
83322
 
83329
83323
  // ../../node_modules/@sap-ux/store/dist/i18n.js
83330
- var require_i18n4 = __commonJS({
83324
+ var require_i18n6 = __commonJS({
83331
83325
  "../../node_modules/@sap-ux/store/dist/i18n.js"(exports2) {
83332
83326
  "use strict";
83333
83327
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
@@ -84374,7 +84368,7 @@ var require_backend_system6 = __commonJS({
84374
84368
  exports2.getInstance = exports2.SystemService = void 0;
84375
84369
  var backend_system_1 = require_backend_system5();
84376
84370
  var backend_system_2 = require_backend_system4();
84377
- var i18n_1 = require_i18n4();
84371
+ var i18n_1 = require_i18n6();
84378
84372
  var SystemService = class {
84379
84373
  constructor(logger, options2 = {}) {
84380
84374
  this.logger = logger;
@@ -84703,7 +84697,7 @@ var require_migration = __commonJS({
84703
84697
  };
84704
84698
  Object.defineProperty(exports2, "__esModule", { value: true });
84705
84699
  exports2.migrateToLatestVersion = exports2.LEGACY_API_HUB_API_KEY = exports2.LEGACY_API_HUB_API_SERVICE = void 0;
84706
- var i18n_1 = require_i18n4();
84700
+ var i18n_1 = require_i18n6();
84707
84701
  var api_hub_1 = require_api_hub2();
84708
84702
  exports2.LEGACY_API_HUB_API_SERVICE = "fiori/system/apiHub";
84709
84703
  exports2.LEGACY_API_HUB_API_KEY = "API_HUB_API_KEY";
@@ -84732,7 +84726,7 @@ var require_migration = __commonJS({
84732
84726
  });
84733
84727
 
84734
84728
  // ../../node_modules/@sap-ux/store/dist/services/api-hub/service.js
84735
- var require_service = __commonJS({
84729
+ var require_service2 = __commonJS({
84736
84730
  "../../node_modules/@sap-ux/store/dist/services/api-hub/service.js"(exports2) {
84737
84731
  "use strict";
84738
84732
  var __awaiter = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) {
@@ -84855,7 +84849,7 @@ var require_api_hub4 = __commonJS({
84855
84849
  __createBinding(exports3, m, p);
84856
84850
  };
84857
84851
  Object.defineProperty(exports2, "__esModule", { value: true });
84858
- __exportStar(require_service(), exports2);
84852
+ __exportStar(require_service2(), exports2);
84859
84853
  }
84860
84854
  });
84861
84855
 
@@ -85519,16 +85513,16 @@ var require_node4 = __commonJS({
85519
85513
  }
85520
85514
  });
85521
85515
 
85522
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream.js
85516
+ // ../../node_modules/readable-stream/lib/internal/streams/stream.js
85523
85517
  var require_stream = __commonJS({
85524
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) {
85518
+ "../../node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) {
85525
85519
  module2.exports = require("stream");
85526
85520
  }
85527
85521
  });
85528
85522
 
85529
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js
85523
+ // ../../node_modules/readable-stream/lib/internal/streams/destroy.js
85530
85524
  var require_destroy = __commonJS({
85531
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) {
85525
+ "../../node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) {
85532
85526
  "use strict";
85533
85527
  function destroy(err, cb) {
85534
85528
  var _this = this;
@@ -85619,9 +85613,9 @@ var require_destroy = __commonJS({
85619
85613
  }
85620
85614
  });
85621
85615
 
85622
- // ../../node_modules/winston-transport/node_modules/readable-stream/errors.js
85616
+ // ../../node_modules/readable-stream/errors.js
85623
85617
  var require_errors3 = __commonJS({
85624
- "../../node_modules/winston-transport/node_modules/readable-stream/errors.js"(exports2, module2) {
85618
+ "../../node_modules/readable-stream/errors.js"(exports2, module2) {
85625
85619
  "use strict";
85626
85620
  var codes = {};
85627
85621
  function createErrorType(code, message, Base) {
@@ -85719,9 +85713,9 @@ var require_errors3 = __commonJS({
85719
85713
  }
85720
85714
  });
85721
85715
 
85722
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js
85716
+ // ../../node_modules/readable-stream/lib/internal/streams/state.js
85723
85717
  var require_state2 = __commonJS({
85724
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) {
85718
+ "../../node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) {
85725
85719
  "use strict";
85726
85720
  var ERR_INVALID_OPT_VALUE = require_errors3().codes.ERR_INVALID_OPT_VALUE;
85727
85721
  function highWaterMarkFrom(options2, isDuplex, duplexKey) {
@@ -85791,9 +85785,9 @@ var require_inherits = __commonJS({
85791
85785
  }
85792
85786
  });
85793
85787
 
85794
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js
85788
+ // ../../node_modules/readable-stream/lib/internal/streams/buffer_list.js
85795
85789
  var require_buffer_list = __commonJS({
85796
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) {
85790
+ "../../node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) {
85797
85791
  "use strict";
85798
85792
  function ownKeys(object, enumerableOnly) {
85799
85793
  var keys = Object.keys(object);
@@ -86102,9 +86096,9 @@ var require_safe_buffer = __commonJS({
86102
86096
  }
86103
86097
  });
86104
86098
 
86105
- // ../../node_modules/winston-transport/node_modules/string_decoder/lib/string_decoder.js
86099
+ // ../../node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js
86106
86100
  var require_string_decoder = __commonJS({
86107
- "../../node_modules/winston-transport/node_modules/string_decoder/lib/string_decoder.js"(exports2) {
86101
+ "../../node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js"(exports2) {
86108
86102
  "use strict";
86109
86103
  var Buffer2 = require_safe_buffer().Buffer;
86110
86104
  var isEncoding = Buffer2.isEncoding || function(encoding) {
@@ -86362,9 +86356,9 @@ var require_string_decoder = __commonJS({
86362
86356
  }
86363
86357
  });
86364
86358
 
86365
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
86359
+ // ../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js
86366
86360
  var require_end_of_stream = __commonJS({
86367
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) {
86361
+ "../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) {
86368
86362
  "use strict";
86369
86363
  var ERR_STREAM_PREMATURE_CLOSE = require_errors3().codes.ERR_STREAM_PREMATURE_CLOSE;
86370
86364
  function once(callback) {
@@ -86463,9 +86457,9 @@ var require_end_of_stream = __commonJS({
86463
86457
  }
86464
86458
  });
86465
86459
 
86466
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js
86460
+ // ../../node_modules/readable-stream/lib/internal/streams/async_iterator.js
86467
86461
  var require_async_iterator = __commonJS({
86468
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) {
86462
+ "../../node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) {
86469
86463
  "use strict";
86470
86464
  var _Object$setPrototypeO;
86471
86465
  function _defineProperty2(obj, key, value) {
@@ -86631,9 +86625,9 @@ var require_async_iterator = __commonJS({
86631
86625
  }
86632
86626
  });
86633
86627
 
86634
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js
86628
+ // ../../node_modules/readable-stream/lib/internal/streams/from.js
86635
86629
  var require_from = __commonJS({
86636
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
86630
+ "../../node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
86637
86631
  "use strict";
86638
86632
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
86639
86633
  try {
@@ -86748,9 +86742,9 @@ var require_from = __commonJS({
86748
86742
  }
86749
86743
  });
86750
86744
 
86751
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js
86745
+ // ../../node_modules/readable-stream/lib/_stream_readable.js
86752
86746
  var require_stream_readable = __commonJS({
86753
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) {
86747
+ "../../node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) {
86754
86748
  "use strict";
86755
86749
  module2.exports = Readable;
86756
86750
  var Duplex;
@@ -87546,9 +87540,9 @@ var require_stream_readable = __commonJS({
87546
87540
  }
87547
87541
  });
87548
87542
 
87549
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js
87543
+ // ../../node_modules/readable-stream/lib/_stream_duplex.js
87550
87544
  var require_stream_duplex = __commonJS({
87551
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) {
87545
+ "../../node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) {
87552
87546
  "use strict";
87553
87547
  var objectKeys = Object.keys || function(obj) {
87554
87548
  var keys2 = [];
@@ -87646,9 +87640,9 @@ var require_stream_duplex = __commonJS({
87646
87640
  }
87647
87641
  });
87648
87642
 
87649
- // ../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js
87643
+ // ../../node_modules/readable-stream/lib/_stream_writable.js
87650
87644
  var require_stream_writable = __commonJS({
87651
- "../../node_modules/winston-transport/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) {
87645
+ "../../node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) {
87652
87646
  "use strict";
87653
87647
  module2.exports = Writable;
87654
87648
  function CorkedRequest(state) {
@@ -91764,2657 +91758,135 @@ var require_series = __commonJS({
91764
91758
  }
91765
91759
  });
91766
91760
 
91767
- // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/stream.js
91768
- var require_stream2 = __commonJS({
91769
- "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) {
91770
- module2.exports = require("stream");
91771
- }
91772
- });
91773
-
91774
- // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/buffer_list.js
91775
- var require_buffer_list2 = __commonJS({
91776
- "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(exports2, module2) {
91761
+ // ../../node_modules/readable-stream/lib/_stream_transform.js
91762
+ var require_stream_transform = __commonJS({
91763
+ "../../node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) {
91777
91764
  "use strict";
91778
- function ownKeys(object, enumerableOnly) {
91779
- var keys = Object.keys(object);
91780
- if (Object.getOwnPropertySymbols) {
91781
- var symbols = Object.getOwnPropertySymbols(object);
91782
- if (enumerableOnly)
91783
- symbols = symbols.filter(function(sym) {
91784
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
91785
- });
91786
- keys.push.apply(keys, symbols);
91765
+ module2.exports = Transform;
91766
+ var _require$codes = require_errors3().codes;
91767
+ var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
91768
+ var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
91769
+ var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
91770
+ var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
91771
+ var Duplex = require_stream_duplex();
91772
+ require_inherits()(Transform, Duplex);
91773
+ function afterTransform(er, data2) {
91774
+ var ts = this._transformState;
91775
+ ts.transforming = false;
91776
+ var cb = ts.writecb;
91777
+ if (cb === null) {
91778
+ return this.emit("error", new ERR_MULTIPLE_CALLBACK());
91779
+ }
91780
+ ts.writechunk = null;
91781
+ ts.writecb = null;
91782
+ if (data2 != null)
91783
+ this.push(data2);
91784
+ cb(er);
91785
+ var rs = this._readableState;
91786
+ rs.reading = false;
91787
+ if (rs.needReadable || rs.length < rs.highWaterMark) {
91788
+ this._read(rs.highWaterMark);
91787
91789
  }
91788
- return keys;
91789
91790
  }
91790
- function _objectSpread2(target) {
91791
- for (var i = 1; i < arguments.length; i++) {
91792
- var source = arguments[i] != null ? arguments[i] : {};
91793
- if (i % 2) {
91794
- ownKeys(Object(source), true).forEach(function(key) {
91795
- _defineProperty2(target, key, source[key]);
91796
- });
91797
- } else if (Object.getOwnPropertyDescriptors) {
91798
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
91799
- } else {
91800
- ownKeys(Object(source)).forEach(function(key) {
91801
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
91802
- });
91803
- }
91791
+ function Transform(options2) {
91792
+ if (!(this instanceof Transform))
91793
+ return new Transform(options2);
91794
+ Duplex.call(this, options2);
91795
+ this._transformState = {
91796
+ afterTransform: afterTransform.bind(this),
91797
+ needTransform: false,
91798
+ transforming: false,
91799
+ writecb: null,
91800
+ writechunk: null,
91801
+ writeencoding: null
91802
+ };
91803
+ this._readableState.needReadable = true;
91804
+ this._readableState.sync = false;
91805
+ if (options2) {
91806
+ if (typeof options2.transform === "function")
91807
+ this._transform = options2.transform;
91808
+ if (typeof options2.flush === "function")
91809
+ this._flush = options2.flush;
91804
91810
  }
91805
- return target;
91811
+ this.on("prefinish", prefinish);
91806
91812
  }
91807
- function _defineProperty2(obj, key, value) {
91808
- if (key in obj) {
91809
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
91813
+ function prefinish() {
91814
+ var _this = this;
91815
+ if (typeof this._flush === "function" && !this._readableState.destroyed) {
91816
+ this._flush(function(er, data2) {
91817
+ done(_this, er, data2);
91818
+ });
91810
91819
  } else {
91811
- obj[key] = value;
91820
+ done(this, null, null);
91812
91821
  }
91813
- return obj;
91814
91822
  }
91815
- function _classCallCheck2(instance, Constructor) {
91816
- if (!(instance instanceof Constructor)) {
91817
- throw new TypeError("Cannot call a class as a function");
91823
+ Transform.prototype.push = function(chunk, encoding) {
91824
+ this._transformState.needTransform = false;
91825
+ return Duplex.prototype.push.call(this, chunk, encoding);
91826
+ };
91827
+ Transform.prototype._transform = function(chunk, encoding, cb) {
91828
+ cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
91829
+ };
91830
+ Transform.prototype._write = function(chunk, encoding, cb) {
91831
+ var ts = this._transformState;
91832
+ ts.writecb = cb;
91833
+ ts.writechunk = chunk;
91834
+ ts.writeencoding = encoding;
91835
+ if (!ts.transforming) {
91836
+ var rs = this._readableState;
91837
+ if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark)
91838
+ this._read(rs.highWaterMark);
91818
91839
  }
91819
- }
91820
- function _defineProperties2(target, props) {
91821
- for (var i = 0; i < props.length; i++) {
91822
- var descriptor = props[i];
91823
- descriptor.enumerable = descriptor.enumerable || false;
91824
- descriptor.configurable = true;
91825
- if ("value" in descriptor)
91826
- descriptor.writable = true;
91827
- Object.defineProperty(target, descriptor.key, descriptor);
91840
+ };
91841
+ Transform.prototype._read = function(n) {
91842
+ var ts = this._transformState;
91843
+ if (ts.writechunk !== null && !ts.transforming) {
91844
+ ts.transforming = true;
91845
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
91846
+ } else {
91847
+ ts.needTransform = true;
91828
91848
  }
91849
+ };
91850
+ Transform.prototype._destroy = function(err, cb) {
91851
+ Duplex.prototype._destroy.call(this, err, function(err2) {
91852
+ cb(err2);
91853
+ });
91854
+ };
91855
+ function done(stream, er, data2) {
91856
+ if (er)
91857
+ return stream.emit("error", er);
91858
+ if (data2 != null)
91859
+ stream.push(data2);
91860
+ if (stream._writableState.length)
91861
+ throw new ERR_TRANSFORM_WITH_LENGTH_0();
91862
+ if (stream._transformState.transforming)
91863
+ throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
91864
+ return stream.push(null);
91829
91865
  }
91830
- function _createClass2(Constructor, protoProps, staticProps) {
91831
- if (protoProps)
91832
- _defineProperties2(Constructor.prototype, protoProps);
91833
- if (staticProps)
91834
- _defineProperties2(Constructor, staticProps);
91835
- return Constructor;
91836
- }
91837
- var _require = require("buffer");
91838
- var Buffer2 = _require.Buffer;
91839
- var _require2 = require("util");
91840
- var inspect = _require2.inspect;
91841
- var custom = inspect && inspect.custom || "inspect";
91842
- function copyBuffer(src, target, offset) {
91843
- Buffer2.prototype.copy.call(src, target, offset);
91844
- }
91845
- module2.exports = /* @__PURE__ */ function() {
91846
- function BufferList() {
91847
- _classCallCheck2(this, BufferList);
91848
- this.head = null;
91849
- this.tail = null;
91850
- this.length = 0;
91851
- }
91852
- _createClass2(BufferList, [{
91853
- key: "push",
91854
- value: function push(v) {
91855
- var entry = {
91856
- data: v,
91857
- next: null
91858
- };
91859
- if (this.length > 0)
91860
- this.tail.next = entry;
91861
- else
91862
- this.head = entry;
91863
- this.tail = entry;
91864
- ++this.length;
91865
- }
91866
- }, {
91867
- key: "unshift",
91868
- value: function unshift(v) {
91869
- var entry = {
91870
- data: v,
91871
- next: this.head
91872
- };
91873
- if (this.length === 0)
91874
- this.tail = entry;
91875
- this.head = entry;
91876
- ++this.length;
91877
- }
91878
- }, {
91879
- key: "shift",
91880
- value: function shift() {
91881
- if (this.length === 0)
91882
- return;
91883
- var ret = this.head.data;
91884
- if (this.length === 1)
91885
- this.head = this.tail = null;
91886
- else
91887
- this.head = this.head.next;
91888
- --this.length;
91889
- return ret;
91890
- }
91891
- }, {
91892
- key: "clear",
91893
- value: function clear() {
91894
- this.head = this.tail = null;
91895
- this.length = 0;
91896
- }
91897
- }, {
91898
- key: "join",
91899
- value: function join2(s) {
91900
- if (this.length === 0)
91901
- return "";
91902
- var p = this.head;
91903
- var ret = "" + p.data;
91904
- while (p = p.next) {
91905
- ret += s + p.data;
91906
- }
91907
- return ret;
91908
- }
91909
- }, {
91910
- key: "concat",
91911
- value: function concat(n) {
91912
- if (this.length === 0)
91913
- return Buffer2.alloc(0);
91914
- var ret = Buffer2.allocUnsafe(n >>> 0);
91915
- var p = this.head;
91916
- var i = 0;
91917
- while (p) {
91918
- copyBuffer(p.data, ret, i);
91919
- i += p.data.length;
91920
- p = p.next;
91921
- }
91922
- return ret;
91923
- }
91924
- // Consumes a specified amount of bytes or characters from the buffered data.
91925
- }, {
91926
- key: "consume",
91927
- value: function consume(n, hasStrings) {
91928
- var ret;
91929
- if (n < this.head.data.length) {
91930
- ret = this.head.data.slice(0, n);
91931
- this.head.data = this.head.data.slice(n);
91932
- } else if (n === this.head.data.length) {
91933
- ret = this.shift();
91934
- } else {
91935
- ret = hasStrings ? this._getString(n) : this._getBuffer(n);
91936
- }
91937
- return ret;
91938
- }
91939
- }, {
91940
- key: "first",
91941
- value: function first() {
91942
- return this.head.data;
91943
- }
91944
- // Consumes a specified amount of characters from the buffered data.
91945
- }, {
91946
- key: "_getString",
91947
- value: function _getString(n) {
91948
- var p = this.head;
91949
- var c = 1;
91950
- var ret = p.data;
91951
- n -= ret.length;
91952
- while (p = p.next) {
91953
- var str = p.data;
91954
- var nb = n > str.length ? str.length : n;
91955
- if (nb === str.length)
91956
- ret += str;
91957
- else
91958
- ret += str.slice(0, n);
91959
- n -= nb;
91960
- if (n === 0) {
91961
- if (nb === str.length) {
91962
- ++c;
91963
- if (p.next)
91964
- this.head = p.next;
91965
- else
91966
- this.head = this.tail = null;
91967
- } else {
91968
- this.head = p;
91969
- p.data = str.slice(nb);
91970
- }
91971
- break;
91972
- }
91973
- ++c;
91974
- }
91975
- this.length -= c;
91976
- return ret;
91977
- }
91978
- // Consumes a specified amount of bytes from the buffered data.
91979
- }, {
91980
- key: "_getBuffer",
91981
- value: function _getBuffer(n) {
91982
- var ret = Buffer2.allocUnsafe(n);
91983
- var p = this.head;
91984
- var c = 1;
91985
- p.data.copy(ret);
91986
- n -= p.data.length;
91987
- while (p = p.next) {
91988
- var buf = p.data;
91989
- var nb = n > buf.length ? buf.length : n;
91990
- buf.copy(ret, ret.length - n, 0, nb);
91991
- n -= nb;
91992
- if (n === 0) {
91993
- if (nb === buf.length) {
91994
- ++c;
91995
- if (p.next)
91996
- this.head = p.next;
91997
- else
91998
- this.head = this.tail = null;
91999
- } else {
92000
- this.head = p;
92001
- p.data = buf.slice(nb);
92002
- }
92003
- break;
92004
- }
92005
- ++c;
92006
- }
92007
- this.length -= c;
92008
- return ret;
92009
- }
92010
- // Make sure the linked list only shows the minimal necessary information.
92011
- }, {
92012
- key: custom,
92013
- value: function value(_45, options2) {
92014
- return inspect(this, _objectSpread2({}, options2, {
92015
- // Only inspect one level.
92016
- depth: 0,
92017
- // It should not recurse.
92018
- customInspect: false
92019
- }));
92020
- }
92021
- }]);
92022
- return BufferList;
92023
- }();
92024
91866
  }
92025
91867
  });
92026
91868
 
92027
- // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/destroy.js
92028
- var require_destroy2 = __commonJS({
92029
- "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) {
91869
+ // ../../node_modules/readable-stream/lib/_stream_passthrough.js
91870
+ var require_stream_passthrough = __commonJS({
91871
+ "../../node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) {
92030
91872
  "use strict";
92031
- function destroy(err, cb) {
92032
- var _this = this;
92033
- var readableDestroyed = this._readableState && this._readableState.destroyed;
92034
- var writableDestroyed = this._writableState && this._writableState.destroyed;
92035
- if (readableDestroyed || writableDestroyed) {
92036
- if (cb) {
92037
- cb(err);
92038
- } else if (err) {
92039
- if (!this._writableState) {
92040
- process.nextTick(emitErrorNT, this, err);
92041
- } else if (!this._writableState.errorEmitted) {
92042
- this._writableState.errorEmitted = true;
92043
- process.nextTick(emitErrorNT, this, err);
92044
- }
92045
- }
92046
- return this;
92047
- }
92048
- if (this._readableState) {
92049
- this._readableState.destroyed = true;
92050
- }
92051
- if (this._writableState) {
92052
- this._writableState.destroyed = true;
92053
- }
92054
- this._destroy(err || null, function(err2) {
92055
- if (!cb && err2) {
92056
- if (!_this._writableState) {
92057
- process.nextTick(emitErrorAndCloseNT, _this, err2);
92058
- } else if (!_this._writableState.errorEmitted) {
92059
- _this._writableState.errorEmitted = true;
92060
- process.nextTick(emitErrorAndCloseNT, _this, err2);
92061
- } else {
92062
- process.nextTick(emitCloseNT, _this);
92063
- }
92064
- } else if (cb) {
92065
- process.nextTick(emitCloseNT, _this);
92066
- cb(err2);
92067
- } else {
92068
- process.nextTick(emitCloseNT, _this);
92069
- }
92070
- });
92071
- return this;
92072
- }
92073
- function emitErrorAndCloseNT(self2, err) {
92074
- emitErrorNT(self2, err);
92075
- emitCloseNT(self2);
92076
- }
92077
- function emitCloseNT(self2) {
92078
- if (self2._writableState && !self2._writableState.emitClose)
92079
- return;
92080
- if (self2._readableState && !self2._readableState.emitClose)
92081
- return;
92082
- self2.emit("close");
92083
- }
92084
- function undestroy() {
92085
- if (this._readableState) {
92086
- this._readableState.destroyed = false;
92087
- this._readableState.reading = false;
92088
- this._readableState.ended = false;
92089
- this._readableState.endEmitted = false;
92090
- }
92091
- if (this._writableState) {
92092
- this._writableState.destroyed = false;
92093
- this._writableState.ended = false;
92094
- this._writableState.ending = false;
92095
- this._writableState.finalCalled = false;
92096
- this._writableState.prefinished = false;
92097
- this._writableState.finished = false;
92098
- this._writableState.errorEmitted = false;
92099
- }
92100
- }
92101
- function emitErrorNT(self2, err) {
92102
- self2.emit("error", err);
92103
- }
92104
- function errorOrDestroy(stream, err) {
92105
- var rState = stream._readableState;
92106
- var wState = stream._writableState;
92107
- if (rState && rState.autoDestroy || wState && wState.autoDestroy)
92108
- stream.destroy(err);
92109
- else
92110
- stream.emit("error", err);
91873
+ module2.exports = PassThrough;
91874
+ var Transform = require_stream_transform();
91875
+ require_inherits()(PassThrough, Transform);
91876
+ function PassThrough(options2) {
91877
+ if (!(this instanceof PassThrough))
91878
+ return new PassThrough(options2);
91879
+ Transform.call(this, options2);
92111
91880
  }
92112
- module2.exports = {
92113
- destroy,
92114
- undestroy,
92115
- errorOrDestroy
91881
+ PassThrough.prototype._transform = function(chunk, encoding, cb) {
91882
+ cb(null, chunk);
92116
91883
  };
92117
91884
  }
92118
91885
  });
92119
91886
 
92120
- // ../../node_modules/winston/node_modules/readable-stream/errors.js
92121
- var require_errors5 = __commonJS({
92122
- "../../node_modules/winston/node_modules/readable-stream/errors.js"(exports2, module2) {
92123
- "use strict";
92124
- var codes = {};
92125
- function createErrorType(code, message, Base) {
92126
- if (!Base) {
92127
- Base = Error;
92128
- }
92129
- function getMessage(arg1, arg2, arg3) {
92130
- if (typeof message === "string") {
92131
- return message;
92132
- } else {
92133
- return message(arg1, arg2, arg3);
92134
- }
92135
- }
92136
- class NodeError extends Base {
92137
- constructor(arg1, arg2, arg3) {
92138
- super(getMessage(arg1, arg2, arg3));
92139
- }
92140
- }
92141
- NodeError.prototype.name = Base.name;
92142
- NodeError.prototype.code = code;
92143
- codes[code] = NodeError;
92144
- }
92145
- function oneOf(expected, thing) {
92146
- if (Array.isArray(expected)) {
92147
- const len = expected.length;
92148
- expected = expected.map((i) => String(i));
92149
- if (len > 2) {
92150
- return `one of ${thing} ${expected.slice(0, len - 1).join(", ")}, or ` + expected[len - 1];
92151
- } else if (len === 2) {
92152
- return `one of ${thing} ${expected[0]} or ${expected[1]}`;
92153
- } else {
92154
- return `of ${thing} ${expected[0]}`;
92155
- }
92156
- } else {
92157
- return `of ${thing} ${String(expected)}`;
92158
- }
92159
- }
92160
- function startsWith(str, search, pos) {
92161
- return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
92162
- }
92163
- function endsWith(str, search, this_len) {
92164
- if (this_len === void 0 || this_len > str.length) {
92165
- this_len = str.length;
92166
- }
92167
- return str.substring(this_len - search.length, this_len) === search;
92168
- }
92169
- function includes(str, search, start) {
92170
- if (typeof start !== "number") {
92171
- start = 0;
92172
- }
92173
- if (start + search.length > str.length) {
92174
- return false;
92175
- } else {
92176
- return str.indexOf(search, start) !== -1;
92177
- }
92178
- }
92179
- createErrorType("ERR_INVALID_OPT_VALUE", function(name, value) {
92180
- return 'The value "' + value + '" is invalid for option "' + name + '"';
92181
- }, TypeError);
92182
- createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
92183
- let determiner;
92184
- if (typeof expected === "string" && startsWith(expected, "not ")) {
92185
- determiner = "must not be";
92186
- expected = expected.replace(/^not /, "");
92187
- } else {
92188
- determiner = "must be";
92189
- }
92190
- let msg;
92191
- if (endsWith(name, " argument")) {
92192
- msg = `The ${name} ${determiner} ${oneOf(expected, "type")}`;
92193
- } else {
92194
- const type = includes(name, ".") ? "property" : "argument";
92195
- msg = `The "${name}" ${type} ${determiner} ${oneOf(expected, "type")}`;
92196
- }
92197
- msg += `. Received type ${typeof actual}`;
92198
- return msg;
92199
- }, TypeError);
92200
- createErrorType("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
92201
- createErrorType("ERR_METHOD_NOT_IMPLEMENTED", function(name) {
92202
- return "The " + name + " method is not implemented";
92203
- });
92204
- createErrorType("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
92205
- createErrorType("ERR_STREAM_DESTROYED", function(name) {
92206
- return "Cannot call " + name + " after a stream was destroyed";
92207
- });
92208
- createErrorType("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
92209
- createErrorType("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
92210
- createErrorType("ERR_STREAM_WRITE_AFTER_END", "write after end");
92211
- createErrorType("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
92212
- createErrorType("ERR_UNKNOWN_ENCODING", function(arg) {
92213
- return "Unknown encoding: " + arg;
92214
- }, TypeError);
92215
- createErrorType("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
92216
- module2.exports.codes = codes;
92217
- }
92218
- });
92219
-
92220
- // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/state.js
92221
- var require_state3 = __commonJS({
92222
- "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/state.js"(exports2, module2) {
92223
- "use strict";
92224
- var ERR_INVALID_OPT_VALUE = require_errors5().codes.ERR_INVALID_OPT_VALUE;
92225
- function highWaterMarkFrom(options2, isDuplex, duplexKey) {
92226
- return options2.highWaterMark != null ? options2.highWaterMark : isDuplex ? options2[duplexKey] : null;
92227
- }
92228
- function getHighWaterMark(state, options2, duplexKey, isDuplex) {
92229
- var hwm = highWaterMarkFrom(options2, isDuplex, duplexKey);
92230
- if (hwm != null) {
92231
- if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
92232
- var name = isDuplex ? duplexKey : "highWaterMark";
92233
- throw new ERR_INVALID_OPT_VALUE(name, hwm);
92234
- }
92235
- return Math.floor(hwm);
92236
- }
92237
- return state.objectMode ? 16 : 16 * 1024;
92238
- }
92239
- module2.exports = {
92240
- getHighWaterMark
92241
- };
92242
- }
92243
- });
92244
-
92245
- // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js
92246
- var require_stream_writable2 = __commonJS({
92247
- "../../node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) {
92248
- "use strict";
92249
- module2.exports = Writable;
92250
- function CorkedRequest(state) {
92251
- var _this = this;
92252
- this.next = null;
92253
- this.entry = null;
92254
- this.finish = function() {
92255
- onCorkedFinish(_this, state);
92256
- };
92257
- }
92258
- var Duplex;
92259
- Writable.WritableState = WritableState;
92260
- var internalUtil = {
92261
- deprecate: require_node4()
92262
- };
92263
- var Stream = require_stream2();
92264
- var Buffer2 = require("buffer").Buffer;
92265
- var OurUint8Array = global.Uint8Array || function() {
92266
- };
92267
- function _uint8ArrayToBuffer(chunk) {
92268
- return Buffer2.from(chunk);
92269
- }
92270
- function _isUint8Array(obj) {
92271
- return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
92272
- }
92273
- var destroyImpl = require_destroy2();
92274
- var _require = require_state3();
92275
- var getHighWaterMark = _require.getHighWaterMark;
92276
- var _require$codes = require_errors5().codes;
92277
- var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
92278
- var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
92279
- var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
92280
- var ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE;
92281
- var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
92282
- var ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES;
92283
- var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
92284
- var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
92285
- var errorOrDestroy = destroyImpl.errorOrDestroy;
92286
- require_inherits()(Writable, Stream);
92287
- function nop() {
92288
- }
92289
- function WritableState(options2, stream, isDuplex) {
92290
- Duplex = Duplex || require_stream_duplex2();
92291
- options2 = options2 || {};
92292
- if (typeof isDuplex !== "boolean")
92293
- isDuplex = stream instanceof Duplex;
92294
- this.objectMode = !!options2.objectMode;
92295
- if (isDuplex)
92296
- this.objectMode = this.objectMode || !!options2.writableObjectMode;
92297
- this.highWaterMark = getHighWaterMark(this, options2, "writableHighWaterMark", isDuplex);
92298
- this.finalCalled = false;
92299
- this.needDrain = false;
92300
- this.ending = false;
92301
- this.ended = false;
92302
- this.finished = false;
92303
- this.destroyed = false;
92304
- var noDecode = options2.decodeStrings === false;
92305
- this.decodeStrings = !noDecode;
92306
- this.defaultEncoding = options2.defaultEncoding || "utf8";
92307
- this.length = 0;
92308
- this.writing = false;
92309
- this.corked = 0;
92310
- this.sync = true;
92311
- this.bufferProcessing = false;
92312
- this.onwrite = function(er) {
92313
- onwrite(stream, er);
92314
- };
92315
- this.writecb = null;
92316
- this.writelen = 0;
92317
- this.bufferedRequest = null;
92318
- this.lastBufferedRequest = null;
92319
- this.pendingcb = 0;
92320
- this.prefinished = false;
92321
- this.errorEmitted = false;
92322
- this.emitClose = options2.emitClose !== false;
92323
- this.autoDestroy = !!options2.autoDestroy;
92324
- this.bufferedRequestCount = 0;
92325
- this.corkedRequestsFree = new CorkedRequest(this);
92326
- }
92327
- WritableState.prototype.getBuffer = function getBuffer() {
92328
- var current = this.bufferedRequest;
92329
- var out = [];
92330
- while (current) {
92331
- out.push(current);
92332
- current = current.next;
92333
- }
92334
- return out;
92335
- };
92336
- (function() {
92337
- try {
92338
- Object.defineProperty(WritableState.prototype, "buffer", {
92339
- get: internalUtil.deprecate(function writableStateBufferGetter() {
92340
- return this.getBuffer();
92341
- }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
92342
- });
92343
- } catch (_45) {
92344
- }
92345
- })();
92346
- var realHasInstance;
92347
- if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") {
92348
- realHasInstance = Function.prototype[Symbol.hasInstance];
92349
- Object.defineProperty(Writable, Symbol.hasInstance, {
92350
- value: function value(object) {
92351
- if (realHasInstance.call(this, object))
92352
- return true;
92353
- if (this !== Writable)
92354
- return false;
92355
- return object && object._writableState instanceof WritableState;
92356
- }
92357
- });
92358
- } else {
92359
- realHasInstance = function realHasInstance2(object) {
92360
- return object instanceof this;
92361
- };
92362
- }
92363
- function Writable(options2) {
92364
- Duplex = Duplex || require_stream_duplex2();
92365
- var isDuplex = this instanceof Duplex;
92366
- if (!isDuplex && !realHasInstance.call(Writable, this))
92367
- return new Writable(options2);
92368
- this._writableState = new WritableState(options2, this, isDuplex);
92369
- this.writable = true;
92370
- if (options2) {
92371
- if (typeof options2.write === "function")
92372
- this._write = options2.write;
92373
- if (typeof options2.writev === "function")
92374
- this._writev = options2.writev;
92375
- if (typeof options2.destroy === "function")
92376
- this._destroy = options2.destroy;
92377
- if (typeof options2.final === "function")
92378
- this._final = options2.final;
92379
- }
92380
- Stream.call(this);
92381
- }
92382
- Writable.prototype.pipe = function() {
92383
- errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
92384
- };
92385
- function writeAfterEnd(stream, cb) {
92386
- var er = new ERR_STREAM_WRITE_AFTER_END();
92387
- errorOrDestroy(stream, er);
92388
- process.nextTick(cb, er);
92389
- }
92390
- function validChunk(stream, state, chunk, cb) {
92391
- var er;
92392
- if (chunk === null) {
92393
- er = new ERR_STREAM_NULL_VALUES();
92394
- } else if (typeof chunk !== "string" && !state.objectMode) {
92395
- er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer"], chunk);
92396
- }
92397
- if (er) {
92398
- errorOrDestroy(stream, er);
92399
- process.nextTick(cb, er);
92400
- return false;
92401
- }
92402
- return true;
92403
- }
92404
- Writable.prototype.write = function(chunk, encoding, cb) {
92405
- var state = this._writableState;
92406
- var ret = false;
92407
- var isBuf = !state.objectMode && _isUint8Array(chunk);
92408
- if (isBuf && !Buffer2.isBuffer(chunk)) {
92409
- chunk = _uint8ArrayToBuffer(chunk);
92410
- }
92411
- if (typeof encoding === "function") {
92412
- cb = encoding;
92413
- encoding = null;
92414
- }
92415
- if (isBuf)
92416
- encoding = "buffer";
92417
- else if (!encoding)
92418
- encoding = state.defaultEncoding;
92419
- if (typeof cb !== "function")
92420
- cb = nop;
92421
- if (state.ending)
92422
- writeAfterEnd(this, cb);
92423
- else if (isBuf || validChunk(this, state, chunk, cb)) {
92424
- state.pendingcb++;
92425
- ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
92426
- }
92427
- return ret;
92428
- };
92429
- Writable.prototype.cork = function() {
92430
- this._writableState.corked++;
92431
- };
92432
- Writable.prototype.uncork = function() {
92433
- var state = this._writableState;
92434
- if (state.corked) {
92435
- state.corked--;
92436
- if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest)
92437
- clearBuffer(this, state);
92438
- }
92439
- };
92440
- Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
92441
- if (typeof encoding === "string")
92442
- encoding = encoding.toLowerCase();
92443
- if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1))
92444
- throw new ERR_UNKNOWN_ENCODING(encoding);
92445
- this._writableState.defaultEncoding = encoding;
92446
- return this;
92447
- };
92448
- Object.defineProperty(Writable.prototype, "writableBuffer", {
92449
- // making it explicit this property is not enumerable
92450
- // because otherwise some prototype manipulation in
92451
- // userland will fail
92452
- enumerable: false,
92453
- get: function get3() {
92454
- return this._writableState && this._writableState.getBuffer();
92455
- }
92456
- });
92457
- function decodeChunk(state, chunk, encoding) {
92458
- if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") {
92459
- chunk = Buffer2.from(chunk, encoding);
92460
- }
92461
- return chunk;
92462
- }
92463
- Object.defineProperty(Writable.prototype, "writableHighWaterMark", {
92464
- // making it explicit this property is not enumerable
92465
- // because otherwise some prototype manipulation in
92466
- // userland will fail
92467
- enumerable: false,
92468
- get: function get3() {
92469
- return this._writableState.highWaterMark;
92470
- }
92471
- });
92472
- function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
92473
- if (!isBuf) {
92474
- var newChunk = decodeChunk(state, chunk, encoding);
92475
- if (chunk !== newChunk) {
92476
- isBuf = true;
92477
- encoding = "buffer";
92478
- chunk = newChunk;
92479
- }
92480
- }
92481
- var len = state.objectMode ? 1 : chunk.length;
92482
- state.length += len;
92483
- var ret = state.length < state.highWaterMark;
92484
- if (!ret)
92485
- state.needDrain = true;
92486
- if (state.writing || state.corked) {
92487
- var last = state.lastBufferedRequest;
92488
- state.lastBufferedRequest = {
92489
- chunk,
92490
- encoding,
92491
- isBuf,
92492
- callback: cb,
92493
- next: null
92494
- };
92495
- if (last) {
92496
- last.next = state.lastBufferedRequest;
92497
- } else {
92498
- state.bufferedRequest = state.lastBufferedRequest;
92499
- }
92500
- state.bufferedRequestCount += 1;
92501
- } else {
92502
- doWrite(stream, state, false, len, chunk, encoding, cb);
92503
- }
92504
- return ret;
92505
- }
92506
- function doWrite(stream, state, writev, len, chunk, encoding, cb) {
92507
- state.writelen = len;
92508
- state.writecb = cb;
92509
- state.writing = true;
92510
- state.sync = true;
92511
- if (state.destroyed)
92512
- state.onwrite(new ERR_STREAM_DESTROYED("write"));
92513
- else if (writev)
92514
- stream._writev(chunk, state.onwrite);
92515
- else
92516
- stream._write(chunk, encoding, state.onwrite);
92517
- state.sync = false;
92518
- }
92519
- function onwriteError(stream, state, sync, er, cb) {
92520
- --state.pendingcb;
92521
- if (sync) {
92522
- process.nextTick(cb, er);
92523
- process.nextTick(finishMaybe, stream, state);
92524
- stream._writableState.errorEmitted = true;
92525
- errorOrDestroy(stream, er);
92526
- } else {
92527
- cb(er);
92528
- stream._writableState.errorEmitted = true;
92529
- errorOrDestroy(stream, er);
92530
- finishMaybe(stream, state);
92531
- }
92532
- }
92533
- function onwriteStateUpdate(state) {
92534
- state.writing = false;
92535
- state.writecb = null;
92536
- state.length -= state.writelen;
92537
- state.writelen = 0;
92538
- }
92539
- function onwrite(stream, er) {
92540
- var state = stream._writableState;
92541
- var sync = state.sync;
92542
- var cb = state.writecb;
92543
- if (typeof cb !== "function")
92544
- throw new ERR_MULTIPLE_CALLBACK();
92545
- onwriteStateUpdate(state);
92546
- if (er)
92547
- onwriteError(stream, state, sync, er, cb);
92548
- else {
92549
- var finished = needFinish(state) || stream.destroyed;
92550
- if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
92551
- clearBuffer(stream, state);
92552
- }
92553
- if (sync) {
92554
- process.nextTick(afterWrite, stream, state, finished, cb);
92555
- } else {
92556
- afterWrite(stream, state, finished, cb);
92557
- }
92558
- }
92559
- }
92560
- function afterWrite(stream, state, finished, cb) {
92561
- if (!finished)
92562
- onwriteDrain(stream, state);
92563
- state.pendingcb--;
92564
- cb();
92565
- finishMaybe(stream, state);
92566
- }
92567
- function onwriteDrain(stream, state) {
92568
- if (state.length === 0 && state.needDrain) {
92569
- state.needDrain = false;
92570
- stream.emit("drain");
92571
- }
92572
- }
92573
- function clearBuffer(stream, state) {
92574
- state.bufferProcessing = true;
92575
- var entry = state.bufferedRequest;
92576
- if (stream._writev && entry && entry.next) {
92577
- var l = state.bufferedRequestCount;
92578
- var buffer = new Array(l);
92579
- var holder = state.corkedRequestsFree;
92580
- holder.entry = entry;
92581
- var count = 0;
92582
- var allBuffers = true;
92583
- while (entry) {
92584
- buffer[count] = entry;
92585
- if (!entry.isBuf)
92586
- allBuffers = false;
92587
- entry = entry.next;
92588
- count += 1;
92589
- }
92590
- buffer.allBuffers = allBuffers;
92591
- doWrite(stream, state, true, state.length, buffer, "", holder.finish);
92592
- state.pendingcb++;
92593
- state.lastBufferedRequest = null;
92594
- if (holder.next) {
92595
- state.corkedRequestsFree = holder.next;
92596
- holder.next = null;
92597
- } else {
92598
- state.corkedRequestsFree = new CorkedRequest(state);
92599
- }
92600
- state.bufferedRequestCount = 0;
92601
- } else {
92602
- while (entry) {
92603
- var chunk = entry.chunk;
92604
- var encoding = entry.encoding;
92605
- var cb = entry.callback;
92606
- var len = state.objectMode ? 1 : chunk.length;
92607
- doWrite(stream, state, false, len, chunk, encoding, cb);
92608
- entry = entry.next;
92609
- state.bufferedRequestCount--;
92610
- if (state.writing) {
92611
- break;
92612
- }
92613
- }
92614
- if (entry === null)
92615
- state.lastBufferedRequest = null;
92616
- }
92617
- state.bufferedRequest = entry;
92618
- state.bufferProcessing = false;
92619
- }
92620
- Writable.prototype._write = function(chunk, encoding, cb) {
92621
- cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
92622
- };
92623
- Writable.prototype._writev = null;
92624
- Writable.prototype.end = function(chunk, encoding, cb) {
92625
- var state = this._writableState;
92626
- if (typeof chunk === "function") {
92627
- cb = chunk;
92628
- chunk = null;
92629
- encoding = null;
92630
- } else if (typeof encoding === "function") {
92631
- cb = encoding;
92632
- encoding = null;
92633
- }
92634
- if (chunk !== null && chunk !== void 0)
92635
- this.write(chunk, encoding);
92636
- if (state.corked) {
92637
- state.corked = 1;
92638
- this.uncork();
92639
- }
92640
- if (!state.ending)
92641
- endWritable(this, state, cb);
92642
- return this;
92643
- };
92644
- Object.defineProperty(Writable.prototype, "writableLength", {
92645
- // making it explicit this property is not enumerable
92646
- // because otherwise some prototype manipulation in
92647
- // userland will fail
92648
- enumerable: false,
92649
- get: function get3() {
92650
- return this._writableState.length;
92651
- }
92652
- });
92653
- function needFinish(state) {
92654
- return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
92655
- }
92656
- function callFinal(stream, state) {
92657
- stream._final(function(err) {
92658
- state.pendingcb--;
92659
- if (err) {
92660
- errorOrDestroy(stream, err);
92661
- }
92662
- state.prefinished = true;
92663
- stream.emit("prefinish");
92664
- finishMaybe(stream, state);
92665
- });
92666
- }
92667
- function prefinish(stream, state) {
92668
- if (!state.prefinished && !state.finalCalled) {
92669
- if (typeof stream._final === "function" && !state.destroyed) {
92670
- state.pendingcb++;
92671
- state.finalCalled = true;
92672
- process.nextTick(callFinal, stream, state);
92673
- } else {
92674
- state.prefinished = true;
92675
- stream.emit("prefinish");
92676
- }
92677
- }
92678
- }
92679
- function finishMaybe(stream, state) {
92680
- var need = needFinish(state);
92681
- if (need) {
92682
- prefinish(stream, state);
92683
- if (state.pendingcb === 0) {
92684
- state.finished = true;
92685
- stream.emit("finish");
92686
- if (state.autoDestroy) {
92687
- var rState = stream._readableState;
92688
- if (!rState || rState.autoDestroy && rState.endEmitted) {
92689
- stream.destroy();
92690
- }
92691
- }
92692
- }
92693
- }
92694
- return need;
92695
- }
92696
- function endWritable(stream, state, cb) {
92697
- state.ending = true;
92698
- finishMaybe(stream, state);
92699
- if (cb) {
92700
- if (state.finished)
92701
- process.nextTick(cb);
92702
- else
92703
- stream.once("finish", cb);
92704
- }
92705
- state.ended = true;
92706
- stream.writable = false;
92707
- }
92708
- function onCorkedFinish(corkReq, state, err) {
92709
- var entry = corkReq.entry;
92710
- corkReq.entry = null;
92711
- while (entry) {
92712
- var cb = entry.callback;
92713
- state.pendingcb--;
92714
- cb(err);
92715
- entry = entry.next;
92716
- }
92717
- state.corkedRequestsFree.next = corkReq;
92718
- }
92719
- Object.defineProperty(Writable.prototype, "destroyed", {
92720
- // making it explicit this property is not enumerable
92721
- // because otherwise some prototype manipulation in
92722
- // userland will fail
92723
- enumerable: false,
92724
- get: function get3() {
92725
- if (this._writableState === void 0) {
92726
- return false;
92727
- }
92728
- return this._writableState.destroyed;
92729
- },
92730
- set: function set(value) {
92731
- if (!this._writableState) {
92732
- return;
92733
- }
92734
- this._writableState.destroyed = value;
92735
- }
92736
- });
92737
- Writable.prototype.destroy = destroyImpl.destroy;
92738
- Writable.prototype._undestroy = destroyImpl.undestroy;
92739
- Writable.prototype._destroy = function(err, cb) {
92740
- cb(err);
92741
- };
92742
- }
92743
- });
92744
-
92745
- // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_duplex.js
92746
- var require_stream_duplex2 = __commonJS({
92747
- "../../node_modules/winston/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) {
92748
- "use strict";
92749
- var objectKeys = Object.keys || function(obj) {
92750
- var keys2 = [];
92751
- for (var key in obj) {
92752
- keys2.push(key);
92753
- }
92754
- return keys2;
92755
- };
92756
- module2.exports = Duplex;
92757
- var Readable = require_stream_readable2();
92758
- var Writable = require_stream_writable2();
92759
- require_inherits()(Duplex, Readable);
92760
- {
92761
- keys = objectKeys(Writable.prototype);
92762
- for (v = 0; v < keys.length; v++) {
92763
- method = keys[v];
92764
- if (!Duplex.prototype[method])
92765
- Duplex.prototype[method] = Writable.prototype[method];
92766
- }
92767
- }
92768
- var keys;
92769
- var method;
92770
- var v;
92771
- function Duplex(options2) {
92772
- if (!(this instanceof Duplex))
92773
- return new Duplex(options2);
92774
- Readable.call(this, options2);
92775
- Writable.call(this, options2);
92776
- this.allowHalfOpen = true;
92777
- if (options2) {
92778
- if (options2.readable === false)
92779
- this.readable = false;
92780
- if (options2.writable === false)
92781
- this.writable = false;
92782
- if (options2.allowHalfOpen === false) {
92783
- this.allowHalfOpen = false;
92784
- this.once("end", onend);
92785
- }
92786
- }
92787
- }
92788
- Object.defineProperty(Duplex.prototype, "writableHighWaterMark", {
92789
- // making it explicit this property is not enumerable
92790
- // because otherwise some prototype manipulation in
92791
- // userland will fail
92792
- enumerable: false,
92793
- get: function get3() {
92794
- return this._writableState.highWaterMark;
92795
- }
92796
- });
92797
- Object.defineProperty(Duplex.prototype, "writableBuffer", {
92798
- // making it explicit this property is not enumerable
92799
- // because otherwise some prototype manipulation in
92800
- // userland will fail
92801
- enumerable: false,
92802
- get: function get3() {
92803
- return this._writableState && this._writableState.getBuffer();
92804
- }
92805
- });
92806
- Object.defineProperty(Duplex.prototype, "writableLength", {
92807
- // making it explicit this property is not enumerable
92808
- // because otherwise some prototype manipulation in
92809
- // userland will fail
92810
- enumerable: false,
92811
- get: function get3() {
92812
- return this._writableState.length;
92813
- }
92814
- });
92815
- function onend() {
92816
- if (this._writableState.ended)
92817
- return;
92818
- process.nextTick(onEndNT, this);
92819
- }
92820
- function onEndNT(self2) {
92821
- self2.end();
92822
- }
92823
- Object.defineProperty(Duplex.prototype, "destroyed", {
92824
- // making it explicit this property is not enumerable
92825
- // because otherwise some prototype manipulation in
92826
- // userland will fail
92827
- enumerable: false,
92828
- get: function get3() {
92829
- if (this._readableState === void 0 || this._writableState === void 0) {
92830
- return false;
92831
- }
92832
- return this._readableState.destroyed && this._writableState.destroyed;
92833
- },
92834
- set: function set(value) {
92835
- if (this._readableState === void 0 || this._writableState === void 0) {
92836
- return;
92837
- }
92838
- this._readableState.destroyed = value;
92839
- this._writableState.destroyed = value;
92840
- }
92841
- });
92842
- }
92843
- });
92844
-
92845
- // ../../node_modules/winston/node_modules/string_decoder/lib/string_decoder.js
92846
- var require_string_decoder2 = __commonJS({
92847
- "../../node_modules/winston/node_modules/string_decoder/lib/string_decoder.js"(exports2) {
92848
- "use strict";
92849
- var Buffer2 = require_safe_buffer().Buffer;
92850
- var isEncoding = Buffer2.isEncoding || function(encoding) {
92851
- encoding = "" + encoding;
92852
- switch (encoding && encoding.toLowerCase()) {
92853
- case "hex":
92854
- case "utf8":
92855
- case "utf-8":
92856
- case "ascii":
92857
- case "binary":
92858
- case "base64":
92859
- case "ucs2":
92860
- case "ucs-2":
92861
- case "utf16le":
92862
- case "utf-16le":
92863
- case "raw":
92864
- return true;
92865
- default:
92866
- return false;
92867
- }
92868
- };
92869
- function _normalizeEncoding(enc) {
92870
- if (!enc)
92871
- return "utf8";
92872
- var retried;
92873
- while (true) {
92874
- switch (enc) {
92875
- case "utf8":
92876
- case "utf-8":
92877
- return "utf8";
92878
- case "ucs2":
92879
- case "ucs-2":
92880
- case "utf16le":
92881
- case "utf-16le":
92882
- return "utf16le";
92883
- case "latin1":
92884
- case "binary":
92885
- return "latin1";
92886
- case "base64":
92887
- case "ascii":
92888
- case "hex":
92889
- return enc;
92890
- default:
92891
- if (retried)
92892
- return;
92893
- enc = ("" + enc).toLowerCase();
92894
- retried = true;
92895
- }
92896
- }
92897
- }
92898
- function normalizeEncoding(enc) {
92899
- var nenc = _normalizeEncoding(enc);
92900
- if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc)))
92901
- throw new Error("Unknown encoding: " + enc);
92902
- return nenc || enc;
92903
- }
92904
- exports2.StringDecoder = StringDecoder;
92905
- function StringDecoder(encoding) {
92906
- this.encoding = normalizeEncoding(encoding);
92907
- var nb;
92908
- switch (this.encoding) {
92909
- case "utf16le":
92910
- this.text = utf16Text;
92911
- this.end = utf16End;
92912
- nb = 4;
92913
- break;
92914
- case "utf8":
92915
- this.fillLast = utf8FillLast;
92916
- nb = 4;
92917
- break;
92918
- case "base64":
92919
- this.text = base64Text;
92920
- this.end = base64End;
92921
- nb = 3;
92922
- break;
92923
- default:
92924
- this.write = simpleWrite;
92925
- this.end = simpleEnd;
92926
- return;
92927
- }
92928
- this.lastNeed = 0;
92929
- this.lastTotal = 0;
92930
- this.lastChar = Buffer2.allocUnsafe(nb);
92931
- }
92932
- StringDecoder.prototype.write = function(buf) {
92933
- if (buf.length === 0)
92934
- return "";
92935
- var r;
92936
- var i;
92937
- if (this.lastNeed) {
92938
- r = this.fillLast(buf);
92939
- if (r === void 0)
92940
- return "";
92941
- i = this.lastNeed;
92942
- this.lastNeed = 0;
92943
- } else {
92944
- i = 0;
92945
- }
92946
- if (i < buf.length)
92947
- return r ? r + this.text(buf, i) : this.text(buf, i);
92948
- return r || "";
92949
- };
92950
- StringDecoder.prototype.end = utf8End;
92951
- StringDecoder.prototype.text = utf8Text;
92952
- StringDecoder.prototype.fillLast = function(buf) {
92953
- if (this.lastNeed <= buf.length) {
92954
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
92955
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
92956
- }
92957
- buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
92958
- this.lastNeed -= buf.length;
92959
- };
92960
- function utf8CheckByte(byte) {
92961
- if (byte <= 127)
92962
- return 0;
92963
- else if (byte >> 5 === 6)
92964
- return 2;
92965
- else if (byte >> 4 === 14)
92966
- return 3;
92967
- else if (byte >> 3 === 30)
92968
- return 4;
92969
- return byte >> 6 === 2 ? -1 : -2;
92970
- }
92971
- function utf8CheckIncomplete(self2, buf, i) {
92972
- var j = buf.length - 1;
92973
- if (j < i)
92974
- return 0;
92975
- var nb = utf8CheckByte(buf[j]);
92976
- if (nb >= 0) {
92977
- if (nb > 0)
92978
- self2.lastNeed = nb - 1;
92979
- return nb;
92980
- }
92981
- if (--j < i || nb === -2)
92982
- return 0;
92983
- nb = utf8CheckByte(buf[j]);
92984
- if (nb >= 0) {
92985
- if (nb > 0)
92986
- self2.lastNeed = nb - 2;
92987
- return nb;
92988
- }
92989
- if (--j < i || nb === -2)
92990
- return 0;
92991
- nb = utf8CheckByte(buf[j]);
92992
- if (nb >= 0) {
92993
- if (nb > 0) {
92994
- if (nb === 2)
92995
- nb = 0;
92996
- else
92997
- self2.lastNeed = nb - 3;
92998
- }
92999
- return nb;
93000
- }
93001
- return 0;
93002
- }
93003
- function utf8CheckExtraBytes(self2, buf, p) {
93004
- if ((buf[0] & 192) !== 128) {
93005
- self2.lastNeed = 0;
93006
- return "\uFFFD";
93007
- }
93008
- if (self2.lastNeed > 1 && buf.length > 1) {
93009
- if ((buf[1] & 192) !== 128) {
93010
- self2.lastNeed = 1;
93011
- return "\uFFFD";
93012
- }
93013
- if (self2.lastNeed > 2 && buf.length > 2) {
93014
- if ((buf[2] & 192) !== 128) {
93015
- self2.lastNeed = 2;
93016
- return "\uFFFD";
93017
- }
93018
- }
93019
- }
93020
- }
93021
- function utf8FillLast(buf) {
93022
- var p = this.lastTotal - this.lastNeed;
93023
- var r = utf8CheckExtraBytes(this, buf, p);
93024
- if (r !== void 0)
93025
- return r;
93026
- if (this.lastNeed <= buf.length) {
93027
- buf.copy(this.lastChar, p, 0, this.lastNeed);
93028
- return this.lastChar.toString(this.encoding, 0, this.lastTotal);
93029
- }
93030
- buf.copy(this.lastChar, p, 0, buf.length);
93031
- this.lastNeed -= buf.length;
93032
- }
93033
- function utf8Text(buf, i) {
93034
- var total = utf8CheckIncomplete(this, buf, i);
93035
- if (!this.lastNeed)
93036
- return buf.toString("utf8", i);
93037
- this.lastTotal = total;
93038
- var end = buf.length - (total - this.lastNeed);
93039
- buf.copy(this.lastChar, 0, end);
93040
- return buf.toString("utf8", i, end);
93041
- }
93042
- function utf8End(buf) {
93043
- var r = buf && buf.length ? this.write(buf) : "";
93044
- if (this.lastNeed)
93045
- return r + "\uFFFD";
93046
- return r;
93047
- }
93048
- function utf16Text(buf, i) {
93049
- if ((buf.length - i) % 2 === 0) {
93050
- var r = buf.toString("utf16le", i);
93051
- if (r) {
93052
- var c = r.charCodeAt(r.length - 1);
93053
- if (c >= 55296 && c <= 56319) {
93054
- this.lastNeed = 2;
93055
- this.lastTotal = 4;
93056
- this.lastChar[0] = buf[buf.length - 2];
93057
- this.lastChar[1] = buf[buf.length - 1];
93058
- return r.slice(0, -1);
93059
- }
93060
- }
93061
- return r;
93062
- }
93063
- this.lastNeed = 1;
93064
- this.lastTotal = 2;
93065
- this.lastChar[0] = buf[buf.length - 1];
93066
- return buf.toString("utf16le", i, buf.length - 1);
93067
- }
93068
- function utf16End(buf) {
93069
- var r = buf && buf.length ? this.write(buf) : "";
93070
- if (this.lastNeed) {
93071
- var end = this.lastTotal - this.lastNeed;
93072
- return r + this.lastChar.toString("utf16le", 0, end);
93073
- }
93074
- return r;
93075
- }
93076
- function base64Text(buf, i) {
93077
- var n = (buf.length - i) % 3;
93078
- if (n === 0)
93079
- return buf.toString("base64", i);
93080
- this.lastNeed = 3 - n;
93081
- this.lastTotal = 3;
93082
- if (n === 1) {
93083
- this.lastChar[0] = buf[buf.length - 1];
93084
- } else {
93085
- this.lastChar[0] = buf[buf.length - 2];
93086
- this.lastChar[1] = buf[buf.length - 1];
93087
- }
93088
- return buf.toString("base64", i, buf.length - n);
93089
- }
93090
- function base64End(buf) {
93091
- var r = buf && buf.length ? this.write(buf) : "";
93092
- if (this.lastNeed)
93093
- return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed);
93094
- return r;
93095
- }
93096
- function simpleWrite(buf) {
93097
- return buf.toString(this.encoding);
93098
- }
93099
- function simpleEnd(buf) {
93100
- return buf && buf.length ? this.write(buf) : "";
93101
- }
93102
- }
93103
- });
93104
-
93105
- // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
93106
- var require_end_of_stream2 = __commonJS({
93107
- "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) {
93108
- "use strict";
93109
- var ERR_STREAM_PREMATURE_CLOSE = require_errors5().codes.ERR_STREAM_PREMATURE_CLOSE;
93110
- function once(callback) {
93111
- var called = false;
93112
- return function() {
93113
- if (called)
93114
- return;
93115
- called = true;
93116
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
93117
- args[_key] = arguments[_key];
93118
- }
93119
- callback.apply(this, args);
93120
- };
93121
- }
93122
- function noop3() {
93123
- }
93124
- function isRequest(stream) {
93125
- return stream.setHeader && typeof stream.abort === "function";
93126
- }
93127
- function eos(stream, opts, callback) {
93128
- if (typeof opts === "function")
93129
- return eos(stream, null, opts);
93130
- if (!opts)
93131
- opts = {};
93132
- callback = once(callback || noop3);
93133
- var readable = opts.readable || opts.readable !== false && stream.readable;
93134
- var writable = opts.writable || opts.writable !== false && stream.writable;
93135
- var onlegacyfinish = function onlegacyfinish2() {
93136
- if (!stream.writable)
93137
- onfinish();
93138
- };
93139
- var writableEnded = stream._writableState && stream._writableState.finished;
93140
- var onfinish = function onfinish2() {
93141
- writable = false;
93142
- writableEnded = true;
93143
- if (!readable)
93144
- callback.call(stream);
93145
- };
93146
- var readableEnded = stream._readableState && stream._readableState.endEmitted;
93147
- var onend = function onend2() {
93148
- readable = false;
93149
- readableEnded = true;
93150
- if (!writable)
93151
- callback.call(stream);
93152
- };
93153
- var onerror = function onerror2(err) {
93154
- callback.call(stream, err);
93155
- };
93156
- var onclose = function onclose2() {
93157
- var err;
93158
- if (readable && !readableEnded) {
93159
- if (!stream._readableState || !stream._readableState.ended)
93160
- err = new ERR_STREAM_PREMATURE_CLOSE();
93161
- return callback.call(stream, err);
93162
- }
93163
- if (writable && !writableEnded) {
93164
- if (!stream._writableState || !stream._writableState.ended)
93165
- err = new ERR_STREAM_PREMATURE_CLOSE();
93166
- return callback.call(stream, err);
93167
- }
93168
- };
93169
- var onrequest = function onrequest2() {
93170
- stream.req.on("finish", onfinish);
93171
- };
93172
- if (isRequest(stream)) {
93173
- stream.on("complete", onfinish);
93174
- stream.on("abort", onclose);
93175
- if (stream.req)
93176
- onrequest();
93177
- else
93178
- stream.on("request", onrequest);
93179
- } else if (writable && !stream._writableState) {
93180
- stream.on("end", onlegacyfinish);
93181
- stream.on("close", onlegacyfinish);
93182
- }
93183
- stream.on("end", onend);
93184
- stream.on("finish", onfinish);
93185
- if (opts.error !== false)
93186
- stream.on("error", onerror);
93187
- stream.on("close", onclose);
93188
- return function() {
93189
- stream.removeListener("complete", onfinish);
93190
- stream.removeListener("abort", onclose);
93191
- stream.removeListener("request", onrequest);
93192
- if (stream.req)
93193
- stream.req.removeListener("finish", onfinish);
93194
- stream.removeListener("end", onlegacyfinish);
93195
- stream.removeListener("close", onlegacyfinish);
93196
- stream.removeListener("finish", onfinish);
93197
- stream.removeListener("end", onend);
93198
- stream.removeListener("error", onerror);
93199
- stream.removeListener("close", onclose);
93200
- };
93201
- }
93202
- module2.exports = eos;
93203
- }
93204
- });
93205
-
93206
- // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/async_iterator.js
93207
- var require_async_iterator2 = __commonJS({
93208
- "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) {
93209
- "use strict";
93210
- var _Object$setPrototypeO;
93211
- function _defineProperty2(obj, key, value) {
93212
- if (key in obj) {
93213
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
93214
- } else {
93215
- obj[key] = value;
93216
- }
93217
- return obj;
93218
- }
93219
- var finished = require_end_of_stream2();
93220
- var kLastResolve = Symbol("lastResolve");
93221
- var kLastReject = Symbol("lastReject");
93222
- var kError = Symbol("error");
93223
- var kEnded = Symbol("ended");
93224
- var kLastPromise = Symbol("lastPromise");
93225
- var kHandlePromise = Symbol("handlePromise");
93226
- var kStream = Symbol("stream");
93227
- function createIterResult(value, done) {
93228
- return {
93229
- value,
93230
- done
93231
- };
93232
- }
93233
- function readAndResolve(iter) {
93234
- var resolve = iter[kLastResolve];
93235
- if (resolve !== null) {
93236
- var data2 = iter[kStream].read();
93237
- if (data2 !== null) {
93238
- iter[kLastPromise] = null;
93239
- iter[kLastResolve] = null;
93240
- iter[kLastReject] = null;
93241
- resolve(createIterResult(data2, false));
93242
- }
93243
- }
93244
- }
93245
- function onReadable(iter) {
93246
- process.nextTick(readAndResolve, iter);
93247
- }
93248
- function wrapForNext(lastPromise, iter) {
93249
- return function(resolve, reject) {
93250
- lastPromise.then(function() {
93251
- if (iter[kEnded]) {
93252
- resolve(createIterResult(void 0, true));
93253
- return;
93254
- }
93255
- iter[kHandlePromise](resolve, reject);
93256
- }, reject);
93257
- };
93258
- }
93259
- var AsyncIteratorPrototype = Object.getPrototypeOf(function() {
93260
- });
93261
- var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
93262
- get stream() {
93263
- return this[kStream];
93264
- },
93265
- next: function next() {
93266
- var _this = this;
93267
- var error3 = this[kError];
93268
- if (error3 !== null) {
93269
- return Promise.reject(error3);
93270
- }
93271
- if (this[kEnded]) {
93272
- return Promise.resolve(createIterResult(void 0, true));
93273
- }
93274
- if (this[kStream].destroyed) {
93275
- return new Promise(function(resolve, reject) {
93276
- process.nextTick(function() {
93277
- if (_this[kError]) {
93278
- reject(_this[kError]);
93279
- } else {
93280
- resolve(createIterResult(void 0, true));
93281
- }
93282
- });
93283
- });
93284
- }
93285
- var lastPromise = this[kLastPromise];
93286
- var promise;
93287
- if (lastPromise) {
93288
- promise = new Promise(wrapForNext(lastPromise, this));
93289
- } else {
93290
- var data2 = this[kStream].read();
93291
- if (data2 !== null) {
93292
- return Promise.resolve(createIterResult(data2, false));
93293
- }
93294
- promise = new Promise(this[kHandlePromise]);
93295
- }
93296
- this[kLastPromise] = promise;
93297
- return promise;
93298
- }
93299
- }, _defineProperty2(_Object$setPrototypeO, Symbol.asyncIterator, function() {
93300
- return this;
93301
- }), _defineProperty2(_Object$setPrototypeO, "return", function _return() {
93302
- var _this2 = this;
93303
- return new Promise(function(resolve, reject) {
93304
- _this2[kStream].destroy(null, function(err) {
93305
- if (err) {
93306
- reject(err);
93307
- return;
93308
- }
93309
- resolve(createIterResult(void 0, true));
93310
- });
93311
- });
93312
- }), _Object$setPrototypeO), AsyncIteratorPrototype);
93313
- var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator2(stream) {
93314
- var _Object$create;
93315
- var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty2(_Object$create, kStream, {
93316
- value: stream,
93317
- writable: true
93318
- }), _defineProperty2(_Object$create, kLastResolve, {
93319
- value: null,
93320
- writable: true
93321
- }), _defineProperty2(_Object$create, kLastReject, {
93322
- value: null,
93323
- writable: true
93324
- }), _defineProperty2(_Object$create, kError, {
93325
- value: null,
93326
- writable: true
93327
- }), _defineProperty2(_Object$create, kEnded, {
93328
- value: stream._readableState.endEmitted,
93329
- writable: true
93330
- }), _defineProperty2(_Object$create, kHandlePromise, {
93331
- value: function value(resolve, reject) {
93332
- var data2 = iterator[kStream].read();
93333
- if (data2) {
93334
- iterator[kLastPromise] = null;
93335
- iterator[kLastResolve] = null;
93336
- iterator[kLastReject] = null;
93337
- resolve(createIterResult(data2, false));
93338
- } else {
93339
- iterator[kLastResolve] = resolve;
93340
- iterator[kLastReject] = reject;
93341
- }
93342
- },
93343
- writable: true
93344
- }), _Object$create));
93345
- iterator[kLastPromise] = null;
93346
- finished(stream, function(err) {
93347
- if (err && err.code !== "ERR_STREAM_PREMATURE_CLOSE") {
93348
- var reject = iterator[kLastReject];
93349
- if (reject !== null) {
93350
- iterator[kLastPromise] = null;
93351
- iterator[kLastResolve] = null;
93352
- iterator[kLastReject] = null;
93353
- reject(err);
93354
- }
93355
- iterator[kError] = err;
93356
- return;
93357
- }
93358
- var resolve = iterator[kLastResolve];
93359
- if (resolve !== null) {
93360
- iterator[kLastPromise] = null;
93361
- iterator[kLastResolve] = null;
93362
- iterator[kLastReject] = null;
93363
- resolve(createIterResult(void 0, true));
93364
- }
93365
- iterator[kEnded] = true;
93366
- });
93367
- stream.on("readable", onReadable.bind(null, iterator));
93368
- return iterator;
93369
- };
93370
- module2.exports = createReadableStreamAsyncIterator;
93371
- }
93372
- });
93373
-
93374
- // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/from.js
93375
- var require_from2 = __commonJS({
93376
- "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
93377
- "use strict";
93378
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
93379
- try {
93380
- var info = gen[key](arg);
93381
- var value = info.value;
93382
- } catch (error3) {
93383
- reject(error3);
93384
- return;
93385
- }
93386
- if (info.done) {
93387
- resolve(value);
93388
- } else {
93389
- Promise.resolve(value).then(_next, _throw);
93390
- }
93391
- }
93392
- function _asyncToGenerator(fn) {
93393
- return function() {
93394
- var self2 = this, args = arguments;
93395
- return new Promise(function(resolve, reject) {
93396
- var gen = fn.apply(self2, args);
93397
- function _next(value) {
93398
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
93399
- }
93400
- function _throw(err) {
93401
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
93402
- }
93403
- _next(void 0);
93404
- });
93405
- };
93406
- }
93407
- function ownKeys(object, enumerableOnly) {
93408
- var keys = Object.keys(object);
93409
- if (Object.getOwnPropertySymbols) {
93410
- var symbols = Object.getOwnPropertySymbols(object);
93411
- if (enumerableOnly)
93412
- symbols = symbols.filter(function(sym) {
93413
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
93414
- });
93415
- keys.push.apply(keys, symbols);
93416
- }
93417
- return keys;
93418
- }
93419
- function _objectSpread2(target) {
93420
- for (var i = 1; i < arguments.length; i++) {
93421
- var source = arguments[i] != null ? arguments[i] : {};
93422
- if (i % 2) {
93423
- ownKeys(Object(source), true).forEach(function(key) {
93424
- _defineProperty2(target, key, source[key]);
93425
- });
93426
- } else if (Object.getOwnPropertyDescriptors) {
93427
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
93428
- } else {
93429
- ownKeys(Object(source)).forEach(function(key) {
93430
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
93431
- });
93432
- }
93433
- }
93434
- return target;
93435
- }
93436
- function _defineProperty2(obj, key, value) {
93437
- if (key in obj) {
93438
- Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
93439
- } else {
93440
- obj[key] = value;
93441
- }
93442
- return obj;
93443
- }
93444
- var ERR_INVALID_ARG_TYPE = require_errors5().codes.ERR_INVALID_ARG_TYPE;
93445
- function from(Readable, iterable, opts) {
93446
- var iterator;
93447
- if (iterable && typeof iterable.next === "function") {
93448
- iterator = iterable;
93449
- } else if (iterable && iterable[Symbol.asyncIterator])
93450
- iterator = iterable[Symbol.asyncIterator]();
93451
- else if (iterable && iterable[Symbol.iterator])
93452
- iterator = iterable[Symbol.iterator]();
93453
- else
93454
- throw new ERR_INVALID_ARG_TYPE("iterable", ["Iterable"], iterable);
93455
- var readable = new Readable(_objectSpread2({
93456
- objectMode: true
93457
- }, opts));
93458
- var reading = false;
93459
- readable._read = function() {
93460
- if (!reading) {
93461
- reading = true;
93462
- next();
93463
- }
93464
- };
93465
- function next() {
93466
- return _next2.apply(this, arguments);
93467
- }
93468
- function _next2() {
93469
- _next2 = _asyncToGenerator(function* () {
93470
- try {
93471
- var _ref = yield iterator.next(), value = _ref.value, done = _ref.done;
93472
- if (done) {
93473
- readable.push(null);
93474
- } else if (readable.push(yield value)) {
93475
- next();
93476
- } else {
93477
- reading = false;
93478
- }
93479
- } catch (err) {
93480
- readable.destroy(err);
93481
- }
93482
- });
93483
- return _next2.apply(this, arguments);
93484
- }
93485
- return readable;
93486
- }
93487
- module2.exports = from;
93488
- }
93489
- });
93490
-
93491
- // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js
93492
- var require_stream_readable2 = __commonJS({
93493
- "../../node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) {
93494
- "use strict";
93495
- module2.exports = Readable;
93496
- var Duplex;
93497
- Readable.ReadableState = ReadableState;
93498
- var EE = require("events").EventEmitter;
93499
- var EElistenerCount = function EElistenerCount2(emitter, type) {
93500
- return emitter.listeners(type).length;
93501
- };
93502
- var Stream = require_stream2();
93503
- var Buffer2 = require("buffer").Buffer;
93504
- var OurUint8Array = global.Uint8Array || function() {
93505
- };
93506
- function _uint8ArrayToBuffer(chunk) {
93507
- return Buffer2.from(chunk);
93508
- }
93509
- function _isUint8Array(obj) {
93510
- return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
93511
- }
93512
- var debugUtil = require("util");
93513
- var debug;
93514
- if (debugUtil && debugUtil.debuglog) {
93515
- debug = debugUtil.debuglog("stream");
93516
- } else {
93517
- debug = function debug2() {
93518
- };
93519
- }
93520
- var BufferList = require_buffer_list2();
93521
- var destroyImpl = require_destroy2();
93522
- var _require = require_state3();
93523
- var getHighWaterMark = _require.getHighWaterMark;
93524
- var _require$codes = require_errors5().codes;
93525
- var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
93526
- var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF;
93527
- var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
93528
- var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
93529
- var StringDecoder;
93530
- var createReadableStreamAsyncIterator;
93531
- var from;
93532
- require_inherits()(Readable, Stream);
93533
- var errorOrDestroy = destroyImpl.errorOrDestroy;
93534
- var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
93535
- function prependListener(emitter, event, fn) {
93536
- if (typeof emitter.prependListener === "function")
93537
- return emitter.prependListener(event, fn);
93538
- if (!emitter._events || !emitter._events[event])
93539
- emitter.on(event, fn);
93540
- else if (Array.isArray(emitter._events[event]))
93541
- emitter._events[event].unshift(fn);
93542
- else
93543
- emitter._events[event] = [fn, emitter._events[event]];
93544
- }
93545
- function ReadableState(options2, stream, isDuplex) {
93546
- Duplex = Duplex || require_stream_duplex2();
93547
- options2 = options2 || {};
93548
- if (typeof isDuplex !== "boolean")
93549
- isDuplex = stream instanceof Duplex;
93550
- this.objectMode = !!options2.objectMode;
93551
- if (isDuplex)
93552
- this.objectMode = this.objectMode || !!options2.readableObjectMode;
93553
- this.highWaterMark = getHighWaterMark(this, options2, "readableHighWaterMark", isDuplex);
93554
- this.buffer = new BufferList();
93555
- this.length = 0;
93556
- this.pipes = null;
93557
- this.pipesCount = 0;
93558
- this.flowing = null;
93559
- this.ended = false;
93560
- this.endEmitted = false;
93561
- this.reading = false;
93562
- this.sync = true;
93563
- this.needReadable = false;
93564
- this.emittedReadable = false;
93565
- this.readableListening = false;
93566
- this.resumeScheduled = false;
93567
- this.paused = true;
93568
- this.emitClose = options2.emitClose !== false;
93569
- this.autoDestroy = !!options2.autoDestroy;
93570
- this.destroyed = false;
93571
- this.defaultEncoding = options2.defaultEncoding || "utf8";
93572
- this.awaitDrain = 0;
93573
- this.readingMore = false;
93574
- this.decoder = null;
93575
- this.encoding = null;
93576
- if (options2.encoding) {
93577
- if (!StringDecoder)
93578
- StringDecoder = require_string_decoder2().StringDecoder;
93579
- this.decoder = new StringDecoder(options2.encoding);
93580
- this.encoding = options2.encoding;
93581
- }
93582
- }
93583
- function Readable(options2) {
93584
- Duplex = Duplex || require_stream_duplex2();
93585
- if (!(this instanceof Readable))
93586
- return new Readable(options2);
93587
- var isDuplex = this instanceof Duplex;
93588
- this._readableState = new ReadableState(options2, this, isDuplex);
93589
- this.readable = true;
93590
- if (options2) {
93591
- if (typeof options2.read === "function")
93592
- this._read = options2.read;
93593
- if (typeof options2.destroy === "function")
93594
- this._destroy = options2.destroy;
93595
- }
93596
- Stream.call(this);
93597
- }
93598
- Object.defineProperty(Readable.prototype, "destroyed", {
93599
- // making it explicit this property is not enumerable
93600
- // because otherwise some prototype manipulation in
93601
- // userland will fail
93602
- enumerable: false,
93603
- get: function get3() {
93604
- if (this._readableState === void 0) {
93605
- return false;
93606
- }
93607
- return this._readableState.destroyed;
93608
- },
93609
- set: function set(value) {
93610
- if (!this._readableState) {
93611
- return;
93612
- }
93613
- this._readableState.destroyed = value;
93614
- }
93615
- });
93616
- Readable.prototype.destroy = destroyImpl.destroy;
93617
- Readable.prototype._undestroy = destroyImpl.undestroy;
93618
- Readable.prototype._destroy = function(err, cb) {
93619
- cb(err);
93620
- };
93621
- Readable.prototype.push = function(chunk, encoding) {
93622
- var state = this._readableState;
93623
- var skipChunkCheck;
93624
- if (!state.objectMode) {
93625
- if (typeof chunk === "string") {
93626
- encoding = encoding || state.defaultEncoding;
93627
- if (encoding !== state.encoding) {
93628
- chunk = Buffer2.from(chunk, encoding);
93629
- encoding = "";
93630
- }
93631
- skipChunkCheck = true;
93632
- }
93633
- } else {
93634
- skipChunkCheck = true;
93635
- }
93636
- return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
93637
- };
93638
- Readable.prototype.unshift = function(chunk) {
93639
- return readableAddChunk(this, chunk, null, true, false);
93640
- };
93641
- function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
93642
- debug("readableAddChunk", chunk);
93643
- var state = stream._readableState;
93644
- if (chunk === null) {
93645
- state.reading = false;
93646
- onEofChunk(stream, state);
93647
- } else {
93648
- var er;
93649
- if (!skipChunkCheck)
93650
- er = chunkInvalid(state, chunk);
93651
- if (er) {
93652
- errorOrDestroy(stream, er);
93653
- } else if (state.objectMode || chunk && chunk.length > 0) {
93654
- if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) {
93655
- chunk = _uint8ArrayToBuffer(chunk);
93656
- }
93657
- if (addToFront) {
93658
- if (state.endEmitted)
93659
- errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());
93660
- else
93661
- addChunk(stream, state, chunk, true);
93662
- } else if (state.ended) {
93663
- errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
93664
- } else if (state.destroyed) {
93665
- return false;
93666
- } else {
93667
- state.reading = false;
93668
- if (state.decoder && !encoding) {
93669
- chunk = state.decoder.write(chunk);
93670
- if (state.objectMode || chunk.length !== 0)
93671
- addChunk(stream, state, chunk, false);
93672
- else
93673
- maybeReadMore(stream, state);
93674
- } else {
93675
- addChunk(stream, state, chunk, false);
93676
- }
93677
- }
93678
- } else if (!addToFront) {
93679
- state.reading = false;
93680
- maybeReadMore(stream, state);
93681
- }
93682
- }
93683
- return !state.ended && (state.length < state.highWaterMark || state.length === 0);
93684
- }
93685
- function addChunk(stream, state, chunk, addToFront) {
93686
- if (state.flowing && state.length === 0 && !state.sync) {
93687
- state.awaitDrain = 0;
93688
- stream.emit("data", chunk);
93689
- } else {
93690
- state.length += state.objectMode ? 1 : chunk.length;
93691
- if (addToFront)
93692
- state.buffer.unshift(chunk);
93693
- else
93694
- state.buffer.push(chunk);
93695
- if (state.needReadable)
93696
- emitReadable(stream);
93697
- }
93698
- maybeReadMore(stream, state);
93699
- }
93700
- function chunkInvalid(state, chunk) {
93701
- var er;
93702
- if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) {
93703
- er = new ERR_INVALID_ARG_TYPE("chunk", ["string", "Buffer", "Uint8Array"], chunk);
93704
- }
93705
- return er;
93706
- }
93707
- Readable.prototype.isPaused = function() {
93708
- return this._readableState.flowing === false;
93709
- };
93710
- Readable.prototype.setEncoding = function(enc) {
93711
- if (!StringDecoder)
93712
- StringDecoder = require_string_decoder2().StringDecoder;
93713
- var decoder = new StringDecoder(enc);
93714
- this._readableState.decoder = decoder;
93715
- this._readableState.encoding = this._readableState.decoder.encoding;
93716
- var p = this._readableState.buffer.head;
93717
- var content = "";
93718
- while (p !== null) {
93719
- content += decoder.write(p.data);
93720
- p = p.next;
93721
- }
93722
- this._readableState.buffer.clear();
93723
- if (content !== "")
93724
- this._readableState.buffer.push(content);
93725
- this._readableState.length = content.length;
93726
- return this;
93727
- };
93728
- var MAX_HWM = 1073741824;
93729
- function computeNewHighWaterMark(n) {
93730
- if (n >= MAX_HWM) {
93731
- n = MAX_HWM;
93732
- } else {
93733
- n--;
93734
- n |= n >>> 1;
93735
- n |= n >>> 2;
93736
- n |= n >>> 4;
93737
- n |= n >>> 8;
93738
- n |= n >>> 16;
93739
- n++;
93740
- }
93741
- return n;
93742
- }
93743
- function howMuchToRead(n, state) {
93744
- if (n <= 0 || state.length === 0 && state.ended)
93745
- return 0;
93746
- if (state.objectMode)
93747
- return 1;
93748
- if (n !== n) {
93749
- if (state.flowing && state.length)
93750
- return state.buffer.head.data.length;
93751
- else
93752
- return state.length;
93753
- }
93754
- if (n > state.highWaterMark)
93755
- state.highWaterMark = computeNewHighWaterMark(n);
93756
- if (n <= state.length)
93757
- return n;
93758
- if (!state.ended) {
93759
- state.needReadable = true;
93760
- return 0;
93761
- }
93762
- return state.length;
93763
- }
93764
- Readable.prototype.read = function(n) {
93765
- debug("read", n);
93766
- n = parseInt(n, 10);
93767
- var state = this._readableState;
93768
- var nOrig = n;
93769
- if (n !== 0)
93770
- state.emittedReadable = false;
93771
- if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {
93772
- debug("read: emitReadable", state.length, state.ended);
93773
- if (state.length === 0 && state.ended)
93774
- endReadable(this);
93775
- else
93776
- emitReadable(this);
93777
- return null;
93778
- }
93779
- n = howMuchToRead(n, state);
93780
- if (n === 0 && state.ended) {
93781
- if (state.length === 0)
93782
- endReadable(this);
93783
- return null;
93784
- }
93785
- var doRead = state.needReadable;
93786
- debug("need readable", doRead);
93787
- if (state.length === 0 || state.length - n < state.highWaterMark) {
93788
- doRead = true;
93789
- debug("length less than watermark", doRead);
93790
- }
93791
- if (state.ended || state.reading) {
93792
- doRead = false;
93793
- debug("reading or ended", doRead);
93794
- } else if (doRead) {
93795
- debug("do read");
93796
- state.reading = true;
93797
- state.sync = true;
93798
- if (state.length === 0)
93799
- state.needReadable = true;
93800
- this._read(state.highWaterMark);
93801
- state.sync = false;
93802
- if (!state.reading)
93803
- n = howMuchToRead(nOrig, state);
93804
- }
93805
- var ret;
93806
- if (n > 0)
93807
- ret = fromList(n, state);
93808
- else
93809
- ret = null;
93810
- if (ret === null) {
93811
- state.needReadable = state.length <= state.highWaterMark;
93812
- n = 0;
93813
- } else {
93814
- state.length -= n;
93815
- state.awaitDrain = 0;
93816
- }
93817
- if (state.length === 0) {
93818
- if (!state.ended)
93819
- state.needReadable = true;
93820
- if (nOrig !== n && state.ended)
93821
- endReadable(this);
93822
- }
93823
- if (ret !== null)
93824
- this.emit("data", ret);
93825
- return ret;
93826
- };
93827
- function onEofChunk(stream, state) {
93828
- debug("onEofChunk");
93829
- if (state.ended)
93830
- return;
93831
- if (state.decoder) {
93832
- var chunk = state.decoder.end();
93833
- if (chunk && chunk.length) {
93834
- state.buffer.push(chunk);
93835
- state.length += state.objectMode ? 1 : chunk.length;
93836
- }
93837
- }
93838
- state.ended = true;
93839
- if (state.sync) {
93840
- emitReadable(stream);
93841
- } else {
93842
- state.needReadable = false;
93843
- if (!state.emittedReadable) {
93844
- state.emittedReadable = true;
93845
- emitReadable_(stream);
93846
- }
93847
- }
93848
- }
93849
- function emitReadable(stream) {
93850
- var state = stream._readableState;
93851
- debug("emitReadable", state.needReadable, state.emittedReadable);
93852
- state.needReadable = false;
93853
- if (!state.emittedReadable) {
93854
- debug("emitReadable", state.flowing);
93855
- state.emittedReadable = true;
93856
- process.nextTick(emitReadable_, stream);
93857
- }
93858
- }
93859
- function emitReadable_(stream) {
93860
- var state = stream._readableState;
93861
- debug("emitReadable_", state.destroyed, state.length, state.ended);
93862
- if (!state.destroyed && (state.length || state.ended)) {
93863
- stream.emit("readable");
93864
- state.emittedReadable = false;
93865
- }
93866
- state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;
93867
- flow(stream);
93868
- }
93869
- function maybeReadMore(stream, state) {
93870
- if (!state.readingMore) {
93871
- state.readingMore = true;
93872
- process.nextTick(maybeReadMore_, stream, state);
93873
- }
93874
- }
93875
- function maybeReadMore_(stream, state) {
93876
- while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {
93877
- var len = state.length;
93878
- debug("maybeReadMore read 0");
93879
- stream.read(0);
93880
- if (len === state.length)
93881
- break;
93882
- }
93883
- state.readingMore = false;
93884
- }
93885
- Readable.prototype._read = function(n) {
93886
- errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()"));
93887
- };
93888
- Readable.prototype.pipe = function(dest, pipeOpts) {
93889
- var src = this;
93890
- var state = this._readableState;
93891
- switch (state.pipesCount) {
93892
- case 0:
93893
- state.pipes = dest;
93894
- break;
93895
- case 1:
93896
- state.pipes = [state.pipes, dest];
93897
- break;
93898
- default:
93899
- state.pipes.push(dest);
93900
- break;
93901
- }
93902
- state.pipesCount += 1;
93903
- debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts);
93904
- var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
93905
- var endFn = doEnd ? onend : unpipe;
93906
- if (state.endEmitted)
93907
- process.nextTick(endFn);
93908
- else
93909
- src.once("end", endFn);
93910
- dest.on("unpipe", onunpipe);
93911
- function onunpipe(readable, unpipeInfo) {
93912
- debug("onunpipe");
93913
- if (readable === src) {
93914
- if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
93915
- unpipeInfo.hasUnpiped = true;
93916
- cleanup();
93917
- }
93918
- }
93919
- }
93920
- function onend() {
93921
- debug("onend");
93922
- dest.end();
93923
- }
93924
- var ondrain = pipeOnDrain(src);
93925
- dest.on("drain", ondrain);
93926
- var cleanedUp = false;
93927
- function cleanup() {
93928
- debug("cleanup");
93929
- dest.removeListener("close", onclose);
93930
- dest.removeListener("finish", onfinish);
93931
- dest.removeListener("drain", ondrain);
93932
- dest.removeListener("error", onerror);
93933
- dest.removeListener("unpipe", onunpipe);
93934
- src.removeListener("end", onend);
93935
- src.removeListener("end", unpipe);
93936
- src.removeListener("data", ondata);
93937
- cleanedUp = true;
93938
- if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain))
93939
- ondrain();
93940
- }
93941
- src.on("data", ondata);
93942
- function ondata(chunk) {
93943
- debug("ondata");
93944
- var ret = dest.write(chunk);
93945
- debug("dest.write", ret);
93946
- if (ret === false) {
93947
- if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
93948
- debug("false write response, pause", state.awaitDrain);
93949
- state.awaitDrain++;
93950
- }
93951
- src.pause();
93952
- }
93953
- }
93954
- function onerror(er) {
93955
- debug("onerror", er);
93956
- unpipe();
93957
- dest.removeListener("error", onerror);
93958
- if (EElistenerCount(dest, "error") === 0)
93959
- errorOrDestroy(dest, er);
93960
- }
93961
- prependListener(dest, "error", onerror);
93962
- function onclose() {
93963
- dest.removeListener("finish", onfinish);
93964
- unpipe();
93965
- }
93966
- dest.once("close", onclose);
93967
- function onfinish() {
93968
- debug("onfinish");
93969
- dest.removeListener("close", onclose);
93970
- unpipe();
93971
- }
93972
- dest.once("finish", onfinish);
93973
- function unpipe() {
93974
- debug("unpipe");
93975
- src.unpipe(dest);
93976
- }
93977
- dest.emit("pipe", src);
93978
- if (!state.flowing) {
93979
- debug("pipe resume");
93980
- src.resume();
93981
- }
93982
- return dest;
93983
- };
93984
- function pipeOnDrain(src) {
93985
- return function pipeOnDrainFunctionResult() {
93986
- var state = src._readableState;
93987
- debug("pipeOnDrain", state.awaitDrain);
93988
- if (state.awaitDrain)
93989
- state.awaitDrain--;
93990
- if (state.awaitDrain === 0 && EElistenerCount(src, "data")) {
93991
- state.flowing = true;
93992
- flow(src);
93993
- }
93994
- };
93995
- }
93996
- Readable.prototype.unpipe = function(dest) {
93997
- var state = this._readableState;
93998
- var unpipeInfo = {
93999
- hasUnpiped: false
94000
- };
94001
- if (state.pipesCount === 0)
94002
- return this;
94003
- if (state.pipesCount === 1) {
94004
- if (dest && dest !== state.pipes)
94005
- return this;
94006
- if (!dest)
94007
- dest = state.pipes;
94008
- state.pipes = null;
94009
- state.pipesCount = 0;
94010
- state.flowing = false;
94011
- if (dest)
94012
- dest.emit("unpipe", this, unpipeInfo);
94013
- return this;
94014
- }
94015
- if (!dest) {
94016
- var dests = state.pipes;
94017
- var len = state.pipesCount;
94018
- state.pipes = null;
94019
- state.pipesCount = 0;
94020
- state.flowing = false;
94021
- for (var i = 0; i < len; i++) {
94022
- dests[i].emit("unpipe", this, {
94023
- hasUnpiped: false
94024
- });
94025
- }
94026
- return this;
94027
- }
94028
- var index = indexOf(state.pipes, dest);
94029
- if (index === -1)
94030
- return this;
94031
- state.pipes.splice(index, 1);
94032
- state.pipesCount -= 1;
94033
- if (state.pipesCount === 1)
94034
- state.pipes = state.pipes[0];
94035
- dest.emit("unpipe", this, unpipeInfo);
94036
- return this;
94037
- };
94038
- Readable.prototype.on = function(ev, fn) {
94039
- var res = Stream.prototype.on.call(this, ev, fn);
94040
- var state = this._readableState;
94041
- if (ev === "data") {
94042
- state.readableListening = this.listenerCount("readable") > 0;
94043
- if (state.flowing !== false)
94044
- this.resume();
94045
- } else if (ev === "readable") {
94046
- if (!state.endEmitted && !state.readableListening) {
94047
- state.readableListening = state.needReadable = true;
94048
- state.flowing = false;
94049
- state.emittedReadable = false;
94050
- debug("on readable", state.length, state.reading);
94051
- if (state.length) {
94052
- emitReadable(this);
94053
- } else if (!state.reading) {
94054
- process.nextTick(nReadingNextTick, this);
94055
- }
94056
- }
94057
- }
94058
- return res;
94059
- };
94060
- Readable.prototype.addListener = Readable.prototype.on;
94061
- Readable.prototype.removeListener = function(ev, fn) {
94062
- var res = Stream.prototype.removeListener.call(this, ev, fn);
94063
- if (ev === "readable") {
94064
- process.nextTick(updateReadableListening, this);
94065
- }
94066
- return res;
94067
- };
94068
- Readable.prototype.removeAllListeners = function(ev) {
94069
- var res = Stream.prototype.removeAllListeners.apply(this, arguments);
94070
- if (ev === "readable" || ev === void 0) {
94071
- process.nextTick(updateReadableListening, this);
94072
- }
94073
- return res;
94074
- };
94075
- function updateReadableListening(self2) {
94076
- var state = self2._readableState;
94077
- state.readableListening = self2.listenerCount("readable") > 0;
94078
- if (state.resumeScheduled && !state.paused) {
94079
- state.flowing = true;
94080
- } else if (self2.listenerCount("data") > 0) {
94081
- self2.resume();
94082
- }
94083
- }
94084
- function nReadingNextTick(self2) {
94085
- debug("readable nexttick read 0");
94086
- self2.read(0);
94087
- }
94088
- Readable.prototype.resume = function() {
94089
- var state = this._readableState;
94090
- if (!state.flowing) {
94091
- debug("resume");
94092
- state.flowing = !state.readableListening;
94093
- resume(this, state);
94094
- }
94095
- state.paused = false;
94096
- return this;
94097
- };
94098
- function resume(stream, state) {
94099
- if (!state.resumeScheduled) {
94100
- state.resumeScheduled = true;
94101
- process.nextTick(resume_, stream, state);
94102
- }
94103
- }
94104
- function resume_(stream, state) {
94105
- debug("resume", state.reading);
94106
- if (!state.reading) {
94107
- stream.read(0);
94108
- }
94109
- state.resumeScheduled = false;
94110
- stream.emit("resume");
94111
- flow(stream);
94112
- if (state.flowing && !state.reading)
94113
- stream.read(0);
94114
- }
94115
- Readable.prototype.pause = function() {
94116
- debug("call pause flowing=%j", this._readableState.flowing);
94117
- if (this._readableState.flowing !== false) {
94118
- debug("pause");
94119
- this._readableState.flowing = false;
94120
- this.emit("pause");
94121
- }
94122
- this._readableState.paused = true;
94123
- return this;
94124
- };
94125
- function flow(stream) {
94126
- var state = stream._readableState;
94127
- debug("flow", state.flowing);
94128
- while (state.flowing && stream.read() !== null) {
94129
- ;
94130
- }
94131
- }
94132
- Readable.prototype.wrap = function(stream) {
94133
- var _this = this;
94134
- var state = this._readableState;
94135
- var paused = false;
94136
- stream.on("end", function() {
94137
- debug("wrapped end");
94138
- if (state.decoder && !state.ended) {
94139
- var chunk = state.decoder.end();
94140
- if (chunk && chunk.length)
94141
- _this.push(chunk);
94142
- }
94143
- _this.push(null);
94144
- });
94145
- stream.on("data", function(chunk) {
94146
- debug("wrapped data");
94147
- if (state.decoder)
94148
- chunk = state.decoder.write(chunk);
94149
- if (state.objectMode && (chunk === null || chunk === void 0))
94150
- return;
94151
- else if (!state.objectMode && (!chunk || !chunk.length))
94152
- return;
94153
- var ret = _this.push(chunk);
94154
- if (!ret) {
94155
- paused = true;
94156
- stream.pause();
94157
- }
94158
- });
94159
- for (var i in stream) {
94160
- if (this[i] === void 0 && typeof stream[i] === "function") {
94161
- this[i] = function methodWrap(method) {
94162
- return function methodWrapReturnFunction() {
94163
- return stream[method].apply(stream, arguments);
94164
- };
94165
- }(i);
94166
- }
94167
- }
94168
- for (var n = 0; n < kProxyEvents.length; n++) {
94169
- stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
94170
- }
94171
- this._read = function(n2) {
94172
- debug("wrapped _read", n2);
94173
- if (paused) {
94174
- paused = false;
94175
- stream.resume();
94176
- }
94177
- };
94178
- return this;
94179
- };
94180
- if (typeof Symbol === "function") {
94181
- Readable.prototype[Symbol.asyncIterator] = function() {
94182
- if (createReadableStreamAsyncIterator === void 0) {
94183
- createReadableStreamAsyncIterator = require_async_iterator2();
94184
- }
94185
- return createReadableStreamAsyncIterator(this);
94186
- };
94187
- }
94188
- Object.defineProperty(Readable.prototype, "readableHighWaterMark", {
94189
- // making it explicit this property is not enumerable
94190
- // because otherwise some prototype manipulation in
94191
- // userland will fail
94192
- enumerable: false,
94193
- get: function get3() {
94194
- return this._readableState.highWaterMark;
94195
- }
94196
- });
94197
- Object.defineProperty(Readable.prototype, "readableBuffer", {
94198
- // making it explicit this property is not enumerable
94199
- // because otherwise some prototype manipulation in
94200
- // userland will fail
94201
- enumerable: false,
94202
- get: function get3() {
94203
- return this._readableState && this._readableState.buffer;
94204
- }
94205
- });
94206
- Object.defineProperty(Readable.prototype, "readableFlowing", {
94207
- // making it explicit this property is not enumerable
94208
- // because otherwise some prototype manipulation in
94209
- // userland will fail
94210
- enumerable: false,
94211
- get: function get3() {
94212
- return this._readableState.flowing;
94213
- },
94214
- set: function set(state) {
94215
- if (this._readableState) {
94216
- this._readableState.flowing = state;
94217
- }
94218
- }
94219
- });
94220
- Readable._fromList = fromList;
94221
- Object.defineProperty(Readable.prototype, "readableLength", {
94222
- // making it explicit this property is not enumerable
94223
- // because otherwise some prototype manipulation in
94224
- // userland will fail
94225
- enumerable: false,
94226
- get: function get3() {
94227
- return this._readableState.length;
94228
- }
94229
- });
94230
- function fromList(n, state) {
94231
- if (state.length === 0)
94232
- return null;
94233
- var ret;
94234
- if (state.objectMode)
94235
- ret = state.buffer.shift();
94236
- else if (!n || n >= state.length) {
94237
- if (state.decoder)
94238
- ret = state.buffer.join("");
94239
- else if (state.buffer.length === 1)
94240
- ret = state.buffer.first();
94241
- else
94242
- ret = state.buffer.concat(state.length);
94243
- state.buffer.clear();
94244
- } else {
94245
- ret = state.buffer.consume(n, state.decoder);
94246
- }
94247
- return ret;
94248
- }
94249
- function endReadable(stream) {
94250
- var state = stream._readableState;
94251
- debug("endReadable", state.endEmitted);
94252
- if (!state.endEmitted) {
94253
- state.ended = true;
94254
- process.nextTick(endReadableNT, state, stream);
94255
- }
94256
- }
94257
- function endReadableNT(state, stream) {
94258
- debug("endReadableNT", state.endEmitted, state.length);
94259
- if (!state.endEmitted && state.length === 0) {
94260
- state.endEmitted = true;
94261
- stream.readable = false;
94262
- stream.emit("end");
94263
- if (state.autoDestroy) {
94264
- var wState = stream._writableState;
94265
- if (!wState || wState.autoDestroy && wState.finished) {
94266
- stream.destroy();
94267
- }
94268
- }
94269
- }
94270
- }
94271
- if (typeof Symbol === "function") {
94272
- Readable.from = function(iterable, opts) {
94273
- if (from === void 0) {
94274
- from = require_from2();
94275
- }
94276
- return from(Readable, iterable, opts);
94277
- };
94278
- }
94279
- function indexOf(xs, x) {
94280
- for (var i = 0, l = xs.length; i < l; i++) {
94281
- if (xs[i] === x)
94282
- return i;
94283
- }
94284
- return -1;
94285
- }
94286
- }
94287
- });
94288
-
94289
- // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_transform.js
94290
- var require_stream_transform = __commonJS({
94291
- "../../node_modules/winston/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) {
94292
- "use strict";
94293
- module2.exports = Transform;
94294
- var _require$codes = require_errors5().codes;
94295
- var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
94296
- var ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK;
94297
- var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
94298
- var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
94299
- var Duplex = require_stream_duplex2();
94300
- require_inherits()(Transform, Duplex);
94301
- function afterTransform(er, data2) {
94302
- var ts = this._transformState;
94303
- ts.transforming = false;
94304
- var cb = ts.writecb;
94305
- if (cb === null) {
94306
- return this.emit("error", new ERR_MULTIPLE_CALLBACK());
94307
- }
94308
- ts.writechunk = null;
94309
- ts.writecb = null;
94310
- if (data2 != null)
94311
- this.push(data2);
94312
- cb(er);
94313
- var rs = this._readableState;
94314
- rs.reading = false;
94315
- if (rs.needReadable || rs.length < rs.highWaterMark) {
94316
- this._read(rs.highWaterMark);
94317
- }
94318
- }
94319
- function Transform(options2) {
94320
- if (!(this instanceof Transform))
94321
- return new Transform(options2);
94322
- Duplex.call(this, options2);
94323
- this._transformState = {
94324
- afterTransform: afterTransform.bind(this),
94325
- needTransform: false,
94326
- transforming: false,
94327
- writecb: null,
94328
- writechunk: null,
94329
- writeencoding: null
94330
- };
94331
- this._readableState.needReadable = true;
94332
- this._readableState.sync = false;
94333
- if (options2) {
94334
- if (typeof options2.transform === "function")
94335
- this._transform = options2.transform;
94336
- if (typeof options2.flush === "function")
94337
- this._flush = options2.flush;
94338
- }
94339
- this.on("prefinish", prefinish);
94340
- }
94341
- function prefinish() {
94342
- var _this = this;
94343
- if (typeof this._flush === "function" && !this._readableState.destroyed) {
94344
- this._flush(function(er, data2) {
94345
- done(_this, er, data2);
94346
- });
94347
- } else {
94348
- done(this, null, null);
94349
- }
94350
- }
94351
- Transform.prototype.push = function(chunk, encoding) {
94352
- this._transformState.needTransform = false;
94353
- return Duplex.prototype.push.call(this, chunk, encoding);
94354
- };
94355
- Transform.prototype._transform = function(chunk, encoding, cb) {
94356
- cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
94357
- };
94358
- Transform.prototype._write = function(chunk, encoding, cb) {
94359
- var ts = this._transformState;
94360
- ts.writecb = cb;
94361
- ts.writechunk = chunk;
94362
- ts.writeencoding = encoding;
94363
- if (!ts.transforming) {
94364
- var rs = this._readableState;
94365
- if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark)
94366
- this._read(rs.highWaterMark);
94367
- }
94368
- };
94369
- Transform.prototype._read = function(n) {
94370
- var ts = this._transformState;
94371
- if (ts.writechunk !== null && !ts.transforming) {
94372
- ts.transforming = true;
94373
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
94374
- } else {
94375
- ts.needTransform = true;
94376
- }
94377
- };
94378
- Transform.prototype._destroy = function(err, cb) {
94379
- Duplex.prototype._destroy.call(this, err, function(err2) {
94380
- cb(err2);
94381
- });
94382
- };
94383
- function done(stream, er, data2) {
94384
- if (er)
94385
- return stream.emit("error", er);
94386
- if (data2 != null)
94387
- stream.push(data2);
94388
- if (stream._writableState.length)
94389
- throw new ERR_TRANSFORM_WITH_LENGTH_0();
94390
- if (stream._transformState.transforming)
94391
- throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
94392
- return stream.push(null);
94393
- }
94394
- }
94395
- });
94396
-
94397
- // ../../node_modules/winston/node_modules/readable-stream/lib/_stream_passthrough.js
94398
- var require_stream_passthrough = __commonJS({
94399
- "../../node_modules/winston/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) {
94400
- "use strict";
94401
- module2.exports = PassThrough;
94402
- var Transform = require_stream_transform();
94403
- require_inherits()(PassThrough, Transform);
94404
- function PassThrough(options2) {
94405
- if (!(this instanceof PassThrough))
94406
- return new PassThrough(options2);
94407
- Transform.call(this, options2);
94408
- }
94409
- PassThrough.prototype._transform = function(chunk, encoding, cb) {
94410
- cb(null, chunk);
94411
- };
94412
- }
94413
- });
94414
-
94415
- // ../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/pipeline.js
94416
- var require_pipeline = __commonJS({
94417
- "../../node_modules/winston/node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) {
91887
+ // ../../node_modules/readable-stream/lib/internal/streams/pipeline.js
91888
+ var require_pipeline = __commonJS({
91889
+ "../../node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) {
94418
91890
  "use strict";
94419
91891
  var eos;
94420
91892
  function once(callback) {
@@ -94426,7 +91898,7 @@ var require_pipeline = __commonJS({
94426
91898
  callback.apply(void 0, arguments);
94427
91899
  };
94428
91900
  }
94429
- var _require$codes = require_errors5().codes;
91901
+ var _require$codes = require_errors3().codes;
94430
91902
  var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
94431
91903
  var ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
94432
91904
  function noop3(err) {
@@ -94443,7 +91915,7 @@ var require_pipeline = __commonJS({
94443
91915
  closed = true;
94444
91916
  });
94445
91917
  if (eos === void 0)
94446
- eos = require_end_of_stream2();
91918
+ eos = require_end_of_stream();
94447
91919
  eos(stream, {
94448
91920
  readable: reading,
94449
91921
  writable: writing
@@ -94511,23 +91983,23 @@ var require_pipeline = __commonJS({
94511
91983
  }
94512
91984
  });
94513
91985
 
94514
- // ../../node_modules/winston/node_modules/readable-stream/readable.js
91986
+ // ../../node_modules/readable-stream/readable.js
94515
91987
  var require_readable = __commonJS({
94516
- "../../node_modules/winston/node_modules/readable-stream/readable.js"(exports2, module2) {
91988
+ "../../node_modules/readable-stream/readable.js"(exports2, module2) {
94517
91989
  var Stream = require("stream");
94518
91990
  if (process.env.READABLE_STREAM === "disable" && Stream) {
94519
91991
  module2.exports = Stream.Readable;
94520
91992
  Object.assign(module2.exports, Stream);
94521
91993
  module2.exports.Stream = Stream;
94522
91994
  } else {
94523
- exports2 = module2.exports = require_stream_readable2();
91995
+ exports2 = module2.exports = require_stream_readable();
94524
91996
  exports2.Stream = Stream || exports2;
94525
91997
  exports2.Readable = exports2;
94526
- exports2.Writable = require_stream_writable2();
94527
- exports2.Duplex = require_stream_duplex2();
91998
+ exports2.Writable = require_stream_writable();
91999
+ exports2.Duplex = require_stream_duplex();
94528
92000
  exports2.Transform = require_stream_transform();
94529
92001
  exports2.PassThrough = require_stream_passthrough();
94530
- exports2.finished = require_end_of_stream2();
92002
+ exports2.finished = require_end_of_stream();
94531
92003
  exports2.pipeline = require_pipeline();
94532
92004
  }
94533
92005
  }
@@ -97292,7 +94764,7 @@ var require_is_stream = __commonJS({
97292
94764
  });
97293
94765
 
97294
94766
  // ../../node_modules/winston/lib/winston/transports/stream.js
97295
- var require_stream3 = __commonJS({
94767
+ var require_stream2 = __commonJS({
97296
94768
  "../../node_modules/winston/lib/winston/transports/stream.js"(exports2, module2) {
97297
94769
  "use strict";
97298
94770
  var isStream = require_is_stream();
@@ -97369,7 +94841,7 @@ var require_transports2 = __commonJS({
97369
94841
  configurable: true,
97370
94842
  enumerable: true,
97371
94843
  get() {
97372
- return require_stream3();
94844
+ return require_stream2();
97373
94845
  }
97374
94846
  });
97375
94847
  }
@@ -99720,7 +97192,7 @@ var require_dist13 = __commonJS({
99720
97192
  Object.defineProperty(exports2, "Entity", { enumerable: true, get: function() {
99721
97193
  return constants_1.Entity;
99722
97194
  } });
99723
- var i18n_1 = require_i18n4();
97195
+ var i18n_1 = require_i18n6();
99724
97196
  var backend_system_1 = require_backend_system6();
99725
97197
  var telemetry_setting_1 = require_telemetry_setting3();
99726
97198
  var api_hub_1 = require_api_hub4();
@@ -103882,7 +101354,7 @@ var import_yaml2 = __toESM(require_dist2());
103882
101354
  var package_default = {
103883
101355
  name: "@sap/ux-ui5-tooling",
103884
101356
  displayName: "SAP Fiori Tools \u2013 UI5 Tooling",
103885
- version: "1.12.3",
101357
+ version: "1.12.4",
103886
101358
  description: "SAP Fiori Tools \u2013 UI5 Tooling",
103887
101359
  publisher: "SAPSE",
103888
101360
  license: "SEE LICENSE IN LICENSE",
@@ -103915,7 +101387,7 @@ var package_default = {
103915
101387
  madge: "madge --warning --circular --extensions ts ./"
103916
101388
  },
103917
101389
  dependencies: {
103918
- "@sap-ux/preview-middleware": "0.11.22",
101390
+ "@sap-ux/preview-middleware": "0.11.30",
103919
101391
  "@ui5/fs": "3.0.4",
103920
101392
  debug: "4.3.4",
103921
101393
  express: "4.17.3",
@@ -103927,24 +101399,24 @@ var package_default = {
103927
101399
  keytar: "7.9.0"
103928
101400
  },
103929
101401
  devDependencies: {
103930
- "@sap-ux/adp-tooling": "0.7.2",
103931
- "@sap-ux/backend-proxy-middleware": "0.7.8",
101402
+ "@sap-ux/adp-tooling": "0.8.5",
101403
+ "@sap-ux/backend-proxy-middleware": "0.7.13",
103932
101404
  "@sap-ux/btp-utils": "0.12.1",
103933
- "@sap-ux/deploy-tooling": "0.11.10",
101405
+ "@sap-ux/deploy-tooling": "0.13.0",
103934
101406
  "@sap-ux/logger": "0.4.0",
103935
- "@sap-ux/project-access": "1.16.2",
101407
+ "@sap-ux/project-access": "1.17.0",
103936
101408
  "@sap-ux/store": "0.4.0",
103937
101409
  "@sap-ux/ui5-config": "0.20.0",
103938
101410
  "@sap-ux/ui5-info": "0.2.2",
103939
101411
  "@sap-ux/ui5-proxy-middleware": "1.3.0",
103940
- "@sap/ux-app-templates": "1.12.3",
103941
- "@sap/ux-cds": "1.12.3",
103942
- "@sap/ux-common-utils": "1.12.3",
103943
- "@sap/ux-jest-runner-puppeteer": "1.12.3",
103944
- "@sap/ux-odata-client": "1.12.3",
103945
- "@sap/ux-telemetry": "1.12.3",
103946
- "@sap/ux-ui5-info": "1.12.3",
103947
- "@sapux/project-spec": "1.12.3",
101412
+ "@sap/ux-app-templates": "1.12.4",
101413
+ "@sap/ux-cds": "1.12.4",
101414
+ "@sap/ux-common-utils": "1.12.4",
101415
+ "@sap/ux-jest-runner-puppeteer": "1.12.4",
101416
+ "@sap/ux-odata-client": "1.12.4",
101417
+ "@sap/ux-telemetry": "1.12.4",
101418
+ "@sap/ux-ui5-info": "1.12.4",
101419
+ "@sapux/project-spec": "1.12.4",
103948
101420
  "@types/expect-puppeteer": "4.4.5",
103949
101421
  "@types/jest-dev-server": "5.0.0",
103950
101422
  "@types/marked": "4.0.1",