mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Revert build folder update to fix it properly (#22981)
* Revert "Disable publishing crash reports temporarily (#22950)" This reverts commit13a791d14e. * Revert "Compile build folder (#22811)" This reverts commit2c07c09d0d.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const child_process_1 = require("child_process");
|
||||
@@ -95,6 +95,10 @@ class BooleanPolicy extends BasePolicy {
|
||||
}
|
||||
}
|
||||
class IntPolicy extends BasePolicy {
|
||||
constructor(name, category, minimumVersion, description, moduleName, defaultValue) {
|
||||
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
static from(name, category, minimumVersion, description, moduleName, settingNode) {
|
||||
const type = getStringProperty(settingNode, 'type');
|
||||
if (type !== 'number') {
|
||||
@@ -106,10 +110,6 @@ class IntPolicy extends BasePolicy {
|
||||
}
|
||||
return new IntPolicy(name, category, minimumVersion, description, moduleName, defaultValue);
|
||||
}
|
||||
constructor(name, category, minimumVersion, description, moduleName, defaultValue) {
|
||||
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
renderADMXElements() {
|
||||
return [
|
||||
`<decimal id="${this.name}" valueName="${this.name}" />`
|
||||
@@ -139,6 +139,11 @@ class StringPolicy extends BasePolicy {
|
||||
}
|
||||
}
|
||||
class StringEnumPolicy extends BasePolicy {
|
||||
constructor(name, category, minimumVersion, description, moduleName, enum_, enumDescriptions) {
|
||||
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
|
||||
this.enum_ = enum_;
|
||||
this.enumDescriptions = enumDescriptions;
|
||||
}
|
||||
static from(name, category, minimumVersion, description, moduleName, settingNode) {
|
||||
const type = getStringProperty(settingNode, 'type');
|
||||
if (type !== 'string') {
|
||||
@@ -160,11 +165,6 @@ class StringEnumPolicy extends BasePolicy {
|
||||
}
|
||||
return new StringEnumPolicy(name, category, minimumVersion, description, moduleName, enum_, enumDescriptions);
|
||||
}
|
||||
constructor(name, category, minimumVersion, description, moduleName, enum_, enumDescriptions) {
|
||||
super(PolicyType.StringEnum, name, category, minimumVersion, description, moduleName);
|
||||
this.enum_ = enum_;
|
||||
this.enumDescriptions = enumDescriptions;
|
||||
}
|
||||
renderADMXElements() {
|
||||
return [
|
||||
`<enum id="${this.name}" valueName="${this.name}">`,
|
||||
@@ -185,12 +185,11 @@ class StringEnumPolicy extends BasePolicy {
|
||||
const IntQ = {
|
||||
Q: `(number) @value`,
|
||||
value(matches) {
|
||||
var _a;
|
||||
const match = matches[0];
|
||||
if (!match) {
|
||||
return undefined;
|
||||
}
|
||||
const value = (_a = match.captures.filter((c) => c.name === 'value')[0]) === null || _a === void 0 ? void 0 : _a.node.text;
|
||||
const value = match.captures.filter(c => c.name === 'value')[0]?.node.text;
|
||||
if (!value) {
|
||||
throw new Error(`Missing required 'value' property.`);
|
||||
}
|
||||
@@ -203,16 +202,15 @@ const StringQ = {
|
||||
(call_expression function: (identifier) @localizeFn arguments: (arguments (string (string_fragment) @nlsKey) (string (string_fragment) @value)) (#eq? @localizeFn localize))
|
||||
]`,
|
||||
value(matches) {
|
||||
var _a, _b;
|
||||
const match = matches[0];
|
||||
if (!match) {
|
||||
return undefined;
|
||||
}
|
||||
const value = (_a = match.captures.filter((c) => c.name === 'value')[0]) === null || _a === void 0 ? void 0 : _a.node.text;
|
||||
const value = match.captures.filter(c => c.name === 'value')[0]?.node.text;
|
||||
if (!value) {
|
||||
throw new Error(`Missing required 'value' property.`);
|
||||
}
|
||||
const nlsKey = (_b = match.captures.filter((c) => c.name === 'nlsKey')[0]) === null || _b === void 0 ? void 0 : _b.node.text;
|
||||
const nlsKey = match.captures.filter(c => c.name === 'nlsKey')[0]?.node.text;
|
||||
if (nlsKey) {
|
||||
return { value, nlsKey };
|
||||
}
|
||||
@@ -323,7 +321,7 @@ function getPolicies(moduleName, node) {
|
||||
)
|
||||
`);
|
||||
const categories = new Map();
|
||||
return query.matches(node).map((m) => {
|
||||
return query.matches(node).map(m => {
|
||||
const configurationNode = m.captures.filter(c => c.name === 'configuration')[0].node;
|
||||
const settingNode = m.captures.filter(c => c.name === 'setting')[0].node;
|
||||
const policyNode = m.captures.filter(c => c.name === 'policy')[0].node;
|
||||
@@ -463,13 +461,12 @@ async function parsePolicies() {
|
||||
return policies;
|
||||
}
|
||||
async function getTranslations() {
|
||||
var _a;
|
||||
const updateUrl = product.updateUrl;
|
||||
if (!updateUrl) {
|
||||
console.warn(`Skipping policy localization: No 'updateUrl' found in 'product.json'.`);
|
||||
return [];
|
||||
}
|
||||
const resourceUrlTemplate = (_a = product.extensionsGallery) === null || _a === void 0 ? void 0 : _a.resourceUrlTemplate;
|
||||
const resourceUrlTemplate = product.extensionsGallery?.resourceUrlTemplate;
|
||||
if (!resourceUrlTemplate) {
|
||||
console.warn(`Skipping policy localization: No 'resourceUrlTemplate' found in 'product.json'.`);
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user