@cnwenf/occ 2.1.345 → 2.1.346
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/dist/cli.js +25 -10
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
globalThis.MACRO={"VERSION":"2.1.
|
|
2
|
+
globalThis.MACRO={"VERSION":"2.1.346","BINARY_NAME":"occ","BUILD_TIME":"2026-09-21T18:17:57.821Z","FEEDBACK_CHANNEL":"","ISSUES_EXPLAINER":"","NATIVE_PACKAGE_URL":"","PACKAGE_URL":"@cnwenf/occ","VERSION_CHANGELOG":""};
|
|
3
3
|
// @bun
|
|
4
4
|
var __create = Object.create;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -58662,6 +58662,15 @@ var init_schemas3 = __esm(() => {
|
|
|
58662
58662
|
KnownMarketplacesFileSchema = lazySchema(() => exports_external.record(exports_external.string(), KnownMarketplaceSchema()));
|
|
58663
58663
|
});
|
|
58664
58664
|
|
|
58665
|
+
// src/utils/settings/sanitizeWarningText.ts
|
|
58666
|
+
function sanitizeForWarningText(text) {
|
|
58667
|
+
return text.replace(C0_CONTROL_CHARS_RE, "");
|
|
58668
|
+
}
|
|
58669
|
+
var C0_CONTROL_CHARS_RE;
|
|
58670
|
+
var init_sanitizeWarningText = __esm(() => {
|
|
58671
|
+
C0_CONTROL_CHARS_RE = /[\u0000-\u001f]/g;
|
|
58672
|
+
});
|
|
58673
|
+
|
|
58665
58674
|
// src/utils/settings/marketplacePolicySanitizer.ts
|
|
58666
58675
|
function firstIssueDetail(issues) {
|
|
58667
58676
|
for (const issue2 of issues) {
|
|
@@ -58715,7 +58724,7 @@ function sanitizeMarketplacePolicy(data, filePath) {
|
|
|
58715
58724
|
warnings.push({
|
|
58716
58725
|
file: filePath,
|
|
58717
58726
|
path: `${key}[${index2}]`,
|
|
58718
|
-
message: `Invalid entry was ignored: ${firstIssueDetail(parsed.error.issues) ?? "failed validation"}`,
|
|
58727
|
+
message: `Invalid entry was ignored: ${sanitizeForWarningText(firstIssueDetail(parsed.error.issues) ?? "failed validation")}`,
|
|
58719
58728
|
invalidValue: entry
|
|
58720
58729
|
});
|
|
58721
58730
|
continue;
|
|
@@ -58730,14 +58739,14 @@ function sanitizeMarketplacePolicy(data, filePath) {
|
|
|
58730
58739
|
warnings.push({
|
|
58731
58740
|
file: filePath,
|
|
58732
58741
|
path: `${key}[${index2}]`,
|
|
58733
|
-
message: `Unenforceable entry was kept: ${problem}; it can never match a marketplace source, but marketplace restrictions stay active`,
|
|
58742
|
+
message: `Unenforceable entry was kept: ${sanitizeForWarningText(problem)}; it can never match a marketplace source, but marketplace restrictions stay active`,
|
|
58734
58743
|
invalidValue: entry
|
|
58735
58744
|
});
|
|
58736
58745
|
} else {
|
|
58737
58746
|
warnings.push({
|
|
58738
58747
|
file: filePath,
|
|
58739
58748
|
path: `${key}[${index2}]`,
|
|
58740
|
-
message: `Invalid entry was ignored: ${problem}`,
|
|
58749
|
+
message: `Invalid entry was ignored: ${sanitizeForWarningText(problem)}`,
|
|
58741
58750
|
invalidValue: entry
|
|
58742
58751
|
});
|
|
58743
58752
|
}
|
|
@@ -58750,6 +58759,7 @@ var POLICY_KEYS, STRICT_PRESENT_INVALID_MESSAGE = '"strictKnownMarketplaces" was
|
|
|
58750
58759
|
var init_marketplacePolicySanitizer = __esm(() => {
|
|
58751
58760
|
init_marketplacePolicyValidation();
|
|
58752
58761
|
init_schemas3();
|
|
58762
|
+
init_sanitizeWarningText();
|
|
58753
58763
|
POLICY_KEYS = ["strictKnownMarketplaces", "blockedMarketplaces"];
|
|
58754
58764
|
});
|
|
58755
58765
|
|
|
@@ -58770,7 +58780,7 @@ function validateAllowlistEntry(key, entry) {
|
|
|
58770
58780
|
return {
|
|
58771
58781
|
ok: true,
|
|
58772
58782
|
value: { marketplace, plugin },
|
|
58773
|
-
notice: `"allowedChannelPlugins" entry "${entry}" was accepted; prefer the documented object form {"plugin": "${plugin}", "marketplace": "${marketplace}"}.`
|
|
58783
|
+
notice: `"allowedChannelPlugins" entry "${sanitizeForWarningText(entry)}" was accepted; prefer the documented object form {"plugin": "${sanitizeForWarningText(plugin)}", "marketplace": "${sanitizeForWarningText(marketplace)}"}.`
|
|
58774
58784
|
};
|
|
58775
58785
|
}
|
|
58776
58786
|
}
|
|
@@ -58815,7 +58825,7 @@ function sanitizeSecurityAllowlists(data, filePath) {
|
|
|
58815
58825
|
warnings.push({
|
|
58816
58826
|
file: filePath,
|
|
58817
58827
|
path: `${key}[${index2}]`,
|
|
58818
|
-
message: `Invalid entry was ignored: ${result.detail}`,
|
|
58828
|
+
message: `Invalid entry was ignored: ${sanitizeForWarningText(result.detail)}`,
|
|
58819
58829
|
invalidValue: entry
|
|
58820
58830
|
});
|
|
58821
58831
|
}
|
|
@@ -58834,6 +58844,7 @@ function sanitizeSecurityAllowlists(data, filePath) {
|
|
|
58834
58844
|
var STRING_ENTRY, CHANNEL_PLUGIN_ENTRY, ALLOWLIST_SPECS;
|
|
58835
58845
|
var init_sanitizeAllowlists = __esm(() => {
|
|
58836
58846
|
init_v4();
|
|
58847
|
+
init_sanitizeWarningText();
|
|
58837
58848
|
STRING_ENTRY = exports_external.string();
|
|
58838
58849
|
CHANNEL_PLUGIN_ENTRY = exports_external.object({
|
|
58839
58850
|
marketplace: exports_external.string(),
|
|
@@ -60513,11 +60524,11 @@ function filterInvalidPermissionRules(data, filePath) {
|
|
|
60513
60524
|
}
|
|
60514
60525
|
const result = validatePermissionRule(rule);
|
|
60515
60526
|
if (!result.valid) {
|
|
60516
|
-
let message = `Invalid permission rule "${rule}" was skipped`;
|
|
60527
|
+
let message = `Invalid permission rule "${sanitizeForWarningText(rule)}" was skipped`;
|
|
60517
60528
|
if (result.error)
|
|
60518
|
-
message += `: ${result.error}`;
|
|
60529
|
+
message += `: ${sanitizeForWarningText(result.error)}`;
|
|
60519
60530
|
if (result.suggestion)
|
|
60520
|
-
message += `. ${result.suggestion}`;
|
|
60531
|
+
message += `. ${sanitizeForWarningText(result.suggestion)}`;
|
|
60521
60532
|
warnings.push({
|
|
60522
60533
|
file: filePath,
|
|
60523
60534
|
path: `permissions.${key}`,
|
|
@@ -60535,6 +60546,7 @@ var init_validation2 = __esm(() => {
|
|
|
60535
60546
|
init_slowOperations();
|
|
60536
60547
|
init_stringUtils();
|
|
60537
60548
|
init_permissionValidation();
|
|
60549
|
+
init_sanitizeWarningText();
|
|
60538
60550
|
init_schemaOutput();
|
|
60539
60551
|
init_types2();
|
|
60540
60552
|
init_validationTips();
|
|
@@ -61014,7 +61026,10 @@ function getSettingsForSourceUncached(source) {
|
|
|
61014
61026
|
const cachedRemote = getRemoteManagedSettingsSyncFromCache();
|
|
61015
61027
|
if (cachedRemote && Object.keys(cachedRemote).length > 0) {
|
|
61016
61028
|
const remoteSettings = clone(cachedRemote);
|
|
61017
|
-
sanitizePolicySourceData(remoteSettings, "remote managed settings");
|
|
61029
|
+
const remoteWarnings = sanitizePolicySourceData(remoteSettings, "remote managed settings");
|
|
61030
|
+
for (const warning of remoteWarnings) {
|
|
61031
|
+
logForDebugging(`[settings] ${warning.file}: ${warning.path}: ${warning.message}`);
|
|
61032
|
+
}
|
|
61018
61033
|
return remoteSettings;
|
|
61019
61034
|
}
|
|
61020
61035
|
const mdmResult = getMdmSettings();
|