@aws/cloudformation-languageserver 1.14.0 → 1.15.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.
Files changed (36) hide show
  1. package/README.md +2 -1
  2. package/THIRD-PARTY-LICENSES.txt +457 -58
  3. package/assets/featureFlag/prod.json +2 -2
  4. package/assets/release-manifest.json +158 -572
  5. package/cfn-lsp-server-standalone.js +53 -782
  6. package/cfn-lsp-server-standalone.js.map +1 -1
  7. package/node_modules_aws-sdk_credential-provider-http_dist-es_index_js.js +4 -4
  8. package/node_modules_aws-sdk_credential-provider-ini_dist-es_index_js.js +1 -1
  9. package/node_modules_aws-sdk_credential-provider-login_dist-es_index_js.js +2 -2
  10. package/node_modules_aws-sdk_credential-provider-process_dist-es_index_js.js +1 -1
  11. package/node_modules_aws-sdk_credential-provider-sso_dist-es_index_js.js +38 -20
  12. package/node_modules_aws-sdk_credential-provider-sso_dist-es_index_js.js.map +1 -1
  13. package/node_modules_aws-sdk_credential-provider-web-identity_dist-es_index_js.js +1 -1
  14. package/node_modules_smithy_credential-provider-imds_dist-es_index_js.js +1 -1
  15. package/package.json +3 -3
  16. package/pyodide-worker.js +26 -17
  17. package/pyodide-worker.js.map +1 -1
  18. package/vendors-node_modules_aws-sdk_client-cloudcontrol_dist-es_index_js-node_modules_aws-sdk_client-4d5eee.js +17868 -8730
  19. package/vendors-node_modules_aws-sdk_client-cloudcontrol_dist-es_index_js-node_modules_aws-sdk_client-4d5eee.js.map +1 -1
  20. package/vendors-node_modules_aws-sdk_credential-provider-sso_dist-es_loadSso_js.js +13 -7
  21. package/vendors-node_modules_aws-sdk_credential-provider-sso_dist-es_loadSso_js.js.map +1 -1
  22. package/vendors-node_modules_aws-sdk_nested-clients_dist-es_submodules_signin_index_js.js +20 -7
  23. package/vendors-node_modules_aws-sdk_nested-clients_dist-es_submodules_signin_index_js.js.map +1 -1
  24. package/vendors-node_modules_aws-sdk_nested-clients_dist-es_submodules_sso-oidc_index_js.js +20 -7
  25. package/vendors-node_modules_aws-sdk_nested-clients_dist-es_submodules_sso-oidc_index_js.js.map +1 -1
  26. package/vendors-node_modules_aws-sdk_nested-clients_dist-es_submodules_sts_index_js.js +16 -7
  27. package/vendors-node_modules_aws-sdk_nested-clients_dist-es_submodules_sts_index_js.js.map +1 -1
  28. package/vendors-node_modules_bowser_bowser_mjs.js +2244 -0
  29. package/vendors-node_modules_bowser_bowser_mjs.js.map +1 -0
  30. package/guard_bg.wasm +0 -0
  31. package/vendor/cfn-guard/guard.js +0 -414
  32. package/vendor/cfn-guard/guard_bg.wasm +0 -0
  33. package/vendor/cfn-guard/index.js +0 -87
  34. package/vendor/cfn-guard/package.json +0 -39
  35. package/vendors-node_modules_bowser_src_bowser_js.js +0 -3300
  36. package/vendors-node_modules_bowser_src_bowser_js.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pyodide-worker.js","mappings":";;;;;;;;;;AAyBA,oDA+BC;AAxDD,6GAAqF;AAwBrF,8FAA8F;AAC9F,SAAgB,oBAAoB,CAAC,WAAgC,EAAE,GAAW;IAC9E,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG;YACT,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;YACrC,KAAK,EAAE;gBACH,KAAK,EAAE;oBACH,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,UAAU,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;oBAC9D,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,IAAI,CAAC,C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AO,CAAC,6DAAoB;AACvC,iBAAiB,mBAAO,CAAC,2DAAkB;AAC3C,WAAW,mBAAO,CAAC,wDAAS;AAC5B,eAAe,mBAAO,CAAC,uDAAqC;AAC5D,aAAa,mBAAO,CAAC,uDAAqC;AAC1D,aAAa,mBAAO,CAAC,wDAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,YAAY,aAAa,aAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2IAA2I,OAAO;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS,EAAE,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ,IAAI,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,EAAE;AAC1D;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,sBAAsB,QAAQ,IAAI,MAAM;AACxC;AACA;AACA;AACA;AACA;;;;;;;;ACjRA,oC;;;;;;;ACAA,wD;;;;;;;ACAA,0C;;;;;;;ACAA,mC;;;;;;;ACAA,+B;;;;;;;ACAA,gC;;;;;;;ACAA,sC;;;;;;;ACAA,+B;;;;;;;ACAA,iC;;;;;;;ACAA,gC;;;;;;;ACAA,iC;;;;;;;ACAA,2C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;;;;WClCA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,E;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF,E;;;;;WCRA;WACA;WACA;WACA;WACA,E;;;;;WCJA,wF;;;;;WCAA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,gBAAgB,qBAAqB;WACrC;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA,aAAa;WACb;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;;WAEA;;WAEA;;WAEA,kB;;;;;WCxCA;WACA;WACA;WACA;WACA,E;;;;;UEJA;UACA","sources":["webpack://@aws/cloudformation-languageserver/./src/services/cfnLint/CfnLintDiagnosticConverter.ts","webpack://@aws/cloudformation-languageserver/./src/services/cfnLint/pyodide-worker.ts","webpack://@aws/cloudformation-languageserver/./src/utils/String.ts","webpack://@aws/cloudformation-languageserver/./src/utils/errors/ErrorUtils.ts","webpack://@aws/cloudformation-languageserver/./node_modules/vscode-languageserver-protocol/lib/node/main.js","webpack://@aws/cloudformation-languageserver/./node_modules/vscode-languageserver/lib/node/main.js","webpack://@aws/cloudformation-languageserver/external commonjs2 \"pyodide\"","webpack://@aws/cloudformation-languageserver/external commonjs2 \"vscode-languageserver-types\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"child_process\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"crypto\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"fs\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"net\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"node:util\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"os\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"path\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"url\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"util\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"worker_threads\"","webpack://@aws/cloudformation-languageserver/webpack/bootstrap","webpack://@aws/cloudformation-languageserver/webpack/runtime/chunk loaded","webpack://@aws/cloudformation-languageserver/webpack/runtime/ensure chunk","webpack://@aws/cloudformation-languageserver/webpack/runtime/get javascript chunk filename","webpack://@aws/cloudformation-languageserver/webpack/runtime/hasOwnProperty shorthand","webpack://@aws/cloudformation-languageserver/webpack/runtime/require chunk loading","webpack://@aws/cloudformation-languageserver/webpack/runtime/startup chunk dependencies","webpack://@aws/cloudformation-languageserver/webpack/before-startup","webpack://@aws/cloudformation-languageserver/webpack/startup","webpack://@aws/cloudformation-languageserver/webpack/after-startup"],"sourcesContent":["import { DiagnosticSeverity, PublishDiagnosticsParams } from 'vscode-languageserver';\n\n// JSON shape from cfn-lint --format json. Shared by local and Pyodide paths.\nexport type CfnLintDiagnostic = {\n Level: string;\n Message: string;\n Rule: {\n Id: string;\n Source: string;\n };\n Location: {\n Start: {\n LineNumber: number;\n ColumnNumber: number;\n };\n End: {\n LineNumber: number;\n ColumnNumber: number;\n };\n Path: unknown;\n };\n Filename: string;\n};\n\n// Returns [] (not [{uri, diagnostics: []}]) when no findings, so callers can skip publishing.\nexport function toPublishDiagnostics(diagnostics: CfnLintDiagnostic[], uri: string): PublishDiagnosticsParams[] {\n if (!diagnostics || diagnostics.length === 0) {\n return [];\n }\n\n const lspDiagnostics = diagnostics.map((item) => {\n const base = {\n severity: convertSeverity(item.Level),\n range: {\n start: {\n line: Math.max(0, (item.Location?.Start?.LineNumber || 1) - 1),\n character: Math.max(0, (item.Location?.Start?.ColumnNumber || 1) - 1),\n },\n end: {\n line: Math.max(0, (item.Location?.End?.LineNumber || 1) - 1),\n character: Math.max(0, (item.Location?.End?.ColumnNumber || 1) - 1),\n },\n },\n message: item.Message || 'Unknown cfn-lint error',\n source: 'cfn-lint',\n code: item.Rule?.Id || 'unknown',\n };\n\n const sourceUrl = item.Rule?.Source;\n if (sourceUrl) {\n return { ...base, codeDescription: { href: sourceUrl } };\n }\n return base;\n });\n\n return [{ uri, diagnostics: lspDiagnostics }];\n}\n\nfunction convertSeverity(level: string): DiagnosticSeverity {\n switch (level) {\n case 'Error': {\n return DiagnosticSeverity.Error;\n }\n case 'Warning': {\n return DiagnosticSeverity.Warning;\n }\n case 'Informational':\n case 'Info': {\n return DiagnosticSeverity.Information;\n }\n default: {\n return DiagnosticSeverity.Information;\n }\n }\n}\n","import path from 'path';\nimport { parentPort } from 'worker_threads';\nimport { loadPyodide, type PyodideInterface } from 'pyodide';\nimport { PublishDiagnosticsParams } from 'vscode-languageserver';\nimport { CloudFormationFileType } from '../../document/Document';\nimport { extractErrorMessage } from '../../utils/errors/ErrorUtils';\nimport { CfnLintDiagnostic, toPublishDiagnostics } from './CfnLintDiagnosticConverter';\n\n// Instead of sending stdout/stderr messages back to the main thread,\n// we'll just log them in the worker thread\nconst customStdout = (_text: string): void => {\n // No-op in production, used for debugging\n // console.log(text);\n};\n\nconst customStderr = (_text: string): void => {\n // No-op in production, used for debugging\n // console.error(text);\n};\n\ninterface WorkerMessage {\n id: string;\n action: string;\n payload: Record<string, unknown>;\n}\n\ninterface InitializeResult {\n status: 'initialized' | 'already-initialized' | 'already-initializing';\n installSource?: string;\n}\n\ninterface MountResult {\n mounted: boolean;\n mountDir: string;\n}\n\nlet pyodide: PyodideInterface | undefined;\nlet initialized = false;\nlet initializing = false;\n\n// Handle messages from main thread\nif (parentPort) {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n parentPort.on('message', async (message: WorkerMessage) => {\n const { id, action, payload } = message;\n\n try {\n let result: unknown;\n\n switch (action) {\n case 'initialize': {\n result = await initializePyodide();\n break;\n }\n case 'lint': {\n result = await lintTemplate(\n payload.content as string,\n payload.uri as string,\n payload.fileType as CloudFormationFileType,\n payload.settings as Record<string, unknown>,\n );\n break;\n }\n case 'lintFile': {\n result = await lintFile(\n payload.path as string,\n payload.uri as string,\n payload.fileType as CloudFormationFileType,\n payload.settings as Record<string, unknown>,\n );\n break;\n }\n case 'mountFolder': {\n result = mountFolder(payload.fsDir as string, payload.mountDir as string);\n break;\n }\n case 'getVersion': {\n result = await getVersion();\n break;\n }\n default: {\n throw new Error(`Unknown action: ${action}`);\n }\n }\n\n // Send successful result back to main thread\n if (parentPort !== null && parentPort !== undefined) {\n parentPort.postMessage({ id, result, success: true });\n }\n } catch (error) {\n // Send error back to main thread\n if (parentPort !== null && parentPort !== undefined) {\n parentPort.postMessage({\n id,\n error: extractErrorMessage(error),\n success: false,\n phase: action === 'initialize' ? currentInitPhase : undefined,\n });\n }\n }\n });\n}\n\ntype InitPhase =\n 'pyodide_load' | 'micropip_load' | 'ssl_load' | 'packages_load' | 'cfn_lint_install' | 'cfn_lint_setup';\n\nlet currentInitPhase: InitPhase = 'pyodide_load';\n\n// Initialize Pyodide with cfn-lint\nasync function initializePyodide(): Promise<InitializeResult> {\n if (initialized) {\n return { status: 'already-initialized' };\n }\n\n if (initializing) {\n return { status: 'already-initializing' };\n }\n\n initializing = true;\n\n try {\n // Load Pyodide with explicit stdout/stderr handlers\n currentInitPhase = 'pyodide_load';\n pyodide = await loadPyodide({\n stdout: customStdout,\n stderr: customStderr,\n });\n\n if (!pyodide) {\n throw new Error('Failed to initialize Pyodide: returned null');\n }\n\n // Mount assets directory early so local wheels are available as fallback\n const assetsPath = path.join(__dirname, 'assets');\n try {\n pyodide.FS.mkdirTree('/assets');\n pyodide.mountNodeFS('/assets', assetsPath);\n } catch {\n // Failed to mount assets directory\n }\n\n // Load bootstrap packages — micropip is required for fallback installs\n // loadPackage fetches from JsDelivr CDN which can silently fail\n // Set CFN_LSP_OFFLINE=1 to skip CDN and test local wheel fallback\n currentInitPhase = 'micropip_load';\n const offlineMode = process.env.CFN_LSP_OFFLINE === '1';\n if (!offlineMode) {\n await pyodide.loadPackage('micropip');\n }\n // ssl is a system shared library — must always use loadPackage (can't install via micropip)\n currentInitPhase = 'ssl_load';\n await pyodide.loadPackage('ssl');\n\n // Verify micropip is available; fall back to local wheel if CDN failed\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const micropipAvailable = await pyodide.runPythonAsync(`\n try:\n import micropip\n True\n except ModuleNotFoundError:\n False\n `);\n if (!micropipAvailable) {\n // loadPackage with emfs: URLs also silently fails, so unzip directly\n await pyodide.runPythonAsync(`\n from pathlib import Path\n from zipfile import ZipFile\n import importlib, site\n wheels = list(Path('/assets/wheels').glob('micropip-*.whl'))\n if not wheels:\n raise ModuleNotFoundError('micropip not available and no local wheel found')\n with ZipFile(str(wheels[0])) as zf:\n zf.extractall(site.getsitepackages()[0])\n importlib.invalidate_caches()\n import micropip\n `);\n }\n\n // Load packages with verification and local wheel/micropip fallback\n // Define the package mapping once, used for both verification and cfn-lint skip logic\n currentInitPhase = 'packages_load';\n const pyodidePackages = ['pyyaml', 'regex', 'rpds-py', 'pydantic', 'pydantic-core'];\n if (!offlineMode) {\n for (const pkg of pyodidePackages) {\n await pyodide.loadPackage(pkg);\n }\n }\n await pyodide.runPythonAsync(`\n import micropip\n from pathlib import Path\n\n # Package name -> import name mapping for Pyodide-managed packages\n PYODIDE_PACKAGES = {\n \"micropip\": \"micropip\", \"pyyaml\": \"yaml\", \"regex\": \"regex\",\n \"rpds-py\": \"rpds\", \"pydantic\": \"pydantic\", \"pydantic-core\": \"pydantic_core\", \"ssl\": \"ssl\",\n }\n\n _wheels_dir = Path('/assets/wheels')\n for pkg_name, import_name in PYODIDE_PACKAGES.items():\n try:\n __import__(import_name)\n except ModuleNotFoundError:\n _installed = False\n if _wheels_dir.exists():\n _prefix = pkg_name.replace('-', '_')\n _local = [w for w in _wheels_dir.glob('*.whl') if w.name.lower().startswith(_prefix.lower())]\n if _local:\n try:\n await micropip.install(f'emfs:{_local[0]}', deps=False)\n _installed = True\n except Exception:\n pass\n if not _installed:\n await micropip.install(pkg_name)\n `);\n\n // Replace CSafeLoader with SafeLoader to avoid Pyodide parsing issues\n await pyodide.runPythonAsync(`\n import yaml\n if hasattr(yaml, 'CSafeLoader'):\n yaml.CSafeLoader = yaml.SafeLoader\n `);\n\n // Install cfn-lint with local wheel fallback\n currentInitPhase = 'cfn_lint_install';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const installResult = await pyodide.runPythonAsync(`\n import micropip\n from pathlib import Path\n \n cfn_lint_installed = False\n install_source = None\n \n # Try to install latest from PyPI first\n try:\n await micropip.install('cfn-lint')\n cfn_lint_installed = True\n install_source = 'pypi'\n except Exception:\n pass\n \n # Fallback to local wheels if online installation failed\n if not cfn_lint_installed:\n wheels_dir = Path('/assets/wheels')\n _fail_reason = f'wheels_dir exists={wheels_dir.exists()}'\n \n if wheels_dir.exists():\n wheel_files = list(wheels_dir.glob('*.whl'))\n _fail_reason = f'{len(wheel_files)} wheel files found'\n \n if wheel_files:\n try:\n # Skip packages already installed above\n _skip = {p.replace('-','_') for p in PYODIDE_PACKAGES}\n for whl in wheel_files:\n if whl.name.split('-')[0].lower() in _skip:\n continue\n await micropip.install(f'emfs:{whl}', deps=False)\n cfn_lint_installed = True\n install_source = 'wheels'\n except Exception as e:\n _fail_reason = f'wheel install error: {e}'\n \n if not cfn_lint_installed:\n raise Exception(f'Failed to install cfn-lint from both PyPI and local wheels. {_fail_reason}')\n \n install_source\n `);\n\n // Setup Python functions for linting\n currentInitPhase = 'cfn_lint_setup';\n await pyodide.runPythonAsync(`\n from cfnlint.version import __version__\n\n print('cfn-lint version:', __version__)\n \n from pathlib import Path\n from cfnlint import lint, lint_by_config, ManualArgs\n from cfnlint.formatters import JsonFormatter\n\n _json_formatter = JsonFormatter()\n\n def lint_to_json(matches):\n # Use JsonFormatter for --format json parity. Sort to match CLI ordering.\n sorted_matches = sorted(matches, key=lambda m: (m.filename, m.linenumber, m.rule.id))\n return _json_formatter.print_matches(sorted_matches, None, None)\n \n def parse_cfn_lint_settings(settings):\n \"\"\"Parse cfn-lint settings into ManualArgs format\"\"\"\n config = {}\n if not settings:\n return config\n \n if settings.get('ignoreChecks'):\n config['ignore_checks'] = settings['ignoreChecks']\n if settings.get('includeChecks'):\n config['include_checks'] = settings['includeChecks']\n if settings.get('mandatoryChecks'):\n config['mandatory_checks'] = settings['mandatoryChecks']\n if settings.get('includeExperimental'):\n config['include_experimental'] = settings['includeExperimental']\n if settings.get('configureRules'):\n # Parse configure rules from string format \"RuleId:key=value\"\n configure_rules = {}\n for rule_config in settings['configureRules']:\n if ':' in rule_config:\n rule_id, config_str = rule_config.split(':', 1)\n if '=' in config_str:\n key, value = config_str.split('=', 1)\n if rule_id not in configure_rules:\n configure_rules[rule_id] = {}\n # Convert string values to appropriate types\n if value.lower() == 'true':\n configure_rules[rule_id][key] = True\n elif value.lower() == 'false':\n configure_rules[rule_id][key] = False\n else:\n try:\n configure_rules[rule_id][key] = int(value)\n except ValueError:\n configure_rules[rule_id][key] = value\n if configure_rules:\n config['configure_rules'] = configure_rules\n if settings.get('regions'):\n config['regions'] = settings['regions']\n return config\n\n def lint_str(template_str, uri, settings=None):\n \"\"\"\n Lint a CloudFormation template string and return cfn-lint JSON findings.\n \n Args:\n template_str (str): CloudFormation template as a string\n uri (str): Document URI (unused here; passed through to the TS caller)\n settings (dict, optional): cfn-lint settings\n\n Returns:\n str: JSON array of cfn-lint findings (same schema as --format json)\n \"\"\"\n config = parse_cfn_lint_settings(settings)\n return lint_to_json(lint(template_str, config=ManualArgs(**config) if config else None))\n\n def lint_uri(lint_path, uri, lint_type, settings=None):\n import glob\n config = parse_cfn_lint_settings(settings)\n path = Path(lint_path)\n\n # cfn-lint expands these paths with glob.glob and raises ValueError when\n # nothing matches, so escape glob metacharacters (e.g. [, ], *, ?) to make\n # sure the path is treated literally.\n if lint_type == \"template\":\n config[\"templates\"] = [glob.escape(str(path))]\n elif lint_type == \"gitsync-deployment\":\n config[\"deployment_files\"] = [glob.escape(str(path))]\n\n return lint_to_json(lint_by_config(ManualArgs(**config)))\n `);\n\n // Create result object with installation source\n const result = { status: 'initialized' as const, installSource: installResult as string };\n\n // eslint-disable-next-line require-atomic-updates\n initialized = true;\n // eslint-disable-next-line require-atomic-updates\n initializing = false;\n\n return result;\n } catch (error) {\n // eslint-disable-next-line require-atomic-updates\n initializing = false;\n throw error;\n }\n}\n\nasync function getVersion(): Promise<string> {\n if (!pyodide) {\n throw new Error('Pyodide not initialized');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const result = await pyodide.runPythonAsync(`\n from cfnlint.version import __version__\n __version__\n `);\n\n return result as string;\n}\n\n// Parse the JSON string returned by lint_str/lint_uri (cfn-lint JsonFormatter output)\n// and convert to LSP diagnostics using the shared converter.\nexport function convertPythonResultToDiagnostics(result: unknown, uri: string): PublishDiagnosticsParams[] {\n if (typeof result !== 'string') {\n throw new TypeError('Expected a JSON string from Python linting');\n }\n let findings: CfnLintDiagnostic[];\n try {\n findings = JSON.parse(result) as CfnLintDiagnostic[];\n } catch (error) {\n throw new Error(\n `Failed to parse cfn-lint output from Pyodide: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n return toPublishDiagnostics(findings, uri);\n}\n\n// Lint template content as string\nasync function lintTemplate(\n content: string,\n uri: string,\n _fileType: CloudFormationFileType,\n settings?: Record<string, unknown>,\n): Promise<PublishDiagnosticsParams[]> {\n if (!initialized || !pyodide) {\n throw new Error('Pyodide not initialized');\n }\n\n // Safe type assertions since we know the expected types\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const pyUri = pyodide.toPy(uri);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const pyContent = pyodide.toPy(content.replaceAll('\"\"\"', '\\\\\"\\\\\"\\\\\"'));\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const pySettings = pyodide.toPy(settings ?? {});\n\n // Execute Python code and get result\n const pythonCode = `lint_str(r\"\"\"${pyContent}\"\"\", r\"\"\"${pyUri}\"\"\", ${pySettings})`;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const result = await pyodide.runPythonAsync(pythonCode);\n\n return convertPythonResultToDiagnostics(result, uri);\n}\n\n// Lint file using path\nasync function lintFile(\n path: string,\n uri: string,\n fileType: CloudFormationFileType,\n settings?: Record<string, unknown>,\n): Promise<PublishDiagnosticsParams[]> {\n if (!initialized || !pyodide) {\n throw new Error('Pyodide not initialized');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const pySettings = pyodide.toPy(settings ?? {});\n\n // Execute Python code and get result\n const pythonCode = `lint_uri(r\"\"\"${path}\"\"\", r\"\"\"${uri}\"\"\", r\"\"\"${fileType}\"\"\", ${pySettings})`;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const result = await pyodide.runPythonAsync(pythonCode);\n\n return convertPythonResultToDiagnostics(result, uri);\n}\n\n// Mount folder to Pyodide filesystem\nfunction mountFolder(fsDir: string, mountDir: string): MountResult {\n if (!initialized || !pyodide) {\n throw new Error('Pyodide not initialized');\n }\n\n try {\n pyodide.FS.mkdirTree(mountDir);\n\n // The first parameter should be the mount point, the second parameter should be the host path\n pyodide.mountNodeFS(mountDir, fsDir);\n\n return { mounted: true, mountDir };\n } catch (error) {\n // Clean up if mounting fails\n try {\n pyodide.FS.rmdir(mountDir);\n } catch {\n // Ignore cleanup errors\n }\n throw error;\n }\n}\n","import { prettyPrint } from '@base2/pretty-print-object';\n\nexport function toString(value: unknown, indent = '\\t'.repeat(1)) {\n if (value === null || !['object', 'function'].includes(typeof value)) {\n return String(value);\n }\n\n return prettyPrint(value, {\n indent,\n inlineCharacterLimit: 50,\n });\n}\n\nexport function dashesToUnderscores(input: string): string {\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return input.replace(/-/g, '_');\n}\n\nexport function removeQuotes(str: string): string {\n // Only replace starting and ending quotes\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return str.replace(/^['\"]|['\"]$/g, '');\n}\n\nexport function isStringABoolean(value: string): boolean {\n return ['true', 'false'].includes(value.trim().toLowerCase());\n}\n\nexport function stringToBoolean(value: string): boolean {\n return value.trim().toLowerCase() === 'true';\n}\n\nexport function byteSize(str: string) {\n const bytes: Uint8Array = new TextEncoder().encode(str);\n return bytes.length;\n}\n\nexport function formatNumber(value: number, decimals: number = 2) {\n return value.toFixed(decimals);\n}\n\nexport function toStringOrUndefined(value: unknown): string | undefined {\n if (typeof value === 'string') return value;\n if (typeof value === 'number' || typeof value === 'boolean') return String(value);\n return undefined;\n}\n","import { ErrorCodes, ResponseError } from 'vscode-languageserver';\nimport { toString } from '../String';\n\nexport function extractStatusReason(error: unknown): string | undefined {\n try {\n const message = error instanceof Error ? error.message : String(error);\n const parsed = JSON.parse(message) as { reason?: { StatusReason?: string } };\n if (parsed?.reason?.StatusReason) {\n return parsed.reason.StatusReason;\n }\n } catch {\n // Not JSON, continue with normal error handling\n }\n}\n\nexport function extractErrorMessage(error: unknown) {\n if (error instanceof Error) {\n const prefix = error.name === 'Error' ? '' : `${error.name}: `;\n return `${prefix}${error.message}`;\n }\n\n return toString(error);\n}\n\nfunction createResponseError(code: number, message: string, cause: unknown): ResponseError<unknown> {\n const responseError = new ResponseError<unknown>(code, message);\n responseError.cause = cause;\n return responseError;\n}\n\nexport function handleLspError(error: unknown, contextMessage: string): never {\n if (error instanceof ResponseError) {\n throw error;\n }\n if (error instanceof TypeError) {\n throw createResponseError(ErrorCodes.InvalidParams, error.message, error);\n }\n throw createResponseError(ErrorCodes.InternalError, `${contextMessage}: ${extractErrorMessage(error)}`, error);\n}\n\nexport function extractRootCause(error: unknown): Error | undefined {\n const [, cause] = errorCauseChain(error);\n return cause instanceof Error ? cause : undefined;\n}\n\nconst MaxCauseDepth = 8;\n\nexport function errorCauseChain(error: unknown): unknown[] {\n const chain: unknown[] = [];\n const seen = new Set<unknown>();\n let current: unknown = error;\n\n while (current !== undefined && current !== null && chain.length < MaxCauseDepth) {\n if (typeof current === 'object') {\n if (seen.has(current)) {\n break;\n }\n seen.add(current);\n }\n\n chain.push(current);\n\n if (typeof current !== 'object') {\n break;\n }\n\n const { cause, commitError } = current as { cause?: unknown; commitError?: unknown };\n // A promise-valued `commitError` carries no synchronously readable message; only a resolved\n // one (see `attachCommitCause`) is useful here.\n current = (commitError instanceof Error ? commitError : undefined) ?? cause;\n }\n\n return chain;\n}\n\nexport function extractErrorCode(error: unknown): string | undefined {\n if (error === null || typeof error !== 'object') {\n return undefined;\n }\n\n const { code, Code, CODE, errno } = error as { code?: unknown; Code?: unknown; CODE?: unknown; errno?: number };\n\n for (const val of [code, Code, CODE]) {\n if (typeof val === 'string') {\n return val;\n }\n }\n\n for (const val of [code, errno]) {\n if (typeof val === 'number') {\n return `${val}`;\n }\n }\n\n return undefined;\n}\n\nexport function extractHttpStatus(error: unknown): number | undefined {\n if (error === null || typeof error !== 'object') {\n return undefined;\n }\n\n const candidate = error as {\n $metadata?: { httpStatusCode?: number };\n response?: { status?: number };\n status?: number;\n };\n\n if (typeof candidate.$metadata?.httpStatusCode === 'number') {\n return candidate.$metadata?.httpStatusCode;\n }\n\n if (typeof candidate.response?.status === 'number') {\n return candidate.response?.status;\n }\n\n if (typeof candidate.status === 'number') {\n return candidate.status;\n }\n\n return undefined;\n}\n","\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createProtocolConnection = void 0;\nconst node_1 = require(\"vscode-jsonrpc/node\");\n__exportStar(require(\"vscode-jsonrpc/node\"), exports);\n__exportStar(require(\"../common/api\"), exports);\nfunction createProtocolConnection(input, output, logger, options) {\n return (0, node_1.createMessageConnection)(input, output, logger, options);\n}\nexports.createProtocolConnection = createProtocolConnection;\n","\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n/// <reference path=\"../../typings/thenable.d.ts\" />\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createConnection = exports.Files = void 0;\nconst node_util_1 = require(\"node:util\");\nconst Is = require(\"../common/utils/is\");\nconst server_1 = require(\"../common/server\");\nconst fm = require(\"./files\");\nconst node_1 = require(\"vscode-languageserver-protocol/node\");\n__exportStar(require(\"vscode-languageserver-protocol/node\"), exports);\n__exportStar(require(\"../common/api\"), exports);\nvar Files;\n(function (Files) {\n Files.uriToFilePath = fm.uriToFilePath;\n Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;\n Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;\n Files.resolve = fm.resolve;\n Files.resolveModulePath = fm.resolveModulePath;\n})(Files || (exports.Files = Files = {}));\nlet _protocolConnection;\nfunction endProtocolConnection() {\n if (_protocolConnection === undefined) {\n return;\n }\n try {\n _protocolConnection.end();\n }\n catch (_err) {\n // Ignore. The client process could have already\n // did and we can't send an end into the connection.\n }\n}\nlet _shutdownReceived = false;\nlet exitTimer = undefined;\nfunction setupExitTimer() {\n const argName = '--clientProcessId';\n function runTimer(value) {\n try {\n let processId = parseInt(value);\n if (!isNaN(processId)) {\n exitTimer = setInterval(() => {\n try {\n process.kill(processId, 0);\n }\n catch (ex) {\n // Parent process doesn't exist anymore. Exit the server.\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n }\n }, 3000);\n }\n }\n catch (e) {\n // Ignore errors;\n }\n }\n for (let i = 2; i < process.argv.length; i++) {\n let arg = process.argv[i];\n if (arg === argName && i + 1 < process.argv.length) {\n runTimer(process.argv[i + 1]);\n return;\n }\n else {\n let args = arg.split('=');\n if (args[0] === argName) {\n runTimer(args[1]);\n }\n }\n }\n}\nsetupExitTimer();\nconst watchDog = {\n initialize: (params) => {\n const processId = params.processId;\n if (Is.number(processId) && exitTimer === undefined) {\n // We received a parent process id. Set up a timer to periodically check\n // if the parent is still alive.\n setInterval(() => {\n try {\n process.kill(processId, 0);\n }\n catch (ex) {\n // Parent process doesn't exist anymore. Exit the server.\n process.exit(_shutdownReceived ? 0 : 1);\n }\n }, 3000);\n }\n },\n get shutdownReceived() {\n return _shutdownReceived;\n },\n set shutdownReceived(value) {\n _shutdownReceived = value;\n },\n exit: (code) => {\n endProtocolConnection();\n process.exit(code);\n }\n};\nfunction createConnection(arg1, arg2, arg3, arg4) {\n let factories;\n let input;\n let output;\n let options;\n if (arg1 !== void 0 && arg1.__brand === 'features') {\n factories = arg1;\n arg1 = arg2;\n arg2 = arg3;\n arg3 = arg4;\n }\n if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {\n options = arg1;\n }\n else {\n input = arg1;\n output = arg2;\n options = arg3;\n }\n return _createConnection(input, output, options, factories);\n}\nexports.createConnection = createConnection;\nfunction _createConnection(input, output, options, factories) {\n let stdio = false;\n if (!input && !output && process.argv.length > 2) {\n let port = void 0;\n let pipeName = void 0;\n let argv = process.argv.slice(2);\n for (let i = 0; i < argv.length; i++) {\n let arg = argv[i];\n if (arg === '--node-ipc') {\n input = new node_1.IPCMessageReader(process);\n output = new node_1.IPCMessageWriter(process);\n break;\n }\n else if (arg === '--stdio') {\n stdio = true;\n input = process.stdin;\n output = process.stdout;\n break;\n }\n else if (arg === '--socket') {\n port = parseInt(argv[i + 1]);\n break;\n }\n else if (arg === '--pipe') {\n pipeName = argv[i + 1];\n break;\n }\n else {\n var args = arg.split('=');\n if (args[0] === '--socket') {\n port = parseInt(args[1]);\n break;\n }\n else if (args[0] === '--pipe') {\n pipeName = args[1];\n break;\n }\n }\n }\n if (port) {\n let transport = (0, node_1.createServerSocketTransport)(port);\n input = transport[0];\n output = transport[1];\n }\n else if (pipeName) {\n let transport = (0, node_1.createServerPipeTransport)(pipeName);\n input = transport[0];\n output = transport[1];\n }\n }\n var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \\'--node-ipc\\', \\'--stdio\\' or \\'--socket={number}\\'';\n if (!input) {\n throw new Error('Connection input stream is not set. ' + commandLineMessage);\n }\n if (!output) {\n throw new Error('Connection output stream is not set. ' + commandLineMessage);\n }\n // Backwards compatibility\n if (Is.func(input.read) && Is.func(input.on)) {\n let inputStream = input;\n inputStream.on('end', () => {\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n });\n inputStream.on('close', () => {\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n });\n }\n const connectionFactory = (logger) => {\n const result = (0, node_1.createProtocolConnection)(input, output, logger, options);\n if (stdio) {\n patchConsole(logger);\n }\n return result;\n };\n return (0, server_1.createConnection)(connectionFactory, watchDog, factories);\n}\nfunction patchConsole(logger) {\n function serialize(args) {\n return args.map(arg => typeof arg === 'string' ? arg : (0, node_util_1.inspect)(arg)).join(' ');\n }\n const counters = new Map();\n console.assert = function assert(assertion, ...args) {\n if (assertion) {\n return;\n }\n if (args.length === 0) {\n logger.error('Assertion failed');\n }\n else {\n const [message, ...rest] = args;\n logger.error(`Assertion failed: ${message} ${serialize(rest)}`);\n }\n };\n console.count = function count(label = 'default') {\n const message = String(label);\n let counter = counters.get(message) ?? 0;\n counter += 1;\n counters.set(message, counter);\n logger.log(`${message}: ${message}`);\n };\n console.countReset = function countReset(label) {\n if (label === undefined) {\n counters.clear();\n }\n else {\n counters.delete(String(label));\n }\n };\n console.debug = function debug(...args) {\n logger.log(serialize(args));\n };\n console.dir = function dir(arg, options) {\n // @ts-expect-error https://github.com/DefinitelyTyped/DefinitelyTyped/pull/66626\n logger.log((0, node_util_1.inspect)(arg, options));\n };\n console.log = function log(...args) {\n logger.log(serialize(args));\n };\n console.error = function error(...args) {\n logger.error(serialize(args));\n };\n console.trace = function trace(...args) {\n const stack = new Error().stack.replace(/(.+\\n){2}/, '');\n let message = 'Trace';\n if (args.length !== 0) {\n message += `: ${serialize(args)}`;\n }\n logger.log(`${message}\\n${stack}`);\n };\n console.warn = function warn(...args) {\n logger.warn(serialize(args));\n };\n}\n","module.exports = require(\"pyodide\");","module.exports = require(\"vscode-languageserver-types\");","module.exports = require(\"child_process\");","module.exports = require(\"crypto\");","module.exports = require(\"fs\");","module.exports = require(\"net\");","module.exports = require(\"node:util\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"worker_threads\");","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tlet __webpack_exports__ = __webpack_require__.O(undefined, [\"vendors-node_modules_base2_pretty-print-object_dist_index_js-node_modules_vscode-jsonrpc_node-9a0a8d\"], () => (__webpack_require__(\"./src/services/cfnLint/pyodide-worker.ts\")))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","const deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tlet notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tlet [chunkIds, fn, priority] = deferred[i];\n\t\tlet fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tconst r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and chunks that the entrypoint depends on\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// no baseURI\n\n// object to store loaded chunks\n// \"1\" means \"loaded\", otherwise not loaded yet\nconst installedChunks = {\n\t\"pyodide-worker\": 1\n};\n\n__webpack_require__.O.require = (chunkId) => (installedChunks[chunkId]);\n\nconst installChunk = (chunk) => {\n\tconst moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\tfor(var i = 0; i < chunkIds.length; i++)\n\t\tinstalledChunks[chunkIds[i]] = 1;\n\t__webpack_require__.O();\n};\n\n// require() chunk loading for javascript\n__webpack_require__.f.require = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\tconst installedChunk = require(\"./\" + __webpack_require__.u(chunkId));\n\t\t\tif (!installedChunks[chunkId]) {\n\t\t\t\tinstallChunk(installedChunk);\n\t\t\t}\n\t\t} else installedChunks[chunkId] = 1;\n\t}\n};\n\n// no external install chunk\n\n// no HMR\n\n// no HMR manifest","const next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\t__webpack_require__.e(\"vendors-node_modules_base2_pretty-print-object_dist_index_js-node_modules_vscode-jsonrpc_node-9a0a8d\");\n\treturn next();\n};","","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n",""],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"pyodide-worker.js","mappings":";;;;;;;;;;AAyBA,oDA+BC;AAxDD,6GAAqF;AAwBrF,8FAA8F;AAC9F,SAAgB,oBAAoB,CAAC,WAAgC,EAAE,GAAW;IAC9E,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5C,MAAM,IAAI,GAAG;YACT,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC;YACrC,KAAK,EAAE;gBACH,KAAK,EAAE;oBACH,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,C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C5C,aAAa,mBAAO,CAAC,uCAAqB;AAC1C,aAAa,mBAAO,CAAC,iEAAe;AACpC;AACA;AACA;AACA,gCAAgC;;;;;;;;AC3BnB;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,oCAAoC;AACnD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB,GAAG,aAAa;AACxC,oBAAoB,mBAAO,CAAC,WAAW;AACvC,WAAW,mBAAO,CAAC,6DAAoB;AACvC,iBAAiB,mBAAO,CAAC,2DAAkB;AAC3C,WAAW,mBAAO,CAAC,wDAAS;AAC5B,eAAe,mBAAO,CAAC,uDAAqC;AAC5D,aAAa,mBAAO,CAAC,uDAAqC;AAC1D,aAAa,mBAAO,CAAC,wDAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,YAAY,aAAa,aAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,iBAAiB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2IAA2I,OAAO;AAClJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,SAAS,EAAE,gBAAgB;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ,IAAI,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,EAAE;AAC1D;AACA;AACA,4BAA4B,gBAAgB;AAC5C;AACA,sBAAsB,QAAQ,IAAI,MAAM;AACxC;AACA;AACA;AACA;AACA;;;;;;;;ACjRA,oC;;;;;;;ACAA,wD;;;;;;;ACAA,0C;;;;;;;ACAA,mC;;;;;;;ACAA,+B;;;;;;;ACAA,gC;;;;;;;ACAA,sC;;;;;;;ACAA,+B;;;;;;;ACAA,iC;;;;;;;ACAA,gC;;;;;;;ACAA,iC;;;;;;;ACAA,2C;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;;;;WClCA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,E;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,EAAE;WACF,E;;;;;WCRA;WACA;WACA;WACA;WACA,E;;;;;WCJA,wF;;;;;WCAA;;WAEA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,gBAAgB,qBAAqB;WACrC;WACA;WACA;;WAEA;WACA;WACA;WACA;WACA,aAAa;WACb;WACA;WACA;WACA;WACA,IAAI;WACJ;WACA;;WAEA;;WAEA;;WAEA,kB;;;;;WCxCA;WACA;WACA;WACA;WACA,E;;;;;UEJA;UACA","sources":["webpack://@aws/cloudformation-languageserver/./src/services/cfnLint/CfnLintDiagnosticConverter.ts","webpack://@aws/cloudformation-languageserver/./src/services/cfnLint/pyodide-worker.ts","webpack://@aws/cloudformation-languageserver/./src/utils/String.ts","webpack://@aws/cloudformation-languageserver/./src/utils/errors/ErrorUtils.ts","webpack://@aws/cloudformation-languageserver/./node_modules/vscode-languageserver-protocol/lib/node/main.js","webpack://@aws/cloudformation-languageserver/./node_modules/vscode-languageserver/lib/node/main.js","webpack://@aws/cloudformation-languageserver/external commonjs2 \"pyodide\"","webpack://@aws/cloudformation-languageserver/external commonjs2 \"vscode-languageserver-types\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"child_process\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"crypto\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"fs\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"net\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"node:util\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"os\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"path\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"url\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"util\"","webpack://@aws/cloudformation-languageserver/external node-commonjs \"worker_threads\"","webpack://@aws/cloudformation-languageserver/webpack/bootstrap","webpack://@aws/cloudformation-languageserver/webpack/runtime/chunk loaded","webpack://@aws/cloudformation-languageserver/webpack/runtime/ensure chunk","webpack://@aws/cloudformation-languageserver/webpack/runtime/get javascript chunk filename","webpack://@aws/cloudformation-languageserver/webpack/runtime/hasOwnProperty shorthand","webpack://@aws/cloudformation-languageserver/webpack/runtime/require chunk loading","webpack://@aws/cloudformation-languageserver/webpack/runtime/startup chunk dependencies","webpack://@aws/cloudformation-languageserver/webpack/before-startup","webpack://@aws/cloudformation-languageserver/webpack/startup","webpack://@aws/cloudformation-languageserver/webpack/after-startup"],"sourcesContent":["import { DiagnosticSeverity, PublishDiagnosticsParams } from 'vscode-languageserver';\n\n// JSON shape from cfn-lint --format json. Shared by local and Pyodide paths.\nexport type CfnLintDiagnostic = {\n Level: string;\n Message: string;\n Rule: {\n Id: string;\n Source: string;\n };\n Location: {\n Start: {\n LineNumber: number;\n ColumnNumber: number;\n };\n End: {\n LineNumber: number;\n ColumnNumber: number;\n };\n Path: unknown;\n };\n Filename: string;\n};\n\n// Returns [] (not [{uri, diagnostics: []}]) when no findings, so callers can skip publishing.\nexport function toPublishDiagnostics(diagnostics: CfnLintDiagnostic[], uri: string): PublishDiagnosticsParams[] {\n if (!diagnostics || diagnostics.length === 0) {\n return [];\n }\n\n const lspDiagnostics = diagnostics.map((item) => {\n const base = {\n severity: convertSeverity(item.Level),\n range: {\n start: {\n line: Math.max(0, (item.Location?.Start?.LineNumber || 1) - 1),\n character: Math.max(0, (item.Location?.Start?.ColumnNumber || 1) - 1),\n },\n end: {\n line: Math.max(0, (item.Location?.End?.LineNumber || 1) - 1),\n character: Math.max(0, (item.Location?.End?.ColumnNumber || 1) - 1),\n },\n },\n message: item.Message || 'Unknown cfn-lint error',\n source: 'cfn-lint',\n code: item.Rule?.Id || 'unknown',\n };\n\n const sourceUrl = item.Rule?.Source;\n if (sourceUrl) {\n return { ...base, codeDescription: { href: sourceUrl } };\n }\n return base;\n });\n\n return [{ uri, diagnostics: lspDiagnostics }];\n}\n\nfunction convertSeverity(level: string): DiagnosticSeverity {\n switch (level) {\n case 'Error': {\n return DiagnosticSeverity.Error;\n }\n case 'Warning': {\n return DiagnosticSeverity.Warning;\n }\n case 'Informational':\n case 'Info': {\n return DiagnosticSeverity.Information;\n }\n default: {\n return DiagnosticSeverity.Information;\n }\n }\n}\n","import path from 'path';\nimport { parentPort } from 'worker_threads';\nimport { loadPyodide, type PyodideInterface } from 'pyodide';\nimport { PublishDiagnosticsParams } from 'vscode-languageserver';\nimport { CloudFormationFileType } from '../../document/Document';\nimport { extractErrorMessage } from '../../utils/errors/ErrorUtils';\nimport { CfnLintDiagnostic, toPublishDiagnostics } from './CfnLintDiagnosticConverter';\n\n// Instead of sending stdout/stderr messages back to the main thread,\n// we'll just log them in the worker thread\nconst customStdout = (_text: string): void => {\n // No-op in production, used for debugging\n // console.log(text);\n};\n\nconst customStderr = (_text: string): void => {\n // No-op in production, used for debugging\n // console.error(text);\n};\n\n// pyodide.globals.get() and pyodide.toPy() are typed as `any`; narrow the\n// handles we use so call sites stay type-safe (no unsafe-any lint).\ntype DisposablePyProxy = { destroy: () => void };\ntype DisposablePyCallable = ((...args: unknown[]) => unknown) & DisposablePyProxy;\ntype PyGlobals = { get(name: string): unknown };\n\ninterface WorkerMessage {\n id: string;\n action: string;\n payload: Record<string, unknown>;\n}\n\ninterface InitializeResult {\n status: 'initialized' | 'already-initialized' | 'already-initializing';\n installSource?: string;\n}\n\ninterface MountResult {\n mounted: boolean;\n mountDir: string;\n}\n\nlet pyodide: PyodideInterface | undefined;\nlet initialized = false;\nlet initializing = false;\n\n// Handle messages from main thread\nif (parentPort) {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n parentPort.on('message', async (message: WorkerMessage) => {\n const { id, action, payload } = message;\n\n try {\n let result: unknown;\n\n switch (action) {\n case 'initialize': {\n result = await initializePyodide();\n break;\n }\n case 'lint': {\n result = await lintTemplate(\n payload.content as string,\n payload.uri as string,\n payload.fileType as CloudFormationFileType,\n payload.settings as Record<string, unknown>,\n );\n break;\n }\n case 'lintFile': {\n result = await lintFile(\n payload.path as string,\n payload.uri as string,\n payload.fileType as CloudFormationFileType,\n payload.settings as Record<string, unknown>,\n );\n break;\n }\n case 'mountFolder': {\n result = mountFolder(payload.fsDir as string, payload.mountDir as string);\n break;\n }\n case 'getVersion': {\n result = await getVersion();\n break;\n }\n default: {\n throw new Error(`Unknown action: ${action}`);\n }\n }\n\n // Send successful result back to main thread\n if (parentPort !== null && parentPort !== undefined) {\n parentPort.postMessage({ id, result, success: true });\n }\n } catch (error) {\n // Send error back to main thread\n if (parentPort !== null && parentPort !== undefined) {\n parentPort.postMessage({\n id,\n error: extractErrorMessage(error),\n success: false,\n phase: action === 'initialize' ? currentInitPhase : undefined,\n });\n }\n }\n });\n}\n\ntype InitPhase =\n 'pyodide_load' | 'micropip_load' | 'ssl_load' | 'packages_load' | 'cfn_lint_install' | 'cfn_lint_setup';\n\nlet currentInitPhase: InitPhase = 'pyodide_load';\n\n// Initialize Pyodide with cfn-lint\nasync function initializePyodide(): Promise<InitializeResult> {\n if (initialized) {\n return { status: 'already-initialized' };\n }\n\n if (initializing) {\n return { status: 'already-initializing' };\n }\n\n initializing = true;\n\n try {\n // Load Pyodide with explicit stdout/stderr handlers\n currentInitPhase = 'pyodide_load';\n pyodide = await loadPyodide({\n stdout: customStdout,\n stderr: customStderr,\n });\n\n if (!pyodide) {\n throw new Error('Failed to initialize Pyodide: returned null');\n }\n\n // Mount assets directory early so local wheels are available as fallback\n const assetsPath = path.join(__dirname, 'assets');\n try {\n pyodide.FS.mkdirTree('/assets');\n pyodide.mountNodeFS('/assets', assetsPath);\n } catch {\n // Failed to mount assets directory\n }\n\n // Load bootstrap packages — micropip is required for fallback installs\n // loadPackage fetches from JsDelivr CDN which can silently fail\n // Set CFN_LSP_OFFLINE=1 to skip CDN and test local wheel fallback\n currentInitPhase = 'micropip_load';\n const offlineMode = process.env.CFN_LSP_OFFLINE === '1';\n if (!offlineMode) {\n await pyodide.loadPackage('micropip');\n }\n // ssl is a system shared library — must always use loadPackage (can't install via micropip)\n currentInitPhase = 'ssl_load';\n await pyodide.loadPackage('ssl');\n\n // Verify micropip is available; fall back to local wheel if CDN failed\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const micropipAvailable = await pyodide.runPythonAsync(`\n try:\n import micropip\n True\n except ModuleNotFoundError:\n False\n `);\n if (!micropipAvailable) {\n // loadPackage with emfs: URLs also silently fails, so unzip directly\n await pyodide.runPythonAsync(`\n from pathlib import Path\n from zipfile import ZipFile\n import importlib, site\n wheels = list(Path('/assets/wheels').glob('micropip-*.whl'))\n if not wheels:\n raise ModuleNotFoundError('micropip not available and no local wheel found')\n with ZipFile(str(wheels[0])) as zf:\n zf.extractall(site.getsitepackages()[0])\n importlib.invalidate_caches()\n import micropip\n `);\n }\n\n // Load packages with verification and local wheel/micropip fallback\n // Define the package mapping once, used for both verification and cfn-lint skip logic\n currentInitPhase = 'packages_load';\n const pyodidePackages = ['pyyaml', 'regex', 'rpds-py', 'pydantic', 'pydantic-core'];\n if (!offlineMode) {\n for (const pkg of pyodidePackages) {\n await pyodide.loadPackage(pkg);\n }\n }\n await pyodide.runPythonAsync(`\n import micropip\n from pathlib import Path\n\n # Package name -> import name mapping for Pyodide-managed packages\n PYODIDE_PACKAGES = {\n \"micropip\": \"micropip\", \"pyyaml\": \"yaml\", \"regex\": \"regex\",\n \"rpds-py\": \"rpds\", \"pydantic\": \"pydantic\", \"pydantic-core\": \"pydantic_core\", \"ssl\": \"ssl\",\n }\n\n _wheels_dir = Path('/assets/wheels')\n for pkg_name, import_name in PYODIDE_PACKAGES.items():\n try:\n __import__(import_name)\n except ModuleNotFoundError:\n _installed = False\n if _wheels_dir.exists():\n _prefix = pkg_name.replace('-', '_')\n _local = [w for w in _wheels_dir.glob('*.whl') if w.name.lower().startswith(_prefix.lower())]\n if _local:\n try:\n await micropip.install(f'emfs:{_local[0]}', deps=False)\n _installed = True\n except Exception:\n pass\n if not _installed:\n await micropip.install(pkg_name)\n `);\n\n // Replace CSafeLoader with SafeLoader to avoid Pyodide parsing issues\n await pyodide.runPythonAsync(`\n import yaml\n if hasattr(yaml, 'CSafeLoader'):\n yaml.CSafeLoader = yaml.SafeLoader\n `);\n\n // Install cfn-lint with local wheel fallback\n currentInitPhase = 'cfn_lint_install';\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const installResult = await pyodide.runPythonAsync(`\n import micropip\n from pathlib import Path\n \n cfn_lint_installed = False\n install_source = None\n \n # Try to install latest from PyPI first\n try:\n await micropip.install('cfn-lint')\n cfn_lint_installed = True\n install_source = 'pypi'\n except Exception:\n pass\n \n # Fallback to local wheels if online installation failed\n if not cfn_lint_installed:\n wheels_dir = Path('/assets/wheels')\n _fail_reason = f'wheels_dir exists={wheels_dir.exists()}'\n \n if wheels_dir.exists():\n wheel_files = list(wheels_dir.glob('*.whl'))\n _fail_reason = f'{len(wheel_files)} wheel files found'\n \n if wheel_files:\n try:\n # Skip packages already installed above\n _skip = {p.replace('-','_') for p in PYODIDE_PACKAGES}\n for whl in wheel_files:\n if whl.name.split('-')[0].lower() in _skip:\n continue\n await micropip.install(f'emfs:{whl}', deps=False)\n cfn_lint_installed = True\n install_source = 'wheels'\n except Exception as e:\n _fail_reason = f'wheel install error: {e}'\n \n if not cfn_lint_installed:\n raise Exception(f'Failed to install cfn-lint from both PyPI and local wheels. {_fail_reason}')\n \n install_source\n `);\n\n // Setup Python functions for linting\n currentInitPhase = 'cfn_lint_setup';\n await pyodide.runPythonAsync(`\n from cfnlint.version import __version__\n\n print('cfn-lint version:', __version__)\n \n from pathlib import Path\n from cfnlint import lint, lint_by_config, ManualArgs\n from cfnlint.formatters import JsonFormatter\n\n _json_formatter = JsonFormatter()\n\n def lint_to_json(matches):\n # Use JsonFormatter for --format json parity. Sort to match CLI ordering.\n sorted_matches = sorted(matches, key=lambda m: (m.filename, m.linenumber, m.rule.id))\n return _json_formatter.print_matches(sorted_matches, None, None)\n \n def parse_cfn_lint_settings(settings):\n \"\"\"Parse cfn-lint settings into ManualArgs format\"\"\"\n config = {}\n if not settings:\n return config\n \n if settings.get('ignoreChecks'):\n config['ignore_checks'] = settings['ignoreChecks']\n if settings.get('includeChecks'):\n config['include_checks'] = settings['includeChecks']\n if settings.get('mandatoryChecks'):\n config['mandatory_checks'] = settings['mandatoryChecks']\n if settings.get('includeExperimental'):\n config['include_experimental'] = settings['includeExperimental']\n if settings.get('configureRules'):\n # Parse configure rules from string format \"RuleId:key=value\"\n configure_rules = {}\n for rule_config in settings['configureRules']:\n if ':' in rule_config:\n rule_id, config_str = rule_config.split(':', 1)\n if '=' in config_str:\n key, value = config_str.split('=', 1)\n if rule_id not in configure_rules:\n configure_rules[rule_id] = {}\n # Convert string values to appropriate types\n if value.lower() == 'true':\n configure_rules[rule_id][key] = True\n elif value.lower() == 'false':\n configure_rules[rule_id][key] = False\n else:\n try:\n configure_rules[rule_id][key] = int(value)\n except ValueError:\n configure_rules[rule_id][key] = value\n if configure_rules:\n config['configure_rules'] = configure_rules\n if settings.get('regions'):\n config['regions'] = settings['regions']\n return config\n\n def lint_str(template_str, uri, settings=None):\n \"\"\"\n Lint a CloudFormation template string and return cfn-lint JSON findings.\n \n Args:\n template_str (str): CloudFormation template as a string\n uri (str): Document URI (unused here; passed through to the TS caller)\n settings (dict, optional): cfn-lint settings\n\n Returns:\n str: JSON array of cfn-lint findings (same schema as --format json)\n \"\"\"\n config = parse_cfn_lint_settings(settings)\n return lint_to_json(lint(template_str, config=ManualArgs(**config) if config else None))\n\n def lint_uri(lint_path, uri, lint_type, settings=None):\n import glob\n config = parse_cfn_lint_settings(settings)\n path = Path(lint_path)\n\n # cfn-lint expands these paths with glob.glob and raises ValueError when\n # nothing matches, so escape glob metacharacters (e.g. [, ], *, ?) to make\n # sure the path is treated literally.\n if lint_type == \"template\":\n config[\"templates\"] = [glob.escape(str(path))]\n elif lint_type == \"gitsync-deployment\":\n config[\"deployment_files\"] = [glob.escape(str(path))]\n\n return lint_to_json(lint_by_config(ManualArgs(**config)))\n `);\n\n // Create result object with installation source\n const result = { status: 'initialized' as const, installSource: installResult as string };\n\n // eslint-disable-next-line require-atomic-updates\n initialized = true;\n // eslint-disable-next-line require-atomic-updates\n initializing = false;\n\n return result;\n } catch (error) {\n // eslint-disable-next-line require-atomic-updates\n initializing = false;\n throw error;\n }\n}\n\nasync function getVersion(): Promise<string> {\n if (!pyodide) {\n throw new Error('Pyodide not initialized');\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const result = await pyodide.runPythonAsync(`\n from cfnlint.version import __version__\n __version__\n `);\n\n return result as string;\n}\n\n// Parse the JSON string returned by lint_str/lint_uri (cfn-lint JsonFormatter output)\n// and convert to LSP diagnostics using the shared converter.\nexport function convertPythonResultToDiagnostics(result: unknown, uri: string): PublishDiagnosticsParams[] {\n if (typeof result !== 'string') {\n throw new TypeError('Expected a JSON string from Python linting');\n }\n let findings: CfnLintDiagnostic[];\n try {\n findings = JSON.parse(result) as CfnLintDiagnostic[];\n } catch (error) {\n throw new Error(\n `Failed to parse cfn-lint output from Pyodide: ${error instanceof Error ? error.message : String(error)}`,\n );\n }\n return toPublishDiagnostics(findings, uri);\n}\n\n// Lint template content as string\nasync function lintTemplate(\n content: string,\n uri: string,\n _fileType: CloudFormationFileType,\n settings?: Record<string, unknown>,\n): Promise<PublishDiagnosticsParams[]> {\n if (!initialized || !pyodide) {\n throw new Error('Pyodide not initialized');\n }\n\n // Call lint_str with the content and uri as native arguments rather than\n // interpolating them into a Python source string. This passes the values\n // through verbatim and keeps the call independent of their contents.\n const pyGlobals = pyodide.globals as unknown as PyGlobals;\n const lintStr = pyGlobals.get('lint_str') as DisposablePyCallable;\n const pySettings = pyodide.toPy(settings ?? {}) as unknown as DisposablePyProxy;\n try {\n const result = await lintStr(content, uri, pySettings);\n return convertPythonResultToDiagnostics(result, uri);\n } finally {\n lintStr.destroy();\n pySettings.destroy();\n }\n}\n\n// Lint file using path\nasync function lintFile(\n path: string,\n uri: string,\n fileType: CloudFormationFileType,\n settings?: Record<string, unknown>,\n): Promise<PublishDiagnosticsParams[]> {\n if (!initialized || !pyodide) {\n throw new Error('Pyodide not initialized');\n }\n\n // Call lint_uri with path, uri and fileType as native arguments rather\n // than interpolating them into a Python source string, so the values are\n // passed through verbatim regardless of their contents.\n const pyGlobals = pyodide.globals as unknown as PyGlobals;\n const lintUri = pyGlobals.get('lint_uri') as DisposablePyCallable;\n const pySettings = pyodide.toPy(settings ?? {}) as unknown as DisposablePyProxy;\n try {\n const result = await lintUri(path, uri, fileType, pySettings);\n return convertPythonResultToDiagnostics(result, uri);\n } finally {\n lintUri.destroy();\n pySettings.destroy();\n }\n}\n\n// Mount folder to Pyodide filesystem\nfunction mountFolder(fsDir: string, mountDir: string): MountResult {\n if (!initialized || !pyodide) {\n throw new Error('Pyodide not initialized');\n }\n\n try {\n pyodide.FS.mkdirTree(mountDir);\n\n // The first parameter should be the mount point, the second parameter should be the host path\n pyodide.mountNodeFS(mountDir, fsDir);\n\n return { mounted: true, mountDir };\n } catch (error) {\n // Clean up if mounting fails\n try {\n pyodide.FS.rmdir(mountDir);\n } catch {\n // Ignore cleanup errors\n }\n throw error;\n }\n}\n","import { prettyPrint } from '@base2/pretty-print-object';\n\nexport function toString(value: unknown, indent = '\\t'.repeat(1)) {\n if (value === null || !['object', 'function'].includes(typeof value)) {\n return String(value);\n }\n\n return prettyPrint(value, {\n indent,\n inlineCharacterLimit: 50,\n });\n}\n\nexport function dashesToUnderscores(input: string): string {\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return input.replace(/-/g, '_');\n}\n\nexport function removeQuotes(str: string): string {\n // Only replace starting and ending quotes\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return str.replace(/^['\"]|['\"]$/g, '');\n}\n\nexport function isStringABoolean(value: string): boolean {\n return ['true', 'false'].includes(value.trim().toLowerCase());\n}\n\nexport function stringToBoolean(value: string): boolean {\n return value.trim().toLowerCase() === 'true';\n}\n\nexport function byteSize(str: string) {\n const bytes: Uint8Array = new TextEncoder().encode(str);\n return bytes.length;\n}\n\nexport function formatNumber(value: number, decimals: number = 2) {\n return value.toFixed(decimals);\n}\n\nexport function toStringOrUndefined(value: unknown): string | undefined {\n if (typeof value === 'string') return value;\n if (typeof value === 'number' || typeof value === 'boolean') return String(value);\n return undefined;\n}\n","import { ErrorCodes, ResponseError } from 'vscode-languageserver';\nimport { toString } from '../String';\n\nexport function extractStatusReason(error: unknown): string | undefined {\n try {\n const message = error instanceof Error ? error.message : String(error);\n const parsed = JSON.parse(message) as { reason?: { StatusReason?: string } };\n if (parsed?.reason?.StatusReason) {\n return parsed.reason.StatusReason;\n }\n } catch {\n // Not JSON, continue with normal error handling\n }\n}\n\nexport function extractErrorMessage(error: unknown) {\n if (error instanceof Error) {\n const prefix = error.name === 'Error' ? '' : `${error.name}: `;\n return `${prefix}${error.message}`;\n }\n\n return toString(error);\n}\n\nfunction createResponseError(code: number, message: string, cause: unknown): ResponseError<unknown> {\n const responseError = new ResponseError<unknown>(code, message);\n responseError.cause = cause;\n return responseError;\n}\n\nexport function handleLspError(error: unknown, contextMessage: string): never {\n if (error instanceof ResponseError) {\n throw error;\n }\n if (error instanceof TypeError) {\n throw createResponseError(ErrorCodes.InvalidParams, error.message, error);\n }\n throw createResponseError(ErrorCodes.InternalError, `${contextMessage}: ${extractErrorMessage(error)}`, error);\n}\n\nexport function extractRootCause(error: unknown): Error | undefined {\n const [, cause] = errorCauseChain(error);\n return cause instanceof Error ? cause : undefined;\n}\n\nconst MaxCauseDepth = 8;\n\nexport function errorCauseChain(error: unknown): unknown[] {\n const chain: unknown[] = [];\n const seen = new Set<unknown>();\n let current: unknown = error;\n\n while (current !== undefined && current !== null && chain.length < MaxCauseDepth) {\n if (typeof current === 'object') {\n if (seen.has(current)) {\n break;\n }\n seen.add(current);\n }\n\n chain.push(current);\n\n if (typeof current !== 'object') {\n break;\n }\n\n const { cause, commitError } = current as { cause?: unknown; commitError?: unknown };\n // A promise-valued `commitError` carries no synchronously readable message; only a resolved\n // one (see `attachCommitCause`) is useful here.\n current = (commitError instanceof Error ? commitError : undefined) ?? cause;\n }\n\n return chain;\n}\n\nexport function extractErrorCode(error: unknown): string | undefined {\n if (error === null || typeof error !== 'object') {\n return undefined;\n }\n\n const { code, Code, CODE, errno } = error as { code?: unknown; Code?: unknown; CODE?: unknown; errno?: number };\n\n for (const val of [code, Code, CODE]) {\n if (typeof val === 'string') {\n return val;\n }\n }\n\n for (const val of [code, errno]) {\n if (typeof val === 'number') {\n return `${val}`;\n }\n }\n\n return undefined;\n}\n\nexport function extractHttpStatus(error: unknown): number | undefined {\n if (error === null || typeof error !== 'object') {\n return undefined;\n }\n\n const candidate = error as {\n $metadata?: { httpStatusCode?: number };\n response?: { status?: number };\n status?: number;\n };\n\n if (typeof candidate.$metadata?.httpStatusCode === 'number') {\n return candidate.$metadata?.httpStatusCode;\n }\n\n if (typeof candidate.response?.status === 'number') {\n return candidate.response?.status;\n }\n\n if (typeof candidate.status === 'number') {\n return candidate.status;\n }\n\n return undefined;\n}\n","\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createProtocolConnection = void 0;\nconst node_1 = require(\"vscode-jsonrpc/node\");\n__exportStar(require(\"vscode-jsonrpc/node\"), exports);\n__exportStar(require(\"../common/api\"), exports);\nfunction createProtocolConnection(input, output, logger, options) {\n return (0, node_1.createMessageConnection)(input, output, logger, options);\n}\nexports.createProtocolConnection = createProtocolConnection;\n","\"use strict\";\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n/// <reference path=\"../../typings/thenable.d.ts\" />\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createConnection = exports.Files = void 0;\nconst node_util_1 = require(\"node:util\");\nconst Is = require(\"../common/utils/is\");\nconst server_1 = require(\"../common/server\");\nconst fm = require(\"./files\");\nconst node_1 = require(\"vscode-languageserver-protocol/node\");\n__exportStar(require(\"vscode-languageserver-protocol/node\"), exports);\n__exportStar(require(\"../common/api\"), exports);\nvar Files;\n(function (Files) {\n Files.uriToFilePath = fm.uriToFilePath;\n Files.resolveGlobalNodePath = fm.resolveGlobalNodePath;\n Files.resolveGlobalYarnPath = fm.resolveGlobalYarnPath;\n Files.resolve = fm.resolve;\n Files.resolveModulePath = fm.resolveModulePath;\n})(Files || (exports.Files = Files = {}));\nlet _protocolConnection;\nfunction endProtocolConnection() {\n if (_protocolConnection === undefined) {\n return;\n }\n try {\n _protocolConnection.end();\n }\n catch (_err) {\n // Ignore. The client process could have already\n // did and we can't send an end into the connection.\n }\n}\nlet _shutdownReceived = false;\nlet exitTimer = undefined;\nfunction setupExitTimer() {\n const argName = '--clientProcessId';\n function runTimer(value) {\n try {\n let processId = parseInt(value);\n if (!isNaN(processId)) {\n exitTimer = setInterval(() => {\n try {\n process.kill(processId, 0);\n }\n catch (ex) {\n // Parent process doesn't exist anymore. Exit the server.\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n }\n }, 3000);\n }\n }\n catch (e) {\n // Ignore errors;\n }\n }\n for (let i = 2; i < process.argv.length; i++) {\n let arg = process.argv[i];\n if (arg === argName && i + 1 < process.argv.length) {\n runTimer(process.argv[i + 1]);\n return;\n }\n else {\n let args = arg.split('=');\n if (args[0] === argName) {\n runTimer(args[1]);\n }\n }\n }\n}\nsetupExitTimer();\nconst watchDog = {\n initialize: (params) => {\n const processId = params.processId;\n if (Is.number(processId) && exitTimer === undefined) {\n // We received a parent process id. Set up a timer to periodically check\n // if the parent is still alive.\n setInterval(() => {\n try {\n process.kill(processId, 0);\n }\n catch (ex) {\n // Parent process doesn't exist anymore. Exit the server.\n process.exit(_shutdownReceived ? 0 : 1);\n }\n }, 3000);\n }\n },\n get shutdownReceived() {\n return _shutdownReceived;\n },\n set shutdownReceived(value) {\n _shutdownReceived = value;\n },\n exit: (code) => {\n endProtocolConnection();\n process.exit(code);\n }\n};\nfunction createConnection(arg1, arg2, arg3, arg4) {\n let factories;\n let input;\n let output;\n let options;\n if (arg1 !== void 0 && arg1.__brand === 'features') {\n factories = arg1;\n arg1 = arg2;\n arg2 = arg3;\n arg3 = arg4;\n }\n if (node_1.ConnectionStrategy.is(arg1) || node_1.ConnectionOptions.is(arg1)) {\n options = arg1;\n }\n else {\n input = arg1;\n output = arg2;\n options = arg3;\n }\n return _createConnection(input, output, options, factories);\n}\nexports.createConnection = createConnection;\nfunction _createConnection(input, output, options, factories) {\n let stdio = false;\n if (!input && !output && process.argv.length > 2) {\n let port = void 0;\n let pipeName = void 0;\n let argv = process.argv.slice(2);\n for (let i = 0; i < argv.length; i++) {\n let arg = argv[i];\n if (arg === '--node-ipc') {\n input = new node_1.IPCMessageReader(process);\n output = new node_1.IPCMessageWriter(process);\n break;\n }\n else if (arg === '--stdio') {\n stdio = true;\n input = process.stdin;\n output = process.stdout;\n break;\n }\n else if (arg === '--socket') {\n port = parseInt(argv[i + 1]);\n break;\n }\n else if (arg === '--pipe') {\n pipeName = argv[i + 1];\n break;\n }\n else {\n var args = arg.split('=');\n if (args[0] === '--socket') {\n port = parseInt(args[1]);\n break;\n }\n else if (args[0] === '--pipe') {\n pipeName = args[1];\n break;\n }\n }\n }\n if (port) {\n let transport = (0, node_1.createServerSocketTransport)(port);\n input = transport[0];\n output = transport[1];\n }\n else if (pipeName) {\n let transport = (0, node_1.createServerPipeTransport)(pipeName);\n input = transport[0];\n output = transport[1];\n }\n }\n var commandLineMessage = 'Use arguments of createConnection or set command line parameters: \\'--node-ipc\\', \\'--stdio\\' or \\'--socket={number}\\'';\n if (!input) {\n throw new Error('Connection input stream is not set. ' + commandLineMessage);\n }\n if (!output) {\n throw new Error('Connection output stream is not set. ' + commandLineMessage);\n }\n // Backwards compatibility\n if (Is.func(input.read) && Is.func(input.on)) {\n let inputStream = input;\n inputStream.on('end', () => {\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n });\n inputStream.on('close', () => {\n endProtocolConnection();\n process.exit(_shutdownReceived ? 0 : 1);\n });\n }\n const connectionFactory = (logger) => {\n const result = (0, node_1.createProtocolConnection)(input, output, logger, options);\n if (stdio) {\n patchConsole(logger);\n }\n return result;\n };\n return (0, server_1.createConnection)(connectionFactory, watchDog, factories);\n}\nfunction patchConsole(logger) {\n function serialize(args) {\n return args.map(arg => typeof arg === 'string' ? arg : (0, node_util_1.inspect)(arg)).join(' ');\n }\n const counters = new Map();\n console.assert = function assert(assertion, ...args) {\n if (assertion) {\n return;\n }\n if (args.length === 0) {\n logger.error('Assertion failed');\n }\n else {\n const [message, ...rest] = args;\n logger.error(`Assertion failed: ${message} ${serialize(rest)}`);\n }\n };\n console.count = function count(label = 'default') {\n const message = String(label);\n let counter = counters.get(message) ?? 0;\n counter += 1;\n counters.set(message, counter);\n logger.log(`${message}: ${message}`);\n };\n console.countReset = function countReset(label) {\n if (label === undefined) {\n counters.clear();\n }\n else {\n counters.delete(String(label));\n }\n };\n console.debug = function debug(...args) {\n logger.log(serialize(args));\n };\n console.dir = function dir(arg, options) {\n // @ts-expect-error https://github.com/DefinitelyTyped/DefinitelyTyped/pull/66626\n logger.log((0, node_util_1.inspect)(arg, options));\n };\n console.log = function log(...args) {\n logger.log(serialize(args));\n };\n console.error = function error(...args) {\n logger.error(serialize(args));\n };\n console.trace = function trace(...args) {\n const stack = new Error().stack.replace(/(.+\\n){2}/, '');\n let message = 'Trace';\n if (args.length !== 0) {\n message += `: ${serialize(args)}`;\n }\n logger.log(`${message}\\n${stack}`);\n };\n console.warn = function warn(...args) {\n logger.warn(serialize(args));\n };\n}\n","module.exports = require(\"pyodide\");","module.exports = require(\"vscode-languageserver-types\");","module.exports = require(\"child_process\");","module.exports = require(\"crypto\");","module.exports = require(\"fs\");","module.exports = require(\"net\");","module.exports = require(\"node:util\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"worker_threads\");","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// the startup function\n__webpack_require__.x = () => {\n\t// Load entry module and return exports\n\t// This entry module depends on other loaded chunks and execution need to be delayed\n\tlet __webpack_exports__ = __webpack_require__.O(undefined, [\"vendors-node_modules_base2_pretty-print-object_dist_index_js-node_modules_vscode-jsonrpc_node-9a0a8d\"], () => (__webpack_require__(\"./src/services/cfnLint/pyodide-worker.ts\")))\n\t__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n\treturn __webpack_exports__;\n};\n\n","const deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tlet notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tlet [chunkIds, fn, priority] = deferred[i];\n\t\tlet fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tconst r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks and chunks that the entrypoint depends on\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".js\";\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// no baseURI\n\n// object to store loaded chunks\n// \"1\" means \"loaded\", otherwise not loaded yet\nconst installedChunks = {\n\t\"pyodide-worker\": 1\n};\n\n__webpack_require__.O.require = (chunkId) => (installedChunks[chunkId]);\n\nconst installChunk = (chunk) => {\n\tconst moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime;\n\tfor(var moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\tfor(var i = 0; i < chunkIds.length; i++)\n\t\tinstalledChunks[chunkIds[i]] = 1;\n\t__webpack_require__.O();\n};\n\n// require() chunk loading for javascript\n__webpack_require__.f.require = (chunkId, promises) => {\n\t// \"1\" is the signal for \"already loaded\"\n\tif(!installedChunks[chunkId]) {\n\t\tif(true) { // all chunks have JS\n\t\t\tconst installedChunk = require(\"./\" + __webpack_require__.u(chunkId));\n\t\t\tif (!installedChunks[chunkId]) {\n\t\t\t\tinstallChunk(installedChunk);\n\t\t\t}\n\t\t} else installedChunks[chunkId] = 1;\n\t}\n};\n\n// no external install chunk\n\n// no HMR\n\n// no HMR manifest","const next = __webpack_require__.x;\n__webpack_require__.x = () => {\n\t__webpack_require__.e(\"vendors-node_modules_base2_pretty-print-object_dist_index_js-node_modules_vscode-jsonrpc_node-9a0a8d\");\n\treturn next();\n};","","// run startup\nvar __webpack_exports__ = __webpack_require__.x();\n",""],"names":[],"sourceRoot":""}