@sap/ux-ui5-tooling 1.7.5 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cli/index.js +14644 -5752
- package/dist/middlewares/fiori-tools-appreload.js +3 -3
- package/dist/middlewares/fiori-tools-preview.js +93 -72
- package/dist/middlewares/fiori-tools-proxy.js +7227 -10728
- package/dist/tasks/cf-deploy/index.js +141 -113
- package/dist/tasks/deploy/index.js +115 -88
- package/dist/templates/control-property-editor/app.css +1 -1
- package/dist/templates/control-property-editor/app.js +48 -48
- package/package.json +13 -13
|
@@ -181,7 +181,7 @@ var require_dist = __commonJS({
|
|
|
181
181
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
182
182
|
};
|
|
183
183
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
184
|
-
exports2.getFioriToolsDirectory = exports2.FioriToolsSettings = exports2.getAppStudioProxyURL = exports2.getAppStudioBaseURL = exports2.isAppStudio = void 0;
|
|
184
|
+
exports2.filterReferenceUri = exports2.getFioriToolsDirectory = exports2.FioriToolsSettings = exports2.getAppStudioProxyURL = exports2.getAppStudioBaseURL = exports2.isAppStudio = void 0;
|
|
185
185
|
var os_1 = require("os");
|
|
186
186
|
var path_1 = __importDefault(require("path"));
|
|
187
187
|
var appStudio_1 = require_appStudio();
|
|
@@ -205,6 +205,10 @@ var require_dist = __commonJS({
|
|
|
205
205
|
return path_1.default.join(os_1.homedir(), FioriToolsSettings.dir);
|
|
206
206
|
};
|
|
207
207
|
exports2.getFioriToolsDirectory = getFioriToolsDirectory;
|
|
208
|
+
function filterReferenceUri(metadata) {
|
|
209
|
+
return metadata == null ? void 0 : metadata.replace(/ Uri="(http|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[0])/g, ` Uri=".`);
|
|
210
|
+
}
|
|
211
|
+
exports2.filterReferenceUri = filterReferenceUri;
|
|
208
212
|
}
|
|
209
213
|
});
|
|
210
214
|
|
|
@@ -11906,7 +11910,7 @@ var require_package4 = __commonJS({
|
|
|
11906
11910
|
"../lib/telemetry/dist/package.json"(exports2, module2) {
|
|
11907
11911
|
module2.exports = {
|
|
11908
11912
|
name: "@sap/ux-telemetry",
|
|
11909
|
-
version: "1.
|
|
11913
|
+
version: "1.8.0",
|
|
11910
11914
|
description: "SAP Fiori tools telemetry library",
|
|
11911
11915
|
main: "dist/src/index.js",
|
|
11912
11916
|
author: "SAP SE",
|
|
@@ -11919,7 +11923,7 @@ var require_package4 = __commonJS({
|
|
|
11919
11923
|
"clean:dist": "rimraf ./dist ./generators *.tsbuildinfo",
|
|
11920
11924
|
clean: "rimraf ./reports",
|
|
11921
11925
|
build: "ts-node ./build-script/ && yarn run clean && tsc --build ./",
|
|
11922
|
-
test: "jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
|
|
11926
|
+
test: "cross-env SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY=false jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
|
|
11923
11927
|
lint: "eslint . --ext .ts",
|
|
11924
11928
|
"lint:summary": "eslint . --ext .ts -f summary",
|
|
11925
11929
|
"lint:fix": "eslint --fix",
|
|
@@ -11931,10 +11935,10 @@ var require_package4 = __commonJS({
|
|
|
11931
11935
|
},
|
|
11932
11936
|
dependencies: {
|
|
11933
11937
|
"@sap-ux/store": "0.3.0",
|
|
11934
|
-
"@sap/ux-cds": "1.
|
|
11935
|
-
"@sap/ux-common-utils": "1.
|
|
11936
|
-
"@sap/ux-feature-toggle": "1.
|
|
11937
|
-
"@sap/ux-project-access": "1.
|
|
11938
|
+
"@sap/ux-cds": "1.8.0",
|
|
11939
|
+
"@sap/ux-common-utils": "1.8.0",
|
|
11940
|
+
"@sap/ux-feature-toggle": "1.8.0",
|
|
11941
|
+
"@sap/ux-project-access": "1.8.0",
|
|
11938
11942
|
applicationinsights: "1.4.1",
|
|
11939
11943
|
"performance-now": "2.1.0",
|
|
11940
11944
|
yaml: "2.0.0-10"
|
|
@@ -12064,8 +12068,12 @@ var require_reporting = __commonJS({
|
|
|
12064
12068
|
});
|
|
12065
12069
|
return parsedStack;
|
|
12066
12070
|
};
|
|
12067
|
-
var reportingTelemetryClient
|
|
12068
|
-
|
|
12071
|
+
var reportingTelemetryClient;
|
|
12072
|
+
var _a2;
|
|
12073
|
+
if (((_a2 = process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY) == null ? void 0 : _a2.trim()) !== "true") {
|
|
12074
|
+
reportingTelemetryClient = new appInsights.TelemetryClient(telemetryPackageJSON.azureInstrumentationKey);
|
|
12075
|
+
telemetryClientConfig_1.configAzureTelemetryClient(reportingTelemetryClient);
|
|
12076
|
+
}
|
|
12069
12077
|
var reportRuntimeError = (error3) => {
|
|
12070
12078
|
const properties = { message: error3.message };
|
|
12071
12079
|
if (error3.stack) {
|
|
@@ -12209,8 +12217,11 @@ var require_system2 = __commonJS({
|
|
|
12209
12217
|
patterns: ["generators", "project-generator", "deployment-generator", "ux-ui5-tooling", "generator-common"]
|
|
12210
12218
|
}
|
|
12211
12219
|
];
|
|
12220
|
+
var _a2;
|
|
12212
12221
|
try {
|
|
12213
|
-
|
|
12222
|
+
if (((_a2 = process.env.SAP_UX_FIORI_TOOLS_DISABLE_TELEMETRY) == null ? void 0 : _a2.trim()) !== "true") {
|
|
12223
|
+
TelemetrySystem.init();
|
|
12224
|
+
}
|
|
12214
12225
|
} catch (err) {
|
|
12215
12226
|
reporting_1.reportRuntimeError(err);
|
|
12216
12227
|
}
|
|
@@ -38289,9 +38300,9 @@ var require_is_wsl = __commonJS({
|
|
|
38289
38300
|
}
|
|
38290
38301
|
});
|
|
38291
38302
|
|
|
38292
|
-
//
|
|
38303
|
+
// ../lib/odata-client/node_modules/open/index.js
|
|
38293
38304
|
var require_open = __commonJS({
|
|
38294
|
-
"
|
|
38305
|
+
"../lib/odata-client/node_modules/open/index.js"(exports2, module2) {
|
|
38295
38306
|
"use strict";
|
|
38296
38307
|
var { promisify } = require("util");
|
|
38297
38308
|
var path = require("path");
|
|
@@ -38666,9 +38677,9 @@ var require_error2 = __commonJS({
|
|
|
38666
38677
|
}
|
|
38667
38678
|
});
|
|
38668
38679
|
|
|
38669
|
-
//
|
|
38680
|
+
// ../../node_modules/qs/lib/utils.js
|
|
38670
38681
|
var require_utils4 = __commonJS({
|
|
38671
|
-
"
|
|
38682
|
+
"../../node_modules/qs/lib/utils.js"(exports2, module2) {
|
|
38672
38683
|
"use strict";
|
|
38673
38684
|
var has = Object.prototype.hasOwnProperty;
|
|
38674
38685
|
var isArray = Array.isArray;
|
|
@@ -38848,9 +38859,9 @@ var require_utils4 = __commonJS({
|
|
|
38848
38859
|
}
|
|
38849
38860
|
});
|
|
38850
38861
|
|
|
38851
|
-
//
|
|
38862
|
+
// ../../node_modules/qs/lib/formats.js
|
|
38852
38863
|
var require_formats = __commonJS({
|
|
38853
|
-
"
|
|
38864
|
+
"../../node_modules/qs/lib/formats.js"(exports2, module2) {
|
|
38854
38865
|
"use strict";
|
|
38855
38866
|
var replace = String.prototype.replace;
|
|
38856
38867
|
var percentTwenties = /%20/g;
|
|
@@ -38870,9 +38881,9 @@ var require_formats = __commonJS({
|
|
|
38870
38881
|
}
|
|
38871
38882
|
});
|
|
38872
38883
|
|
|
38873
|
-
//
|
|
38884
|
+
// ../../node_modules/qs/lib/stringify.js
|
|
38874
38885
|
var require_stringify2 = __commonJS({
|
|
38875
|
-
"
|
|
38886
|
+
"../../node_modules/qs/lib/stringify.js"(exports2, module2) {
|
|
38876
38887
|
"use strict";
|
|
38877
38888
|
var utils = require_utils4();
|
|
38878
38889
|
var formats = require_formats();
|
|
@@ -39050,9 +39061,9 @@ var require_stringify2 = __commonJS({
|
|
|
39050
39061
|
}
|
|
39051
39062
|
});
|
|
39052
39063
|
|
|
39053
|
-
//
|
|
39064
|
+
// ../../node_modules/qs/lib/parse.js
|
|
39054
39065
|
var require_parse2 = __commonJS({
|
|
39055
|
-
"
|
|
39066
|
+
"../../node_modules/qs/lib/parse.js"(exports2, module2) {
|
|
39056
39067
|
"use strict";
|
|
39057
39068
|
var utils = require_utils4();
|
|
39058
39069
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -39234,9 +39245,9 @@ var require_parse2 = __commonJS({
|
|
|
39234
39245
|
}
|
|
39235
39246
|
});
|
|
39236
39247
|
|
|
39237
|
-
//
|
|
39248
|
+
// ../../node_modules/qs/lib/index.js
|
|
39238
39249
|
var require_lib = __commonJS({
|
|
39239
|
-
"
|
|
39250
|
+
"../../node_modules/qs/lib/index.js"(exports2, module2) {
|
|
39240
39251
|
"use strict";
|
|
39241
39252
|
var stringify = require_stringify2();
|
|
39242
39253
|
var parse2 = require_parse2();
|
|
@@ -54225,7 +54236,7 @@ var require_connection = __commonJS({
|
|
|
54225
54236
|
var connectWithReentranceTicket_1 = require_connectWithReentranceTicket();
|
|
54226
54237
|
var detect_content_type_1 = __importDefault(require_lib2());
|
|
54227
54238
|
exports2.SAP_CLIENT = "sap-client";
|
|
54228
|
-
async function connectWithBasicAuth({ target, credentials, autoAddTrailingSlash = true, timeout, ignoreCertError = false, logger = console }) {
|
|
54239
|
+
async function connectWithBasicAuth({ target, credentials, autoAddTrailingSlash = true, timeout, ignoreCertError = false, logger = console, disableSAML = false }) {
|
|
54229
54240
|
var _a2;
|
|
54230
54241
|
const url = new url_1.URL(target.service, target.url).toString();
|
|
54231
54242
|
const hasCredentials = !!((_a2 = credentials == null ? void 0 : credentials.username) == null ? void 0 : _a2.length);
|
|
@@ -54257,7 +54268,7 @@ var require_connection = __commonJS({
|
|
|
54257
54268
|
config.params[exports2.SAP_CLIENT] = target.client;
|
|
54258
54269
|
}
|
|
54259
54270
|
const isTargetDestOnAppStudio = ux_common_utils_1.isAppStudio() && target.destination;
|
|
54260
|
-
if (isTargetDestOnAppStudio) {
|
|
54271
|
+
if (isTargetDestOnAppStudio || disableSAML) {
|
|
54261
54272
|
config.params.saml2 = "disabled";
|
|
54262
54273
|
}
|
|
54263
54274
|
const urlPath = !(url == null ? void 0 : url.endsWith("/")) && autoAddTrailingSlash ? `${url}/` : url;
|
|
@@ -54313,7 +54324,7 @@ var require_connection = __commonJS({
|
|
|
54313
54324
|
function isSamlLogonNeeded(response) {
|
|
54314
54325
|
return (response == null ? void 0 : response.status) === 200 && isHtmlResponse(response) && typeof response.data === "string" && !!response.data.match(/saml/i);
|
|
54315
54326
|
}
|
|
54316
|
-
async function connect({ target, credentials, log: log4, autoAddTrailingSlash = true, timeout, ignoreCertError = false, postConnectionCallback }) {
|
|
54327
|
+
async function connect({ target, credentials, log: log4, autoAddTrailingSlash = true, timeout, ignoreCertError = false, postConnectionCallback, disableSAML = false }) {
|
|
54317
54328
|
const targetAuthType = target.authenticationType;
|
|
54318
54329
|
if (targetAuthType === config_1.AuthenticationType.OAuth2RefreshToken) {
|
|
54319
54330
|
return uaaOauth_1.connectUsingUaa({ target, credentials, log: log4, postConnectionCallback });
|
|
@@ -54328,7 +54339,8 @@ var require_connection = __commonJS({
|
|
|
54328
54339
|
autoAddTrailingSlash,
|
|
54329
54340
|
timeout,
|
|
54330
54341
|
ignoreCertError,
|
|
54331
|
-
logger: log4
|
|
54342
|
+
logger: log4,
|
|
54343
|
+
disableSAML
|
|
54332
54344
|
});
|
|
54333
54345
|
}
|
|
54334
54346
|
}
|
|
@@ -54351,7 +54363,7 @@ var require_httpClient = __commonJS({
|
|
|
54351
54363
|
var connection_1 = require_connection();
|
|
54352
54364
|
var https_1 = __importDefault(require("https"));
|
|
54353
54365
|
var url_1 = require("url");
|
|
54354
|
-
async function newHttpClient({ system, credentials, log: log4, existingConnection, autoAddTrailingSlash = true, timeout, ignoreCertError, postConnectionCallback }) {
|
|
54366
|
+
async function newHttpClient({ system, credentials, log: log4, existingConnection, autoAddTrailingSlash = true, timeout, ignoreCertError, postConnectionCallback, disableSAML = false }) {
|
|
54355
54367
|
const connection = existingConnection || await connection_1.connect({
|
|
54356
54368
|
target: system,
|
|
54357
54369
|
credentials,
|
|
@@ -54359,7 +54371,8 @@ var require_httpClient = __commonJS({
|
|
|
54359
54371
|
autoAddTrailingSlash,
|
|
54360
54372
|
timeout,
|
|
54361
54373
|
ignoreCertError,
|
|
54362
|
-
postConnectionCallback
|
|
54374
|
+
postConnectionCallback,
|
|
54375
|
+
disableSAML
|
|
54363
54376
|
});
|
|
54364
54377
|
const headers = {
|
|
54365
54378
|
Cookie: connection.cookies.toString()
|
|
@@ -55973,6 +55986,7 @@ var require_utils7 = __commonJS({
|
|
|
55973
55986
|
if (!isImportedSystem) {
|
|
55974
55987
|
sapSystem.name = system.name || "";
|
|
55975
55988
|
sapSystem.setCredentials(creds);
|
|
55989
|
+
sapSystem.setUserDisplayName(creds.username);
|
|
55976
55990
|
}
|
|
55977
55991
|
} else {
|
|
55978
55992
|
sapSystem = __1.newSapSystem(system.name || "", system.url, system.client, creds, true);
|
|
@@ -56051,7 +56065,7 @@ var require_oDataClient = __commonJS({
|
|
|
56051
56065
|
var utils_1 = require_utils7();
|
|
56052
56066
|
var error_1 = require_error();
|
|
56053
56067
|
var ODataClient = class {
|
|
56054
|
-
constructor({ system, credentials = void 0, log: log4 = console, connection = void 0, autoAddTrailingSlash = true, timeout, ignoreCertError, postConnectionCallback }) {
|
|
56068
|
+
constructor({ system, credentials = void 0, log: log4 = console, connection = void 0, autoAddTrailingSlash = true, timeout, ignoreCertError, postConnectionCallback, disableSAML = false }) {
|
|
56055
56069
|
this.autoAddTrailingSlash = true;
|
|
56056
56070
|
this.system = system;
|
|
56057
56071
|
this.credentials = credentials;
|
|
@@ -56061,6 +56075,7 @@ var require_oDataClient = __commonJS({
|
|
|
56061
56075
|
this.timeout = timeout;
|
|
56062
56076
|
this.ignoreCertError = ignoreCertError;
|
|
56063
56077
|
this.postConnectionCallback = postConnectionCallback;
|
|
56078
|
+
this.disableSAML = disableSAML;
|
|
56064
56079
|
if (system && patchTls_1.TlsPatch.isPatchRequired(system.url)) {
|
|
56065
56080
|
patchTls_1.TlsPatch.apply();
|
|
56066
56081
|
}
|
|
@@ -56092,7 +56107,8 @@ var require_oDataClient = __commonJS({
|
|
|
56092
56107
|
timeout: this.timeout,
|
|
56093
56108
|
ignoreCertError: this.ignoreCertError,
|
|
56094
56109
|
updateUserInfo: this.updateUserInfo,
|
|
56095
|
-
postConnectionCallback: this.postConnectionCallback
|
|
56110
|
+
postConnectionCallback: this.postConnectionCallback,
|
|
56111
|
+
disableSAML: this.disableSAML
|
|
56096
56112
|
});
|
|
56097
56113
|
this.connection = connection;
|
|
56098
56114
|
this.client = httpClient;
|
|
@@ -56105,10 +56121,15 @@ var require_oDataClient = __commonJS({
|
|
|
56105
56121
|
}
|
|
56106
56122
|
return this.connection;
|
|
56107
56123
|
}
|
|
56108
|
-
async metadata() {
|
|
56124
|
+
async metadata(filterReferenceUriInEdmx = true) {
|
|
56109
56125
|
var _a2;
|
|
56110
56126
|
const metadataPath = ((_a2 = this.system.service) == null ? void 0 : _a2.endsWith("/")) ? "$metadata" : "/$metadata";
|
|
56111
|
-
|
|
56127
|
+
const edmx = await this.get(metadataPath, { Accept: "application/xml" });
|
|
56128
|
+
try {
|
|
56129
|
+
return filterReferenceUriInEdmx ? ux_common_utils_1.filterReferenceUri(edmx) : edmx;
|
|
56130
|
+
} catch {
|
|
56131
|
+
return edmx;
|
|
56132
|
+
}
|
|
56112
56133
|
}
|
|
56113
56134
|
async get(path, headers) {
|
|
56114
56135
|
var _a2, _b, _c;
|
|
@@ -69591,9 +69612,9 @@ var require_console = __commonJS({
|
|
|
69591
69612
|
}
|
|
69592
69613
|
});
|
|
69593
69614
|
|
|
69594
|
-
// ../../node_modules/
|
|
69615
|
+
// ../../node_modules/async/internal/isArrayLike.js
|
|
69595
69616
|
var require_isArrayLike2 = __commonJS({
|
|
69596
|
-
"../../node_modules/
|
|
69617
|
+
"../../node_modules/async/internal/isArrayLike.js"(exports2, module2) {
|
|
69597
69618
|
"use strict";
|
|
69598
69619
|
Object.defineProperty(exports2, "__esModule", {
|
|
69599
69620
|
value: true
|
|
@@ -69606,9 +69627,9 @@ var require_isArrayLike2 = __commonJS({
|
|
|
69606
69627
|
}
|
|
69607
69628
|
});
|
|
69608
69629
|
|
|
69609
|
-
// ../../node_modules/
|
|
69630
|
+
// ../../node_modules/async/internal/initialParams.js
|
|
69610
69631
|
var require_initialParams = __commonJS({
|
|
69611
|
-
"../../node_modules/
|
|
69632
|
+
"../../node_modules/async/internal/initialParams.js"(exports2, module2) {
|
|
69612
69633
|
"use strict";
|
|
69613
69634
|
Object.defineProperty(exports2, "__esModule", {
|
|
69614
69635
|
value: true
|
|
@@ -69623,9 +69644,9 @@ var require_initialParams = __commonJS({
|
|
|
69623
69644
|
}
|
|
69624
69645
|
});
|
|
69625
69646
|
|
|
69626
|
-
// ../../node_modules/
|
|
69647
|
+
// ../../node_modules/async/internal/setImmediate.js
|
|
69627
69648
|
var require_setImmediate = __commonJS({
|
|
69628
|
-
"../../node_modules/
|
|
69649
|
+
"../../node_modules/async/internal/setImmediate.js"(exports2) {
|
|
69629
69650
|
"use strict";
|
|
69630
69651
|
Object.defineProperty(exports2, "__esModule", {
|
|
69631
69652
|
value: true
|
|
@@ -69655,9 +69676,9 @@ var require_setImmediate = __commonJS({
|
|
|
69655
69676
|
}
|
|
69656
69677
|
});
|
|
69657
69678
|
|
|
69658
|
-
// ../../node_modules/
|
|
69679
|
+
// ../../node_modules/async/asyncify.js
|
|
69659
69680
|
var require_asyncify = __commonJS({
|
|
69660
|
-
"../../node_modules/
|
|
69681
|
+
"../../node_modules/async/asyncify.js"(exports2, module2) {
|
|
69661
69682
|
"use strict";
|
|
69662
69683
|
Object.defineProperty(exports2, "__esModule", {
|
|
69663
69684
|
value: true
|
|
@@ -69713,9 +69734,9 @@ var require_asyncify = __commonJS({
|
|
|
69713
69734
|
}
|
|
69714
69735
|
});
|
|
69715
69736
|
|
|
69716
|
-
// ../../node_modules/
|
|
69737
|
+
// ../../node_modules/async/internal/wrapAsync.js
|
|
69717
69738
|
var require_wrapAsync = __commonJS({
|
|
69718
|
-
"../../node_modules/
|
|
69739
|
+
"../../node_modules/async/internal/wrapAsync.js"(exports2) {
|
|
69719
69740
|
"use strict";
|
|
69720
69741
|
Object.defineProperty(exports2, "__esModule", {
|
|
69721
69742
|
value: true
|
|
@@ -69747,9 +69768,9 @@ var require_wrapAsync = __commonJS({
|
|
|
69747
69768
|
}
|
|
69748
69769
|
});
|
|
69749
69770
|
|
|
69750
|
-
// ../../node_modules/
|
|
69771
|
+
// ../../node_modules/async/internal/awaitify.js
|
|
69751
69772
|
var require_awaitify = __commonJS({
|
|
69752
|
-
"../../node_modules/
|
|
69773
|
+
"../../node_modules/async/internal/awaitify.js"(exports2, module2) {
|
|
69753
69774
|
"use strict";
|
|
69754
69775
|
Object.defineProperty(exports2, "__esModule", {
|
|
69755
69776
|
value: true
|
|
@@ -69777,9 +69798,9 @@ var require_awaitify = __commonJS({
|
|
|
69777
69798
|
}
|
|
69778
69799
|
});
|
|
69779
69800
|
|
|
69780
|
-
// ../../node_modules/
|
|
69801
|
+
// ../../node_modules/async/internal/parallel.js
|
|
69781
69802
|
var require_parallel = __commonJS({
|
|
69782
|
-
"../../node_modules/
|
|
69803
|
+
"../../node_modules/async/internal/parallel.js"(exports2, module2) {
|
|
69783
69804
|
"use strict";
|
|
69784
69805
|
Object.defineProperty(exports2, "__esModule", {
|
|
69785
69806
|
value: true
|
|
@@ -69809,9 +69830,9 @@ var require_parallel = __commonJS({
|
|
|
69809
69830
|
}
|
|
69810
69831
|
});
|
|
69811
69832
|
|
|
69812
|
-
// ../../node_modules/
|
|
69833
|
+
// ../../node_modules/async/internal/once.js
|
|
69813
69834
|
var require_once = __commonJS({
|
|
69814
|
-
"../../node_modules/
|
|
69835
|
+
"../../node_modules/async/internal/once.js"(exports2, module2) {
|
|
69815
69836
|
"use strict";
|
|
69816
69837
|
Object.defineProperty(exports2, "__esModule", {
|
|
69817
69838
|
value: true
|
|
@@ -69832,9 +69853,9 @@ var require_once = __commonJS({
|
|
|
69832
69853
|
}
|
|
69833
69854
|
});
|
|
69834
69855
|
|
|
69835
|
-
// ../../node_modules/
|
|
69856
|
+
// ../../node_modules/async/internal/getIterator.js
|
|
69836
69857
|
var require_getIterator = __commonJS({
|
|
69837
|
-
"../../node_modules/
|
|
69858
|
+
"../../node_modules/async/internal/getIterator.js"(exports2, module2) {
|
|
69838
69859
|
"use strict";
|
|
69839
69860
|
Object.defineProperty(exports2, "__esModule", {
|
|
69840
69861
|
value: true
|
|
@@ -69846,9 +69867,9 @@ var require_getIterator = __commonJS({
|
|
|
69846
69867
|
}
|
|
69847
69868
|
});
|
|
69848
69869
|
|
|
69849
|
-
// ../../node_modules/
|
|
69870
|
+
// ../../node_modules/async/internal/iterator.js
|
|
69850
69871
|
var require_iterator2 = __commonJS({
|
|
69851
|
-
"../../node_modules/
|
|
69872
|
+
"../../node_modules/async/internal/iterator.js"(exports2, module2) {
|
|
69852
69873
|
"use strict";
|
|
69853
69874
|
Object.defineProperty(exports2, "__esModule", {
|
|
69854
69875
|
value: true
|
|
@@ -69901,9 +69922,9 @@ var require_iterator2 = __commonJS({
|
|
|
69901
69922
|
}
|
|
69902
69923
|
});
|
|
69903
69924
|
|
|
69904
|
-
// ../../node_modules/
|
|
69925
|
+
// ../../node_modules/async/internal/onlyOnce.js
|
|
69905
69926
|
var require_onlyOnce = __commonJS({
|
|
69906
|
-
"../../node_modules/
|
|
69927
|
+
"../../node_modules/async/internal/onlyOnce.js"(exports2, module2) {
|
|
69907
69928
|
"use strict";
|
|
69908
69929
|
Object.defineProperty(exports2, "__esModule", {
|
|
69909
69930
|
value: true
|
|
@@ -69922,9 +69943,9 @@ var require_onlyOnce = __commonJS({
|
|
|
69922
69943
|
}
|
|
69923
69944
|
});
|
|
69924
69945
|
|
|
69925
|
-
// ../../node_modules/
|
|
69946
|
+
// ../../node_modules/async/internal/breakLoop.js
|
|
69926
69947
|
var require_breakLoop = __commonJS({
|
|
69927
|
-
"../../node_modules/
|
|
69948
|
+
"../../node_modules/async/internal/breakLoop.js"(exports2, module2) {
|
|
69928
69949
|
"use strict";
|
|
69929
69950
|
Object.defineProperty(exports2, "__esModule", {
|
|
69930
69951
|
value: true
|
|
@@ -69935,9 +69956,9 @@ var require_breakLoop = __commonJS({
|
|
|
69935
69956
|
}
|
|
69936
69957
|
});
|
|
69937
69958
|
|
|
69938
|
-
// ../../node_modules/
|
|
69959
|
+
// ../../node_modules/async/internal/asyncEachOfLimit.js
|
|
69939
69960
|
var require_asyncEachOfLimit = __commonJS({
|
|
69940
|
-
"../../node_modules/
|
|
69961
|
+
"../../node_modules/async/internal/asyncEachOfLimit.js"(exports2, module2) {
|
|
69941
69962
|
"use strict";
|
|
69942
69963
|
Object.defineProperty(exports2, "__esModule", {
|
|
69943
69964
|
value: true
|
|
@@ -70005,9 +70026,9 @@ var require_asyncEachOfLimit = __commonJS({
|
|
|
70005
70026
|
}
|
|
70006
70027
|
});
|
|
70007
70028
|
|
|
70008
|
-
// ../../node_modules/
|
|
70029
|
+
// ../../node_modules/async/internal/eachOfLimit.js
|
|
70009
70030
|
var require_eachOfLimit = __commonJS({
|
|
70010
|
-
"../../node_modules/
|
|
70031
|
+
"../../node_modules/async/internal/eachOfLimit.js"(exports2, module2) {
|
|
70011
70032
|
"use strict";
|
|
70012
70033
|
Object.defineProperty(exports2, "__esModule", {
|
|
70013
70034
|
value: true
|
|
@@ -70086,9 +70107,9 @@ var require_eachOfLimit = __commonJS({
|
|
|
70086
70107
|
}
|
|
70087
70108
|
});
|
|
70088
70109
|
|
|
70089
|
-
// ../../node_modules/
|
|
70110
|
+
// ../../node_modules/async/eachOfLimit.js
|
|
70090
70111
|
var require_eachOfLimit2 = __commonJS({
|
|
70091
|
-
"../../node_modules/
|
|
70112
|
+
"../../node_modules/async/eachOfLimit.js"(exports2, module2) {
|
|
70092
70113
|
"use strict";
|
|
70093
70114
|
Object.defineProperty(exports2, "__esModule", {
|
|
70094
70115
|
value: true
|
|
@@ -70110,9 +70131,9 @@ var require_eachOfLimit2 = __commonJS({
|
|
|
70110
70131
|
}
|
|
70111
70132
|
});
|
|
70112
70133
|
|
|
70113
|
-
// ../../node_modules/
|
|
70134
|
+
// ../../node_modules/async/eachOfSeries.js
|
|
70114
70135
|
var require_eachOfSeries = __commonJS({
|
|
70115
|
-
"../../node_modules/
|
|
70136
|
+
"../../node_modules/async/eachOfSeries.js"(exports2, module2) {
|
|
70116
70137
|
"use strict";
|
|
70117
70138
|
Object.defineProperty(exports2, "__esModule", {
|
|
70118
70139
|
value: true
|
|
@@ -70132,9 +70153,9 @@ var require_eachOfSeries = __commonJS({
|
|
|
70132
70153
|
}
|
|
70133
70154
|
});
|
|
70134
70155
|
|
|
70135
|
-
// ../../node_modules/
|
|
70156
|
+
// ../../node_modules/async/series.js
|
|
70136
70157
|
var require_series = __commonJS({
|
|
70137
|
-
"../../node_modules/
|
|
70158
|
+
"../../node_modules/async/series.js"(exports2, module2) {
|
|
70138
70159
|
"use strict";
|
|
70139
70160
|
Object.defineProperty(exports2, "__esModule", {
|
|
70140
70161
|
value: true
|
|
@@ -75567,9 +75588,9 @@ var require_config3 = __commonJS({
|
|
|
75567
75588
|
}
|
|
75568
75589
|
});
|
|
75569
75590
|
|
|
75570
|
-
// ../../node_modules/
|
|
75591
|
+
// ../../node_modules/async/eachOf.js
|
|
75571
75592
|
var require_eachOf = __commonJS({
|
|
75572
|
-
"../../node_modules/
|
|
75593
|
+
"../../node_modules/async/eachOf.js"(exports2, module2) {
|
|
75573
75594
|
"use strict";
|
|
75574
75595
|
Object.defineProperty(exports2, "__esModule", {
|
|
75575
75596
|
value: true
|
|
@@ -75625,9 +75646,9 @@ var require_eachOf = __commonJS({
|
|
|
75625
75646
|
}
|
|
75626
75647
|
});
|
|
75627
75648
|
|
|
75628
|
-
// ../../node_modules/
|
|
75649
|
+
// ../../node_modules/async/internal/withoutIndex.js
|
|
75629
75650
|
var require_withoutIndex = __commonJS({
|
|
75630
|
-
"../../node_modules/
|
|
75651
|
+
"../../node_modules/async/internal/withoutIndex.js"(exports2, module2) {
|
|
75631
75652
|
"use strict";
|
|
75632
75653
|
Object.defineProperty(exports2, "__esModule", {
|
|
75633
75654
|
value: true
|
|
@@ -75640,9 +75661,9 @@ var require_withoutIndex = __commonJS({
|
|
|
75640
75661
|
}
|
|
75641
75662
|
});
|
|
75642
75663
|
|
|
75643
|
-
// ../../node_modules/
|
|
75664
|
+
// ../../node_modules/async/forEach.js
|
|
75644
75665
|
var require_forEach = __commonJS({
|
|
75645
|
-
"../../node_modules/
|
|
75666
|
+
"../../node_modules/async/forEach.js"(exports2, module2) {
|
|
75646
75667
|
"use strict";
|
|
75647
75668
|
Object.defineProperty(exports2, "__esModule", {
|
|
75648
75669
|
value: true
|
|
@@ -85191,6 +85212,11 @@ var require_logger4 = __commonJS({
|
|
|
85191
85212
|
});
|
|
85192
85213
|
|
|
85193
85214
|
// src/tasks/cf-deploy/index.ts
|
|
85215
|
+
var cf_deploy_exports = {};
|
|
85216
|
+
__export(cf_deploy_exports, {
|
|
85217
|
+
default: () => task
|
|
85218
|
+
});
|
|
85219
|
+
module.exports = __toCommonJS(cf_deploy_exports);
|
|
85194
85220
|
var import_path = require("path");
|
|
85195
85221
|
var import_fs = require("fs");
|
|
85196
85222
|
var import_child_process = require("child_process");
|
|
@@ -85200,6 +85226,47 @@ var import_logger = __toESM(require_logger4());
|
|
|
85200
85226
|
init_i18next();
|
|
85201
85227
|
var import_yaml = __toESM(require_dist2());
|
|
85202
85228
|
var log3 = (0, import_logger.getLogger)("cf spaces");
|
|
85229
|
+
async function task(args = []) {
|
|
85230
|
+
await (0, import_ux_telemetry.initTelemetrySettings)();
|
|
85231
|
+
const markName = import_ux_telemetry.PerformanceMeasurementAPI.startMark("LOADING_TIME");
|
|
85232
|
+
let cfAuthenticated = true;
|
|
85233
|
+
try {
|
|
85234
|
+
await _spawnAsync("cf", ["spaces"]);
|
|
85235
|
+
} catch (error3) {
|
|
85236
|
+
cfAuthenticated = false;
|
|
85237
|
+
}
|
|
85238
|
+
if (cfAuthenticated) {
|
|
85239
|
+
const defaultMtaDir = "mta_archives";
|
|
85240
|
+
let archiveName = "archive.mtar";
|
|
85241
|
+
try {
|
|
85242
|
+
const mtaArchives = (0, import_fs.readdirSync)(defaultMtaDir);
|
|
85243
|
+
if (mtaArchives.length === 1 && mtaArchives[0].includes(".mtar")) {
|
|
85244
|
+
archiveName = mtaArchives[0];
|
|
85245
|
+
}
|
|
85246
|
+
} catch (err) {
|
|
85247
|
+
}
|
|
85248
|
+
let exitCode;
|
|
85249
|
+
let error3;
|
|
85250
|
+
try {
|
|
85251
|
+
exitCode = await _spawnAsync("cf", ["deploy", `${defaultMtaDir}/${archiveName}`, ...args], {
|
|
85252
|
+
stdio: "inherit"
|
|
85253
|
+
});
|
|
85254
|
+
} catch (err) {
|
|
85255
|
+
error3 = err;
|
|
85256
|
+
exitCode = 1;
|
|
85257
|
+
}
|
|
85258
|
+
if (exitCode === 0) {
|
|
85259
|
+
await _showHelpGuide();
|
|
85260
|
+
}
|
|
85261
|
+
try {
|
|
85262
|
+
await _reportDeployTelemetry(exitCode, markName);
|
|
85263
|
+
} catch (err) {
|
|
85264
|
+
}
|
|
85265
|
+
if (error3) {
|
|
85266
|
+
throw error3;
|
|
85267
|
+
}
|
|
85268
|
+
}
|
|
85269
|
+
}
|
|
85203
85270
|
async function _spawnAsync(cmd, args, options2) {
|
|
85204
85271
|
return new Promise((resolve, reject) => {
|
|
85205
85272
|
const process2 = (0, import_child_process.spawn)(cmd, args, options2);
|
|
@@ -85278,47 +85345,8 @@ async function _showHelpGuide() {
|
|
|
85278
85345
|
}
|
|
85279
85346
|
log3.info(`${i18next_default.t("DEPLOYMENT_HELP")}`);
|
|
85280
85347
|
}
|
|
85281
|
-
|
|
85282
|
-
|
|
85283
|
-
const markName = import_ux_telemetry.PerformanceMeasurementAPI.startMark("LOADING_TIME");
|
|
85284
|
-
let cfAuthenticated = true;
|
|
85285
|
-
try {
|
|
85286
|
-
await _spawnAsync("cf", ["spaces"]);
|
|
85287
|
-
} catch (error3) {
|
|
85288
|
-
cfAuthenticated = false;
|
|
85289
|
-
}
|
|
85290
|
-
if (cfAuthenticated) {
|
|
85291
|
-
const defaultMtaDir = "mta_archives";
|
|
85292
|
-
let archiveName = "archive.mtar";
|
|
85293
|
-
try {
|
|
85294
|
-
const mtaArchives = (0, import_fs.readdirSync)(defaultMtaDir);
|
|
85295
|
-
if (mtaArchives.length === 1 && mtaArchives[0].includes(".mtar")) {
|
|
85296
|
-
archiveName = mtaArchives[0];
|
|
85297
|
-
}
|
|
85298
|
-
} catch (err) {
|
|
85299
|
-
}
|
|
85300
|
-
let exitCode;
|
|
85301
|
-
let error3;
|
|
85302
|
-
try {
|
|
85303
|
-
exitCode = await _spawnAsync("cf", ["deploy", `${defaultMtaDir}/${archiveName}`, ...args], {
|
|
85304
|
-
stdio: "inherit"
|
|
85305
|
-
});
|
|
85306
|
-
} catch (err) {
|
|
85307
|
-
error3 = err;
|
|
85308
|
-
exitCode = 1;
|
|
85309
|
-
}
|
|
85310
|
-
if (exitCode === 0) {
|
|
85311
|
-
await _showHelpGuide();
|
|
85312
|
-
}
|
|
85313
|
-
try {
|
|
85314
|
-
await _reportDeployTelemetry(exitCode, markName);
|
|
85315
|
-
} catch (err) {
|
|
85316
|
-
}
|
|
85317
|
-
if (error3) {
|
|
85318
|
-
throw error3;
|
|
85319
|
-
}
|
|
85320
|
-
}
|
|
85321
|
-
};
|
|
85348
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
85349
|
+
0 && (module.exports = {});
|
|
85322
85350
|
/*
|
|
85323
85351
|
object-assign
|
|
85324
85352
|
(c) Sindre Sorhus
|