updates
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
[shell]
|
||||
program="/usr/local/bin/tmux"
|
||||
program="/usr/bin/tmux"
|
||||
|
||||
[font]
|
||||
normal = { family = "DejaVu Sans Mono", style = "Normal" }
|
||||
|
@ -1,7 +1,3 @@
|
||||
if vim.fn.has('nvim-0.8') == 0 then
|
||||
error('Need Neovim 0.8+ in order to use this config')
|
||||
end
|
||||
|
||||
for _, cmd in ipairs({"git", "rg", {"fd", "fdfind"}}) do
|
||||
local name = type(cmd) == "string" and cmd or vim.inspect(cmd)
|
||||
local commands = type(cmd) == "string" and {cmd} or cmd
|
||||
|
@ -70,6 +70,8 @@ bind-key -n ¡ select-window -t 1
|
||||
bind-key -n ™ select-window -t 2
|
||||
bind-key -n £ select-window -t 3
|
||||
bind-key -n ¢ select-window -t 4
|
||||
bind-key -n ∞ select-window -t 5
|
||||
bind-key -n § select-window -t 6
|
||||
|
||||
|
||||
# Select Window (Linux)
|
||||
@ -77,6 +79,8 @@ bind-key -n M-1 select-window -t 1
|
||||
bind-key -n M-2 select-window -t 2
|
||||
bind-key -n M-3 select-window -t 3
|
||||
bind-key -n M-4 select-window -t 4
|
||||
bind-key -n M-5 select-window -t 5
|
||||
bind-key -n M-6 select-window -t 6
|
||||
|
||||
# Swap Window
|
||||
bind -r "<" swap-window -d -t -1
|
||||
|
1
vscode/.vscode/extensions/.obsolete
vendored
@ -1 +0,0 @@
|
||||
{"hashicorp.hcl-0.5.0":true,"hashicorp.terraform-2.32.0-darwin-arm64":true,"matangover.mypy-0.3.1":true,"ms-toolsai.jupyter-2024.5.0-darwin-arm64":true,"ms-toolsai.jupyter-2024.6.0-darwin-arm64":true,"ms-toolsai.jupyter-keymap-1.1.2":true,"ms-toolsai.jupyter-renderers-1.0.18":true,"ms-toolsai.vscode-jupyter-cell-tags-0.1.9":true,"ms-toolsai.vscode-jupyter-slideshow-0.1.6":true}
|
@ -1,10 +0,0 @@
|
||||
schema_version = 1
|
||||
|
||||
project {
|
||||
license = "MPL-2.0"
|
||||
|
||||
# (OPTIONAL) A list of globs that should not have copyright/license headers.
|
||||
# Supports doublestar glob patterns for more flexibility in defining which
|
||||
# files or folders should be ignored
|
||||
// header_ignore = []
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
|
||||
<Metadata>
|
||||
<Identity Language="en-US" Id="hcl" Version="0.5.0" Publisher="hashicorp" />
|
||||
<DisplayName>HashiCorp HCL</DisplayName>
|
||||
<Description xml:space="preserve">HashiCorp HCL syntax</Description>
|
||||
<Tags>HashiCorp,devops,cloud,hcl,HCL,__ext_hcl,__web_extension</Tags>
|
||||
<Categories>Programming Languages,Other</Categories>
|
||||
<GalleryFlags>Public</GalleryFlags>
|
||||
|
||||
<Properties>
|
||||
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.61.0" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="workspace,web" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
|
||||
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/hashicorp/vscode-hcl.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/hashicorp/vscode-hcl.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/hashicorp/vscode-hcl.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/hashicorp/vscode-hcl/issues" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Learn" Value="https://github.com/hashicorp/vscode-hcl" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Branding.Color" Value="#FFF" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Branding.Theme" Value="light" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Content.Pricing" Value="Free"/>
|
||||
|
||||
|
||||
|
||||
</Properties>
|
||||
<License>extension/LICENSE.txt</License>
|
||||
<Icon>extension/assets/hashicorp_logo_mark_light_universal_radius45.png</Icon>
|
||||
</Metadata>
|
||||
<Installation>
|
||||
<InstallationTarget Id="Microsoft.VisualStudio.Code"/>
|
||||
</Installation>
|
||||
<Dependencies/>
|
||||
<Assets>
|
||||
<Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.Changelog" Path="extension/CHANGELOG.md" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.txt" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/assets/hashicorp_logo_mark_light_universal_radius45.png" Addressable="true" />
|
||||
</Assets>
|
||||
</PackageManifest>
|
@ -1,132 +0,0 @@
|
||||
## [0.5.0] (2024-05-15)
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Allow curly braces in block label strings [syntax#120](https://github.com/hashicorp/syntax/pull/120)
|
||||
|
||||
## [0.4.0] (2024-04-10)
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Improve highlighting within objects/maps [syntax#112](https://github.com/hashicorp/syntax/pull/112)
|
||||
* Fix mis-highlight for `=>` [syntax#115](https://github.com/hashicorp/syntax/pull/115)
|
||||
* Fix mis-highlight for conditionals detected as a block [syntax#116](https://github.com/hashicorp/syntax/pull/116)
|
||||
* Fix inline for-expression matching [syntax#117](https://github.com/hashicorp/syntax/pull/117)
|
||||
* Be more permissive in allowed characters in a block label [syntax#94](https://github.com/hashicorp/syntax/pull/94)
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
* Add support for namespaced functions [syntax#110](https://github.com/hashicorp/syntax/pull/110)
|
||||
* Recognise new Nomad naming convention [#213](https://github.com/hashicorp/vscode-hcl/pull/213)
|
||||
* Update to Node v18 [#277](https://github.com/hashicorp/vscode-hcl/pull/277)
|
||||
|
||||
## [0.3.2] (2022-12-15)
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Improve attribute name matching [syntax#49](https://github.com/hashicorp/syntax/pull/49)
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
* telemetry: track `.tflint.hcl` [#182](https://github.com/hashicorp/vscode-hcl/pull/182)
|
||||
|
||||
## [0.3.1] (2022-11-24)
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
* Update icon for HCL files [#174](https://github.com/hashicorp/vscode-hcl/pull/174)
|
||||
* Telemetry: Fix product detection [#176](https://github.com/hashicorp/vscode-hcl/pull/176)
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
* Readme: Add section to mention telemetry [#173](https://github.com/hashicorp/vscode-hcl/pull/173)
|
||||
|
||||
## [0.3.0] (2022-11-14)
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
* Add icon for HCL files [#151](https://github.com/hashicorp/vscode-hcl/pull/151)
|
||||
* Add Sentinel to telemetry [#162](https://github.com/hashicorp/vscode-hcl/pull/162)
|
||||
|
||||
INTERNAL:
|
||||
|
||||
* Update MPL-2.0 LICENSE [#166](https://github.com/hashicorp/vscode-hcl/pull/166)
|
||||
|
||||
## [0.2.1] (2022-07-08)
|
||||
|
||||
INTERNAL:
|
||||
|
||||
- telemetry: Measure Terraform usage ([#123](https://github.com/hashicorp/vscode-hcl/pull/123))
|
||||
- telemetry: Further break down language IDs ([#134](https://github.com/hashicorp/vscode-hcl/pull/134))
|
||||
- build(deps-dev): bump @vscode/test-electron from 2.1.4 to 2.1.5 ([#129](https://github.com/hashicorp/vscode-hcl/pull/129))
|
||||
- build(deps-dev): bump eslint from 8.16.0 to 8.17.0 ([#119](https://github.com/hashicorp/vscode-hcl/pull/119))
|
||||
- build(deps-dev): bump eslint from 8.17.0 to 8.18.0 ([#126](https://github.com/hashicorp/vscode-hcl/pull/126))
|
||||
- build(deps-dev): bump eslint from 8.18.0 to 8.19.0 ([#133](https://github.com/hashicorp/vscode-hcl/pull/133))
|
||||
- build(deps-dev): bump eslint-plugin-prettier from 4.0.0 to 4.1.0 ([#130](https://github.com/hashicorp/vscode-hcl/pull/130))
|
||||
- build(deps-dev): bump eslint-plugin-prettier from 4.1.0 to 4.2.1 ([#131](https://github.com/hashicorp/vscode-hcl/pull/131))
|
||||
- build(deps-dev): bump prettier from 2.6.2 to 2.7.0 ([#122](https://github.com/hashicorp/vscode-hcl/pull/122))
|
||||
- build(deps-dev): bump prettier from 2.7.0 to 2.7.1 ([#124](https://github.com/hashicorp/vscode-hcl/pull/124))
|
||||
- build(deps-dev): bump ts-loader from 9.3.0 to 9.3.1 ([#128](https://github.com/hashicorp/vscode-hcl/pull/128))
|
||||
- build(deps-dev): bump ts-node from 10.8.0 to 10.8.1 ([#121](https://github.com/hashicorp/vscode-hcl/pull/121))
|
||||
- build(deps-dev): bump ts-node from 10.8.1 to 10.8.2 ([#132](https://github.com/hashicorp/vscode-hcl/pull/132))
|
||||
- build(deps-dev): bump typescript from 4.7.3 to 4.7.4 ([#125](https://github.com/hashicorp/vscode-hcl/pull/125))
|
||||
- build(deps-dev): bump vsce from 2.9.1 to 2.9.2 ([#127](https://github.com/hashicorp/vscode-hcl/pull/127))
|
||||
- build(deps-dev): bump webpack-cli from 4.9.2 to 4.10.0 ([#120](https://github.com/hashicorp/vscode-hcl/pull/120))
|
||||
|
||||
## [0.2.0] (2022-06-13)
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
- Variables with no space between them break syntax highlighting ([syntax#34](https://github.com/hashicorp/syntax/pull/34))
|
||||
- Fix parsing block with dash in name ([syntax#42](https://github.com/hashicorp/syntax/pull/42))
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
- Enable github.dev and vscode.dev support ([#114](https://github.com/hashicorp/vscode-hcl/pull/114))
|
||||
|
||||
INTERNAL:
|
||||
|
||||
- Measure usage of known products ([#117](https://github.com/hashicorp/vscode-hcl/pull/117))
|
||||
|
||||
## [0.1.1] (2022-05-20)
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
- Variables with no space between them break syntax highlighting ([syntax#34](https://github.com/hashicorp/syntax/pull/34))
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
- Use theme-universal icon with solid background ([#90](https://github.com/hashicorp/vscode-hcl/pull/90))
|
||||
|
||||
INTERNAL:
|
||||
|
||||
- build(deps-dev): bump glob from 7.2.0 to 7.2.3 ([#83](https://github.com/hashicorp/vscode-hcl/pull/83))
|
||||
- build(deps-dev): bump @typescript-eslint/eslint-plugin from 5.23.0 to 5.25.0 ([#87](https://github.com/hashicorp/vscode-hcl/pull/87))
|
||||
- build(deps-dev): bump @typescript-eslint/parser from 5.23.0 to 5.25.0 ([#88](https://github.com/hashicorp/vscode-hcl/pull/88))
|
||||
- build(deps-dev): bump vsce from 2.7.0 to 2.8.0 ([#89](https://github.com/hashicorp/vscode-hcl/pull/89))
|
||||
|
||||
## [0.1.0] (2022-05-13)
|
||||
|
||||
ENHANCEMENTS:
|
||||
|
||||
- Scaffold extension ([#2](https://github.com/hashicorp/vscode-hcl/pull/2))
|
||||
- Give credit to William Holroyd for extension ([#33](https://github.com/hashicorp/vscode-hcl/pull/33))
|
||||
- Correct link to wholroyd.hcl ([#70](https://github.com/hashicorp/vscode-hcl/pull/70))
|
||||
- Download hashicorp/syntax files on build ([#22](https://github.com/hashicorp/vscode-hcl/pull/22))
|
||||
- Brand Marketplace Entry for publishing ([#23](https://github.com/hashicorp/vscode-hcl/pull/23))
|
||||
- Brand Extension packaging ([#69](https://github.com/hashicorp/vscode-hcl/pull/69))
|
||||
- Walk back Language activationEvents ([#71](https://github.com/hashicorp/vscode-hcl/pull/71))
|
||||
- Update README content ([#73](https://github.com/hashicorp/vscode-hcl/pull/73))
|
||||
- Fix Publish Action ([#81](https://github.com/hashicorp/vscode-hcl/pull/81))
|
||||
|
||||
<!-- Links to tag comparisons -->
|
||||
[Unreleased]: https://github.com/hashicorp/vscode-hcl/compare/v0.5.0...main
|
||||
[0.5.0]: https://github.com/hashicorp/vscode-hcl/compare/v0.4.0...v0.5.0
|
||||
[0.4.0]: https://github.com/hashicorp/vscode-hcl/compare/v0.3.2...v0.4.0
|
||||
[0.3.2]: https://github.com/hashicorp/vscode-hcl/compare/v0.3.1...v0.3.2
|
||||
[0.3.1]: https://github.com/hashicorp/vscode-hcl/compare/v0.3.0...v0.3.1
|
||||
[0.3.0]: https://github.com/hashicorp/vscode-hcl/compare/v0.2.1...v0.3.0
|
||||
[0.2.1]: https://github.com/hashicorp/vscode-hcl/compare/v0.2.0...v0.2.1
|
||||
[0.2.0]: https://github.com/hashicorp/vscode-hcl/compare/v0.1.1...v0.2.0
|
||||
[0.1.1]: https://github.com/hashicorp/vscode-hcl/compare/v0.1.0...v0.1.1
|
||||
[0.1.0]: https://github.com/hashicorp/vscode-hcl/commits/v0.1.0
|
@ -1,375 +0,0 @@
|
||||
Copyright (c) 2022 HashiCorp, Inc.
|
||||
|
||||
Mozilla Public License Version 2.0
|
||||
==================================
|
||||
|
||||
1. Definitions
|
||||
--------------
|
||||
|
||||
1.1. "Contributor"
|
||||
means each individual or legal entity that creates, contributes to
|
||||
the creation of, or owns Covered Software.
|
||||
|
||||
1.2. "Contributor Version"
|
||||
means the combination of the Contributions of others (if any) used
|
||||
by a Contributor and that particular Contributor's Contribution.
|
||||
|
||||
1.3. "Contribution"
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. "Covered Software"
|
||||
means Source Code Form to which the initial Contributor has attached
|
||||
the notice in Exhibit A, the Executable Form of such Source Code
|
||||
Form, and Modifications of such Source Code Form, in each case
|
||||
including portions thereof.
|
||||
|
||||
1.5. "Incompatible With Secondary Licenses"
|
||||
means
|
||||
|
||||
(a) that the initial Contributor has attached the notice described
|
||||
in Exhibit B to the Covered Software; or
|
||||
|
||||
(b) that the Covered Software was made available under the terms of
|
||||
version 1.1 or earlier of the License, but not also under the
|
||||
terms of a Secondary License.
|
||||
|
||||
1.6. "Executable Form"
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. "Larger Work"
|
||||
means a work that combines Covered Software with other material, in
|
||||
a separate file or files, that is not Covered Software.
|
||||
|
||||
1.8. "License"
|
||||
means this document.
|
||||
|
||||
1.9. "Licensable"
|
||||
means having the right to grant, to the maximum extent possible,
|
||||
whether at the time of the initial grant or subsequently, any and
|
||||
all of the rights conveyed by this License.
|
||||
|
||||
1.10. "Modifications"
|
||||
means any of the following:
|
||||
|
||||
(a) any file in Source Code Form that results from an addition to,
|
||||
deletion from, or modification of the contents of Covered
|
||||
Software; or
|
||||
|
||||
(b) any new file in Source Code Form that contains any Covered
|
||||
Software.
|
||||
|
||||
1.11. "Patent Claims" of a Contributor
|
||||
means any patent claim(s), including without limitation, method,
|
||||
process, and apparatus claims, in any patent Licensable by such
|
||||
Contributor that would be infringed, but for the grant of the
|
||||
License, by the making, using, selling, offering for sale, having
|
||||
made, import, or transfer of either its Contributions or its
|
||||
Contributor Version.
|
||||
|
||||
1.12. "Secondary License"
|
||||
means either the GNU General Public License, Version 2.0, the GNU
|
||||
Lesser General Public License, Version 2.1, the GNU Affero General
|
||||
Public License, Version 3.0, or any later versions of those
|
||||
licenses.
|
||||
|
||||
1.13. "Source Code Form"
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. "You" (or "Your")
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, "You" includes any entity that
|
||||
controls, is controlled by, or is under common control with You. For
|
||||
purposes of this definition, "control" means (a) the power, direct
|
||||
or indirect, to cause the direction or management of such entity,
|
||||
whether by contract or otherwise, or (b) ownership of more than
|
||||
fifty percent (50%) of the outstanding shares or beneficial
|
||||
ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions
|
||||
--------------------------------
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
(a) under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or
|
||||
as part of a Larger Work; and
|
||||
|
||||
(b) under Patent Claims of such Contributor to make, use, sell, offer
|
||||
for sale, have made, import, and otherwise transfer either its
|
||||
Contributions or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution
|
||||
become effective for each Contribution on the date the Contributor first
|
||||
distributes such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under
|
||||
this License. No additional rights or licenses will be implied from the
|
||||
distribution or licensing of Covered Software under this License.
|
||||
Notwithstanding Section 2.1(b) above, no patent license is granted by a
|
||||
Contributor:
|
||||
|
||||
(a) for any code that a Contributor has removed from Covered Software;
|
||||
or
|
||||
|
||||
(b) for infringements caused by: (i) Your and any other third party's
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
(c) under Patent Claims infringed by Covered Software in the absence of
|
||||
its Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks,
|
||||
or logos of any Contributor (except as may be necessary to comply with
|
||||
the notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this
|
||||
License (see Section 10.2) or under the terms of a Secondary License (if
|
||||
permitted under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its
|
||||
Contributions are its original creation(s) or it has sufficient rights
|
||||
to grant the rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under
|
||||
applicable copyright doctrines of fair use, fair dealing, or other
|
||||
equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
|
||||
in Section 2.1.
|
||||
|
||||
3. Responsibilities
|
||||
-------------------
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under
|
||||
the terms of this License. You must inform recipients that the Source
|
||||
Code Form of the Covered Software is governed by the terms of this
|
||||
License, and how they can obtain a copy of this License. You may not
|
||||
attempt to alter or restrict the recipients' rights in the Source Code
|
||||
Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
(a) such Covered Software must also be made available in Source Code
|
||||
Form, as described in Section 3.1, and You must inform recipients of
|
||||
the Executable Form how they can obtain a copy of such Source Code
|
||||
Form by reasonable means in a timely manner, at a charge no more
|
||||
than the cost of distribution to the recipient; and
|
||||
|
||||
(b) You may distribute such Executable Form under the terms of this
|
||||
License, or sublicense it under different terms, provided that the
|
||||
license for the Executable Form does not attempt to limit or alter
|
||||
the recipients' rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for
|
||||
the Covered Software. If the Larger Work is a combination of Covered
|
||||
Software with a work governed by one or more Secondary Licenses, and the
|
||||
Covered Software is not Incompatible With Secondary Licenses, this
|
||||
License permits You to additionally distribute such Covered Software
|
||||
under the terms of such Secondary License(s), so that the recipient of
|
||||
the Larger Work may, at their option, further distribute the Covered
|
||||
Software under the terms of either this License or such Secondary
|
||||
License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices
|
||||
(including copyright notices, patent notices, disclaimers of warranty,
|
||||
or limitations of liability) contained within the Source Code Form of
|
||||
the Covered Software, except that You may alter any license notices to
|
||||
the extent required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on
|
||||
behalf of any Contributor. You must make it absolutely clear that any
|
||||
such warranty, support, indemnity, or liability obligation is offered by
|
||||
You alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
---------------------------------------------------
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this
|
||||
License with respect to some or all of the Covered Software due to
|
||||
statute, judicial order, or regulation then You must: (a) comply with
|
||||
the terms of this License to the maximum extent possible; and (b)
|
||||
describe the limitations and the code they affect. Such description must
|
||||
be placed in a text file included with all distributions of the Covered
|
||||
Software under this License. Except to the extent prohibited by statute
|
||||
or regulation, such description must be sufficiently detailed for a
|
||||
recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
--------------
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically
|
||||
if You fail to comply with any of its terms. However, if You become
|
||||
compliant, then the rights granted under this License from a particular
|
||||
Contributor are reinstated (a) provisionally, unless and until such
|
||||
Contributor explicitly and finally terminates Your grants, and (b) on an
|
||||
ongoing basis, if such Contributor fails to notify You of the
|
||||
non-compliance by some reasonable means prior to 60 days after You have
|
||||
come back into compliance. Moreover, Your grants from a particular
|
||||
Contributor are reinstated on an ongoing basis if such Contributor
|
||||
notifies You of the non-compliance by some reasonable means, this is the
|
||||
first time You have received notice of non-compliance with this License
|
||||
from such Contributor, and You become compliant prior to 30 days after
|
||||
Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions,
|
||||
counter-claims, and cross-claims) alleging that a Contributor Version
|
||||
directly or indirectly infringes any patent, then the rights granted to
|
||||
You by any and all Contributors for the Covered Software under Section
|
||||
2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
|
||||
end user license agreements (excluding distributors and resellers) which
|
||||
have been validly granted by You or Your distributors under this License
|
||||
prior to termination shall survive termination.
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 6. Disclaimer of Warranty *
|
||||
* ------------------------- *
|
||||
* *
|
||||
* Covered Software is provided under this License on an "as is" *
|
||||
* basis, without warranty of any kind, either expressed, implied, or *
|
||||
* statutory, including, without limitation, warranties that the *
|
||||
* Covered Software is free of defects, merchantable, fit for a *
|
||||
* particular purpose or non-infringing. The entire risk as to the *
|
||||
* quality and performance of the Covered Software is with You. *
|
||||
* Should any Covered Software prove defective in any respect, You *
|
||||
* (not any Contributor) assume the cost of any necessary servicing, *
|
||||
* repair, or correction. This disclaimer of warranty constitutes an *
|
||||
* essential part of this License. No use of any Covered Software is *
|
||||
* authorized under this License except under this disclaimer. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
************************************************************************
|
||||
* *
|
||||
* 7. Limitation of Liability *
|
||||
* -------------------------- *
|
||||
* *
|
||||
* Under no circumstances and under no legal theory, whether tort *
|
||||
* (including negligence), contract, or otherwise, shall any *
|
||||
* Contributor, or anyone who distributes Covered Software as *
|
||||
* permitted above, be liable to You for any direct, indirect, *
|
||||
* special, incidental, or consequential damages of any character *
|
||||
* including, without limitation, damages for lost profits, loss of *
|
||||
* goodwill, work stoppage, computer failure or malfunction, or any *
|
||||
* and all other commercial damages or losses, even if such party *
|
||||
* shall have been informed of the possibility of such damages. This *
|
||||
* limitation of liability shall not apply to liability for death or *
|
||||
* personal injury resulting from such party's negligence to the *
|
||||
* extent applicable law prohibits such limitation. Some *
|
||||
* jurisdictions do not allow the exclusion or limitation of *
|
||||
* incidental or consequential damages, so this exclusion and *
|
||||
* limitation may not apply to You. *
|
||||
* *
|
||||
************************************************************************
|
||||
|
||||
8. Litigation
|
||||
-------------
|
||||
|
||||
Any litigation relating to this License may be brought only in the
|
||||
courts of a jurisdiction where the defendant maintains its principal
|
||||
place of business and such litigation shall be governed by laws of that
|
||||
jurisdiction, without reference to its conflict-of-law provisions.
|
||||
Nothing in this Section shall prevent a party's ability to bring
|
||||
cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
----------------
|
||||
|
||||
This License represents the complete agreement concerning the subject
|
||||
matter hereof. If any provision of this License is held to be
|
||||
unenforceable, such provision shall be reformed only to the extent
|
||||
necessary to make it enforceable. Any law or regulation which provides
|
||||
that the language of a contract shall be construed against the drafter
|
||||
shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
---------------------------
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version
|
||||
of the License under which You originally received the Covered Software,
|
||||
or under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a
|
||||
modified version of this License if you rename the license and remove
|
||||
any references to the name of the license steward (except to note that
|
||||
such modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary
|
||||
Licenses
|
||||
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
-------------------------------------------
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public
|
||||
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular
|
||||
file, then You may include the notice in a location (such as a LICENSE
|
||||
file in a relevant directory) where a recipient would be likely to look
|
||||
for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - "Incompatible With Secondary Licenses" Notice
|
||||
---------------------------------------------------------
|
||||
|
||||
This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
defined by the Mozilla Public License, v. 2.0.
|
@ -1,32 +0,0 @@
|
||||
# HCL Extension for Visual Studio Code
|
||||
|
||||
The [HashiCorp HCL Extension](https://marketplace.visualstudio.com/items?itemName=hashicorp.hcl) for Visual Studio Code (VS Code) adds syntax highlighting for [HCL](https://www.hashicorp.com) files.
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. Install the extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=hashicorp.hcl)
|
||||
1. Open your desired workspace and/or the root folder containing your [HCL](https://github.com/hashicorp/hcl#hcl) files.
|
||||
|
||||
## Features
|
||||
|
||||
This extension provides [HCL](https://github.com/hashicorp/hcl#hcl) syntax highlighting for files that use `.hcl` as the file extension, for example:
|
||||
|
||||
- [Nomad job specification](https://www.nomadproject.io/docs/job-specification/hcl2)
|
||||
- [Packer template](https://www.packer.io/docs/templates/hcl_templates)
|
||||
- [Waypoint project](https://www.waypointproject.io/docs/waypoint-hcl)
|
||||
|
||||
## Usage
|
||||
|
||||
The [HashiCorp HCL Extension](https://marketplace.visualstudio.com/items?itemName=hashicorp.HCL) is a grammar only extension targeted to provide HCL syntax highlighting for files not already accounted for by a more specific product-focused extension. For example, Terraform syntax highlighting is already provided by the official [HashiCorp Terraform Extension](https://marketplace.visualstudio.com/items?itemName=hashicorp.terraform) for VS Code.
|
||||
|
||||
Current Terraform users can install the HCL extension alongside the Terraform Extension and find that they can use HCL files without conflict. Users can also install the HCL Extension separately from the Terraform Extension if they only want HCL support.
|
||||
|
||||
Read more about HCL at https://github.com/hashicorp/hcl.
|
||||
|
||||
## Telemetry
|
||||
|
||||
We use telemetry to collect data about opened file _types_ which are implied from file names (such as `terraform` for `*.tf` or `packer` for `*.pkr.hcl`). This helps us better understand usage and make better informed product decisions. You can configure VS Code to send all telemetry, or turn it off entirely by [configuring](https://code.visualstudio.com/docs/getstarted/telemetry#_disable-telemetry-reporting) `"telemetry.telemetryLevel"` to your desired value (e.g. `"off"` or `"all"`). You can also [monitor what's being sent](https://code.visualstudio.com/docs/getstarted/telemetry#_output-channel-for-telemetry-events) in your logs.
|
||||
|
||||
## Credits
|
||||
|
||||
- We thank [William Holroyd](https://github.com/wholroyd) for creation and past maintenance of [`wholroyd.HCL`](https://marketplace.visualstudio.com/items?itemName=wholroyd.HCL) VS Code extension and for agreeing to the extension namespace transfer to make the transition conflict-less and easy for existing users
|
@ -1,5 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.8353 0.535004L2 3.92582V3.92846V12.0722L4.19184 13.3473V5.20085L7.8353 3.08241V0.535004Z" fill="#0e1112"/>
|
||||
<path d="M10.1647 0.535004V7.02231H7.83529V4.60161L5.64214 5.87663V14.188L7.83529 15.4657V8.99687H10.1647V11.4017L12.3565 10.1267V1.81003L10.1647 0.535004Z" fill="#0e1112"/>
|
||||
<path d="M10.1647 15.4683L16 12.0775V12.0749V3.9311L13.8069 2.65608V10.8025L10.1647 12.9209V15.4683Z" fill="#0e1112"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 515 B |
@ -1,5 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.8353 0.535004L2 3.92582V3.92846V12.0722L4.19184 13.3473V5.20085L7.8353 3.08241V0.535004Z" fill="#d4d7d6"/>
|
||||
<path d="M10.1647 0.535004V7.02231H7.83529V4.60161L5.64214 5.87663V14.188L7.83529 15.4657V8.99687H10.1647V11.4017L12.3565 10.1267V1.81003L10.1647 0.535004Z" fill="#d4d7d6"/>
|
||||
<path d="M10.1647 15.4683L16 12.0775V12.0749V3.9311L13.8069 2.65608V10.8025L10.1647 12.9209V15.4683Z" fill="#d4d7d6"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 515 B |
Before Width: | Height: | Size: 10 KiB |
@ -1,30 +0,0 @@
|
||||
{
|
||||
"comments": {
|
||||
// symbol used for single line comment. Remove this entry if your language does not support line comments
|
||||
"lineComment": "//",
|
||||
// symbols used for start and end a block comment. Remove this entry if your language does not support block comments
|
||||
"blockComment": ["/*", "*/"]
|
||||
},
|
||||
// symbols used as brackets
|
||||
"brackets": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"]
|
||||
],
|
||||
// symbols that are auto closed when typing
|
||||
"autoClosingPairs": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
],
|
||||
// symbols that can be used to surround a selection
|
||||
"surroundingPairs": [
|
||||
["{", "}"],
|
||||
["[", "]"],
|
||||
["(", ")"],
|
||||
["\"", "\""],
|
||||
["'", "'"]
|
||||
]
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
/*!
|
||||
* Microsoft Dynamic Proto Utility, 1.1.4
|
||||
* Copyright (c) Microsoft and contributors. All rights reserved.
|
||||
*/
|
@ -1,124 +0,0 @@
|
||||
{
|
||||
"icon": "assets/hashicorp_logo_mark_light_universal_radius45.png",
|
||||
"name": "hcl",
|
||||
"publisher": "hashicorp",
|
||||
"displayName": "HashiCorp HCL",
|
||||
"description": "HashiCorp HCL syntax",
|
||||
"appInsightsKey": "885372d2-6f3c-499f-9d25-b8b219983a52",
|
||||
"version": "0.5.0",
|
||||
"license": "MPL-2.0",
|
||||
"preview": false,
|
||||
"private": true,
|
||||
"syntax": {
|
||||
"version": "0.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"npm": "~10.X",
|
||||
"node": "~18.X",
|
||||
"vscode": "^1.61.0"
|
||||
},
|
||||
"categories": [
|
||||
"Programming Languages",
|
||||
"Other"
|
||||
],
|
||||
"keywords": [
|
||||
"HashiCorp",
|
||||
"devops",
|
||||
"cloud",
|
||||
"hcl"
|
||||
],
|
||||
"galleryBanner": {
|
||||
"color": "#FFF",
|
||||
"theme": "light"
|
||||
},
|
||||
"homepage": "https://github.com/hashicorp/vscode-hcl",
|
||||
"bugs": {
|
||||
"url": "https://github.com/hashicorp/vscode-hcl/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/hashicorp/vscode-hcl.git"
|
||||
},
|
||||
"activationEvents": [
|
||||
"workspaceContains:**/*.hcl"
|
||||
],
|
||||
"main": "./out/extension",
|
||||
"browser": "./out/web/extension",
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
"id": "hcl",
|
||||
"aliases": [
|
||||
"HCL"
|
||||
],
|
||||
"extensions": [
|
||||
".hcl"
|
||||
],
|
||||
"configuration": "./language-configuration.json",
|
||||
"icon": {
|
||||
"light": "./assets/HashiCorp_Icon_Black_RGB.svg",
|
||||
"dark": "./assets/HashiCorp_Icon_White_RGB.svg"
|
||||
}
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
{
|
||||
"language": "hcl",
|
||||
"scopeName": "source.hcl",
|
||||
"path": "./syntaxes/hcl.tmGrammar.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint src --ext ts",
|
||||
"prettier": "prettier \"**/*.+(js|json|ts)\"",
|
||||
"format": "npm run prettier -- --write",
|
||||
"check-format": "npm run prettier -- --check",
|
||||
"download:syntax": "ts-node ./build/download-syntax.ts",
|
||||
"prepare": "npm run download:syntax",
|
||||
"compile": "webpack --mode development",
|
||||
"watch": "webpack --mode development --watch",
|
||||
"prepackage": "npm run download:syntax",
|
||||
"vscode:prepublish": "webpack --mode production --devtool hidden-source-map",
|
||||
"package": "vsce package",
|
||||
"run-in-browser": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@vscode/extension-telemetry": "^0.5.2",
|
||||
"path-browserify": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.18.12",
|
||||
"@types/vscode": "^1.61.0",
|
||||
"@types/webpack-env": "^1.17.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
||||
"@typescript-eslint/parser": "^5.27.0",
|
||||
"@vscode/test-electron": "^2.0.3",
|
||||
"@vscode/vsce": "^2.19.0",
|
||||
"assert": "^2.0.0",
|
||||
"eslint": "^8.16.0",
|
||||
"eslint-config-prettier": "^8.4.0",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"got": "^11.8.3",
|
||||
"prettier": "^2.5.1",
|
||||
"process": "^0.11.10",
|
||||
"ts-loader": "^9.3.0",
|
||||
"ts-node": "^10.6.0",
|
||||
"typescript": "^4.7.3",
|
||||
"webpack": "^5.72.1",
|
||||
"webpack-cli": "^4.9.2"
|
||||
},
|
||||
"__metadata": {
|
||||
"id": "41a86ae3-cc87-4293-9324-c615272967f2",
|
||||
"publisherId": "a8dd781d-e144-400a-943c-417165981be2",
|
||||
"publisherDisplayName": "HashiCorp",
|
||||
"targetPlatform": "undefined",
|
||||
"isApplicationScoped": false,
|
||||
"isPreReleaseVersion": false,
|
||||
"hasPreReleaseVersion": false,
|
||||
"installedTimestamp": 1719347837254,
|
||||
"pinned": false,
|
||||
"preRelease": false,
|
||||
"source": "gallery"
|
||||
}
|
||||
}
|
@ -1,791 +0,0 @@
|
||||
{
|
||||
"scopeName": "source.hcl",
|
||||
"name": "HashiCorp HCL",
|
||||
"uuid": "a14187be-98d8-42c1-ac89-bb5eaccf911e",
|
||||
"fileTypes": [
|
||||
"hcl"
|
||||
],
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_definition"
|
||||
},
|
||||
{
|
||||
"include": "#block"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"attribute_access": {
|
||||
"begin": "\\.(?!\\*)",
|
||||
"end": "[[:alpha:]][\\w-]*|\\d*",
|
||||
"comment": "Matches traversal attribute access such as .attr",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.accessor.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?!null|false|true)[[:alpha:]][\\w-]*",
|
||||
"comment": "Attribute name",
|
||||
"name": "variable.other.member.hcl"
|
||||
},
|
||||
{
|
||||
"match": "\\d+",
|
||||
"comment": "Optional attribute index",
|
||||
"name": "constant.numeric.integer.hcl"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"attribute_definition": {
|
||||
"name": "variable.declaration.hcl",
|
||||
"match": "(\\()?(\\b(?!null\\b|false\\b|true\\b)[[:alpha:]][[:alnum:]_-]*)(\\))?\\s*(\\=(?!\\=|\\>))\\s*",
|
||||
"comment": "Identifier \"=\" with optional parens",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.readwrite.hcl"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.operator.assignment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"attribute_splat": {
|
||||
"begin": "\\.",
|
||||
"end": "\\*",
|
||||
"comment": "Legacy attribute-only splat",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.accessor.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.splat.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"block": {
|
||||
"name": "meta.block.hcl",
|
||||
"begin": "([\\w][\\-\\w]*)([^?\\r\\n]*)(\\{)",
|
||||
"end": "\\}",
|
||||
"comment": "This will match HCL blocks like `thing1 \"one\" \"two\" {` or `thing2 {`",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",
|
||||
"comment": "Block type",
|
||||
"name": "entity.name.type.hcl"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\\"[^\\\"\\r\\n]*\\\"",
|
||||
"comment": "Block label (String Literal)",
|
||||
"name": "variable.other.enummember.hcl"
|
||||
},
|
||||
{
|
||||
"match": "[[:alpha:]][[:alnum:]_-]*",
|
||||
"comment": "Block label (Indentifier)",
|
||||
"name": "variable.other.enummember.hcl"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.block.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.block.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_definition"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"block_inline_comments": {
|
||||
"name": "comment.block.hcl",
|
||||
"begin": "/\\*",
|
||||
"end": "\\*/",
|
||||
"comment": "Inline comments start with the /* sequence and end with the */ sequence, and may have any characters within except the ending sequence. An inline comment is considered equivalent to a whitespace sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"brackets": {
|
||||
"begin": "\\[",
|
||||
"end": "\\]",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.splat.hcl",
|
||||
"match": "\\*",
|
||||
"comment": "Splat operator"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#inline_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#inline_if_expression"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"char_escapes": {
|
||||
"name": "constant.character.escape.hcl",
|
||||
"match": "\\\\[nrt\"\\\\]|\\\\u(\\h{8}|\\h{4})",
|
||||
"comment": "Character Escapes"
|
||||
},
|
||||
"comma": {
|
||||
"name": "punctuation.separator.hcl",
|
||||
"match": "\\,",
|
||||
"comment": "Commas - used in certain expressions"
|
||||
},
|
||||
"comments": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#hash_line_comments"
|
||||
},
|
||||
{
|
||||
"include": "#double_slash_line_comments"
|
||||
},
|
||||
{
|
||||
"include": "#block_inline_comments"
|
||||
}
|
||||
]
|
||||
},
|
||||
"double_slash_line_comments": {
|
||||
"name": "comment.line.double-slash.hcl",
|
||||
"begin": "//",
|
||||
"end": "$\\n?",
|
||||
"comment": "Line comments start with // sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"expressions": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#literal_values"
|
||||
},
|
||||
{
|
||||
"include": "#operators"
|
||||
},
|
||||
{
|
||||
"include": "#tuple_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#object_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#brackets"
|
||||
},
|
||||
{
|
||||
"include": "#objects"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_access"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_splat"
|
||||
},
|
||||
{
|
||||
"include": "#functions"
|
||||
},
|
||||
{
|
||||
"include": "#parens"
|
||||
}
|
||||
]
|
||||
},
|
||||
"for_expression_body": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.word.hcl",
|
||||
"match": "\\bin\\b",
|
||||
"comment": "in keyword"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.conditional.hcl",
|
||||
"match": "\\bif\\b",
|
||||
"comment": "if keyword"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\:"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"functions": {
|
||||
"name": "meta.function-call.hcl",
|
||||
"begin": "([:\\-\\w]+)(\\()",
|
||||
"end": "\\)",
|
||||
"comment": "Built-in function calls",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b[[:alpha:]][\\w_-]*::([[:alpha:]][\\w_-]*::)?[[:alpha:]][\\w_-]*\\b",
|
||||
"name": "support.function.namespaced.hcl"
|
||||
},
|
||||
{
|
||||
"match": "\\b[[:alpha:]][\\w_-]*\\b",
|
||||
"name": "support.function.builtin.hcl"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hash_line_comments": {
|
||||
"name": "comment.line.number-sign.hcl",
|
||||
"begin": "#",
|
||||
"end": "$\\n?",
|
||||
"comment": "Line comments start with # sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"hcl_type_keywords": {
|
||||
"name": "storage.type.hcl",
|
||||
"match": "\\b(any|string|number|bool|list|set|map|tuple|object)\\b",
|
||||
"comment": "Type keywords known to HCL."
|
||||
},
|
||||
"heredoc": {
|
||||
"name": "string.unquoted.heredoc.hcl",
|
||||
"begin": "(\\<\\<\\-?)\\s*(\\w+)\\s*$",
|
||||
"end": "^\\s*\\2\\s*$",
|
||||
"comment": "String Heredoc",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.heredoc.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.heredoc.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.control.heredoc.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string_interpolation"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inline_for_expression": {
|
||||
"match": "(for)\\b(.*)\\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.hcl"
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\=\\>",
|
||||
"name": "storage.type.function.hcl"
|
||||
},
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"inline_if_expression": {
|
||||
"begin": "(if)\\b",
|
||||
"end": "\\n",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.conditional.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"language_constants": {
|
||||
"name": "constant.language.hcl",
|
||||
"match": "\\b(true|false|null)\\b",
|
||||
"comment": "Language Constants"
|
||||
},
|
||||
"literal_values": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#numeric_literals"
|
||||
},
|
||||
{
|
||||
"include": "#language_constants"
|
||||
},
|
||||
{
|
||||
"include": "#string_literals"
|
||||
},
|
||||
{
|
||||
"include": "#heredoc"
|
||||
},
|
||||
{
|
||||
"include": "#hcl_type_keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
"local_identifiers": {
|
||||
"name": "variable.other.readwrite.hcl",
|
||||
"match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",
|
||||
"comment": "Local Identifiers"
|
||||
},
|
||||
"numeric_literals": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.numeric.float.hcl",
|
||||
"match": "\\b\\d+([Ee][+-]?)\\d+\\b",
|
||||
"comment": "Integer, no fraction, optional exponent",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.exponent.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.float.hcl",
|
||||
"match": "\\b\\d+(\\.)\\d+(?:([Ee][+-]?)\\d+)?\\b",
|
||||
"comment": "Integer, fraction, optional exponent",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.decimal.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.exponent.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.integer.hcl",
|
||||
"match": "\\b\\d+\\b",
|
||||
"comment": "Integers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object_for_expression": {
|
||||
"begin": "(\\{)\\s?(for)\\b",
|
||||
"end": "\\}",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.braces.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "storage.type.function.hcl",
|
||||
"match": "\\=\\>"
|
||||
},
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object_key_values": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#literal_values"
|
||||
},
|
||||
{
|
||||
"include": "#operators"
|
||||
},
|
||||
{
|
||||
"include": "#tuple_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#object_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#heredoc"
|
||||
},
|
||||
{
|
||||
"include": "#functions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"objects": {
|
||||
"name": "meta.braces.hcl",
|
||||
"begin": "\\{",
|
||||
"end": "\\}",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#objects"
|
||||
},
|
||||
{
|
||||
"include": "#inline_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#inline_if_expression"
|
||||
},
|
||||
{
|
||||
"match": "\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*)\\s*(\\=(?!=))\\s*",
|
||||
"comment": "Literal, named object key",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "meta.mapping.key.hcl variable.other.readwrite.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^\\s*((\").*(\"))\\s*(\\=)\\s*",
|
||||
"comment": "String object key",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "meta.mapping.key.hcl string.quoted.double.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.hcl"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.string.end.hcl"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.operator.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "meta.mapping.key.hcl",
|
||||
"begin": "^\\s*\\(",
|
||||
"end": "(\\))\\s*(=|:)\\s*",
|
||||
"comment": "Computed object key (any expression between parens)",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#attribute_access"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_splat"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#object_key_values"
|
||||
}
|
||||
]
|
||||
},
|
||||
"operators": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\>\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\<\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\=\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\!\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\+"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\-"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\*"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\/"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\%"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\&\\&"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\|\\|"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\!"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\>"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\<"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\?"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\.\\.\\."
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\:"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\=\\>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"parens": {
|
||||
"begin": "\\(",
|
||||
"end": "\\)",
|
||||
"comment": "Parens - matched *after* function syntax",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"string_interpolation": {
|
||||
"name": "meta.interpolation.hcl",
|
||||
"begin": "(?<![%$])([%$]{)",
|
||||
"end": "\\}",
|
||||
"comment": "String interpolation",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.interpolation.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.other.interpolation.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.template.left.trim.hcl",
|
||||
"match": "\\~\\s",
|
||||
"comment": "Trim left whitespace"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.template.right.trim.hcl",
|
||||
"match": "\\s\\~",
|
||||
"comment": "Trim right whitespace"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.hcl",
|
||||
"match": "\\b(if|else|endif|for|in|endfor)\\b",
|
||||
"comment": "if/else/endif and for/in/endfor directives"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"string_literals": {
|
||||
"name": "string.quoted.double.hcl",
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"comment": "Strings",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string_interpolation"
|
||||
},
|
||||
{
|
||||
"include": "#char_escapes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tuple_for_expression": {
|
||||
"begin": "(\\[)\\s?(for)\\b",
|
||||
"end": "\\]",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.brackets.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
|
||||
<Metadata>
|
||||
<Identity Language="en-US" Id="terraform" Version="2.32.0" Publisher="hashicorp" TargetPlatform="darwin-arm64"/>
|
||||
<DisplayName>HashiCorp Terraform</DisplayName>
|
||||
<Description xml:space="preserve">Syntax highlighting and autocompletion for Terraform</Description>
|
||||
<Tags>devops,terraform,hcl,snippet,Terraform,__ext_tf,terraform-vars,__ext_tfvars,terraform-stack,Terraform Stack,__ext_tfstackhcl,terraform-deploy,Terraform Deployment,__ext_tfdeployhcl,json,__ext_tfstate,__web_extension</Tags>
|
||||
<Categories>Programming Languages,Other,Formatters,Linters</Categories>
|
||||
<GalleryFlags>Public</GalleryFlags>
|
||||
|
||||
<Properties>
|
||||
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.86.2" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="workspace,web" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
|
||||
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/hashicorp/vscode-terraform.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/hashicorp/vscode-terraform.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/hashicorp/vscode-terraform.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/hashicorp/vscode-terraform/issues" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Learn" Value="https://github.com/hashicorp/vscode-terraform#readme" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Branding.Color" Value="#FFF" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Branding.Theme" Value="light" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Content.Pricing" Value="Free"/>
|
||||
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.CustomerQnALink" Value="https://discuss.hashicorp.com/c/terraform-core/terraform-editor-integrations/46" />
|
||||
</Properties>
|
||||
<License>extension/LICENSE.txt</License>
|
||||
<Icon>extension/assets/icons/terraform_logo_mark_light_universal.png</Icon>
|
||||
</Metadata>
|
||||
<Installation>
|
||||
<InstallationTarget Id="Microsoft.VisualStudio.Code"/>
|
||||
</Installation>
|
||||
<Dependencies/>
|
||||
<Assets>
|
||||
<Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.Changelog" Path="extension/CHANGELOG.md" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.txt" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/assets/icons/terraform_logo_mark_light_universal.png" Addressable="true" />
|
||||
</Assets>
|
||||
</PackageManifest>
|
@ -1,355 +0,0 @@
|
||||
Copyright (c) 2016 HashiCorp, Inc.
|
||||
|
||||
Mozilla Public License, version 2.0
|
||||
|
||||
1. Definitions
|
||||
|
||||
1.1. “Contributor”
|
||||
|
||||
means each individual or legal entity that creates, contributes to the
|
||||
creation of, or owns Covered Software.
|
||||
|
||||
1.2. “Contributor Version”
|
||||
|
||||
means the combination of the Contributions of others (if any) used by a
|
||||
Contributor and that particular Contributor’s Contribution.
|
||||
|
||||
1.3. “Contribution”
|
||||
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. “Covered Software”
|
||||
|
||||
means Source Code Form to which the initial Contributor has attached the
|
||||
notice in Exhibit A, the Executable Form of such Source Code Form, and
|
||||
Modifications of such Source Code Form, in each case including portions
|
||||
thereof.
|
||||
|
||||
1.5. “Incompatible With Secondary Licenses”
|
||||
means
|
||||
|
||||
a. that the initial Contributor has attached the notice described in
|
||||
Exhibit B to the Covered Software; or
|
||||
|
||||
b. that the Covered Software was made available under the terms of version
|
||||
1.1 or earlier of the License, but not also under the terms of a
|
||||
Secondary License.
|
||||
|
||||
1.6. “Executable Form”
|
||||
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. “Larger Work”
|
||||
|
||||
means a work that combines Covered Software with other material, in a separate
|
||||
file or files, that is not Covered Software.
|
||||
|
||||
1.8. “License”
|
||||
|
||||
means this document.
|
||||
|
||||
1.9. “Licensable”
|
||||
|
||||
means having the right to grant, to the maximum extent possible, whether at the
|
||||
time of the initial grant or subsequently, any and all of the rights conveyed by
|
||||
this License.
|
||||
|
||||
1.10. “Modifications”
|
||||
|
||||
means any of the following:
|
||||
|
||||
a. any file in Source Code Form that results from an addition to, deletion
|
||||
from, or modification of the contents of Covered Software; or
|
||||
|
||||
b. any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.11. “Patent Claims” of a Contributor
|
||||
|
||||
means any patent claim(s), including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by such Contributor that
|
||||
would be infringed, but for the grant of the License, by the making,
|
||||
using, selling, offering for sale, having made, import, or transfer of
|
||||
either its Contributions or its Contributor Version.
|
||||
|
||||
1.12. “Secondary License”
|
||||
|
||||
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
||||
General Public License, Version 2.1, the GNU Affero General Public
|
||||
License, Version 3.0, or any later versions of those licenses.
|
||||
|
||||
1.13. “Source Code Form”
|
||||
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. “You” (or “Your”)
|
||||
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, “You” includes any entity that controls, is
|
||||
controlled by, or is under common control with You. For purposes of this
|
||||
definition, “control” means (a) the power, direct or indirect, to cause
|
||||
the direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of more than fifty percent (50%) of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
|
||||
2. License Grants and Conditions
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
a. under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or as
|
||||
part of a Larger Work; and
|
||||
|
||||
b. under Patent Claims of such Contributor to make, use, sell, offer for
|
||||
sale, have made, import, and otherwise transfer either its Contributions
|
||||
or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution become
|
||||
effective for each Contribution on the date the Contributor first distributes
|
||||
such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under this
|
||||
License. No additional rights or licenses will be implied from the distribution
|
||||
or licensing of Covered Software under this License. Notwithstanding Section
|
||||
2.1(b) above, no patent license is granted by a Contributor:
|
||||
|
||||
a. for any code that a Contributor has removed from Covered Software; or
|
||||
|
||||
b. for infringements caused by: (i) Your and any other third party’s
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
c. under Patent Claims infringed by Covered Software in the absence of its
|
||||
Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks, or
|
||||
logos of any Contributor (except as may be necessary to comply with the
|
||||
notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this License
|
||||
(see Section 10.2) or under the terms of a Secondary License (if permitted
|
||||
under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its Contributions
|
||||
are its original creation(s) or it has sufficient rights to grant the
|
||||
rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under applicable
|
||||
copyright doctrines of fair use, fair dealing, or other equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
||||
Section 2.1.
|
||||
|
||||
|
||||
3. Responsibilities
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under the
|
||||
terms of this License. You must inform recipients that the Source Code Form
|
||||
of the Covered Software is governed by the terms of this License, and how
|
||||
they can obtain a copy of this License. You may not attempt to alter or
|
||||
restrict the recipients’ rights in the Source Code Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
a. such Covered Software must also be made available in Source Code Form,
|
||||
as described in Section 3.1, and You must inform recipients of the
|
||||
Executable Form how they can obtain a copy of such Source Code Form by
|
||||
reasonable means in a timely manner, at a charge no more than the cost
|
||||
of distribution to the recipient; and
|
||||
|
||||
b. You may distribute such Executable Form under the terms of this License,
|
||||
or sublicense it under different terms, provided that the license for
|
||||
the Executable Form does not attempt to limit or alter the recipients’
|
||||
rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for the
|
||||
Covered Software. If the Larger Work is a combination of Covered Software
|
||||
with a work governed by one or more Secondary Licenses, and the Covered
|
||||
Software is not Incompatible With Secondary Licenses, this License permits
|
||||
You to additionally distribute such Covered Software under the terms of
|
||||
such Secondary License(s), so that the recipient of the Larger Work may, at
|
||||
their option, further distribute the Covered Software under the terms of
|
||||
either this License or such Secondary License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices (including
|
||||
copyright notices, patent notices, disclaimers of warranty, or limitations
|
||||
of liability) contained within the Source Code Form of the Covered
|
||||
Software, except that You may alter any license notices to the extent
|
||||
required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on behalf
|
||||
of any Contributor. You must make it absolutely clear that any such
|
||||
warranty, support, indemnity, or liability obligation is offered by You
|
||||
alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this License
|
||||
with respect to some or all of the Covered Software due to statute, judicial
|
||||
order, or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and the code
|
||||
they affect. Such description must be placed in a text file included with all
|
||||
distributions of the Covered Software under this License. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Termination
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically if You
|
||||
fail to comply with any of its terms. However, if You become compliant,
|
||||
then the rights granted under this License from a particular Contributor
|
||||
are reinstated (a) provisionally, unless and until such Contributor
|
||||
explicitly and finally terminates Your grants, and (b) on an ongoing basis,
|
||||
if such Contributor fails to notify You of the non-compliance by some
|
||||
reasonable means prior to 60 days after You have come back into compliance.
|
||||
Moreover, Your grants from a particular Contributor are reinstated on an
|
||||
ongoing basis if such Contributor notifies You of the non-compliance by
|
||||
some reasonable means, this is the first time You have received notice of
|
||||
non-compliance with this License from such Contributor, and You become
|
||||
compliant prior to 30 days after Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions, counter-claims,
|
||||
and cross-claims) alleging that a Contributor Version directly or
|
||||
indirectly infringes any patent, then the rights granted to You by any and
|
||||
all Contributors for the Covered Software under Section 2.1 of this License
|
||||
shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
||||
license agreements (excluding distributors and resellers) which have been
|
||||
validly granted by You or Your distributors under this License prior to
|
||||
termination shall survive termination.
|
||||
|
||||
6. Disclaimer of Warranty
|
||||
|
||||
Covered Software is provided under this License on an “as is” basis, without
|
||||
warranty of any kind, either expressed, implied, or statutory, including,
|
||||
without limitation, warranties that the Covered Software is free of defects,
|
||||
merchantable, fit for a particular purpose or non-infringing. The entire
|
||||
risk as to the quality and performance of the Covered Software is with You.
|
||||
Should any Covered Software prove defective in any respect, You (not any
|
||||
Contributor) assume the cost of any necessary servicing, repair, or
|
||||
correction. This disclaimer of warranty constitutes an essential part of this
|
||||
License. No use of any Covered Software is authorized under this License
|
||||
except under this disclaimer.
|
||||
|
||||
7. Limitation of Liability
|
||||
|
||||
Under no circumstances and under no legal theory, whether tort (including
|
||||
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
||||
distributes Covered Software as permitted above, be liable to You for any
|
||||
direct, indirect, special, incidental, or consequential damages of any
|
||||
character including, without limitation, damages for lost profits, loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses, even if such party shall have been
|
||||
informed of the possibility of such damages. This limitation of liability
|
||||
shall not apply to liability for death or personal injury resulting from such
|
||||
party’s negligence to the extent applicable law prohibits such limitation.
|
||||
Some jurisdictions do not allow the exclusion or limitation of incidental or
|
||||
consequential damages, so this exclusion and limitation may not apply to You.
|
||||
|
||||
8. Litigation
|
||||
|
||||
Any litigation relating to this License may be brought only in the courts of
|
||||
a jurisdiction where the defendant maintains its principal place of business
|
||||
and such litigation shall be governed by laws of that jurisdiction, without
|
||||
reference to its conflict-of-law provisions. Nothing in this Section shall
|
||||
prevent a party’s ability to bring cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
|
||||
This License represents the complete agreement concerning the subject matter
|
||||
hereof. If any provision of this License is held to be unenforceable, such
|
||||
provision shall be reformed only to the extent necessary to make it
|
||||
enforceable. Any law or regulation which provides that the language of a
|
||||
contract shall be construed against the drafter shall not be used to construe
|
||||
this License against a Contributor.
|
||||
|
||||
|
||||
10. Versions of the License
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version of
|
||||
the License under which You originally received the Covered Software, or
|
||||
under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a modified
|
||||
version of this License if you rename the license and remove any
|
||||
references to the name of the license steward (except to note that such
|
||||
modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular file, then
|
||||
You may include the notice in a location (such as a LICENSE file in a relevant
|
||||
directory) where a recipient would be likely to look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - “Incompatible With Secondary Licenses” Notice
|
||||
|
||||
This Source Code Form is “Incompatible
|
||||
With Secondary Licenses”, as defined by
|
||||
the Mozilla Public License, v. 2.0.
|
@ -1,445 +0,0 @@
|
||||
# Terraform Extension for Visual Studio Code
|
||||
|
||||
The HashiCorp [Terraform Extension for Visual Studio Code (VS Code)](https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform) with the [Terraform Language Server](https://github.com/hashicorp/terraform-ls) adds editing features for [Terraform](https://www.terraform.io) files such as syntax highlighting, IntelliSense, code navigation, code formatting, module explorer and much more!
|
||||
|
||||
## Quick Start
|
||||
|
||||
Get started writing Terraform configurations with VS Code in three steps:
|
||||
|
||||
- **Step 1:** If you haven't done so already, install [Terraform](https://www.terraform.io/downloads)
|
||||
|
||||
- **Step 2:** Install the [Terraform Extension for VS Code](https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform).
|
||||
|
||||
- **Step 3:** To activate the extension, open any folder or VS Code workspace containing Terraform files. Once activated, the Terraform language indicator will appear in the bottom right corner of the window.
|
||||
|
||||
New to Terraform? Read the [Terraform Learning guides](https://learn.hashicorp.com/terraform)
|
||||
|
||||
See [Usage](#usage) for more detailed getting started information.
|
||||
|
||||
Read the [Troubleshooting Guide](#troubleshooting) for answers to common questions.
|
||||
|
||||
## Features
|
||||
|
||||
- [IntelliSense](#intellisense-and-autocomplete) Edit your code with auto-completion of providers, resource names, data sources, attributes and more
|
||||
- [Syntax validation](#syntax-validation) Provides inline diagnostics for invalid configuration as you type
|
||||
- [Syntax highlighting](#syntax-highlighting) Highlighting syntax from Terraform 0.12 to 1.X
|
||||
- [Code Navigation](#code-navigation) Navigate through your codebase with Go to Definition and Symbol support
|
||||
- [Code Formatting](#code-formatting) Format your code with `terraform fmt` automatically
|
||||
- [Code Snippets](#code-snippets) Shortcuts for common snippets like `for_each` and `variable`
|
||||
- [HCP Terraform Integration](#hcp-terraform-integration) View HCP Terraform Workspaces and Run details inside VS Code
|
||||
- [Terraform Module Explorer](#terraform-module-and-provider-explorer) View all modules and providers referenced in the currently open document.
|
||||
- [Terraform commands](#terraform-commands) Directly execute commands like `terraform init` or `terraform plan` from the VS Code Command Palette.
|
||||
|
||||
### IntelliSense and Autocomplete
|
||||
|
||||
IntelliSense is a general term for a variety of code editing features including: code completion, parameter info, quick info, and member lists. IntelliSense features are sometimes called by other names such as autocomplete, code completion, and code hinting.
|
||||
|
||||
For Terraform constructs like resource and data, labels, blocks and attributes are auto completed both at the root of the document and inside other blocks. This also works for Terraform modules that are installed in the workspace, attributes and other constructs are autocompleted.
|
||||
|
||||
> **Note:** If there are syntax errors present in the document upon opening, intellisense may not provide all completions. Please fix the errors and reload the document and intellisense will return. See [hcl-lang#57](https://github.com/hashicorp/hcl-lang/issues/57) for more information.
|
||||
|
||||
Invoking intellisense is performed through the [keyboard combination](https://code.visualstudio.com/docs/getstarted/keybindings) for your platform and the results depend on where the cursor is placed.
|
||||
|
||||
If the cursor is at the beginning of a line and no other characters are present, then a list of constructs like `data`, `provider`, `resource`, etc are shown.
|
||||
|
||||

|
||||
|
||||
If inside a set of quotes or inside a block, the extension provides context specific completions appropriate for the location. For example, inside a `resource` block attributes for a given provider are listed.
|
||||
|
||||

|
||||
|
||||
Combining `editor.suggest.preview` with the [pre-fill required fields](#code-completion) setting will provide inline snippet suggestions for blocks of code:
|
||||
|
||||

|
||||
|
||||
Completing the snippet allows you to tab complete through each attribute and block.
|
||||
|
||||
### Syntax Validation
|
||||
|
||||
Terraform configuration files are validated when opened and on change, and invalid code is marked with diagnostics.
|
||||
|
||||
HCL syntax is checked for e.g. missing control characters like `}`, `"` or others in the wrong place.
|
||||
|
||||

|
||||
|
||||
Enhanced validation of selected Terraform language constructs in both `*.tf` and `*.tfvars` files based on detected Terraform version and provider versions is also provided. This can highlight deprecations, missing required attributes or blocks, references to undeclared variables and more, [as documented](https://github.com/hashicorp/terraform-ls/blob/main/docs/validation.md#enhanced-validation).
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
The enhanced validation feature is enabled by default but can be disabled using the following setting:
|
||||
|
||||
```json
|
||||
"terraform.validation.enableEnhancedValidation": false
|
||||
```
|
||||
|
||||
The extension also provides validation through [`terraform validate`](https://www.terraform.io/cli/commands/validate). This can be triggered via command palette. Unlike the other validation methods, this one requires the Terraform CLI installed and a previous successful run of `terraform init` (i.e. local installation of all providers and modules) to function correctly. It is the slowest method, but the most thorough - i.e. it will catch the most mistakes.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Syntax Highlighting
|
||||
|
||||
Terraform syntax highlighting recognizes language constructs from Terraform version 0.12 to 1.X. Terraform providers, modules, variables and other high-level constructs are recognized, as well as more complex code statements like `for` loops, conditional expressions, and other complex expressions.
|
||||
|
||||

|
||||
|
||||
Some language constructs will highlight differently for older versions of Terraform that are incompatible with newer ways of expressing Terraform code. In these cases we lean toward ensuring the latest version of Terraform displays correctly and do our best with older versions.
|
||||
|
||||
### Code Navigation
|
||||
|
||||
While editing, you can right-click different identifiers to take advantage of several convenient commands
|
||||
|
||||
- `Go to Definition` (`F12`) navigates to the code that defines the construct where your cursor is. This command is helpful when you're working with Terraform modules and variables defined in other files than the currently opened document.
|
||||
- `Peek Definition` (`Alt+F12`) displays the relevant code snippet for the construct where your cursor is directly in the current editor instead of navigating to another file.
|
||||
- `Go to Declaration` navigates to the place where the variable or other construct is declared.
|
||||
- `Peek Declaration` displays the declaration directly inside the current editor.
|
||||
|
||||
### Code Formatting
|
||||
|
||||
This extension utilizes [`terraform fmt`](https://www.terraform.io/cli/commands/fmt) to rewrite an open document to a canonical format and style. This command applies a subset of the [Terraform language style conventions](https://www.terraform.io/language/syntax/style), along with other minor adjustments for readability.
|
||||
|
||||
|
||||
See the [Formatting](#formatting) Configuration section for information on how to configure this feature.
|
||||
|
||||
### Code Snippets
|
||||
|
||||
The extension provides several snippets to accelerate adding Terraform code to your configuration files:
|
||||
|
||||
- `fore` - For Each
|
||||
- `module` - Module
|
||||
- `output` - Output
|
||||
- `provisioner` - Provisioner
|
||||
- `vare` - Empty variable
|
||||
- `varm` - Map Variable
|
||||
|
||||
### HCP Terraform Integration
|
||||
|
||||
Every time you have to switch away from your code, you risk losing momentum and the context about your tasks. Previously, Terraform users needed to have at least two windows open – their editor and a web page – to develop Terraform code. The editor contains all of the Terraform code they are working on, and the web page has the HCP Terraform workspace loaded. Switching back and forth between the HCP Terraform website and the text editor can be a frustrating and fragmented experience.
|
||||
|
||||
The HCP Terraform Visual Studio Code integration improves user experience by allowing users to view workspaces directly from within Visual Studio Code. Users can view the status of current and past runs and inspect detailed logs – without ever leaving the comfort of their editor.
|
||||
|
||||
To start using HCP Terraform with VS Code, open the new HCP Terraform sidebar and click "Login to HCP Terraform". You can login using a stored token from the Terraform CLI, an existing token you provide, or open the HCP Terraform website to generate a new token.
|
||||
|
||||

|
||||
|
||||
Once logged in, you are prompted to choose which Organization to view workspaces in.
|
||||
|
||||

|
||||
|
||||
Now that your Organization is chosen, the Workspace view populates with all workspaces your token has permission to view. At a glance, you can see the last run status of each Workspace. Hovering over a workspace shows detailed information about each workspace.
|
||||
|
||||

|
||||
|
||||
Selecting a workspace populates the Run view with a list of runs for that workspace. At a glance, you can see the status of each Run, and hover over each for more detailed information.
|
||||
|
||||

|
||||
|
||||
If a Run has been Planned or Applied, you can view the raw log for each by expanding the Run then selecting the 'View Raw Log' button for either the Plan or Apply.
|
||||
|
||||

|
||||
|
||||
To sign out or log out of your HCP Terraform session, click the Accounts icon next to the Settings icon in the Activity Bar and select "Sign Out":
|
||||
|
||||

|
||||
|
||||
This will clear the currently saved token and allow you to login using a different token.
|
||||
|
||||
### Terraform Module and Provider Explorer
|
||||
|
||||
List Terraform modules used in the current open document in the Explorer Pane, or drag to the Side Bar pane for an expanded view.
|
||||
|
||||
Each item shows an icon indicating where the module comes from (local filesystem, git repository, or Terraform Registry).
|
||||
|
||||

|
||||
|
||||
If the module comes from the Terraform Registry, a link to open the documentation in a browser is provided.
|
||||
|
||||

|
||||
|
||||
List Terraform providers used in the current open document in the Explorer Pane, or drag to the Side Bar pane for an expanded view.
|
||||
|
||||

|
||||
|
||||
### Terraform Commands
|
||||
|
||||
The extension provides access to several Terraform commands through the Command Palette:
|
||||
|
||||
- Terraform: init
|
||||
- Terraform: init current folder
|
||||
- Terraform: validate
|
||||
- Terraform: plan
|
||||
|
||||
## Requirements
|
||||
|
||||
The Terraform VS Code extension bundles the [Terraform Language Server](https://github.com/hashicorp/terraform-ls) and is a self-contained install.
|
||||
|
||||
The extension does require the following to be installed before use:
|
||||
|
||||
- VS Code v1.86 or greater
|
||||
- Terraform v0.12 or greater
|
||||
|
||||
## Platform Support
|
||||
|
||||
The extension should work anywhere VS Code itself and Terraform 0.12 or higher is supported. Our test matrix includes the following:
|
||||
|
||||
- Windows Server 2022 with Terraform v1.6
|
||||
- macOS 12 with Terraform v1.6
|
||||
- macOS 11 with Terraform v1.6
|
||||
- Ubuntu 22.04 with Terraform v1.6
|
||||
|
||||
Intellisense, error checking and other language features are supported for Terraform v0.12 and greater.
|
||||
|
||||
Syntax highlighting targets Terraform v1.0 and greater. Highlighting 0.12-0.15 configuration is done on a best effort basis.
|
||||
|
||||
## Usage
|
||||
|
||||
### VS Code Workspace support
|
||||
|
||||
It is a common pattern to have separate folders containing related Terraform configuration that are not contained under one root folder. For example, you have a main Terraform folder containing the configuration for a single application and several module folders containing encapsulated code for configuring different parts of component pieces. You could open each folder in a separate VS Code window, and bounce between each window to author your changes.
|
||||
|
||||
A better approach is to use [VS Code Workspaces](https://code.visualstudio.com/docs/editor/workspaces). Using our example above, open the main Terraform folder first, then use Add Folder to workspace to add the dependent module folders. A single VS Code window is used and all Terraform files are available to author your changes. This uses a single terraform-ls process that has an understanding of your entire project, allowing you to use features like `Go to Symbol` and `Reference counts` across your project.
|
||||
|
||||
### Single file support
|
||||
|
||||
Opening a single Terraform configuration file inside VS Code is currently not supported. We see this approach most commonly attempted by users of terminal editors like vim, where it is common to edit a single file at a time.
|
||||
|
||||
The Terraform VS Code extension works best when it has the full context of a Terraform project where it can parse the referenced files and provide the expected advanced language features.
|
||||
|
||||
The recommended workflow is to instead open the containing folder for the desired Terraform file inside a single VS Code editor window, then navigate to the desired file. This seems counter-intuitive when you only want to edit a single file, but this allows the extension to understand the Terraform setup you are using and provide accurate and helpful intellisense, error checking, and other language features.
|
||||
|
||||
### Refresh Intellisense
|
||||
|
||||
The extension will pick up new schema for Terraform providers you reference in your configuration files automatically whenever anything changes inside `.terraform`.
|
||||
|
||||
To provide the extension with an up-to-date schema for the Terraform providers used in your configuration:
|
||||
|
||||
1. Open any folder or VS Code workspace containing Terraform files.
|
||||
1. Open the Command Palette and run `Terraform: init current folder` or perform a `terraform init` from the terminal.
|
||||
|
||||
### Remote Extension support
|
||||
|
||||
The Visual Studio Code [Remote - WSL extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) lets you use the Windows Subsystem for Linux (WSL) as your full-time development environment right from VS Code. You can author Terraform configuration files in a Linux-based environment, use Linux-specific toolchains and utilities from the comfort of Windows.
|
||||
|
||||
The Remote WSL extension runs the [HashiCorp Extension](https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform) and other extensions directly in WSL so you can edit files located in WSL or the mounted Windows filesystem (for example /mnt/c) without worrying about pathing issues, binary compatibility, or other cross-OS challenges.
|
||||
|
||||
For a detailed walkthrough for how to get started using WSL and VS Code, see https://code.visualstudio.com/docs/remote/wsl-tutorial.
|
||||
|
||||
## Configuration
|
||||
|
||||
The extension does not require any initial configuration and should work out of the box. To take advantage of additional VS Code features or experimental extension features you can configure settings to customize behavior.
|
||||
|
||||
This extension offers several configuration options. To modify these open the [VS Code Settings Editor](https://code.visualstudio.com/docs/getstarted/settings#_settings-editor) in the UI or JSON view for [user and workspace level](https://code.visualstudio.com/docs/getstarted/settings#_creating-user-and-workspace-settings) settings, [scope your settings by language](https://code.visualstudio.com/docs/getstarted/settings#_languagespecific-editor-settings), or alternatively modify the `.vscode/settings.json` file in the root of your working directory.
|
||||
|
||||
### Code Completion
|
||||
|
||||
An experimental option can be enabled to prefill required fields when completing Terraform blocks with the following setting:
|
||||
|
||||
```json
|
||||
"terraform.experimentalFeatures.prefillRequiredFields": true
|
||||
```
|
||||
|
||||
For example, choosing `aws_alb_listener` in the following block inserts a snippet in the current line with the `resource` block entirely filled out, containing tab stops to fill in the required values.
|
||||
|
||||

|
||||
|
||||
Combine this with `editor.suggest.preview` and the editor will provide inline snippet suggestions for blocks of code:
|
||||
|
||||

|
||||
|
||||
Completing the snippet allows you to tab complete through each attribute and block.
|
||||
|
||||
### Code Lens
|
||||
|
||||
Display reference counts above top level blocks and attributes
|
||||
|
||||
```json
|
||||
"terraform.codelens.referenceCount": true
|
||||
```
|
||||
|
||||

|
||||
|
||||
> **Note:** This feature impacts extension performance when opening folders with many modules present. If you experience slowness or high CPU utilization, open a smaller set of folders or disable this setting.
|
||||
|
||||
### Formatting
|
||||
|
||||
To enable automatic formatting, it is recommended that the following be added to the extension settings for the Terraform extension:
|
||||
|
||||
```json
|
||||
"[terraform]": {
|
||||
"editor.defaultFormatter": "hashicorp.terraform",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnSaveMode": "file"
|
||||
},
|
||||
"[terraform-vars]": {
|
||||
"editor.defaultFormatter": "hashicorp.terraform",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnSaveMode": "file"
|
||||
}
|
||||
```
|
||||
|
||||
> It is recommended to set `editor.defaultFormatter` to ensure that VS Code knows which extension to use to format your files. It is possible to have more than one extension installed which claim a capability to format Terraform files.
|
||||
|
||||
When using the `editor.formatOnSaveMode` setting, only `file` is currently supported. The `modifications` or `modificationsIfAvailable` settings [use the currently configured SCM](https://code.visualstudio.com/updates/v1_49#_only-format-modified-text) to detect file line ranges that have changed and send those ranges to the formatter. The `file` setting works because `terraform fmt` was originally designed for formatting an entire file, not ranges. If you don't have an SCM enabled for the files you are editing, `modifications` won't work at all. The `modificationsIfAvailable` setting will fall back to `file` if there is no SCM and will appear to work sometimes.
|
||||
|
||||
If you want to use `editor.codeActionsOnSave` with `editor.formatOnSave` to automatically format Terraform files, use the following configuration:
|
||||
|
||||
```json
|
||||
"editor.formatOnSave": true,
|
||||
"[terraform]": {
|
||||
"editor.defaultFormatter": "hashicorp.terraform",
|
||||
"editor.formatOnSave": false,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.formatAll.terraform": true
|
||||
},
|
||||
},
|
||||
"[terraform-vars]": {
|
||||
"editor.defaultFormatter": "hashicorp.terraform",
|
||||
"editor.formatOnSave": false,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.formatAll.terraform": true
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
This will keep the global `editor.formatOnSave` for other languages you use, and configure the Terraform extension to only format during a `codeAction` sweep.
|
||||
|
||||
> **Note**: Ensure that the terraform binary is present in the environment `PATH` variable. If the terraform binary cannot be found, formatting will silently fail.
|
||||
|
||||
### Validation
|
||||
|
||||
An experimental validate-on-save option can be enabled with the following setting:
|
||||
|
||||
```json
|
||||
"terraform.experimentalFeatures.validateOnSave": true
|
||||
```
|
||||
|
||||
This will create diagnostics for any elements that fail validation. You can also run `terraform validate` by issuing the `Terraform: validate` in the command palette.
|
||||
|
||||
### Multiple Workspaces
|
||||
|
||||
If you have multiple root modules in your workspace, you can configure the language server settings to identify them. Edit this through the VSCode Settings UI or add a `.vscode/settings.json` file using the following template:
|
||||
|
||||
```json
|
||||
"terraform.languageServer.rootModules": [
|
||||
"/module1",
|
||||
"/module2"
|
||||
]
|
||||
```
|
||||
|
||||
If you want to automatically search root modules in your workspace and exclude some folders, you can configure the language server settings to identify them.
|
||||
|
||||
```json
|
||||
"terraform.languageServer.excludeRootModules": [
|
||||
"/module3",
|
||||
"/module4"
|
||||
]
|
||||
```
|
||||
|
||||
If you want to automatically ignore certain directories when terraform-ls indexes files, add the folder names to this setting:
|
||||
|
||||
```json
|
||||
"terraform.languageServer.ignoreDirectoryNames": [
|
||||
"folder1",
|
||||
"folder2"
|
||||
]
|
||||
```
|
||||
|
||||
### Terraform command options
|
||||
|
||||
You can configure the path to the Terraform binary used by terraform-ls to perform operations inside the editor by configuring this setting:
|
||||
|
||||
```json
|
||||
"terraform.languageServer.terraform.path": "C:/some/folder/path"
|
||||
```
|
||||
|
||||
You can override the Terraform execution timeout by configuring this setting:
|
||||
|
||||
```json
|
||||
"terraform.languageServer.terraform.timeout": "30"
|
||||
```
|
||||
|
||||
You can set the path Terraform logs (`TF_LOG_PATH`) by configuring this setting:
|
||||
|
||||
```json
|
||||
"terraform.languageServer.terraform.logFilePath": "C:/some/folder/path/log-{{varname}}.log"
|
||||
```
|
||||
|
||||
Supports variables (e.g. timestamp, pid, ppid) via Go template syntax `{{varname}}`
|
||||
|
||||
### Telemetry
|
||||
|
||||
We use telemetry to send error reports to our team, so we can respond more effectively. You can configure VS Code to send all telemetry, just crash telemetry, just errors or turn it off entirely by [configuring](https://code.visualstudio.com/docs/getstarted/telemetry#_disable-telemetry-reporting) `"telemetry.telemetryLevel"` to your desired value. You can also [monitor what's being sent](https://code.visualstudio.com/docs/getstarted/telemetry#_output-channel-for-telemetry-events) in your logs.
|
||||
|
||||
## Known Issues
|
||||
|
||||
- If there are syntax errors present in the document upon opening, intellisense may not provide all completions. Run `Terraform: validate` and fix validation errors, then reload the document and intellisense will work again. Potential solutions for this are being investigated in See [hcl-lang#57](https://github.com/hashicorp/hcl-lang/issues/57) for more information.
|
||||
- Completion inside incomplete blocks, such as `resource "here` (without the closing quote and braces) is not supported. You can complete the 1st level blocks though and that will automatically trigger subsequent completion for e.g. resource types. See [terraform-ls#57](https://github.com/hashicorp/terraform-ls/issues/57) for more information.
|
||||
- A number of different folder configurations (specifically when your root module is not a parent to any submodules) are not yet supported. More information available in ([terraform-ls#32](https://github.com/hashicorp/terraform-ls/issues/32#issuecomment-649707345))
|
||||
|
||||
### Terraform 0.11 compatibility
|
||||
|
||||
If you are using a Terraform version prior to 0.12.0, you can install the pre-transfer 1.4.0 version of this extension by following the instructions in the [pin version section](#pin-to-a-specific-version-of-the-extension).
|
||||
|
||||
The configuration has changed from 1.4.0 to v2.X. If you are having issues with the Language Server starting, you can reset the configuration to the following:
|
||||
|
||||
```json
|
||||
"terraform.languageServer.enable": true,
|
||||
"terraform.languageServer.args": ["serve"]
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- If you have a question about how to accomplish something with the extension, please ask on the [Terraform Editor Discuss site](https://discuss.hashicorp.com/c/terraform-core/terraform-editor-integrations/46)
|
||||
- If you come across a problem with the extension, please file an [issue](https://github.com/hashicorp/vscode-terraform/issues/new/choose).
|
||||
- If someone has already filed an issue that encompasses your feedback, please leave a 👍/👎 reaction on the issue
|
||||
- Contributions are always welcome! Please see our [contributing guide](https://github.com/hashicorp/vscode-terraform/issues/new?assignees=&labels=enhancement&template=feature_request.md) for more details
|
||||
- If you're interested in the development of the extension, you can read about our [development process](https://github.com/hashicorp/vscode-terraform/blob/HEAD/DEVELOPMENT.md)
|
||||
|
||||
### Settings Migration
|
||||
|
||||
Read more about [changes in settings options introduced in v2.24.0](https://github.com/hashicorp/vscode-terraform/blob/HEAD/docs/settings-migration.md).
|
||||
|
||||
### Generate a bug report
|
||||
|
||||
Experience a problem? You can have VS Code open a Github issue in our repo with all the information filled out for you. Open the Command Palette and invoke `Terraform: Generate Bug Report`. This will inspect the VS Code version, the Terraform extension version, the terraform-ls version and the list of installed extensions and open a browser window with GitHub loaded. You can then inspect the information provided, edit if desired, and submit the issue.
|
||||
|
||||
### Reload the extension
|
||||
|
||||
If you haven't seen the Problems Pane update in awhile, or hover and intellisense doesn't seem to showing up, you might not know what to do. Sometimes the Terraform extension can experience problems which cause the editor to not respond. The extension has a way of [reporting the problem](#generate-a-bug-report), but there is something you can do to get right back to working after reporting the problem: reload the Terraform extension.
|
||||
|
||||
You can reload the Terraform extension by opening the command palette and starting to type `Reload`. A list of commands will appear, select `Reload Window`. This will reload the Visual Studio Code window without closing down the entire editor, and without losing any work currently open in the editor.
|
||||
|
||||
### Pin to a specific version of the extension
|
||||
|
||||
If you wish to install a specific version of the extension, you can choose 'Install Another version' option in the Extensions pane. This will bring up a list of prior versions for the selected extension. Choose the version you want to install from the list.
|
||||
|
||||

|
||||
|
||||
## Code of Conduct
|
||||
|
||||
HashiCorp Community Guidelines apply to you when interacting with the community here on GitHub and contributing code to this repository.
|
||||
|
||||
Please read the full text at https://www.hashicorp.com/community-guidelines
|
||||
|
||||
## Contributing
|
||||
|
||||
We are an open source project on GitHub and would enjoy your contributions! Consult our [development guide](https://github.com/hashicorp/vscode-terraform/blob/HEAD/DEVELOPMENT.md) for steps on how to get started. Please [open a new issue](https://github.com/hashicorp/terraform-vscode/issues) before working on a PR that requires significant effort. This will allow us to make sure the work is in line with the project's goals.
|
||||
|
||||
## Release History
|
||||
|
||||
**v2.0.0** is the first official release from HashiCorp, prior releases were by [Mikael Olenfalk](https://github.com/mauve).
|
||||
|
||||
The 2.0.0 release integrates a new [Language Server package from HashiCorp](https://github.com/hashicorp/terraform-ls). The extension will install and upgrade terraform-ls to continue to add new functionality around code completion and formatting. See the [terraform-ls CHANGELOG](https://github.com/hashicorp/terraform-ls/blob/main/CHANGELOG.md) for details.
|
||||
|
||||
In addition, this new version brings the syntax highlighting up to date with all HCL2 features, as needed for Terraform 0.12 and above.
|
||||
|
||||
> **Configuration Changes** Please note that in 2.x, the configuration differs from 1.4.0, see [Known Issues](#known-issues) for more information.
|
||||
|
||||
See the [CHANGELOG](https://github.com/hashicorp/vscode-terraform/blob/main/CHANGELOG.md) for more detailed release notes.
|
||||
|
||||
## Credits
|
||||
|
||||
- [Mikael Olenfalk](https://github.com/mauve) - creating and supporting the [vscode-terraform](https://github.com/mauve/vscode-terraform) extension, which was used as a starting point and inspiration for this extension.
|
@ -1,13 +0,0 @@
|
||||
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_0_1)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23 11L40 21.3349V42L23 31.6697V11Z" fill="#7B42BC"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M42 21.3349V42L60 31.6697V11L42 21.3349Z" fill="#7B42BC"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3 0V20L21 30V10L3 0Z" fill="#7B42BC"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23 53.9985L40 64V44.1353V44.0015L23 34V53.9985Z" fill="#7B42BC"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_0_1">
|
||||
<rect width="64" height="64" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 653 B |
Before Width: | Height: | Size: 20 KiB |
@ -1,11 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" fill="none" viewBox="1 1 62 62">
|
||||
<g fill="#a074c4" fill-rule="evenodd" clip-path="url(#a) translate(1,0)" clip-rule="evenodd">
|
||||
<path
|
||||
d="m23 11 17 10.335V42L23 31.67zM42 21.335V42l18-10.33V11zM3 0v20l18 10V10zM23 53.999 40 64V44.002L23 34z" />
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="a">
|
||||
<path fill="#fff" d="M0 0h64v64H0z" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 434 B |
@ -1,14 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_876_66097)">
|
||||
<path d="M5.33333 4.3999V9.19798L9.47487 11.5976V6.79957L5.33333 4.3999Z" fill="black"/>
|
||||
<path d="M14.0714 9.47665L9.92863 7.07825V11.8763L14.0714 14.276V9.47665Z" fill="black"/>
|
||||
<path d="M14.5251 14.276V9.47665L18.6667 7.07825V11.8763L14.5251 14.276Z" fill="black"/>
|
||||
<path d="M14.0702 19.5999L9.92863 17.2002V12.4022L14.0702 14.8018V19.5999Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.2 1H4.8C3.94342 1 3.36113 1.00078 2.91104 1.03755C2.47262 1.07337 2.24842 1.1383 2.09202 1.21799C1.71569 1.40973 1.40973 1.71569 1.21799 2.09202C1.1383 2.24842 1.07337 2.47262 1.03755 2.91104C1.00078 3.36113 1 3.94342 1 4.8V19.2C1 20.0566 1.00078 20.6389 1.03755 21.089C1.07337 21.5274 1.1383 21.7516 1.21799 21.908C1.40973 22.2843 1.71569 22.5903 2.09202 22.782C2.24842 22.8617 2.47262 22.9266 2.91104 22.9625C3.36113 22.9992 3.94342 23 4.8 23H19.2C20.0566 23 20.6389 22.9992 21.089 22.9625C21.5274 22.9266 21.7516 22.8617 21.908 22.782C22.2843 22.5903 22.5903 22.2843 22.782 21.908C22.8617 21.7516 22.9266 21.5274 22.9624 21.089C22.9992 20.6389 23 20.0566 23 19.2V4.8C23 3.94342 22.9992 3.36113 22.9624 2.91104C22.9266 2.47262 22.8617 2.24842 22.782 2.09202C22.5903 1.71569 22.2843 1.40973 21.908 1.21799C21.7516 1.1383 21.5274 1.07337 21.089 1.03755C20.6389 1.00078 20.0566 1 19.2 1ZM0.32698 1.63803C0 2.27976 0 3.11984 0 4.8V19.2C0 20.8802 0 21.7202 0.32698 22.362C0.614601 22.9265 1.07354 23.3854 1.63803 23.673C2.27976 24 3.11984 24 4.8 24H19.2C20.8802 24 21.7202 24 22.362 23.673C22.9265 23.3854 23.3854 22.9265 23.673 22.362C24 21.7202 24 20.8802 24 19.2V4.8C24 3.11984 24 2.27976 23.673 1.63803C23.3854 1.07354 22.9265 0.614601 22.362 0.32698C21.7202 0 20.8802 0 19.2 0H4.8C3.11984 0 2.27976 0 1.63803 0.32698C1.07354 0.614601 0.614601 1.07354 0.32698 1.63803Z" fill="black"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_876_66097">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.0 KiB |
@ -1,15 +0,0 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_876_66101)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.68755 6.6936L13.3125 8.79221V12.9916L9.68755 10.8919V6.6936Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.7095 8.79221V12.9916L17.3333 10.8919V6.6936L13.7095 8.79221Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.66667 4.3501V8.54841L9.29051 10.6481V6.44981L5.66667 4.3501Z" fill="black"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.68755 15.5504L13.3114 17.6501V13.4793V13.4518L9.68755 11.3521V15.5504Z" fill="black"/>
|
||||
<path d="M24 20.75C24 22.5449 22.5449 24 20.75 24C20.7314 24 20.7129 23.9998 20.6944 23.9995L16.25 24.0001C15.0074 24.0001 14 22.9926 14 21.75C14 20.5074 15.0074 19.5 16.25 19.5C16.7562 19.5 17.2234 19.6672 17.5994 19.9494C17.956 18.5416 19.2314 17.5 20.75 17.5C22.5449 17.5 24 18.9551 24 20.75Z" fill="black"/>
|
||||
<path d="M4.8 1H18.2C19.0566 1 19.6389 1.00078 20.089 1.03755C20.5274 1.07337 20.7516 1.1383 20.908 1.21799C21.2843 1.40973 21.5903 1.71569 21.782 2.09202C21.8617 2.24842 21.9266 2.47262 21.9624 2.91104C21.9992 3.36113 22 3.94342 22 4.8V16.1662C22.3512 16.2617 22.6862 16.3966 23 16.5657V4.8C23 3.11984 23 2.27976 22.673 1.63803C22.3854 1.07354 21.9265 0.614601 21.362 0.32698C20.7202 0 19.8802 0 18.2 0H4.8C3.11984 0 2.27976 0 1.63803 0.32698C1.07354 0.614601 0.614601 1.07354 0.32698 1.63803C0 2.27976 0 3.11984 0 4.8V18.2C0 19.8802 0 20.7202 0.32698 21.362C0.614601 21.9265 1.07354 22.3854 1.63803 22.673C2.27976 23 3.11984 23 4.8 23H12.7134C12.6017 22.684 12.5311 22.3485 12.5082 22H4.8C3.94342 22 3.36113 21.9992 2.91104 21.9624C2.47262 21.9266 2.24842 21.8617 2.09202 21.782C1.71569 21.5903 1.40973 21.2843 1.21799 20.908C1.1383 20.7516 1.07337 20.5274 1.03755 20.089C1.00078 19.6389 1 19.0566 1 18.2V4.8C1 3.94342 1.00078 3.36113 1.03755 2.91104C1.07337 2.47262 1.1383 2.24842 1.21799 2.09202C1.40973 1.71569 1.71569 1.40973 2.09202 1.21799C2.24842 1.1383 2.47262 1.07337 2.91104 1.03755C3.36113 1.00078 3.94342 1 4.8 1Z" fill="black"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_876_66101">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.2 KiB |
@ -1,356 +0,0 @@
|
||||
Copyright (c) 2020 HashiCorp, Inc.
|
||||
|
||||
Mozilla Public License, version 2.0
|
||||
|
||||
1. Definitions
|
||||
|
||||
1.1. “Contributor”
|
||||
|
||||
means each individual or legal entity that creates, contributes to the
|
||||
creation of, or owns Covered Software.
|
||||
|
||||
1.2. “Contributor Version”
|
||||
|
||||
means the combination of the Contributions of others (if any) used by a
|
||||
Contributor and that particular Contributor’s Contribution.
|
||||
|
||||
1.3. “Contribution”
|
||||
|
||||
means Covered Software of a particular Contributor.
|
||||
|
||||
1.4. “Covered Software”
|
||||
|
||||
means Source Code Form to which the initial Contributor has attached the
|
||||
notice in Exhibit A, the Executable Form of such Source Code Form, and
|
||||
Modifications of such Source Code Form, in each case including portions
|
||||
thereof.
|
||||
|
||||
1.5. “Incompatible With Secondary Licenses”
|
||||
means
|
||||
|
||||
a. that the initial Contributor has attached the notice described in
|
||||
Exhibit B to the Covered Software; or
|
||||
|
||||
b. that the Covered Software was made available under the terms of version
|
||||
1.1 or earlier of the License, but not also under the terms of a
|
||||
Secondary License.
|
||||
|
||||
1.6. “Executable Form”
|
||||
|
||||
means any form of the work other than Source Code Form.
|
||||
|
||||
1.7. “Larger Work”
|
||||
|
||||
means a work that combines Covered Software with other material, in a separate
|
||||
file or files, that is not Covered Software.
|
||||
|
||||
1.8. “License”
|
||||
|
||||
means this document.
|
||||
|
||||
1.9. “Licensable”
|
||||
|
||||
means having the right to grant, to the maximum extent possible, whether at the
|
||||
time of the initial grant or subsequently, any and all of the rights conveyed by
|
||||
this License.
|
||||
|
||||
1.10. “Modifications”
|
||||
|
||||
means any of the following:
|
||||
|
||||
a. any file in Source Code Form that results from an addition to, deletion
|
||||
from, or modification of the contents of Covered Software; or
|
||||
|
||||
b. any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.11. “Patent Claims” of a Contributor
|
||||
|
||||
means any patent claim(s), including without limitation, method, process,
|
||||
and apparatus claims, in any patent Licensable by such Contributor that
|
||||
would be infringed, but for the grant of the License, by the making,
|
||||
using, selling, offering for sale, having made, import, or transfer of
|
||||
either its Contributions or its Contributor Version.
|
||||
|
||||
1.12. “Secondary License”
|
||||
|
||||
means either the GNU General Public License, Version 2.0, the GNU Lesser
|
||||
General Public License, Version 2.1, the GNU Affero General Public
|
||||
License, Version 3.0, or any later versions of those licenses.
|
||||
|
||||
1.13. “Source Code Form”
|
||||
|
||||
means the form of the work preferred for making modifications.
|
||||
|
||||
1.14. “You” (or “Your”)
|
||||
|
||||
means an individual or a legal entity exercising rights under this
|
||||
License. For legal entities, “You” includes any entity that controls, is
|
||||
controlled by, or is under common control with You. For purposes of this
|
||||
definition, “control” means (a) the power, direct or indirect, to cause
|
||||
the direction or management of such entity, whether by contract or
|
||||
otherwise, or (b) ownership of more than fifty percent (50%) of the
|
||||
outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
|
||||
2. License Grants and Conditions
|
||||
|
||||
2.1. Grants
|
||||
|
||||
Each Contributor hereby grants You a world-wide, royalty-free,
|
||||
non-exclusive license:
|
||||
|
||||
a. under intellectual property rights (other than patent or trademark)
|
||||
Licensable by such Contributor to use, reproduce, make available,
|
||||
modify, display, perform, distribute, and otherwise exploit its
|
||||
Contributions, either on an unmodified basis, with Modifications, or as
|
||||
part of a Larger Work; and
|
||||
|
||||
b. under Patent Claims of such Contributor to make, use, sell, offer for
|
||||
sale, have made, import, and otherwise transfer either its Contributions
|
||||
or its Contributor Version.
|
||||
|
||||
2.2. Effective Date
|
||||
|
||||
The licenses granted in Section 2.1 with respect to any Contribution become
|
||||
effective for each Contribution on the date the Contributor first distributes
|
||||
such Contribution.
|
||||
|
||||
2.3. Limitations on Grant Scope
|
||||
|
||||
The licenses granted in this Section 2 are the only rights granted under this
|
||||
License. No additional rights or licenses will be implied from the distribution
|
||||
or licensing of Covered Software under this License. Notwithstanding Section
|
||||
2.1(b) above, no patent license is granted by a Contributor:
|
||||
|
||||
a. for any code that a Contributor has removed from Covered Software; or
|
||||
|
||||
b. for infringements caused by: (i) Your and any other third party’s
|
||||
modifications of Covered Software, or (ii) the combination of its
|
||||
Contributions with other software (except as part of its Contributor
|
||||
Version); or
|
||||
|
||||
c. under Patent Claims infringed by Covered Software in the absence of its
|
||||
Contributions.
|
||||
|
||||
This License does not grant any rights in the trademarks, service marks, or
|
||||
logos of any Contributor (except as may be necessary to comply with the
|
||||
notice requirements in Section 3.4).
|
||||
|
||||
2.4. Subsequent Licenses
|
||||
|
||||
No Contributor makes additional grants as a result of Your choice to
|
||||
distribute the Covered Software under a subsequent version of this License
|
||||
(see Section 10.2) or under the terms of a Secondary License (if permitted
|
||||
under the terms of Section 3.3).
|
||||
|
||||
2.5. Representation
|
||||
|
||||
Each Contributor represents that the Contributor believes its Contributions
|
||||
are its original creation(s) or it has sufficient rights to grant the
|
||||
rights to its Contributions conveyed by this License.
|
||||
|
||||
2.6. Fair Use
|
||||
|
||||
This License is not intended to limit any rights You have under applicable
|
||||
copyright doctrines of fair use, fair dealing, or other equivalents.
|
||||
|
||||
2.7. Conditions
|
||||
|
||||
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
|
||||
Section 2.1.
|
||||
|
||||
|
||||
3. Responsibilities
|
||||
|
||||
3.1. Distribution of Source Form
|
||||
|
||||
All distribution of Covered Software in Source Code Form, including any
|
||||
Modifications that You create or to which You contribute, must be under the
|
||||
terms of this License. You must inform recipients that the Source Code Form
|
||||
of the Covered Software is governed by the terms of this License, and how
|
||||
they can obtain a copy of this License. You may not attempt to alter or
|
||||
restrict the recipients’ rights in the Source Code Form.
|
||||
|
||||
3.2. Distribution of Executable Form
|
||||
|
||||
If You distribute Covered Software in Executable Form then:
|
||||
|
||||
a. such Covered Software must also be made available in Source Code Form,
|
||||
as described in Section 3.1, and You must inform recipients of the
|
||||
Executable Form how they can obtain a copy of such Source Code Form by
|
||||
reasonable means in a timely manner, at a charge no more than the cost
|
||||
of distribution to the recipient; and
|
||||
|
||||
b. You may distribute such Executable Form under the terms of this License,
|
||||
or sublicense it under different terms, provided that the license for
|
||||
the Executable Form does not attempt to limit or alter the recipients’
|
||||
rights in the Source Code Form under this License.
|
||||
|
||||
3.3. Distribution of a Larger Work
|
||||
|
||||
You may create and distribute a Larger Work under terms of Your choice,
|
||||
provided that You also comply with the requirements of this License for the
|
||||
Covered Software. If the Larger Work is a combination of Covered Software
|
||||
with a work governed by one or more Secondary Licenses, and the Covered
|
||||
Software is not Incompatible With Secondary Licenses, this License permits
|
||||
You to additionally distribute such Covered Software under the terms of
|
||||
such Secondary License(s), so that the recipient of the Larger Work may, at
|
||||
their option, further distribute the Covered Software under the terms of
|
||||
either this License or such Secondary License(s).
|
||||
|
||||
3.4. Notices
|
||||
|
||||
You may not remove or alter the substance of any license notices (including
|
||||
copyright notices, patent notices, disclaimers of warranty, or limitations
|
||||
of liability) contained within the Source Code Form of the Covered
|
||||
Software, except that You may alter any license notices to the extent
|
||||
required to remedy known factual inaccuracies.
|
||||
|
||||
3.5. Application of Additional Terms
|
||||
|
||||
You may choose to offer, and to charge a fee for, warranty, support,
|
||||
indemnity or liability obligations to one or more recipients of Covered
|
||||
Software. However, You may do so only on Your own behalf, and not on behalf
|
||||
of any Contributor. You must make it absolutely clear that any such
|
||||
warranty, support, indemnity, or liability obligation is offered by You
|
||||
alone, and You hereby agree to indemnify every Contributor for any
|
||||
liability incurred by such Contributor as a result of warranty, support,
|
||||
indemnity or liability terms You offer. You may include additional
|
||||
disclaimers of warranty and limitations of liability specific to any
|
||||
jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
|
||||
If it is impossible for You to comply with any of the terms of this License
|
||||
with respect to some or all of the Covered Software due to statute, judicial
|
||||
order, or regulation then You must: (a) comply with the terms of this License
|
||||
to the maximum extent possible; and (b) describe the limitations and the code
|
||||
they affect. Such description must be placed in a text file included with all
|
||||
distributions of the Covered Software under this License. Except to the
|
||||
extent prohibited by statute or regulation, such description must be
|
||||
sufficiently detailed for a recipient of ordinary skill to be able to
|
||||
understand it.
|
||||
|
||||
5. Termination
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically if You
|
||||
fail to comply with any of its terms. However, if You become compliant,
|
||||
then the rights granted under this License from a particular Contributor
|
||||
are reinstated (a) provisionally, unless and until such Contributor
|
||||
explicitly and finally terminates Your grants, and (b) on an ongoing basis,
|
||||
if such Contributor fails to notify You of the non-compliance by some
|
||||
reasonable means prior to 60 days after You have come back into compliance.
|
||||
Moreover, Your grants from a particular Contributor are reinstated on an
|
||||
ongoing basis if such Contributor notifies You of the non-compliance by
|
||||
some reasonable means, this is the first time You have received notice of
|
||||
non-compliance with this License from such Contributor, and You become
|
||||
compliant prior to 30 days after Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent
|
||||
infringement claim (excluding declaratory judgment actions, counter-claims,
|
||||
and cross-claims) alleging that a Contributor Version directly or
|
||||
indirectly infringes any patent, then the rights granted to You by any and
|
||||
all Contributors for the Covered Software under Section 2.1 of this License
|
||||
shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
|
||||
license agreements (excluding distributors and resellers) which have been
|
||||
validly granted by You or Your distributors under this License prior to
|
||||
termination shall survive termination.
|
||||
|
||||
6. Disclaimer of Warranty
|
||||
|
||||
Covered Software is provided under this License on an “as is” basis, without
|
||||
warranty of any kind, either expressed, implied, or statutory, including,
|
||||
without limitation, warranties that the Covered Software is free of defects,
|
||||
merchantable, fit for a particular purpose or non-infringing. The entire
|
||||
risk as to the quality and performance of the Covered Software is with You.
|
||||
Should any Covered Software prove defective in any respect, You (not any
|
||||
Contributor) assume the cost of any necessary servicing, repair, or
|
||||
correction. This disclaimer of warranty constitutes an essential part of this
|
||||
License. No use of any Covered Software is authorized under this License
|
||||
except under this disclaimer.
|
||||
|
||||
7. Limitation of Liability
|
||||
|
||||
Under no circumstances and under no legal theory, whether tort (including
|
||||
negligence), contract, or otherwise, shall any Contributor, or anyone who
|
||||
distributes Covered Software as permitted above, be liable to You for any
|
||||
direct, indirect, special, incidental, or consequential damages of any
|
||||
character including, without limitation, damages for lost profits, loss of
|
||||
goodwill, work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses, even if such party shall have been
|
||||
informed of the possibility of such damages. This limitation of liability
|
||||
shall not apply to liability for death or personal injury resulting from such
|
||||
party’s negligence to the extent applicable law prohibits such limitation.
|
||||
Some jurisdictions do not allow the exclusion or limitation of incidental or
|
||||
consequential damages, so this exclusion and limitation may not apply to You.
|
||||
|
||||
8. Litigation
|
||||
|
||||
Any litigation relating to this License may be brought only in the courts of
|
||||
a jurisdiction where the defendant maintains its principal place of business
|
||||
and such litigation shall be governed by laws of that jurisdiction, without
|
||||
reference to its conflict-of-law provisions. Nothing in this Section shall
|
||||
prevent a party’s ability to bring cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
|
||||
This License represents the complete agreement concerning the subject matter
|
||||
hereof. If any provision of this License is held to be unenforceable, such
|
||||
provision shall be reformed only to the extent necessary to make it
|
||||
enforceable. Any law or regulation which provides that the language of a
|
||||
contract shall be construed against the drafter shall not be used to construe
|
||||
this License against a Contributor.
|
||||
|
||||
|
||||
10. Versions of the License
|
||||
|
||||
10.1. New Versions
|
||||
|
||||
Mozilla Foundation is the license steward. Except as provided in Section
|
||||
10.3, no one other than the license steward has the right to modify or
|
||||
publish new versions of this License. Each version will be given a
|
||||
distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions
|
||||
|
||||
You may distribute the Covered Software under the terms of the version of
|
||||
the License under which You originally received the Covered Software, or
|
||||
under the terms of any subsequent version published by the license
|
||||
steward.
|
||||
|
||||
10.3. Modified Versions
|
||||
|
||||
If you create software not governed by this License, and you want to
|
||||
create a new license for such software, you may create and use a modified
|
||||
version of this License if you rename the license and remove any
|
||||
references to the name of the license steward (except to note that such
|
||||
modified license differs from this License).
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
|
||||
If You choose to distribute Source Code Form that is Incompatible With
|
||||
Secondary Licenses under the terms of this version of the License, the
|
||||
notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice
|
||||
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular file, then
|
||||
You may include the notice in a location (such as a LICENSE file in a relevant
|
||||
directory) where a recipient would be likely to look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - “Incompatible With Secondary Licenses” Notice
|
||||
|
||||
This Source Code Form is “Incompatible
|
||||
With Secondary Licenses”, as defined by
|
||||
the Mozilla Public License, v. 2.0.
|
||||
|
@ -1,81 +0,0 @@
|
||||
{
|
||||
"comments": {
|
||||
"lineComment": "#",
|
||||
"blockComment": [
|
||||
"/*",
|
||||
"*/"
|
||||
]
|
||||
},
|
||||
"brackets": [
|
||||
[
|
||||
"{",
|
||||
"}"
|
||||
],
|
||||
[
|
||||
"[",
|
||||
"]"
|
||||
],
|
||||
[
|
||||
"(",
|
||||
")"
|
||||
]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
{
|
||||
"open": "{",
|
||||
"close": "}"
|
||||
},
|
||||
{
|
||||
"open": "[",
|
||||
"close": "]"
|
||||
},
|
||||
{
|
||||
"open": "(",
|
||||
"close": ")"
|
||||
},
|
||||
{
|
||||
"open": "\"",
|
||||
"close": "\"",
|
||||
"notIn": [
|
||||
"string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"open": "'",
|
||||
"close": "'",
|
||||
"notIn": [
|
||||
"string",
|
||||
"comment"
|
||||
]
|
||||
}
|
||||
],
|
||||
"autoCloseBefore": ";:.,=}])> \n\t\"",
|
||||
"surroundingPairs": [
|
||||
[
|
||||
"{",
|
||||
"}"
|
||||
],
|
||||
[
|
||||
"[",
|
||||
"]"
|
||||
],
|
||||
[
|
||||
"(",
|
||||
")"
|
||||
],
|
||||
[
|
||||
"\"",
|
||||
"\""
|
||||
],
|
||||
[
|
||||
"'",
|
||||
"'"
|
||||
]
|
||||
],
|
||||
"folding": {
|
||||
"markers": {
|
||||
"start": "^\\s*#region",
|
||||
"end": "^\\s*#endregion"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
/*!
|
||||
* mime-db
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015-2022 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/*!
|
||||
* mime-types
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
@ -1,968 +0,0 @@
|
||||
{
|
||||
"icon": "assets/icons/terraform_logo_mark_light_universal.png",
|
||||
"name": "terraform",
|
||||
"displayName": "HashiCorp Terraform",
|
||||
"description": "Syntax highlighting and autocompletion for Terraform",
|
||||
"version": "2.32.0",
|
||||
"publisher": "hashicorp",
|
||||
"appInsightsKey": "885372d2-6f3c-499f-9d25-b8b219983a52",
|
||||
"license": "MPL-2.0",
|
||||
"preview": false,
|
||||
"private": true,
|
||||
"extensionKind": [
|
||||
"workspace"
|
||||
],
|
||||
"engines": {
|
||||
"npm": "~10.X",
|
||||
"node": "~18.X",
|
||||
"vscode": "^1.86.2"
|
||||
},
|
||||
"langServer": {
|
||||
"version": "0.34.0"
|
||||
},
|
||||
"syntax": {
|
||||
"version": "0.5.0"
|
||||
},
|
||||
"qna": "https://discuss.hashicorp.com/c/terraform-core/terraform-editor-integrations/46",
|
||||
"bugs": {
|
||||
"url": "https://github.com/hashicorp/vscode-terraform/issues",
|
||||
"email": "terraform-vscode@hashicorp.com"
|
||||
},
|
||||
"categories": [
|
||||
"Programming Languages",
|
||||
"Other",
|
||||
"Formatters",
|
||||
"Linters"
|
||||
],
|
||||
"keywords": [
|
||||
"devops",
|
||||
"terraform",
|
||||
"hcl"
|
||||
],
|
||||
"galleryBanner": {
|
||||
"color": "#FFF",
|
||||
"theme": "light"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/hashicorp/vscode-terraform.git"
|
||||
},
|
||||
"activationEvents": [
|
||||
"onAuthenticationRequest:terraform",
|
||||
"onView:terraform-modules",
|
||||
"workspaceContains:**/*.tf",
|
||||
"workspaceContains:**/*.tfvars"
|
||||
],
|
||||
"main": "./out/extension",
|
||||
"browser": "./out/web/extension",
|
||||
"contributes": {
|
||||
"languages": [
|
||||
{
|
||||
"id": "terraform",
|
||||
"aliases": [
|
||||
"Terraform",
|
||||
"terraform"
|
||||
],
|
||||
"extensions": [
|
||||
".tf"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
},
|
||||
{
|
||||
"id": "terraform-vars",
|
||||
"extensions": [
|
||||
".tfvars"
|
||||
],
|
||||
"configuration": "./language-configuration.json"
|
||||
},
|
||||
{
|
||||
"id": "terraform-stack",
|
||||
"aliases": [
|
||||
"Terraform Stack"
|
||||
],
|
||||
"extensions": [
|
||||
".tfstack.hcl"
|
||||
],
|
||||
"configuration": "./language-configuration.json",
|
||||
"icon": {
|
||||
"dark": "assets/icons/terraform_stacks.svg",
|
||||
"light": "assets/icons/terraform_stacks.svg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "terraform-deploy",
|
||||
"aliases": [
|
||||
"Terraform Deployment"
|
||||
],
|
||||
"extensions": [
|
||||
".tfdeploy.hcl"
|
||||
],
|
||||
"configuration": "./language-configuration.json",
|
||||
"icon": {
|
||||
"dark": "assets/icons/terraform_stacks.svg",
|
||||
"light": "assets/icons/terraform_stacks.svg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "json",
|
||||
"extensions": [
|
||||
".tfstate"
|
||||
]
|
||||
}
|
||||
],
|
||||
"grammars": [
|
||||
{
|
||||
"language": "terraform",
|
||||
"scopeName": "source.hcl.terraform",
|
||||
"path": "./syntaxes/terraform.tmGrammar.json"
|
||||
},
|
||||
{
|
||||
"language": "terraform-vars",
|
||||
"scopeName": "source.hcl.terraform",
|
||||
"path": "./syntaxes/terraform.tmGrammar.json"
|
||||
},
|
||||
{
|
||||
"language": "terraform-stack",
|
||||
"scopeName": "source.hcl",
|
||||
"path": "./syntaxes/hcl.tmGrammar.json"
|
||||
},
|
||||
{
|
||||
"language": "terraform-deploy",
|
||||
"scopeName": "source.hcl",
|
||||
"path": "./syntaxes/hcl.tmGrammar.json"
|
||||
}
|
||||
],
|
||||
"semanticTokenTypes": [
|
||||
{
|
||||
"id": "hcl-attrName",
|
||||
"superType": "property",
|
||||
"description": "Attribute name"
|
||||
},
|
||||
{
|
||||
"id": "hcl-blockType",
|
||||
"superType": "type",
|
||||
"description": "Block type"
|
||||
},
|
||||
{
|
||||
"id": "hcl-blockLabel",
|
||||
"superType": "enumMember",
|
||||
"description": "Block label"
|
||||
},
|
||||
{
|
||||
"id": "hcl-bool",
|
||||
"superType": "keyword",
|
||||
"description": "Boolean"
|
||||
},
|
||||
{
|
||||
"id": "hcl-string",
|
||||
"superType": "string",
|
||||
"description": "String"
|
||||
},
|
||||
{
|
||||
"id": "hcl-number",
|
||||
"superType": "number",
|
||||
"description": "Number"
|
||||
},
|
||||
{
|
||||
"id": "hcl-objectKey",
|
||||
"superType": "parameter",
|
||||
"description": "Object key"
|
||||
},
|
||||
{
|
||||
"id": "hcl-mapKey",
|
||||
"superType": "parameter",
|
||||
"description": "Map key"
|
||||
},
|
||||
{
|
||||
"id": "hcl-keyword",
|
||||
"superType": "variable",
|
||||
"description": "Keyword"
|
||||
},
|
||||
{
|
||||
"id": "hcl-referenceStep",
|
||||
"superType": "variable",
|
||||
"description": "Reference step"
|
||||
},
|
||||
{
|
||||
"id": "hcl-typeComplex",
|
||||
"superType": "keyword",
|
||||
"description": "Type (complex)"
|
||||
},
|
||||
{
|
||||
"id": "hcl-typePrimitive",
|
||||
"superType": "keyword",
|
||||
"description": "Type (primitive)"
|
||||
},
|
||||
{
|
||||
"id": "hcl-functionName",
|
||||
"superType": "function",
|
||||
"description": "Function name"
|
||||
}
|
||||
],
|
||||
"semanticTokenScopes": [
|
||||
{
|
||||
"scopes": {
|
||||
"hcl-attrName": [
|
||||
"variable.other.property"
|
||||
],
|
||||
"hcl-blockType": [
|
||||
"entity.name.type"
|
||||
],
|
||||
"hcl-blockLabel": [
|
||||
"variable.other.enummember"
|
||||
],
|
||||
"hcl-bool": [
|
||||
"keyword.control"
|
||||
],
|
||||
"hcl-string": [
|
||||
"string"
|
||||
],
|
||||
"hcl-number": [
|
||||
"constant.numeric"
|
||||
],
|
||||
"hcl-objectKey": [
|
||||
"variable.parameter"
|
||||
],
|
||||
"hcl-mapKey": [
|
||||
"variable.parameter"
|
||||
],
|
||||
"hcl-keyword": [
|
||||
"keyword.control"
|
||||
],
|
||||
"hcl-referenceStep": [
|
||||
"variable.other.readwrite"
|
||||
],
|
||||
"hcl-typeComplex": [
|
||||
"keyword.control"
|
||||
],
|
||||
"hcl-typePrimitive": [
|
||||
"keyword.control"
|
||||
],
|
||||
"hcl-functionName": [
|
||||
"support.function"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"semanticTokenModifiers": [
|
||||
{
|
||||
"id": "hcl-dependent",
|
||||
"description": "Dependent"
|
||||
},
|
||||
{
|
||||
"id": "terraform-data",
|
||||
"description": "Data source"
|
||||
},
|
||||
{
|
||||
"id": "terraform-locals",
|
||||
"description": "Locals"
|
||||
},
|
||||
{
|
||||
"id": "terraform-module",
|
||||
"description": "Module"
|
||||
},
|
||||
{
|
||||
"id": "terraform-output",
|
||||
"description": "Output"
|
||||
},
|
||||
{
|
||||
"id": "terraform-provider",
|
||||
"description": "Provider"
|
||||
},
|
||||
{
|
||||
"id": "terraform-resource",
|
||||
"description": "Resource"
|
||||
},
|
||||
{
|
||||
"id": "terraform-provisioner",
|
||||
"description": "Provisioner"
|
||||
},
|
||||
{
|
||||
"id": "terraform-connection",
|
||||
"description": "Connection"
|
||||
},
|
||||
{
|
||||
"id": "terraform-variable",
|
||||
"description": "Variable"
|
||||
},
|
||||
{
|
||||
"id": "terraform-terraform",
|
||||
"description": "Terraform"
|
||||
},
|
||||
{
|
||||
"id": "terraform-backend",
|
||||
"description": "Backend"
|
||||
},
|
||||
{
|
||||
"id": "terraform-name",
|
||||
"description": "Name"
|
||||
},
|
||||
{
|
||||
"id": "terraform-type",
|
||||
"description": "Type"
|
||||
},
|
||||
{
|
||||
"id": "terraform-requiredProviders",
|
||||
"description": "Required providers"
|
||||
}
|
||||
],
|
||||
"icons": {
|
||||
"run-status-running": {
|
||||
"description": "Run Status icon",
|
||||
"default": {
|
||||
"fontPath": "./assets/icons/running.woff",
|
||||
"fontCharacter": "D"
|
||||
}
|
||||
}
|
||||
},
|
||||
"snippets": [
|
||||
{
|
||||
"language": "terraform",
|
||||
"path": "./snippets/terraform.json"
|
||||
}
|
||||
],
|
||||
"configuration": [
|
||||
{
|
||||
"title": "General",
|
||||
"order": 0,
|
||||
"properties": {
|
||||
"terraform.codelens.referenceCount": {
|
||||
"scope": "window",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Display reference counts above top level blocks and attributes."
|
||||
},
|
||||
"terraform.validation.enableEnhancedValidation": {
|
||||
"scope": "window",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable enhanced validation of Terraform files and modules"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Language Server",
|
||||
"order": 1,
|
||||
"properties": {
|
||||
"terraform.languageServer.enable": {
|
||||
"scope": "window",
|
||||
"order": "0",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Enable Terraform Language Server"
|
||||
},
|
||||
"terraform.languageServer.path": {
|
||||
"order": "1",
|
||||
"scope": "machine",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Path to the Terraform Language Server binary (optional)"
|
||||
},
|
||||
"terraform.languageServer.args": {
|
||||
"order": "2",
|
||||
"scope": "machine",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [
|
||||
"serve"
|
||||
],
|
||||
"description": "Arguments to pass to language server binary"
|
||||
},
|
||||
"terraform.languageServer.tcp.port": {
|
||||
"order": 4,
|
||||
"type": [
|
||||
"number",
|
||||
null
|
||||
],
|
||||
"scope": "machine",
|
||||
"default": null,
|
||||
"markdownDescription": "Language server TCP port to connect to. This is not compatible with `#terraform.languageServer.path#`. This is used when you want the extension to connect via TCP to an already running language server process."
|
||||
},
|
||||
"terraform.languageServer.ignoreSingleFileWarning": {
|
||||
"order": "3",
|
||||
"scope": "window",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Enable warning when opening a single Terraform file instead of a Terraform folder. Enabling this will prevent the message being sent"
|
||||
},
|
||||
"terraform.languageServer.indexing.ignorePaths": {
|
||||
"scope": "machine",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [],
|
||||
"description": "Per-workspace list of paths for the language server to ignore when indexing files"
|
||||
},
|
||||
"terraform.languageServer.indexing.ignoreDirectoryNames": {
|
||||
"scope": "machine",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": [],
|
||||
"description": "Per-workspace list of directory names for the language server to ignore when indexing files"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Terraform Features",
|
||||
"order": 3,
|
||||
"properties": {
|
||||
"terraform.languageServer.terraform.path": {
|
||||
"order": 0,
|
||||
"scope": "machine",
|
||||
"type": "string",
|
||||
"description": "Path to the Terraform binary used by the Terraform Language Server"
|
||||
},
|
||||
"terraform.languageServer.terraform.timeout": {
|
||||
"order": 1,
|
||||
"scope": "machine",
|
||||
"type": "string",
|
||||
"description": "Overrides Terraform execution timeout (e.g. 30s) used by the Terraform Language Server"
|
||||
},
|
||||
"terraform.languageServer.terraform.logFilePath": {
|
||||
"order": 2,
|
||||
"scope": "machine",
|
||||
"type": "string",
|
||||
"markdownDescription": "Path to a file (`TF_LOG_PATH`) for Terraform executions to be logged used by the the Terraform Language Server. Support for variables (e.g. timestamp, pid, ppid) via Go template syntax `{{varName}}`"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Experimental Features",
|
||||
"order": 4,
|
||||
"properties": {
|
||||
"terraform.experimentalFeatures.validateOnSave": {
|
||||
"description": "Enable validating the currently open file on save",
|
||||
"scope": "window",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"terraform.experimentalFeatures.prefillRequiredFields": {
|
||||
"markdownDescription": "Enable autocompletion for required fields when completing Terraform blocks. Combine with `#editor.suggest.preview#` and the editor will provide inline snippet suggestions for blocks of code",
|
||||
"scope": "window",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"commands": [
|
||||
{
|
||||
"command": "terraform.generateBugReport",
|
||||
"title": "HashiCorp Terraform: Generate Bug Report"
|
||||
},
|
||||
{
|
||||
"command": "terraform.enableLanguageServer",
|
||||
"title": "HashiCorp Terraform: Enable Language Server"
|
||||
},
|
||||
{
|
||||
"command": "terraform.disableLanguageServer",
|
||||
"title": "HashiCorp Terraform: Disable Language Server"
|
||||
},
|
||||
{
|
||||
"command": "terraform.init",
|
||||
"title": "HashiCorp Terraform: init"
|
||||
},
|
||||
{
|
||||
"command": "terraform.initCurrent",
|
||||
"title": "HashiCorp Terraform: init current folder",
|
||||
"icon": "$(cloud-download)"
|
||||
},
|
||||
{
|
||||
"command": "terraform.validate",
|
||||
"title": "HashiCorp Terraform: validate"
|
||||
},
|
||||
{
|
||||
"command": "terraform.plan",
|
||||
"title": "HashiCorp Terraform: plan"
|
||||
},
|
||||
{
|
||||
"command": "terraform.modules.refreshList",
|
||||
"title": "Refresh Module Calls",
|
||||
"icon": "$(refresh)"
|
||||
},
|
||||
{
|
||||
"command": "terraform.providers.refreshList",
|
||||
"title": "Refresh Module Providers",
|
||||
"icon": "$(refresh)"
|
||||
},
|
||||
{
|
||||
"command": "terraform.modules.openDocumentation",
|
||||
"title": "Open Documentation",
|
||||
"icon": "$(book)"
|
||||
},
|
||||
{
|
||||
"command": "terraform.providers.openDocumentation",
|
||||
"title": "Open Documentation",
|
||||
"icon": "$(book)"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.login",
|
||||
"title": "HCP Terraform: Login",
|
||||
"enablement": "terraform.cloud.signed-in === false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.refresh",
|
||||
"title": "Refresh",
|
||||
"icon": "$(refresh)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.viewInBrowser",
|
||||
"title": "View workspace",
|
||||
"icon": "$(globe)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.runs.refresh",
|
||||
"title": "Refresh",
|
||||
"icon": "$(refresh)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewInBrowser",
|
||||
"title": "View run",
|
||||
"icon": "$(globe)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.plan.downloadLog",
|
||||
"title": "View raw plan log",
|
||||
"icon": "$(console)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewPlan",
|
||||
"title": "View plan output",
|
||||
"icon": "$(output)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.apply.downloadLog",
|
||||
"title": "View raw apply log",
|
||||
"icon": "$(output)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewApply",
|
||||
"title": "View apply output",
|
||||
"icon": "$(output)"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.organization.picker",
|
||||
"title": "HCP Terraform: Pick Organization",
|
||||
"icon": "$(account)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.filterByProject",
|
||||
"title": "Filter by project",
|
||||
"icon": "$(filter)",
|
||||
"enablement": "terraform.cloud.signed-in"
|
||||
}
|
||||
],
|
||||
"menus": {
|
||||
"commandPalette": [
|
||||
{
|
||||
"command": "terraform.enableLanguageServer",
|
||||
"when": "config.terraform.languageServer.enable == false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.disableLanguageServer",
|
||||
"when": "config.terraform.languageServer.enable == true"
|
||||
},
|
||||
{
|
||||
"command": "terraform.init",
|
||||
"when": "config.terraform.languageServer.enable == true"
|
||||
},
|
||||
{
|
||||
"command": "terraform.initCurrent",
|
||||
"when": "config.terraform.languageServer.enable == true"
|
||||
},
|
||||
{
|
||||
"command": "terraform.validate",
|
||||
"when": "config.terraform.languageServer.enable == true"
|
||||
},
|
||||
{
|
||||
"command": "terraform.plan",
|
||||
"when": "config.terraform.languageServer.enable == true"
|
||||
},
|
||||
{
|
||||
"command": "terraform.modules.refreshList",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.providers.refreshList",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.modules.openDocumentation",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.providers.openDocumentation",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.login",
|
||||
"when": "terraform.cloud.signed-in === false && terraform.cloud.views.visible"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.organization.picker",
|
||||
"when": "terraform.cloud.signed-in"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.viewInBrowser",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewInBrowser",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.plan.downloadLog",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewPlan",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.runs.refresh",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.apply.downloadLog",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewApply",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.filterByProject",
|
||||
"when": "false"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.refresh",
|
||||
"when": "false"
|
||||
}
|
||||
],
|
||||
"view/title": [
|
||||
{
|
||||
"command": "terraform.modules.refreshList",
|
||||
"when": "view == terraform.modules",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "terraform.providers.refreshList",
|
||||
"when": "view == terraform.providers",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "terraform.initCurrent",
|
||||
"when": "view == terraform.providers",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.filterByProject",
|
||||
"when": "view == terraform.cloud.workspaces",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.organization.picker",
|
||||
"when": "view == terraform.cloud.workspaces",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.refresh",
|
||||
"when": "view == terraform.cloud.workspaces",
|
||||
"group": "navigation"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.runs.refresh",
|
||||
"when": "view == terraform.cloud.runs",
|
||||
"group": "navigation"
|
||||
}
|
||||
],
|
||||
"view/item/context": [
|
||||
{
|
||||
"command": "terraform.modules.openDocumentation",
|
||||
"when": "view == terraform.modules"
|
||||
},
|
||||
{
|
||||
"command": "terraform.providers.openDocumentation",
|
||||
"when": "view == terraform.providers && viewItem == moduleProviderHasDocs"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.workspaces.viewInBrowser",
|
||||
"when": "view == terraform.cloud.workspaces && viewItem =~ /hasLink/",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewInBrowser",
|
||||
"when": "view == terraform.cloud.runs && viewItem =~ /isRun/",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.plan.downloadLog",
|
||||
"when": "view == terraform.cloud.runs && viewItem =~ /hasRawPlan/",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewPlan",
|
||||
"when": "view == terraform.cloud.runs && viewItem =~ /hasStructuredPlan/",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.apply.downloadLog",
|
||||
"when": "view == terraform.cloud.runs && viewItem =~ /hasRawApply/",
|
||||
"group": "inline"
|
||||
},
|
||||
{
|
||||
"command": "terraform.cloud.run.viewApply",
|
||||
"when": "view == terraform.cloud.runs && viewItem =~ /hasStructuredApply/",
|
||||
"group": "inline"
|
||||
}
|
||||
]
|
||||
},
|
||||
"views": {
|
||||
"terraform": [
|
||||
{
|
||||
"id": "terraform.providers",
|
||||
"name": "Providers"
|
||||
},
|
||||
{
|
||||
"id": "terraform.modules",
|
||||
"name": "Module Calls"
|
||||
}
|
||||
],
|
||||
"terraform-cloud": [
|
||||
{
|
||||
"id": "terraform.cloud.workspaces",
|
||||
"name": "Workspaces",
|
||||
"contextualTitle": "HCP Terraform workspaces"
|
||||
},
|
||||
{
|
||||
"id": "terraform.cloud.runs",
|
||||
"name": "Runs",
|
||||
"contextualTitle": "HCP Terraform runs"
|
||||
}
|
||||
],
|
||||
"terraform-cloud-panel": [
|
||||
{
|
||||
"id": "terraform.cloud.run.plan",
|
||||
"name": "Plan",
|
||||
"when": "terraform.cloud.run.viewingPlan"
|
||||
},
|
||||
{
|
||||
"id": "terraform.cloud.run.apply",
|
||||
"name": "Apply",
|
||||
"when": "terraform.cloud.run.viewingApply"
|
||||
}
|
||||
]
|
||||
},
|
||||
"viewsContainers": {
|
||||
"activitybar": [
|
||||
{
|
||||
"id": "terraform",
|
||||
"title": "HashiCorp Terraform",
|
||||
"icon": "assets/icons/vs_code_terraform.svg"
|
||||
},
|
||||
{
|
||||
"id": "terraform-cloud",
|
||||
"title": "HCP Terraform",
|
||||
"icon": "assets/icons/vs_code_terraform_cloud.svg"
|
||||
}
|
||||
],
|
||||
"panel": [
|
||||
{
|
||||
"id": "terraform-cloud-panel",
|
||||
"title": "HCP Terraform",
|
||||
"icon": "assets/icons/vs_code_terraform_cloud.svg"
|
||||
}
|
||||
]
|
||||
},
|
||||
"viewsWelcome": [
|
||||
{
|
||||
"view": "terraform.providers",
|
||||
"contents": "This view requires the language server to be enabled:\n[Open Settings](command:terraform.openSettingsJson)",
|
||||
"when": "config.terraform.languageServer.enable === false"
|
||||
},
|
||||
{
|
||||
"view": "terraform.providers",
|
||||
"contents": "There are no open Terraform files. Please open a Terraform configuration file to see installed providers.",
|
||||
"when": "config.terraform.languageServer.enable && terraform.providers.documentOpened === false"
|
||||
},
|
||||
{
|
||||
"view": "terraform.providers",
|
||||
"contents": "The active document is not a Terraform file. Please open a Terraform configuration file to see installed providers.",
|
||||
"when": "config.terraform.languageServer.enable && terraform.providers.documentIsTerraform === false"
|
||||
},
|
||||
{
|
||||
"view": "terraform.providers",
|
||||
"contents": "There are no installed providers found for the current open file.\n[Learn more about providers](https://www.terraform.io/docs/language/providers/index.html)",
|
||||
"when": "config.terraform.languageServer.enable && terraform.providers.noProviders === true"
|
||||
},
|
||||
{
|
||||
"view": "terraform.providers",
|
||||
"contents": "The active editor cannot provide information about installed providers.\n[Learn more about providers](https://www.terraform.io/docs/language/providers/index.html)",
|
||||
"when": "config.terraform.languageServer.enable && terraform.providers.noResponse === true"
|
||||
},
|
||||
{
|
||||
"view": "terraform.modules",
|
||||
"contents": "This view requires the language server to be enabled:\n[Open Settings](command:terraform.openSettingsJson)",
|
||||
"when": "config.terraform.languageServer.enable === false"
|
||||
},
|
||||
{
|
||||
"view": "terraform.modules",
|
||||
"contents": "There are no open Terraform files. Please open a Terraform configuration file to see installed modules.",
|
||||
"when": "config.terraform.languageServer.enable && terraform.modules.documentOpened === false"
|
||||
},
|
||||
{
|
||||
"view": "terraform.modules",
|
||||
"contents": "The active document is not a Terraform file. Please open a Terraform configuration file to see installed modules.",
|
||||
"when": "config.terraform.languageServer.enable && terraform.modules.documentIsTerraform === false"
|
||||
},
|
||||
{
|
||||
"view": "terraform.modules",
|
||||
"contents": "There are no installed modules found for the current open file.\n[Learn more about modules](https://www.terraform.io/docs/language/modules/develop/index.html)",
|
||||
"when": "config.terraform.languageServer.enable && terraform.modules.noModules === true"
|
||||
},
|
||||
{
|
||||
"view": "terraform.modules",
|
||||
"contents": "The active editor cannot provide information about installed modules.\n[Learn more about modules](https://www.terraform.io/docs/language/modules/develop/index.html)",
|
||||
"when": "config.terraform.languageServer.enable && terraform.modules.noResponse === true"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.workspaces",
|
||||
"contents": "In order to use HCP Terraform features, you need to be logged in\n[Login to HCP Terraform](command:terraform.cloud.login)",
|
||||
"when": "terraform.cloud.signed-in === false"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.workspaces",
|
||||
"contents": "No organizations found for this token. Please create a new HCP Terraform organization to get started\n[Create or select an organization](command:terraform.cloud.organization.picker)",
|
||||
"when": "terraform.cloud.signed-in && !terraform.cloud.organizationsExist && !terraform.cloud.organizationsChosen"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.workspaces",
|
||||
"contents": "Please choose an organization:\n[Select a organization](command:terraform.cloud.organization.picker)",
|
||||
"when": "terraform.cloud.signed-in && terraform.cloud.organizationsExist && !terraform.cloud.organizationsChosen"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.workspaces",
|
||||
"contents": "There are no workspaces in this organization.\n[Create a new workspace](command:terraform.cloud.workspaces.picker)\n[Choose a different organization](command:terraform.cloud.organization.picker)",
|
||||
"when": "terraform.cloud.signed-in && terraform.cloud.organizationsExist && terraform.cloud.organizationsChosen && !terraform.cloud.projectFilterUsed && !terraform.cloud.workspacesExist && !terraform.cloud.pendingOrgMembership"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.workspaces",
|
||||
"contents": "You have not yet accepted the invitation to this organization\n[See pending invitations](command:terraform.cloud.organization.viewInBrowser)\n[Choose a different organization](command:terraform.cloud.organization.picker)",
|
||||
"when": "terraform.cloud.signed-in && terraform.cloud.organizationsExist && terraform.cloud.organizationsChosen && !terraform.cloud.projectFilterUsed && !terraform.cloud.workspacesExist && terraform.cloud.pendingOrgMembership"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.workspaces",
|
||||
"contents": "There are no workspaces in this project\n[Create a new workspace](command:terraform.cloud.workspaces.picker)\n[Clear filter](command:terraform.cloud.workspaces.resetProjectFilter)",
|
||||
"when": "terraform.cloud.signed-in && terraform.cloud.organizationsExist && terraform.cloud.organizationsChosen && terraform.cloud.projectFilterUsed && !terraform.cloud.workspacesExist"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.runs",
|
||||
"contents": "Select a workspace to view a list of runs"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.run.plan",
|
||||
"contents": "Select a run to view a plan"
|
||||
},
|
||||
{
|
||||
"view": "terraform.cloud.run.apply",
|
||||
"contents": "Select a run to view an apply"
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "npm run download:artifacts && cd src/test/e2e && npm install",
|
||||
"compile": "webpack",
|
||||
"compile:test": "tsc --project ./",
|
||||
"compile:test:watch": "tsc --project ./ --watch",
|
||||
"compile:prod": "webpack --mode production --devtool hidden-source-map",
|
||||
"watch": "webpack --watch --mode development",
|
||||
"web": "npm run compile && vscode-test-web --browserType=chromium --extensionDevelopmentPath=. ./testFixture",
|
||||
"web:serve": "npx serve --cors -l 5001",
|
||||
"web:tunnel": "npx localtunnel -p 5001",
|
||||
"download:artifacts": "ts-node ./build/downloader.ts",
|
||||
"vscode:prepublish": "npm run compile:prod",
|
||||
"package": "vsce package",
|
||||
"test": "npm run compile:test && vscode-test",
|
||||
"lint": "eslint src --ext ts",
|
||||
"prettier": "prettier \"**/*.+(js|json|ts)\"",
|
||||
"format": "npm run prettier -- --write",
|
||||
"check-format": "npm run prettier -- --check",
|
||||
"wdio": "npm run compile && wdio run ./src/test/e2e/wdio.conf.ts",
|
||||
"changelog:build": "changie batch auto && changie merge && npm i --package-lock-only"
|
||||
},
|
||||
"dependencies": {
|
||||
"@vscode/extension-telemetry": "^0.4.9",
|
||||
"@zodios/core": "^10.9.2",
|
||||
"@zodios/plugins": "^10.6.0",
|
||||
"axios": "^1.4.0",
|
||||
"semver": "^7.5.4",
|
||||
"vscode-languageclient": "^9.0.1",
|
||||
"vscode-uri": "^3.0.7",
|
||||
"which": "^3.0.1",
|
||||
"zod": "^3.21.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hashicorp/js-releases": "^1.7.1",
|
||||
"@playwright/browser-chromium": "^1.39.0",
|
||||
"@types/chai": "^4.3.5",
|
||||
"@types/glob": "^8.1.0",
|
||||
"@types/mocha": "^10.0.1",
|
||||
"@types/node": "^18.x",
|
||||
"@types/vscode": "~1.86",
|
||||
"@types/webpack-env": "^1.18.0",
|
||||
"@types/which": "^3.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.59.5",
|
||||
"@typescript-eslint/parser": "^5.59.5",
|
||||
"@vscode/test-cli": "^0.0.9",
|
||||
"@vscode/test-electron": "^2.3.9",
|
||||
"@vscode/test-web": "^0.0.50",
|
||||
"@vscode/vsce": "^2.19.0",
|
||||
"@wdio/cli": "^8.38.1",
|
||||
"@wdio/local-runner": "^8.38.0",
|
||||
"@wdio/mocha-framework": "^8.38.0",
|
||||
"@wdio/spec-reporter": "^8.38.0",
|
||||
"assert": "^2.0.0",
|
||||
"chai": "^4.3.7",
|
||||
"esbuild-loader": "^4.1.0",
|
||||
"eslint": "^8.40.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"mocha": "^10.2.0",
|
||||
"msw": "^2.0.11",
|
||||
"prettier": "^2.8.8",
|
||||
"process": "^0.11.10",
|
||||
"ts-loader": "^9.4.2",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "^5.1.3",
|
||||
"wdio-vscode-service": "^6.0.3",
|
||||
"wdio-wait-for": "^3.0.11",
|
||||
"webpack": "^5.82.0",
|
||||
"webpack-cli": "^5.1.1"
|
||||
},
|
||||
"__metadata": {
|
||||
"id": "4a23294b-fd16-4c51-9759-da9936474cf8",
|
||||
"publisherId": "a8dd781d-e144-400a-943c-417165981be2",
|
||||
"publisherDisplayName": "HashiCorp",
|
||||
"targetPlatform": "darwin-arm64",
|
||||
"isApplicationScoped": false,
|
||||
"isPreReleaseVersion": false,
|
||||
"hasPreReleaseVersion": false,
|
||||
"installedTimestamp": 1721074844275,
|
||||
"pinned": false,
|
||||
"preRelease": false,
|
||||
"source": "gallery"
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
{
|
||||
"For Each": {
|
||||
"prefix": "fore",
|
||||
"body": [
|
||||
"for_each = {",
|
||||
"\t${1:key} = \"${2:value}\"",
|
||||
"}"
|
||||
],
|
||||
"description": "The for_each meta-argument accepts a map or a set of strings, and creates an instance for each item in that map or set."
|
||||
},
|
||||
"Module": {
|
||||
"prefix": "module",
|
||||
"body": [
|
||||
"module \"${1:name}\" {",
|
||||
"\tsource = \"$2\"",
|
||||
"\t$3",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Output": {
|
||||
"prefix": "output",
|
||||
"body": [
|
||||
"output \"${1:name}\" {",
|
||||
"\tvalue = \"$2\"",
|
||||
"}"
|
||||
]
|
||||
},
|
||||
"Provisioner": {
|
||||
"prefix": "provisioner",
|
||||
"body": [
|
||||
"provisioner \"${1:name}\" {",
|
||||
"${2}",
|
||||
"}"
|
||||
],
|
||||
"description": "Provisioners can be used to model specific actions on the local machine or on a remote machine in order to prepare servers or other infrastructure objects for service."
|
||||
},
|
||||
"Empty variable": {
|
||||
"prefix": "vare",
|
||||
"body": [
|
||||
"variable \"${1:name}\" {",
|
||||
"\ttype = ${2|string,number,bool|}",
|
||||
"\t${3:description = \"${4:(optional) describe your variable}\"}",
|
||||
"}"
|
||||
],
|
||||
"description": "Variable (empty)"
|
||||
},
|
||||
"Map variable": {
|
||||
"prefix": "varm",
|
||||
"body": [
|
||||
"variable \"${1:name}\" {",
|
||||
"\ttype = map(${2|string,number,bool|})",
|
||||
"\t${3:description = \"${4:(optional) describe your variable}\"}",
|
||||
"\tdefault = {",
|
||||
"\t\t${5:key1} = \"${6:val1}\"",
|
||||
"\t\t${7:key2} = \"${8:val2}\"",
|
||||
"\t}",
|
||||
"}"
|
||||
],
|
||||
"description": "Variable (map)"
|
||||
}
|
||||
}
|
@ -1,791 +0,0 @@
|
||||
{
|
||||
"scopeName": "source.hcl",
|
||||
"name": "HashiCorp HCL",
|
||||
"uuid": "a14187be-98d8-42c1-ac89-bb5eaccf911e",
|
||||
"fileTypes": [
|
||||
"hcl"
|
||||
],
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_definition"
|
||||
},
|
||||
{
|
||||
"include": "#block"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"attribute_access": {
|
||||
"begin": "\\.(?!\\*)",
|
||||
"end": "[[:alpha:]][\\w-]*|\\d*",
|
||||
"comment": "Matches traversal attribute access such as .attr",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.accessor.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?!null|false|true)[[:alpha:]][\\w-]*",
|
||||
"comment": "Attribute name",
|
||||
"name": "variable.other.member.hcl"
|
||||
},
|
||||
{
|
||||
"match": "\\d+",
|
||||
"comment": "Optional attribute index",
|
||||
"name": "constant.numeric.integer.hcl"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"attribute_definition": {
|
||||
"name": "variable.declaration.hcl",
|
||||
"match": "(\\()?(\\b(?!null\\b|false\\b|true\\b)[[:alpha:]][[:alnum:]_-]*)(\\))?\\s*(\\=(?!\\=|\\>))\\s*",
|
||||
"comment": "Identifier \"=\" with optional parens",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.readwrite.hcl"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.operator.assignment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"attribute_splat": {
|
||||
"begin": "\\.",
|
||||
"end": "\\*",
|
||||
"comment": "Legacy attribute-only splat",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.accessor.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.splat.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"block": {
|
||||
"name": "meta.block.hcl",
|
||||
"begin": "([\\w][\\-\\w]*)([^?{\\r\\n]*)(\\{)",
|
||||
"end": "\\}",
|
||||
"comment": "This will match HCL blocks like `thing1 \"one\" \"two\" {` or `thing2 {`",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",
|
||||
"comment": "Block type",
|
||||
"name": "entity.name.type.hcl"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\\"[^\\\"\\r\\n]*\\\"",
|
||||
"comment": "Block label (String Literal)",
|
||||
"name": "variable.other.enummember.hcl"
|
||||
},
|
||||
{
|
||||
"match": "[[:alpha:]][[:alnum:]_-]*",
|
||||
"comment": "Block label (Indentifier)",
|
||||
"name": "variable.other.enummember.hcl"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.block.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.block.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_definition"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#block"
|
||||
}
|
||||
]
|
||||
},
|
||||
"block_inline_comments": {
|
||||
"name": "comment.block.hcl",
|
||||
"begin": "/\\*",
|
||||
"end": "\\*/",
|
||||
"comment": "Inline comments start with the /* sequence and end with the */ sequence, and may have any characters within except the ending sequence. An inline comment is considered equivalent to a whitespace sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"brackets": {
|
||||
"begin": "\\[",
|
||||
"end": "\\]",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.splat.hcl",
|
||||
"match": "\\*",
|
||||
"comment": "Splat operator"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#inline_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#inline_if_expression"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"char_escapes": {
|
||||
"name": "constant.character.escape.hcl",
|
||||
"match": "\\\\[nrt\"\\\\]|\\\\u(\\h{8}|\\h{4})",
|
||||
"comment": "Character Escapes"
|
||||
},
|
||||
"comma": {
|
||||
"name": "punctuation.separator.hcl",
|
||||
"match": "\\,",
|
||||
"comment": "Commas - used in certain expressions"
|
||||
},
|
||||
"comments": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#hash_line_comments"
|
||||
},
|
||||
{
|
||||
"include": "#double_slash_line_comments"
|
||||
},
|
||||
{
|
||||
"include": "#block_inline_comments"
|
||||
}
|
||||
]
|
||||
},
|
||||
"double_slash_line_comments": {
|
||||
"name": "comment.line.double-slash.hcl",
|
||||
"begin": "//",
|
||||
"end": "$\\n?",
|
||||
"comment": "Line comments start with // sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"expressions": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#literal_values"
|
||||
},
|
||||
{
|
||||
"include": "#operators"
|
||||
},
|
||||
{
|
||||
"include": "#tuple_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#object_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#brackets"
|
||||
},
|
||||
{
|
||||
"include": "#objects"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_access"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_splat"
|
||||
},
|
||||
{
|
||||
"include": "#functions"
|
||||
},
|
||||
{
|
||||
"include": "#parens"
|
||||
}
|
||||
]
|
||||
},
|
||||
"for_expression_body": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.word.hcl",
|
||||
"match": "\\bin\\b",
|
||||
"comment": "in keyword"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.conditional.hcl",
|
||||
"match": "\\bif\\b",
|
||||
"comment": "if keyword"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\:"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"functions": {
|
||||
"name": "meta.function-call.hcl",
|
||||
"begin": "([:\\-\\w]+)(\\()",
|
||||
"end": "\\)",
|
||||
"comment": "Built-in function calls",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b[[:alpha:]][\\w_-]*::([[:alpha:]][\\w_-]*::)?[[:alpha:]][\\w_-]*\\b",
|
||||
"name": "support.function.namespaced.hcl"
|
||||
},
|
||||
{
|
||||
"match": "\\b[[:alpha:]][\\w_-]*\\b",
|
||||
"name": "support.function.builtin.hcl"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hash_line_comments": {
|
||||
"name": "comment.line.number-sign.hcl",
|
||||
"begin": "#",
|
||||
"end": "$\\n?",
|
||||
"comment": "Line comments start with # sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"hcl_type_keywords": {
|
||||
"name": "storage.type.hcl",
|
||||
"match": "\\b(any|string|number|bool|list|set|map|tuple|object)\\b",
|
||||
"comment": "Type keywords known to HCL."
|
||||
},
|
||||
"heredoc": {
|
||||
"name": "string.unquoted.heredoc.hcl",
|
||||
"begin": "(\\<\\<\\-?)\\s*(\\w+)\\s*$",
|
||||
"end": "^\\s*\\2\\s*$",
|
||||
"comment": "String Heredoc",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.heredoc.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.heredoc.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.control.heredoc.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string_interpolation"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inline_for_expression": {
|
||||
"match": "(for)\\b(.*)\\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.hcl"
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\=\\>",
|
||||
"name": "storage.type.function.hcl"
|
||||
},
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"inline_if_expression": {
|
||||
"begin": "(if)\\b",
|
||||
"end": "\\n",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.conditional.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"language_constants": {
|
||||
"name": "constant.language.hcl",
|
||||
"match": "\\b(true|false|null)\\b",
|
||||
"comment": "Language Constants"
|
||||
},
|
||||
"literal_values": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#numeric_literals"
|
||||
},
|
||||
{
|
||||
"include": "#language_constants"
|
||||
},
|
||||
{
|
||||
"include": "#string_literals"
|
||||
},
|
||||
{
|
||||
"include": "#heredoc"
|
||||
},
|
||||
{
|
||||
"include": "#hcl_type_keywords"
|
||||
}
|
||||
]
|
||||
},
|
||||
"local_identifiers": {
|
||||
"name": "variable.other.readwrite.hcl",
|
||||
"match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",
|
||||
"comment": "Local Identifiers"
|
||||
},
|
||||
"numeric_literals": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.numeric.float.hcl",
|
||||
"match": "\\b\\d+([Ee][+-]?)\\d+\\b",
|
||||
"comment": "Integer, no fraction, optional exponent",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.exponent.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.float.hcl",
|
||||
"match": "\\b\\d+(\\.)\\d+(?:([Ee][+-]?)\\d+)?\\b",
|
||||
"comment": "Integer, fraction, optional exponent",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.decimal.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.exponent.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.integer.hcl",
|
||||
"match": "\\b\\d+\\b",
|
||||
"comment": "Integers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object_for_expression": {
|
||||
"begin": "(\\{)\\s?(for)\\b",
|
||||
"end": "\\}",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.braces.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "storage.type.function.hcl",
|
||||
"match": "\\=\\>"
|
||||
},
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object_key_values": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#literal_values"
|
||||
},
|
||||
{
|
||||
"include": "#operators"
|
||||
},
|
||||
{
|
||||
"include": "#tuple_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#object_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#heredoc"
|
||||
},
|
||||
{
|
||||
"include": "#functions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"objects": {
|
||||
"name": "meta.braces.hcl",
|
||||
"begin": "\\{",
|
||||
"end": "\\}",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#objects"
|
||||
},
|
||||
{
|
||||
"include": "#inline_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#inline_if_expression"
|
||||
},
|
||||
{
|
||||
"match": "\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*)\\s*(\\=(?!=))\\s*",
|
||||
"comment": "Literal, named object key",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "meta.mapping.key.hcl variable.other.readwrite.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^\\s*((\").*(\"))\\s*(\\=)\\s*",
|
||||
"comment": "String object key",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "meta.mapping.key.hcl string.quoted.double.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.hcl"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.string.end.hcl"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.operator.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "meta.mapping.key.hcl",
|
||||
"begin": "^\\s*\\(",
|
||||
"end": "(\\))\\s*(=|:)\\s*",
|
||||
"comment": "Computed object key (any expression between parens)",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#attribute_access"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_splat"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#object_key_values"
|
||||
}
|
||||
]
|
||||
},
|
||||
"operators": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\>\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\<\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\=\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\!\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\+"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\-"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\*"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\/"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\%"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\&\\&"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\|\\|"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\!"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\>"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\<"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\?"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\.\\.\\."
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\:"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\=\\>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"parens": {
|
||||
"begin": "\\(",
|
||||
"end": "\\)",
|
||||
"comment": "Parens - matched *after* function syntax",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"string_interpolation": {
|
||||
"name": "meta.interpolation.hcl",
|
||||
"begin": "(?<![%$])([%$]{)",
|
||||
"end": "\\}",
|
||||
"comment": "String interpolation",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.interpolation.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.other.interpolation.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.template.left.trim.hcl",
|
||||
"match": "\\~\\s",
|
||||
"comment": "Trim left whitespace"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.template.right.trim.hcl",
|
||||
"match": "\\s\\~",
|
||||
"comment": "Trim right whitespace"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.hcl",
|
||||
"match": "\\b(if|else|endif|for|in|endfor)\\b",
|
||||
"comment": "if/else/endif and for/in/endfor directives"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"string_literals": {
|
||||
"name": "string.quoted.double.hcl",
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"comment": "Strings",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string_interpolation"
|
||||
},
|
||||
{
|
||||
"include": "#char_escapes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tuple_for_expression": {
|
||||
"begin": "(\\[)\\s?(for)\\b",
|
||||
"end": "\\]",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.brackets.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,813 +0,0 @@
|
||||
{
|
||||
"scopeName": "source.hcl.terraform",
|
||||
"name": "HashiCorp Terraform",
|
||||
"uuid": "d9db10d3-db70-48aa-8d44-f96ccbaa29f3",
|
||||
"fileTypes": [
|
||||
"tf",
|
||||
"tfvars"
|
||||
],
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_definition"
|
||||
},
|
||||
{
|
||||
"include": "#block"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"attribute_access": {
|
||||
"begin": "\\.(?!\\*)",
|
||||
"end": "[[:alpha:]][\\w-]*|\\d*",
|
||||
"comment": "Matches traversal attribute access such as .attr",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.accessor.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "(?!null|false|true)[[:alpha:]][\\w-]*",
|
||||
"comment": "Attribute name",
|
||||
"name": "variable.other.member.hcl"
|
||||
},
|
||||
{
|
||||
"match": "\\d+",
|
||||
"comment": "Optional attribute index",
|
||||
"name": "constant.numeric.integer.hcl"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"attribute_definition": {
|
||||
"name": "variable.declaration.hcl",
|
||||
"match": "(\\()?(\\b(?!null\\b|false\\b|true\\b)[[:alpha:]][[:alnum:]_-]*)(\\))?\\s*(\\=(?!\\=|\\>))\\s*",
|
||||
"comment": "Identifier \"=\" with optional parens",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "variable.other.readwrite.hcl"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.operator.assignment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"attribute_splat": {
|
||||
"begin": "\\.",
|
||||
"end": "\\*",
|
||||
"comment": "Legacy attribute-only splat",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.accessor.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.operator.splat.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"block": {
|
||||
"name": "meta.block.hcl",
|
||||
"begin": "([\\w][\\-\\w]*)([\\s\\\"\\-\\w]*)(\\{)",
|
||||
"end": "\\}",
|
||||
"comment": "This will match Terraform blocks like `resource \"aws_instance\" \"web\" {` or `module {`",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\bdata|check|import|locals|module|output|provider|resource|terraform|variable\\b",
|
||||
"comment": "Known block type",
|
||||
"name": "entity.name.type.terraform"
|
||||
},
|
||||
{
|
||||
"match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",
|
||||
"comment": "Unknown block type",
|
||||
"name": "entity.name.type.hcl"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "[\\\"\\-\\w]+",
|
||||
"comment": "Block label",
|
||||
"name": "variable.other.enummember.hcl"
|
||||
}
|
||||
]
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.section.block.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.block.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_definition"
|
||||
},
|
||||
{
|
||||
"include": "#block"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"block_inline_comments": {
|
||||
"name": "comment.block.hcl",
|
||||
"begin": "/\\*",
|
||||
"end": "\\*/",
|
||||
"comment": "Inline comments start with the /* sequence and end with the */ sequence, and may have any characters within except the ending sequence. An inline comment is considered equivalent to a whitespace sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"brackets": {
|
||||
"begin": "\\[",
|
||||
"end": "\\]",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.splat.hcl",
|
||||
"match": "\\*",
|
||||
"comment": "Splat operator"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#inline_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#inline_if_expression"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"char_escapes": {
|
||||
"name": "constant.character.escape.hcl",
|
||||
"match": "\\\\[nrt\"\\\\]|\\\\u(\\h{8}|\\h{4})",
|
||||
"comment": "Character Escapes"
|
||||
},
|
||||
"comma": {
|
||||
"name": "punctuation.separator.hcl",
|
||||
"match": "\\,",
|
||||
"comment": "Commas - used in certain expressions"
|
||||
},
|
||||
"comments": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#hash_line_comments"
|
||||
},
|
||||
{
|
||||
"include": "#double_slash_line_comments"
|
||||
},
|
||||
{
|
||||
"include": "#block_inline_comments"
|
||||
}
|
||||
]
|
||||
},
|
||||
"double_slash_line_comments": {
|
||||
"name": "comment.line.double-slash.hcl",
|
||||
"begin": "//",
|
||||
"end": "$\\n?",
|
||||
"comment": "Line comments start with // sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"expressions": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#literal_values"
|
||||
},
|
||||
{
|
||||
"include": "#operators"
|
||||
},
|
||||
{
|
||||
"include": "#tuple_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#object_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#brackets"
|
||||
},
|
||||
{
|
||||
"include": "#objects"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_access"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_splat"
|
||||
},
|
||||
{
|
||||
"include": "#functions"
|
||||
},
|
||||
{
|
||||
"include": "#parens"
|
||||
}
|
||||
]
|
||||
},
|
||||
"for_expression_body": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.word.hcl",
|
||||
"match": "\\bin\\b",
|
||||
"comment": "in keyword"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.conditional.hcl",
|
||||
"match": "\\bif\\b",
|
||||
"comment": "if keyword"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\:"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"functions": {
|
||||
"name": "meta.function-call.hcl",
|
||||
"begin": "([:\\-\\w]+)(\\()",
|
||||
"end": "\\)",
|
||||
"comment": "Built-in function calls",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(core::)?(abs|abspath|alltrue|anytrue|base64decode|base64encode|base64gzip|base64sha256|base64sha512|basename|bcrypt|can|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|cidrsubnets|coalesce|coalescelist|compact|concat|contains|csvdecode|dirname|distinct|element|endswith|file|filebase64|filebase64sha256|filebase64sha512|fileexists|filemd5|fileset|filesha1|filesha256|filesha512|flatten|floor|format|formatdate|formatlist|indent|index|join|jsondecode|jsonencode|keys|length|log|lookup|lower|matchkeys|max|md5|merge|min|nonsensitive|one|parseint|pathexpand|plantimestamp|pow|range|regex|regexall|replace|reverse|rsadecrypt|sensitive|setintersection|setproduct|setsubtract|setunion|sha1|sha256|sha512|signum|slice|sort|split|startswith|strcontains|strrev|substr|sum|templatefile|textdecodebase64|textencodebase64|timeadd|timecmp|timestamp|title|tobool|tolist|tomap|tonumber|toset|tostring|transpose|trim|trimprefix|trimspace|trimsuffix|try|upper|urlencode|uuid|uuidv5|values|yamldecode|yamlencode|zipmap)\\b",
|
||||
"name": "support.function.builtin.terraform"
|
||||
},
|
||||
{
|
||||
"match": "\\bprovider::[[:alpha:]][\\w_-]*::[[:alpha:]][\\w_-]*\\b",
|
||||
"name": "support.function.provider.terraform"
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
}
|
||||
]
|
||||
},
|
||||
"hash_line_comments": {
|
||||
"name": "comment.line.number-sign.hcl",
|
||||
"begin": "#",
|
||||
"end": "$\\n?",
|
||||
"comment": "Line comments start with # sequence and end with the next newline sequence. A line comment is considered equivalent to a newline sequence",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
"hcl_type_keywords": {
|
||||
"name": "storage.type.hcl",
|
||||
"match": "\\b(any|string|number|bool|list|set|map|tuple|object)\\b",
|
||||
"comment": "Type keywords known to HCL."
|
||||
},
|
||||
"heredoc": {
|
||||
"name": "string.unquoted.heredoc.hcl",
|
||||
"begin": "(\\<\\<\\-?)\\s*(\\w+)\\s*$",
|
||||
"end": "^\\s*\\2\\s*$",
|
||||
"comment": "String Heredoc",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.operator.heredoc.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.heredoc.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.control.heredoc.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string_interpolation"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inline_for_expression": {
|
||||
"match": "(for)\\b(.*)\\n",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "keyword.control.hcl"
|
||||
},
|
||||
"2": {
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\=\\>",
|
||||
"name": "storage.type.function.hcl"
|
||||
},
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"inline_if_expression": {
|
||||
"begin": "(if)\\b",
|
||||
"end": "\\n",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.control.conditional.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#comma"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"language_constants": {
|
||||
"name": "constant.language.hcl",
|
||||
"match": "\\b(true|false|null)\\b",
|
||||
"comment": "Language Constants"
|
||||
},
|
||||
"literal_values": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#numeric_literals"
|
||||
},
|
||||
{
|
||||
"include": "#language_constants"
|
||||
},
|
||||
{
|
||||
"include": "#string_literals"
|
||||
},
|
||||
{
|
||||
"include": "#heredoc"
|
||||
},
|
||||
{
|
||||
"include": "#hcl_type_keywords"
|
||||
},
|
||||
{
|
||||
"include": "#named_value_references"
|
||||
}
|
||||
]
|
||||
},
|
||||
"local_identifiers": {
|
||||
"name": "variable.other.readwrite.hcl",
|
||||
"match": "\\b(?!null|false|true)[[:alpha:]][[:alnum:]_-]*\\b",
|
||||
"comment": "Local Identifiers"
|
||||
},
|
||||
"named_value_references": {
|
||||
"name": "variable.other.readwrite.terraform",
|
||||
"match": "\\b(var|local|module|data|path|terraform)\\b",
|
||||
"comment": "Constant values available only to Terraform."
|
||||
},
|
||||
"numeric_literals": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "constant.numeric.float.hcl",
|
||||
"match": "\\b\\d+([Ee][+-]?)\\d+\\b",
|
||||
"comment": "Integer, no fraction, optional exponent",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.exponent.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.float.hcl",
|
||||
"match": "\\b\\d+(\\.)\\d+(?:([Ee][+-]?)\\d+)?\\b",
|
||||
"comment": "Integer, fraction, optional exponent",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.separator.decimal.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.exponent.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.integer.hcl",
|
||||
"match": "\\b\\d+\\b",
|
||||
"comment": "Integers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object_for_expression": {
|
||||
"begin": "(\\{)\\s?(for)\\b",
|
||||
"end": "\\}",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.braces.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "storage.type.function.hcl",
|
||||
"match": "\\=\\>"
|
||||
},
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
},
|
||||
"object_key_values": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#literal_values"
|
||||
},
|
||||
{
|
||||
"include": "#operators"
|
||||
},
|
||||
{
|
||||
"include": "#tuple_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#object_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#heredoc"
|
||||
},
|
||||
{
|
||||
"include": "#functions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"objects": {
|
||||
"name": "meta.braces.hcl",
|
||||
"begin": "\\{",
|
||||
"end": "\\}",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.braces.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#objects"
|
||||
},
|
||||
{
|
||||
"include": "#inline_for_expression"
|
||||
},
|
||||
{
|
||||
"include": "#inline_if_expression"
|
||||
},
|
||||
{
|
||||
"match": "\\b((?!null|false|true)[[:alpha:]][[:alnum:]_-]*)\\s*(\\=\\>?)\\s*",
|
||||
"comment": "Literal, named object key",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "meta.mapping.key.hcl variable.other.readwrite.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.assignment.hcl",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\=\\>",
|
||||
"name": "storage.type.function.hcl"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "\\b((\").*(\"))\\s*(\\=)\\s*",
|
||||
"comment": "String object key",
|
||||
"captures": {
|
||||
"0": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#named_value_references"
|
||||
}
|
||||
]
|
||||
},
|
||||
"1": {
|
||||
"name": "meta.mapping.key.hcl string.quoted.double.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.string.begin.hcl"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.string.end.hcl"
|
||||
},
|
||||
"4": {
|
||||
"name": "keyword.operator.hcl"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "meta.mapping.key.hcl",
|
||||
"begin": "^\\s*\\(",
|
||||
"end": "(\\))\\s*(=|:)\\s*",
|
||||
"comment": "Computed object key (any expression between parens)",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.operator.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#named_value_references"
|
||||
},
|
||||
{
|
||||
"include": "#attribute_access"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#object_key_values"
|
||||
}
|
||||
]
|
||||
},
|
||||
"operators": {
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\>\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\<\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\=\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\!\\="
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\+"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\-"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\*"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\/"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.arithmetic.hcl",
|
||||
"match": "\\%"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\&\\&"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\|\\|"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.logical.hcl",
|
||||
"match": "\\!"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\>"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\<"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\?"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\.\\.\\."
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\:"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.hcl",
|
||||
"match": "\\=\\>"
|
||||
}
|
||||
]
|
||||
},
|
||||
"parens": {
|
||||
"begin": "\\(",
|
||||
"end": "\\)",
|
||||
"comment": "Parens - matched *after* function syntax",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.parens.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
}
|
||||
]
|
||||
},
|
||||
"string_interpolation": {
|
||||
"name": "meta.interpolation.hcl",
|
||||
"begin": "(?<![%$])([%$]{)",
|
||||
"end": "\\}",
|
||||
"comment": "String interpolation",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "keyword.other.interpolation.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "keyword.other.interpolation.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.operator.template.left.trim.hcl",
|
||||
"match": "\\~\\s",
|
||||
"comment": "Trim left whitespace"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.template.right.trim.hcl",
|
||||
"match": "\\s\\~",
|
||||
"comment": "Trim right whitespace"
|
||||
},
|
||||
{
|
||||
"name": "keyword.control.hcl",
|
||||
"match": "\\b(if|else|endif|for|in|endfor)\\b",
|
||||
"comment": "if/else/endif and for/in/endfor directives"
|
||||
},
|
||||
{
|
||||
"include": "#expressions"
|
||||
},
|
||||
{
|
||||
"include": "#local_identifiers"
|
||||
}
|
||||
]
|
||||
},
|
||||
"string_literals": {
|
||||
"name": "string.quoted.double.hcl",
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"comment": "Strings",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string_interpolation"
|
||||
},
|
||||
{
|
||||
"include": "#char_escapes"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tuple_for_expression": {
|
||||
"begin": "(\\[)\\s?(for)\\b",
|
||||
"end": "\\]",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.section.brackets.begin.hcl"
|
||||
},
|
||||
"2": {
|
||||
"name": "keyword.control.hcl"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.section.brackets.end.hcl"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#for_expression_body"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
|
||||
<Metadata>
|
||||
<Identity Language="en-US" Id="mypy" Version="0.3.1" Publisher="matangover" />
|
||||
<DisplayName>Mypy</DisplayName>
|
||||
<Description xml:space="preserve">Type checking for Python using mypy</Description>
|
||||
<Tags>python</Tags>
|
||||
<Categories>Programming Languages,Linters,Other</Categories>
|
||||
<GalleryFlags>Public</GalleryFlags>
|
||||
|
||||
<Properties>
|
||||
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.46.0" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="workspace" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="" />
|
||||
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/matangover/mypy-vscode.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/matangover/mypy-vscode.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/matangover/mypy-vscode.git" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/matangover/mypy-vscode/issues" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Learn" Value="https://github.com/matangover/mypy-vscode#readme" />
|
||||
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Content.Pricing" Value="Free"/>
|
||||
|
||||
|
||||
|
||||
</Properties>
|
||||
<License>extension/License.txt</License>
|
||||
<Icon>extension/mypy.png</Icon>
|
||||
</Metadata>
|
||||
<Installation>
|
||||
<InstallationTarget Id="Microsoft.VisualStudio.Code"/>
|
||||
</Installation>
|
||||
<Dependencies/>
|
||||
<Assets>
|
||||
<Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.Changelog" Path="extension/CHANGELOG.md" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/License.txt" Addressable="true" />
|
||||
<Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/mypy.png" Addressable="true" />
|
||||
</Assets>
|
||||
</PackageManifest>
|
@ -1,47 +0,0 @@
|
||||
# Change Log
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- Add commands `Mypy: Recheck Workspace` and `Mypy: Restart Daemon and Recheck Workspace`.
|
||||
- Add help link when dmypy executable is not found.
|
||||
|
||||
## 0.3.0
|
||||
|
||||
- Add `mypy.extraArguments` setting to allow passing additional arguments to mypy ([#35](https://github.com/matangover/mypy-vscode/issues/35)).
|
||||
- Display mypy's error codes with links to relevant documentation (PR [#74](https://github.com/matangover/mypy-vscode/pull/74) by @vidhanio.)
|
||||
- Group long mypy messages into a single VS Code diagnostic (also in PR [#74](https://github.com/matangover/mypy-vscode/issues/74)).
|
||||
- Use Python extension's new environments API for better detection of the active Python interpreter ([#70](https://github.com/matangover/mypy-vscode/issues/70)).
|
||||
- Better error message when running mypy using active interpreter ([#71](https://github.com/matangover/mypy-vscode/issues/71)).
|
||||
|
||||
## 0.2.3
|
||||
|
||||
Add the `mypy.enabled` setting to allow disabling Mypy for a specific workspace or workspace folder ([#41](https://github.com/matangover/mypy-vscode/issues/41), PR by @LaurensBosscher).
|
||||
|
||||
## 0.2.2
|
||||
|
||||
- Fix issues related to daemon not being properly closed: [#47](https://github.com/matangover/mypy-vscode/issues/47), [#45](https://github.com/matangover/mypy-vscode/issues/45), [#37](https://github.com/matangover/mypy-vscode/issues/37).
|
||||
- Add `mypy.debugLogging` setting.
|
||||
|
||||
## 0.2.1
|
||||
|
||||
- Do not fail when `show_absolute_path = True` is specified in the mypy configuration file (#38, PR by @sidharthv96).
|
||||
|
||||
## 0.2.0
|
||||
|
||||
- The extension no longer uses `mypyls` (the mypy language server). We now use the mypy daemon (`dmypy`) which is built into mypy. This leads to less maintenance burden, full mypy feature support, and easier installation.
|
||||
|
||||
- The `mypy.executable` setting is now deprecated (because it used to point to mypyls which is no longer used). Use the new `mypy.dmypyExecutable` instead (which points to dmypy). The extension will attempt to migrate your settings automatically if needed.
|
||||
|
||||
- Added support for multiple workspace folders. A separate mypy daemon will be launched for each workspace folder. All configuration settings can be set on a per-folder basis if desired.
|
||||
|
||||
- Added the option `mypy.runUsingActiveInterpreter` to run dmypy using the interpreter that is currently selected in the Python extension. Can be useful if you install a specific version of mypy in each project. However, normally this is not needed (your code is always checked against the active interpreter anyway).
|
||||
|
||||
- The extension no longer overrides mypy's `check_untyped_defs` setting to true. This means that code inside unannotated functions will no longer be checked by default. If you want the old behavior, create a `mypy.ini` file with the following contents:
|
||||
```
|
||||
[mypy]
|
||||
check_untyped_defs=true
|
||||
```
|
||||
|
||||
- Support the new interpreter storage in the Python extension (experimental replacement for the `python.pythonPath` setting).
|
||||
|
||||
- Support more mypy config file options, e.g. `files` and `strict` (in mypyls these options were not supported).
|
@ -1,11 +0,0 @@
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -1,55 +0,0 @@
|
||||
# Mypy extension for VS Code
|
||||
Runs mypy on Python code to provide type checking.
|
||||
|
||||
* Runs on your entire workspace. (This is different from Microsoft's Python extension's mypy functionality which only lints each file separately, leading to incomplete type checking.)
|
||||
|
||||
* Uses the [mypy daemon](https://mypy.readthedocs.io/en/latest/mypy_daemon.html) to keep the analysis state in memory so that only changed files are rechecked.
|
||||
|
||||
* Respects the active Python interpreter (set in the Python extension) and the `mypy.ini` configuration file.
|
||||
|
||||
* Supports multi-root workspaces: will launch a separate mypy daemon for each workspace folder.
|
||||
|
||||
## Installing mypy
|
||||
|
||||
This extension requires mypy to be installed on your system. To install mypy, run `pip install mypy`. There are other ways to install mypy, such as using `pipx` or your system's package manager.
|
||||
|
||||
By default, this extension relies on having the `dmypy` executable available on your PATH. This should be the case
|
||||
if you installed mypy globally. To use a different mypy installation, set the `mypy.dmypyExecutable` setting.
|
||||
|
||||
Some people prefer to have mypy installed in each project's virtual environment rather than in a global location. To do this, enable `mypy.runUsingActiveInterpreter` (either globally or for a specific workspace).
|
||||
|
||||
## Using the extension
|
||||
|
||||
The extension automatically checks the workspace with Mypy if there are Python files in it. Diagnostics generated by Mypy are shown in the editor and in the Problems panel.
|
||||
|
||||
Every time you save a Python file, the extension will re-run Mypy. Only the changed files (and their dependents) will be re-analyzed.
|
||||
|
||||
The extension also provides the following commands:
|
||||
|
||||
* `Mypy: Recheck Workspace`: Re-run mypy on the workspace. This is not normally necessary, but useful if you change Python files outside of VS Code or after you checkout a different Git branch.
|
||||
* `Mypy: Restart Daemon and Recheck Workspace`: Restart the mypy daemon and recheck. This is not normally necessary, but useful if mypy is behaving unexpectedly.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
To configure mypy, you can create a `mypy.ini` file in your workspace folder (or any of the default locations). See [mypy configuration file](https://mypy.readthedocs.io/en/stable/config_file.html). You can also specify a custom path to `mypy.ini` using the `mypy.configFile` setting.
|
||||
|
||||
To configure the mypy-vscode extension, use the following VS Code settings:
|
||||
|
||||
* `mypy.targets`: specify a list of target files or folders for mypy to analyze. By default the entire workspace folder is checked. You may prefer to use the `files` option in `mypy.ini` to specify which files mypy should analyze. In that case, you should set `mypy.targets` to an empty array (`[]`).
|
||||
|
||||
* `mypy.dmypyExecutable`: Path to `dmypy` (the mypy daemon). Either a full path or just a name (which must exist in your PATH). You can use substitutions: `${workspaceFolder}` and `~` (home directory).
|
||||
|
||||
* `mypy.runUsingActiveInterpreter`: Use the active Python interpreter (selected in the Python extension) to run dmypy itself, instead of the `mypy.dmypyExecutable` setting. Note: your code is always checked against the active interpreter – this setting only controls the interpreter used to run dmypy itself.
|
||||
|
||||
* `mypy.configFile`: Mypy config file, relative to the workspace folder. If empty, search in the default locations. See https://mypy.readthedocs.io/en/latest/config_file.html.
|
||||
|
||||
* `mypy.extraArguments`: A list of extra command-line arguments to append to the `dmypy run` command. For a list of options, see [mypy's documentation](https://mypy.readthedocs.io/en/stable/command_line.html).
|
||||
|
||||
* `mypy.enabled`: Enable or disable Mypy checking. For example, you can disable Mypy for a specific workspace or folder.
|
||||
|
||||
* `mypy.debugLogging`: Enable debug logging for the extension. (Reload the window after changing this setting.)
|
||||
|
||||
## License
|
||||
|
||||
This project is made available under the MIT License.
|
@ -1,31 +0,0 @@
|
||||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
||||
For Microsoft vscode-languageserver-node-example
|
||||
|
||||
This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).
|
||||
Microsoft is not the original author of the Third Party Code. The original copyright notice and license
|
||||
under which Microsoft received such Third Party Code are set out below. This Third Party Code is licensed
|
||||
to you under their original license terms set forth below. Microsoft reserves all other rights not expressly
|
||||
granted, whether by implication, estoppel or otherwise.
|
||||
|
||||
1. DefinitelyTyped version 0.0.1 (https://github.com/borisyankov/DefinitelyTyped)
|
||||
|
||||
This project is licensed under the MIT license.
|
||||
Copyrights are respective of each contributor listed at the beginning of each definition file.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
Before Width: | Height: | Size: 7.4 KiB |
@ -1,20 +0,0 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 150
|
||||
|
||||
[CHANGELOG.md]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.json]
|
||||
max_line_length = off
|
||||
|
||||
[Makefile]
|
||||
max_line_length = off
|
@ -1 +0,0 @@
|
||||
coverage/
|
@ -1,26 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"array-bracket-newline": 0,
|
||||
"id-length": 0,
|
||||
"max-statements-per-line": [2, { "max": 2 }],
|
||||
"max-statements": [2, 19],
|
||||
"new-cap": [2, { "capIsNewExceptions": ["RequireObjectCoercible", "ToObject", "ToUint32", "IsCallable", "ArraySpeciesCreate", "HasProperty", "Get", "ToString", "Call", "CreateDataPropertyOrThrow"] }],
|
||||
"no-magic-numbers": 0,
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"max-lines-per-function": 0,
|
||||
"max-params": 0,
|
||||
"no-invalid-this": 1,
|
||||
"strict": 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
13
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/array.prototype.map/.nycrc
generated
vendored
@ -1,13 +0,0 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.0.3](https://github.com/es-shims/Array.prototype.map/compare/v1.0.2...v1.0.3) - 2020-11-19
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] migrate tests to Github Actions [`7f300c8`](https://github.com/es-shims/Array.prototype.map/commit/7f300c8dc386f6452a8a742c3ff1955f79fca448)
|
||||
- [meta] do not publish github action workflow files [`59276a2`](https://github.com/es-shims/Array.prototype.map/commit/59276a22dbac0a431e422d7056b06a51c565c0ed)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`3502b73`](https://github.com/es-shims/Array.prototype.map/commit/3502b73827b0998edd6538ce7728d5fd9933c15f)
|
||||
- [Deps] update `es-abstract`; use `call-bind` where applicable [`37643d8`](https://github.com/es-shims/Array.prototype.map/commit/37643d8611c54b4b7f159532b4a7ea8fc183cb6b)
|
||||
- [Tests] run `nyc` on all tests [`78049a0`](https://github.com/es-shims/Array.prototype.map/commit/78049a085944abd2186d9d7fbcf442b19b11d1e7)
|
||||
- [actions] add "Allow Edits" workflow [`9e486a9`](https://github.com/es-shims/Array.prototype.map/commit/9e486a9865d5874768ed414b1e1cf30ec025fed7)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `functions-have-names`, `tape` [`fef8cac`](https://github.com/es-shims/Array.prototype.map/commit/fef8cac1ed6b3f37fcc8d77e44603d0f885ab4a3)
|
||||
- [Tests] run `es-shim-api` in postlint; use `tape` runner [`4b26f09`](https://github.com/es-shims/Array.prototype.map/commit/4b26f09fcac54df57fb496ca31f435336e1ef470)
|
||||
- [Dev Deps] update `auto-changelog`, `tape` [`6d3bb01`](https://github.com/es-shims/Array.prototype.map/commit/6d3bb01f5d092fce194a51d2782133803b8801ee)
|
||||
- [Deps] update `es-abstract`, `is-string` [`88bce11`](https://github.com/es-shims/Array.prototype.map/commit/88bce1118b8452c9f6c89d68f2f247f1946e89dd)
|
||||
- [Dev Deps] update `auto-changelog`; add `aud` [`6bfd366`](https://github.com/es-shims/Array.prototype.map/commit/6bfd3666905d45e76a3b988f01720c98619e84a4)
|
||||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`fcdb329`](https://github.com/es-shims/Array.prototype.map/commit/fcdb329c0bb0f23a77c4092dbdbed0e1073b4582)
|
||||
- [Deps] update `es-abstract` [`9ddb318`](https://github.com/es-shims/Array.prototype.map/commit/9ddb31815b8254a2d1f2fc1e9b37da9b42ed979e)
|
||||
- [Tests] only audit prod deps [`61176f9`](https://github.com/es-shims/Array.prototype.map/commit/61176f995d0c58348a95f04b8b15aa51ba21711f)
|
||||
|
||||
## [v1.0.2](https://github.com/es-shims/Array.prototype.map/compare/v1.0.1...v1.0.2) - 2019-12-16
|
||||
|
||||
### Commits
|
||||
|
||||
- [Refactor] use split-up `es-abstract` (66% bundle size decrease) [`d1bf408`](https://github.com/es-shims/Array.prototype.map/commit/d1bf408f70ef059bcb8beb28f960073ed4792c23)
|
||||
- [Dev Deps] update `eslint` [`7c6f449`](https://github.com/es-shims/Array.prototype.map/commit/7c6f449e1b0ec6a7b0c04b1952a6a16d145fa2a1)
|
||||
|
||||
## [v1.0.1](https://github.com/es-shims/Array.prototype.map/compare/v1.0.0...v1.0.1) - 2019-11-21
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] use shared travis-ci configs [`a3c7bac`](https://github.com/es-shims/Array.prototype.map/commit/a3c7bac90d35642d683ad7704be4c4bf639ae0ee)
|
||||
- [meta] add `auto-changelog` [`9101d3a`](https://github.com/es-shims/Array.prototype.map/commit/9101d3a09cc6bb3fd814439ea81664cdf436d75a)
|
||||
- [actions] add automatic rebasing / merge commit blocking [`5183622`](https://github.com/es-shims/Array.prototype.map/commit/5183622f5819712275e1fbdb16c27c4aae35b3c1)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `functions-have-names`, `auto-changelog` [`8bdd590`](https://github.com/es-shims/Array.prototype.map/commit/8bdd5904e505a96f7cfa34cf15618a4b551e9b29)
|
||||
- [Fix] [Refactor]: move `is-string` to prod deps; use callBound instead of `function-bind` [`f0a4b33`](https://github.com/es-shims/Array.prototype.map/commit/f0a4b33df2268f2e7bdc3f777e0c1d3d85f99a90)
|
||||
- [readme] fix example [`0fbd655`](https://github.com/es-shims/Array.prototype.map/commit/0fbd655b90b4d7791bd26da4322370230e40aca2)
|
||||
- [Deps] update `es-abstract` [`9f9a70e`](https://github.com/es-shims/Array.prototype.map/commit/9f9a70ea4666dc644adcd126982bf9095747039a)
|
||||
- [meta] add `funding` field [`b944c33`](https://github.com/es-shims/Array.prototype.map/commit/b944c3304e142053c6aa34ab69b4fc551e89eb4d)
|
||||
- [Dev Deps] update `@ljharb/eslint-config` [`9b6d8e3`](https://github.com/es-shims/Array.prototype.map/commit/9b6d8e3390bcf989d940e187eba59f6077d02a7e)
|
||||
- [actions] fix name of this action [`511a82f`](https://github.com/es-shims/Array.prototype.map/commit/511a82f57071320bb096923f1bba346d9b1c79f2)
|
||||
|
||||
## v1.0.0 - 2019-09-28
|
||||
|
||||
### Commits
|
||||
|
||||
- Tests [`7c021cb`](https://github.com/es-shims/Array.prototype.map/commit/7c021cb73eb1dc791384a85f17f28d3d0c8034fd)
|
||||
- [Tests] add `travis.yml` [`7c4a1f6`](https://github.com/es-shims/Array.prototype.map/commit/7c4a1f632034cd552be5e179837aaddc44e425cd)
|
||||
- implementation [`c5e97f7`](https://github.com/es-shims/Array.prototype.map/commit/c5e97f72e70f04166c1eda8d67e21f8c0d7ec973)
|
||||
- Initial commit [`f7ddee4`](https://github.com/es-shims/Array.prototype.map/commit/f7ddee424d3ea57ba6a8deef32375a74f88d0977)
|
||||
- readme [`86dfaa0`](https://github.com/es-shims/Array.prototype.map/commit/86dfaa09fc0aba93f5c80813ad3159f61ce37042)
|
||||
- [Tests] add `npm run lint` [`1a64f45`](https://github.com/es-shims/Array.prototype.map/commit/1a64f457f6b9693c1b56303ded0f0e64253c9704)
|
||||
- npm init [`cda5cda`](https://github.com/es-shims/Array.prototype.map/commit/cda5cda6fb2b3cd6107d79c1535ded3e4c9cead3)
|
||||
- [meta] add `safe-publish-latest`, `auto-changelog` [`645f846`](https://github.com/es-shims/Array.prototype.map/commit/645f8465648969b8c908fad098403f3fc112d0e4)
|
||||
- Only apps should have lockfiles [`32c5860`](https://github.com/es-shims/Array.prototype.map/commit/32c5860900487e6de237ec184d02639eaeea536d)
|
21
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/array.prototype.map/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -1,63 +0,0 @@
|
||||
# array.prototype.map <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
||||
|
||||
[![Build Status][travis-svg]][travis-url]
|
||||
[![dependency status][deps-svg]][deps-url]
|
||||
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][npm-badge-png]][package-url]
|
||||
|
||||
An ES5 spec-compliant `Array.prototype.map` shim/polyfill/replacement that works as far down as ES3.
|
||||
|
||||
This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](http://www.ecma-international.org/ecma-262/5.1/).
|
||||
|
||||
Because `Array.prototype.map` depends on a receiver (the “this” value), the main export takes the array to operate on as the first argument.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var map = require('array.prototype.map');
|
||||
var assert = require('assert');
|
||||
|
||||
assert.deepEqual(map([1, 1, 1], function (x) { return x + 1; }), [2, 2, 2]);
|
||||
assert.deepEqual(map([1, 0, 1], function (x) { return x + 1; }), [2, 1, 2]);
|
||||
```
|
||||
|
||||
```js
|
||||
var map = require('array.prototype.map');
|
||||
var assert = require('assert');
|
||||
/* when Array#map is not present */
|
||||
delete Array.prototype.map;
|
||||
var shimmedMap = map.shim();
|
||||
assert.equal(shimmedMap, map.getPolyfill());
|
||||
var arr = [1, 2, 3];
|
||||
var add4 = function (x) { return x + 4; };
|
||||
assert.deepEqual(arr.map(add4), map(arr, add4));
|
||||
```
|
||||
|
||||
```js
|
||||
var map = require('array.prototype.map');
|
||||
var assert = require('assert');
|
||||
/* when Array#map is present */
|
||||
var shimmedMap = map.shim();
|
||||
assert.equal(shimmedMap, Array.prototype.map);
|
||||
assert.deepEqual(arr.map(add4), map(arr, add4));
|
||||
```
|
||||
|
||||
## Tests
|
||||
Simply clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[package-url]: https://npmjs.org/package/array.prototype.map
|
||||
[npm-version-svg]: http://versionbadg.es/es-shims/Array.prototype.map.svg
|
||||
[travis-svg]: https://travis-ci.org/es-shims/Array.prototype.map.svg
|
||||
[travis-url]: https://travis-ci.org/es-shims/Array.prototype.map
|
||||
[deps-svg]: https://david-dm.org/es-shims/Array.prototype.map.svg
|
||||
[deps-url]: https://david-dm.org/es-shims/Array.prototype.map
|
||||
[dev-deps-svg]: https://david-dm.org/es-shims/Array.prototype.map/dev-status.svg
|
||||
[dev-deps-url]: https://david-dm.org/es-shims/Array.prototype.map#info=devDependencies
|
||||
[npm-badge-png]: https://nodei.co/npm/array.prototype.map.png?downloads=true&stars=true
|
||||
[license-image]: http://img.shields.io/npm/l/array.prototype.map.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: http://img.shields.io/npm/dm/array.prototype.map.svg
|
||||
[downloads-url]: http://npm-stat.com/charts.html?package=array.prototype.map
|
@ -1,3 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
require('./shim')();
|
@ -1,50 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var ArraySpeciesCreate = require('es-abstract/2020/ArraySpeciesCreate');
|
||||
var Call = require('es-abstract/2020/Call');
|
||||
var CreateDataPropertyOrThrow = require('es-abstract/2020/CreateDataPropertyOrThrow');
|
||||
var Get = require('es-abstract/2020/Get');
|
||||
var HasProperty = require('es-abstract/2020/HasProperty');
|
||||
var IsCallable = require('es-abstract/2020/IsCallable');
|
||||
var ToUint32 = require('es-abstract/2020/ToUint32');
|
||||
var ToObject = require('es-abstract/2020/ToObject');
|
||||
var ToString = require('es-abstract/2020/ToString');
|
||||
var callBound = require('call-bind/callBound');
|
||||
var isString = require('is-string');
|
||||
|
||||
// Check failure of by-index access of string characters (IE < 9) and failure of `0 in boxedString` (Rhino)
|
||||
var boxedString = Object('a');
|
||||
var splitString = boxedString[0] !== 'a' || !(0 in boxedString);
|
||||
|
||||
var strSplit = callBound('String.prototype.split');
|
||||
|
||||
module.exports = function map(callbackfn) {
|
||||
var O = ToObject(this);
|
||||
var self = splitString && isString(O) ? strSplit(O, '') : O;
|
||||
var len = ToUint32(self.length);
|
||||
|
||||
// If no callback function or if callback is not a callable function
|
||||
if (!IsCallable(callbackfn)) {
|
||||
throw new TypeError('Array.prototype.map callback must be a function');
|
||||
}
|
||||
|
||||
var T;
|
||||
if (arguments.length > 1) {
|
||||
T = arguments[1];
|
||||
}
|
||||
|
||||
var A = ArraySpeciesCreate(O, len);
|
||||
var k = 0;
|
||||
while (k < len) {
|
||||
var Pk = ToString(k);
|
||||
var kPresent = HasProperty(O, Pk);
|
||||
if (kPresent) {
|
||||
var kValue = Get(O, Pk);
|
||||
var mappedValue = Call(callbackfn, T, [kValue, k, O]);
|
||||
CreateDataPropertyOrThrow(A, Pk, mappedValue);
|
||||
}
|
||||
k += 1;
|
||||
}
|
||||
|
||||
return A;
|
||||
};
|
@ -1,25 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var define = require('define-properties');
|
||||
var RequireObjectCoercible = require('es-abstract/2020/RequireObjectCoercible');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var implementation = require('./implementation');
|
||||
var getPolyfill = require('./polyfill');
|
||||
var polyfill = getPolyfill();
|
||||
var shim = require('./shim');
|
||||
|
||||
var $slice = callBound('Array.prototype.slice');
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var boundMapShim = function map(array, callbackfn) {
|
||||
RequireObjectCoercible(array);
|
||||
return polyfill.apply(array, $slice(arguments, 1));
|
||||
};
|
||||
define(boundMapShim, {
|
||||
getPolyfill: getPolyfill,
|
||||
implementation: implementation,
|
||||
shim: shim
|
||||
});
|
||||
|
||||
module.exports = boundMapShim;
|
@ -1,74 +0,0 @@
|
||||
{
|
||||
"name": "array.prototype.map",
|
||||
"version": "1.0.3",
|
||||
"description": "An ES5 spec-compliant `Array.prototype.map` shim/polyfill/replacement that works as far down as ES3.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepublish": "safe-publish-latest",
|
||||
"preversion": "auto-changelog",
|
||||
"prelint": "evalmd README.md",
|
||||
"lint": "eslint .",
|
||||
"postlint": "es-shim-api --bound",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "npx aud --production",
|
||||
"tests-only": "nyc tape 'test/**/*.js'",
|
||||
"testling": "npx testling --html > test.html",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/es-shims/Array.prototype.map.git"
|
||||
},
|
||||
"keywords": [
|
||||
"Array.prototype.map",
|
||||
"map",
|
||||
"array",
|
||||
"ES5",
|
||||
"shim",
|
||||
"polyfill",
|
||||
"es-shim API"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/es-shims/Array.prototype.map/issues"
|
||||
},
|
||||
"homepage": "https://github.com/es-shims/Array.prototype.map#readme",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@es-shims/api": "^2.1.2",
|
||||
"@ljharb/eslint-config": "^17.2.0",
|
||||
"aud": "^1.1.3",
|
||||
"auto-changelog": "^2.2.1",
|
||||
"eslint": "^7.13.0",
|
||||
"evalmd": "^0.0.19",
|
||||
"function-bind": "^1.1.1",
|
||||
"functions-have-names": "^1.2.1",
|
||||
"has-strict-mode": "^1.0.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^1.1.4",
|
||||
"tape": "^5.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.0",
|
||||
"define-properties": "^1.1.3",
|
||||
"es-abstract": "^1.18.0-next.1",
|
||||
"es-array-method-boxes-properly": "^1.0.0",
|
||||
"is-string": "^1.0.5"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var arrayMethodBoxesProperly = require('es-array-method-boxes-properly');
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
module.exports = function getPolyfill() {
|
||||
var method = Array.prototype.map;
|
||||
return arrayMethodBoxesProperly(method) ? method : implementation;
|
||||
};
|
14
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/array.prototype.map/shim.js
generated
vendored
@ -1,14 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var define = require('define-properties');
|
||||
var getPolyfill = require('./polyfill');
|
||||
|
||||
module.exports = function shimArrayPrototypeMap() {
|
||||
var polyfill = getPolyfill();
|
||||
define(
|
||||
Array.prototype,
|
||||
{ map: polyfill },
|
||||
{ map: function () { return Array.prototype.map !== polyfill; } }
|
||||
);
|
||||
return polyfill;
|
||||
};
|
@ -1,51 +0,0 @@
|
||||
var map = require('../implementation');
|
||||
var bind = require('function-bind');
|
||||
var test = require('tape');
|
||||
var runTests = require('./tests');
|
||||
|
||||
var hasStrictMode = require('has-strict-mode')();
|
||||
|
||||
test('as a function', function (t) {
|
||||
t.test('bad array/this value', function (st) {
|
||||
st['throws'](bind.call(map, null, undefined, 'a'), TypeError, 'undefined is not an object');
|
||||
st['throws'](bind.call(map, null, null, 'a'), TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('receiver boxing', function (st) {
|
||||
st.plan(hasStrictMode ? 3 : 2);
|
||||
|
||||
var context = 'x';
|
||||
|
||||
map.call(
|
||||
'f',
|
||||
function () {
|
||||
st.equal(typeof this, 'object');
|
||||
st.equal(String.prototype.toString.call(this), context);
|
||||
},
|
||||
context
|
||||
);
|
||||
|
||||
st.test('strict mode', { skip: !hasStrictMode }, function (sst) {
|
||||
sst.plan(2);
|
||||
|
||||
map.call(
|
||||
'f',
|
||||
function () {
|
||||
'use strict';
|
||||
|
||||
sst.equal(typeof this, 'string');
|
||||
sst.equal(this, context);
|
||||
},
|
||||
context
|
||||
);
|
||||
sst.end();
|
||||
});
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(bind.call(Function.call, map), t);
|
||||
|
||||
t.end();
|
||||
});
|
@ -1,18 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var map = require('../');
|
||||
var bind = require('function-bind');
|
||||
var test = require('tape');
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('as a function', function (t) {
|
||||
t.test('bad array/this value', function (st) {
|
||||
st['throws'](bind.call(map, null, undefined, 'a'), TypeError, 'undefined is not an object');
|
||||
st['throws'](bind.call(map, null, null, 'a'), TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(map, t);
|
||||
|
||||
t.end();
|
||||
});
|
@ -1,69 +0,0 @@
|
||||
require('../shim')();
|
||||
|
||||
var test = require('tape');
|
||||
var defineProperties = require('define-properties');
|
||||
var bind = require('function-bind');
|
||||
var hasStrictMode = require('has-strict-mode')();
|
||||
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var functionsHaveNames = require('functions-have-names')();
|
||||
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('shimmed', function (t) {
|
||||
t.equal(Array.prototype.map.length, 1, 'Array#map has a length of 1');
|
||||
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
|
||||
st.equal(Array.prototype.map.name, 'map', 'Array#map has name "map"');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
|
||||
et.equal(false, isEnumerable.call(Array.prototype, 'map'), 'Array#map is not enumerable');
|
||||
et.end();
|
||||
});
|
||||
|
||||
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
|
||||
|
||||
t.test('bad array/this value', { skip: !supportsStrictMode }, function (st) {
|
||||
st['throws'](function () { return Array.prototype.map.call(undefined, 'a'); }, TypeError, 'undefined is not an object');
|
||||
st['throws'](function () { return Array.prototype.map.call(null, 'a'); }, TypeError, 'null is not an object');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('receiver boxing', function (st) {
|
||||
st.plan(hasStrictMode ? 3 : 2);
|
||||
|
||||
var context = 'x';
|
||||
|
||||
Array.prototype.map.call(
|
||||
'f',
|
||||
function () {
|
||||
st.equal(typeof this, 'object');
|
||||
st.equal(String.prototype.toString.call(this), context);
|
||||
},
|
||||
context
|
||||
);
|
||||
|
||||
st.test('strict mode', { skip: !hasStrictMode }, function (sst) {
|
||||
sst.plan(2);
|
||||
|
||||
Array.prototype.map.call(
|
||||
'f',
|
||||
function () {
|
||||
'use strict';
|
||||
|
||||
sst.equal(typeof this, 'string');
|
||||
sst.equal(this, context);
|
||||
},
|
||||
context
|
||||
);
|
||||
sst.end();
|
||||
});
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(bind.call(Function.call, Array.prototype.map), t);
|
||||
|
||||
t.end();
|
||||
});
|
@ -1,167 +0,0 @@
|
||||
var hasStrictMode = require('has-strict-mode')();
|
||||
|
||||
var global = Function('return this')(); // eslint-disable-line no-new-func
|
||||
var identity = function (x) { return x; };
|
||||
var arrayWrap = function (x) { return [x]; };
|
||||
|
||||
var canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false.
|
||||
var undefinedIfNoSparseBug = canDistinguishSparseFromUndefined ? undefined : { valueOf: function () { return 0; } };
|
||||
|
||||
var createArrayLikeFromArray = function createArrayLike(arr) {
|
||||
var o = {};
|
||||
for (var i = 0; i < arr.length; i += 1) {
|
||||
if (i in arr) {
|
||||
o[i] = arr[i];
|
||||
}
|
||||
}
|
||||
o.length = arr.length;
|
||||
return o;
|
||||
};
|
||||
|
||||
var getTestArr = function () {
|
||||
var arr = [2, 3, undefinedIfNoSparseBug, true, 'hej', null, false, 0];
|
||||
delete arr[1];
|
||||
return arr;
|
||||
};
|
||||
|
||||
module.exports = function (map, t) {
|
||||
t.test('does not change the array it is called on', function (st) {
|
||||
var arr = getTestArr();
|
||||
var copy = getTestArr();
|
||||
map(arr, arrayWrap);
|
||||
st.deepEqual(arr, copy, 'array');
|
||||
|
||||
var arrayLike = createArrayLikeFromArray(arr);
|
||||
map(arrayLike, arrayWrap);
|
||||
st.deepEqual(arrayLike, createArrayLikeFromArray(copy), 'arrayLike');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('properly translates the values as according to the callback', function (st) {
|
||||
var expected = [[2], [3], [undefinedIfNoSparseBug], [true], ['hej'], [null], [false], [0]];
|
||||
delete expected[1];
|
||||
|
||||
var result = map(getTestArr(), arrayWrap);
|
||||
st.deepEqual(result, expected, 'array');
|
||||
|
||||
var arrayLikeResult = map(createArrayLikeFromArray(getTestArr()), arrayWrap);
|
||||
st.deepEqual(arrayLikeResult, expected, 'arrayLike');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('skips non-existing values', function (st) {
|
||||
var array = [1, 2, 3, 4];
|
||||
var arrayLike = createArrayLikeFromArray([1, 2, 3, 4]);
|
||||
delete array[2];
|
||||
delete arrayLike[2];
|
||||
|
||||
var i = 0;
|
||||
map(array, function () { i += 1; });
|
||||
st.equal(i, 3, 'array');
|
||||
|
||||
i = 0;
|
||||
map(arrayLike, function () { i += 1; });
|
||||
st.equal(i, 3, 'arrayLike');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('passes the correct values to the callback', function (st) {
|
||||
st.plan(5);
|
||||
|
||||
var expectedValue = {};
|
||||
var arr = [expectedValue];
|
||||
var context = {};
|
||||
map(
|
||||
arr,
|
||||
function (value, key, list) {
|
||||
st.equal(arguments.length, 3);
|
||||
st.equal(value, expectedValue, 'first argument is the value');
|
||||
st.equal(key, 0, 'second argument is the index');
|
||||
st.equal(list, arr, 'third argument is the array being iterated');
|
||||
st.equal(this, context, 'receiver is the expected value');
|
||||
},
|
||||
context
|
||||
);
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('does not visit elements added to the array after it has begun', function (st) {
|
||||
st.plan(4);
|
||||
|
||||
var arr = [1, 2, 3];
|
||||
var i = 0;
|
||||
map(arr, function (a) {
|
||||
i += 1;
|
||||
arr.push(a + 3);
|
||||
});
|
||||
st.deepEqual(arr, [1, 2, 3, 4, 5, 6], 'array has received 3 new elements');
|
||||
st.equal(i, 3, 'map callback only called thrice');
|
||||
|
||||
var arrayLike = createArrayLikeFromArray([1, 2, 3]);
|
||||
i = 0;
|
||||
map(arrayLike, function (a) {
|
||||
i += 1;
|
||||
arrayLike[arrayLike.length] = a + 3;
|
||||
arrayLike.length += 1;
|
||||
});
|
||||
st.deepEqual(Array.prototype.slice.call(arrayLike), [1, 2, 3, 4, 5, 6], 'arrayLike has received 3 new elements');
|
||||
st.equal(i, 3, 'map callback only called thrice');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('does not visit elements deleted from the array after it has begun', function (st) {
|
||||
var arr = [1, 2, 3];
|
||||
var actual = [];
|
||||
map(arr, function (x, i) {
|
||||
actual.push([i, x]);
|
||||
delete arr[1];
|
||||
});
|
||||
st.deepEqual(actual, [[0, 1], [2, 3]]);
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('sets the right context when given none', function (st) {
|
||||
var context;
|
||||
map([1], function () { context = this; });
|
||||
st.equal(context, global, 'receiver is global object in sloppy mode');
|
||||
|
||||
st.test('strict mode', { skip: !hasStrictMode }, function (sst) {
|
||||
map([1], function () {
|
||||
'use strict';
|
||||
|
||||
context = this;
|
||||
});
|
||||
sst.equal(context, undefined, 'receiver is undefined in strict mode');
|
||||
sst.end();
|
||||
});
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('empty array', function (st) {
|
||||
var arr = [];
|
||||
var actual = map(arr, identity);
|
||||
st.notEqual(actual, arr, 'empty array returns !== array');
|
||||
st.deepEqual(actual, arr, 'empty array returns empty array');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('list arg boxing', function (st) {
|
||||
st.plan(3);
|
||||
|
||||
map('f', function (item, index, list) {
|
||||
st.equal(item, 'f', 'letter matches');
|
||||
st.equal(typeof list, 'object', 'primitive list arg is boxed');
|
||||
st.equal(Object.prototype.toString.call(list), '[object String]', 'boxed list arg is a String');
|
||||
});
|
||||
|
||||
st.end();
|
||||
});
|
||||
};
|
14
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/async-lock/AUTHORS
generated
vendored
@ -1,14 +0,0 @@
|
||||
# Authors ordered by first contribution.
|
||||
|
||||
rain1017 (https://github.com/rain1017)
|
||||
JonathanPicques (https://github.com/JonathanPicques)
|
||||
Rogier Schouten (https://github.com/rogierschouten)
|
||||
erikvold (https://github.com/erikvold)
|
||||
Christian Passet (https://github.com/thePunIssuer)
|
||||
Tanguy Krotoff (https://github.com/tkrotoff)
|
||||
jtyers (https://github.com/jtyers)
|
||||
Paul Roub (https://github.com/paulroub)
|
||||
Geoff Whatley (https://github.com/meatwallace)
|
||||
Patryk L. (https://github.com/LosTigeros)
|
||||
Julian Saunderson (https://github.com/bitrivers)
|
||||
Philipp Keck (https://github.com/Philipp91)
|
115
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/async-lock/History.md
generated
vendored
@ -1,115 +0,0 @@
|
||||
1.2.8
|
||||
==================
|
||||
* Fix #37 process not set when acquiring lock (Thank you @Philipp91)
|
||||
|
||||
1.2.7
|
||||
==================
|
||||
DO NOT USE, erroneous publish
|
||||
|
||||
1.2.6
|
||||
==================
|
||||
* Fix `maxPending = Infinity` no longer allowed (thank you @coderaiser)
|
||||
|
||||
1.2.5
|
||||
==================
|
||||
* Allow `maxPending = 0` (thank you @bmrpatel)
|
||||
* Upgrade dependencies
|
||||
|
||||
1.2.4
|
||||
==================
|
||||
* Be robust to lock names that are also Object keys - simpler solution, extra tests.
|
||||
|
||||
1.2.3
|
||||
==================
|
||||
* Be robust to lock names that are also Object keys.
|
||||
* Upgrade dependencies
|
||||
|
||||
1.2.2
|
||||
==================
|
||||
* Fix grunt-env accidentally having become a dependency (#25)
|
||||
|
||||
1.2.1
|
||||
==================
|
||||
* Remove empty postinstall script (#24)
|
||||
* Fixed some vulnerable dev dependencies
|
||||
|
||||
1.2.0
|
||||
==================
|
||||
* ES5 compatibility (#21)
|
||||
|
||||
1.1.4
|
||||
==================
|
||||
* Fix for #17, update dependencies
|
||||
|
||||
1.1.3
|
||||
==================
|
||||
* Fix for #14
|
||||
|
||||
1.1.1
|
||||
==================
|
||||
* Fix result Promise not resolving when locking empty key array
|
||||
|
||||
1.1.0 / 2017-10-17
|
||||
==================
|
||||
* Add option to add waiters to the front of the queue
|
||||
|
||||
1.1.0 / 2017-10-17
|
||||
==================
|
||||
* Add option to add waiters to the front of the queue
|
||||
|
||||
1.0.0 / 2017-06-29
|
||||
==================
|
||||
* Remove dependency on Q by using the global Promise variable by default. Thank you @erikvold (https://github.com/erikvold) for the PR
|
||||
|
||||
0.3.10 / 2017-06-27
|
||||
==================
|
||||
* Remove dependencies on Q-specific nodify(), try(), and defer() methods so that you can inject e.g. standard ES6 promises using `new AsyncLock({ Promise: Promise })`
|
||||
|
||||
0.3.9 / 2016-11-30
|
||||
==================
|
||||
* Referred to MIT license in package.json
|
||||
* Update NPM module dependencies, remove no-longer-maintained blanket code coverage
|
||||
* Change author to rogierschouten
|
||||
* Fix invalid JSDoc comments (thanks @JonathanPicques)
|
||||
* Bugfix: TypeError when locking multiple keys at once
|
||||
|
||||
0.3.7-0.3.8
|
||||
==================
|
||||
Unknown, previous author did not commit this to Github.
|
||||
|
||||
0.3.6 / 2015-09-07
|
||||
==================
|
||||
* Performance improvement
|
||||
|
||||
0.3.5 / 2015-06-15
|
||||
==================
|
||||
* Performance improvement
|
||||
|
||||
0.3.4 / 2015-06-09
|
||||
==================
|
||||
* Bug fix
|
||||
|
||||
0.3.3 / 2015-05-19
|
||||
==================
|
||||
* Bug fix
|
||||
|
||||
0.3.2 / 2015-05-08
|
||||
==================
|
||||
* Set default timeout to never
|
||||
|
||||
0.3.1 / 2015-04-15
|
||||
==================
|
||||
* Use your own promise
|
||||
|
||||
0.3.0 / 2015-03-06
|
||||
==================
|
||||
* Domain reentrant
|
||||
|
||||
0.2.0 / 2015-02-21
|
||||
==================
|
||||
* Support promise mode
|
||||
* Pending task limit
|
||||
|
||||
0.1.0 / 2015-01-13
|
||||
==================
|
||||
* Initial version
|
22
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/async-lock/LICENSE
generated
vendored
@ -1,22 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Rogier Schouten <github@workingcode.ninja>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
163
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/async-lock/README.md
generated
vendored
@ -1,163 +0,0 @@
|
||||
# async-lock
|
||||
|
||||
Lock on asynchronous code
|
||||
|
||||
[](https://travis-ci.org/rogierschouten/async-lock)
|
||||
|
||||
* ES6 promise supported
|
||||
* Multiple keys lock supported
|
||||
* Timeout supported
|
||||
* Pending task limit supported
|
||||
* Domain reentrant supported
|
||||
* 100% code coverage
|
||||
|
||||
## Disclaimer
|
||||
|
||||
I did not create this package, and I will not add any features to it myself. I was granted the ownership because it was no longer being
|
||||
maintained, and I volunteered to fix a bug.
|
||||
|
||||
If you have a new feature you would like to have incorporated, please send me a PR and I will be happy to work with you and get it merged.
|
||||
For any bugs, PRs are most welcome but when possible I will try to get them resolved as soon as possible.
|
||||
|
||||
## Why do you need locking on single threaded nodejs?
|
||||
|
||||
Nodejs is single threaded, and the code execution never gets interrupted inside an event loop, so locking is unnecessary? This is true ONLY IF your critical section can be executed inside a single event loop.
|
||||
However, if you have any async code inside your critical section (it can be simply triggered by any I/O operation, or timer), your critical logic will across multiple event loops, therefore it's not concurrency safe!
|
||||
|
||||
Consider the following code
|
||||
```js
|
||||
redis.get('key', function(err, value) {
|
||||
redis.set('key', value * 2);
|
||||
});
|
||||
```
|
||||
The above code simply multiply a redis key by 2.
|
||||
However, if two users run concurrently, the execution order may like this
|
||||
```
|
||||
user1: redis.get('key') -> 1
|
||||
user2: redis.get('key') -> 1
|
||||
user1: redis.set('key', 1 x 2) -> 2
|
||||
user2: redis.set('key', 1 x 2) -> 2
|
||||
```
|
||||
Obviously it's not what you expected
|
||||
|
||||
|
||||
With asyncLock, you can easily write your async critical section
|
||||
```js
|
||||
lock.acquire('key', function(cb) {
|
||||
// Concurrency safe
|
||||
redis.get('key', function(err, value) {
|
||||
redis.set('key', value * 2, cb);
|
||||
});
|
||||
}, function(err, ret) {
|
||||
});
|
||||
```
|
||||
|
||||
## Get Started
|
||||
|
||||
```js
|
||||
var AsyncLock = require('async-lock');
|
||||
var lock = new AsyncLock();
|
||||
|
||||
/**
|
||||
* @param {String|Array} key resource key or keys to lock
|
||||
* @param {function} fn execute function
|
||||
* @param {function} cb (optional) callback function, otherwise will return a promise
|
||||
* @param {Object} opts (optional) options
|
||||
*/
|
||||
lock.acquire(key, function(done) {
|
||||
// async work
|
||||
done(err, ret);
|
||||
}, function(err, ret) {
|
||||
// lock released
|
||||
}, opts);
|
||||
|
||||
// Promise mode
|
||||
lock.acquire(key, function() {
|
||||
// return value or promise
|
||||
}, opts).then(function() {
|
||||
// lock released
|
||||
});
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
```js
|
||||
// Callback mode
|
||||
lock.acquire(key, function(done) {
|
||||
done(new Error('error'));
|
||||
}, function(err, ret) {
|
||||
console.log(err.message) // output: error
|
||||
});
|
||||
|
||||
// Promise mode
|
||||
lock.acquire(key, function() {
|
||||
throw new Error('error');
|
||||
}).catch(function(err) {
|
||||
console.log(err.message) // output: error
|
||||
});
|
||||
```
|
||||
|
||||
## Acquire multiple keys
|
||||
|
||||
```js
|
||||
lock.acquire([key1, key2], fn, cb);
|
||||
```
|
||||
|
||||
## Domain reentrant lock
|
||||
|
||||
Lock is reentrant in the same domain
|
||||
|
||||
```js
|
||||
var domain = require('domain');
|
||||
var lock = new AsyncLock({domainReentrant : true});
|
||||
|
||||
var d = domain.create();
|
||||
d.run(function() {
|
||||
lock.acquire('key', function() {
|
||||
//Enter lock
|
||||
return lock.acquire('key', function() {
|
||||
//Enter same lock twice
|
||||
});
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
```js
|
||||
// Specify timeout
|
||||
var lock = new AsyncLock({timeout: 5000});
|
||||
lock.acquire(key, fn, function(err, ret) {
|
||||
// timed out error will be returned here if lock not acquired in given time
|
||||
});
|
||||
|
||||
// Set max pending tasks
|
||||
var lock = new AsyncLock({maxPending: 1000});
|
||||
lock.acquire(key, fn, function(err, ret) {
|
||||
// Handle too much pending error
|
||||
})
|
||||
|
||||
// Whether there is any running or pending async function
|
||||
lock.isBusy();
|
||||
|
||||
// Use your own promise library instead of the global Promise variable
|
||||
var lock = new AsyncLock({Promise: require('bluebird')}); // Bluebird
|
||||
var lock = new AsyncLock({Promise: require('q')}); // Q
|
||||
|
||||
// Add a task to the front of the queue waiting for a given lock
|
||||
lock.acquire(key, fn1, cb); // runs immediately
|
||||
lock.acquire(key, fn2, cb); // added to queue
|
||||
lock.acquire(key, priorityFn, cb, {skipQueue: true}); // jumps queue and runs before fn2
|
||||
```
|
||||
|
||||
## Changelog
|
||||
|
||||
See [Changelog](./History.md)
|
||||
|
||||
## Issues
|
||||
|
||||
See [issue tracker](https://github.com/rogierschouten/async-lock/issues).
|
||||
|
||||
## License
|
||||
|
||||
MIT, see [LICENSE](./LICENSE)
|
2
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/async-lock/index.js
generated
vendored
@ -1,2 +0,0 @@
|
||||
'use strict';
|
||||
module.exports = require('./lib');
|
267
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/async-lock/lib/index.js
generated
vendored
@ -1,267 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var AsyncLock = function (opts) {
|
||||
opts = opts || {};
|
||||
|
||||
this.Promise = opts.Promise || Promise;
|
||||
|
||||
// format: {key : [fn, fn]}
|
||||
// queues[key] = null indicates no job running for key
|
||||
this.queues = Object.create(null);
|
||||
|
||||
// lock is reentrant for same domain
|
||||
this.domainReentrant = opts.domainReentrant || false;
|
||||
if (this.domainReentrant) {
|
||||
if (typeof process === 'undefined' || typeof process.domain === 'undefined') {
|
||||
throw new Error(
|
||||
'Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, ' +
|
||||
'use a NodeJS version that still implements Domain, or install a browser polyfill.');
|
||||
}
|
||||
// domain of current running func {key : fn}
|
||||
this.domains = Object.create(null);
|
||||
}
|
||||
|
||||
this.timeout = opts.timeout || AsyncLock.DEFAULT_TIMEOUT;
|
||||
if (opts.maxPending === Infinity || (Number.isInteger(opts.maxPending) && opts.maxPending >= 0)) {
|
||||
this.maxPending = opts.maxPending;
|
||||
} else {
|
||||
this.maxPending = AsyncLock.DEFAULT_MAX_PENDING;
|
||||
}
|
||||
};
|
||||
|
||||
AsyncLock.DEFAULT_TIMEOUT = 0; //Never
|
||||
AsyncLock.DEFAULT_MAX_PENDING = 1000;
|
||||
|
||||
/**
|
||||
* Acquire Locks
|
||||
*
|
||||
* @param {String|Array} key resource key or keys to lock
|
||||
* @param {function} fn async function
|
||||
* @param {function} cb callback function, otherwise will return a promise
|
||||
* @param {Object} opts options
|
||||
*/
|
||||
AsyncLock.prototype.acquire = function (key, fn, cb, opts) {
|
||||
if (Array.isArray(key)) {
|
||||
return this._acquireBatch(key, fn, cb, opts);
|
||||
}
|
||||
|
||||
if (typeof (fn) !== 'function') {
|
||||
throw new Error('You must pass a function to execute');
|
||||
}
|
||||
|
||||
// faux-deferred promise using new Promise() (as Promise.defer is deprecated)
|
||||
var deferredResolve = null;
|
||||
var deferredReject = null;
|
||||
var deferred = null;
|
||||
|
||||
if (typeof (cb) !== 'function') {
|
||||
opts = cb;
|
||||
cb = null;
|
||||
|
||||
// will return a promise
|
||||
deferred = new this.Promise(function(resolve, reject) {
|
||||
deferredResolve = resolve;
|
||||
deferredReject = reject;
|
||||
});
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
var resolved = false;
|
||||
var timer = null;
|
||||
var self = this;
|
||||
|
||||
var done = function (locked, err, ret) {
|
||||
if (locked) {
|
||||
if (self.queues[key].length === 0) {
|
||||
delete self.queues[key];
|
||||
}
|
||||
if (self.domainReentrant) {
|
||||
delete self.domains[key];
|
||||
}
|
||||
}
|
||||
|
||||
if (!resolved) {
|
||||
if (!deferred) {
|
||||
if (typeof (cb) === 'function') {
|
||||
cb(err, ret);
|
||||
}
|
||||
}
|
||||
else {
|
||||
//promise mode
|
||||
if (err) {
|
||||
deferredReject(err);
|
||||
}
|
||||
else {
|
||||
deferredResolve(ret);
|
||||
}
|
||||
}
|
||||
resolved = true;
|
||||
}
|
||||
|
||||
if (locked) {
|
||||
//run next func
|
||||
if (!!self.queues[key] && self.queues[key].length > 0) {
|
||||
self.queues[key].shift()();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var exec = function (locked) {
|
||||
if (resolved) { // may due to timed out
|
||||
return done(locked);
|
||||
}
|
||||
|
||||
if (timer) {
|
||||
clearTimeout(timer);
|
||||
timer = null;
|
||||
}
|
||||
|
||||
if (self.domainReentrant && locked) {
|
||||
self.domains[key] = process.domain;
|
||||
}
|
||||
|
||||
// Callback mode
|
||||
if (fn.length === 1) {
|
||||
var called = false;
|
||||
fn(function (err, ret) {
|
||||
if (!called) {
|
||||
called = true;
|
||||
done(locked, err, ret);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
// Promise mode
|
||||
self._promiseTry(function () {
|
||||
return fn();
|
||||
})
|
||||
.then(function(ret){
|
||||
done(locked, undefined, ret);
|
||||
}, function(error){
|
||||
done(locked, error);
|
||||
});
|
||||
}
|
||||
};
|
||||
if (self.domainReentrant && !!process.domain) {
|
||||
exec = process.domain.bind(exec);
|
||||
}
|
||||
|
||||
if (!self.queues[key]) {
|
||||
self.queues[key] = [];
|
||||
exec(true);
|
||||
}
|
||||
else if (self.domainReentrant && !!process.domain && process.domain === self.domains[key]) {
|
||||
// If code is in the same domain of current running task, run it directly
|
||||
// Since lock is re-enterable
|
||||
exec(false);
|
||||
}
|
||||
else if (self.queues[key].length >= self.maxPending) {
|
||||
done(false, new Error('Too much pending tasks'));
|
||||
}
|
||||
else {
|
||||
var taskFn = function () {
|
||||
exec(true);
|
||||
};
|
||||
if (opts.skipQueue) {
|
||||
self.queues[key].unshift(taskFn);
|
||||
} else {
|
||||
self.queues[key].push(taskFn);
|
||||
}
|
||||
|
||||
var timeout = opts.timeout || self.timeout;
|
||||
if (timeout) {
|
||||
timer = setTimeout(function () {
|
||||
timer = null;
|
||||
done(false, new Error('async-lock timed out'));
|
||||
}, timeout);
|
||||
}
|
||||
}
|
||||
|
||||
if (deferred) {
|
||||
return deferred;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Below is how this function works:
|
||||
*
|
||||
* Equivalent code:
|
||||
* self.acquire(key1, function(cb){
|
||||
* self.acquire(key2, function(cb){
|
||||
* self.acquire(key3, fn, cb);
|
||||
* }, cb);
|
||||
* }, cb);
|
||||
*
|
||||
* Equivalent code:
|
||||
* var fn3 = getFn(key3, fn);
|
||||
* var fn2 = getFn(key2, fn3);
|
||||
* var fn1 = getFn(key1, fn2);
|
||||
* fn1(cb);
|
||||
*/
|
||||
AsyncLock.prototype._acquireBatch = function (keys, fn, cb, opts) {
|
||||
if (typeof (cb) !== 'function') {
|
||||
opts = cb;
|
||||
cb = null;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
var getFn = function (key, fn) {
|
||||
return function (cb) {
|
||||
self.acquire(key, fn, cb, opts);
|
||||
};
|
||||
};
|
||||
|
||||
var fnx = fn;
|
||||
keys.reverse().forEach(function (key) {
|
||||
fnx = getFn(key, fnx);
|
||||
});
|
||||
|
||||
if (typeof (cb) === 'function') {
|
||||
fnx(cb);
|
||||
}
|
||||
else {
|
||||
return new this.Promise(function (resolve, reject) {
|
||||
// check for promise mode in case keys is empty array
|
||||
if (fnx.length === 1) {
|
||||
fnx(function (err, ret) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
else {
|
||||
resolve(ret);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
resolve(fnx());
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* Whether there is any running or pending asyncFunc
|
||||
*
|
||||
* @param {String} key
|
||||
*/
|
||||
AsyncLock.prototype.isBusy = function (key) {
|
||||
if (!key) {
|
||||
return Object.keys(this.queues).length > 0;
|
||||
}
|
||||
else {
|
||||
return !!this.queues[key];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Promise.try() implementation to become independent of Q-specific methods
|
||||
*/
|
||||
AsyncLock.prototype._promiseTry = function(fn) {
|
||||
try {
|
||||
return this.Promise.resolve(fn());
|
||||
} catch (e) {
|
||||
return this.Promise.reject(e);
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AsyncLock;
|
48
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/async-lock/package.json
generated
vendored
@ -1,48 +0,0 @@
|
||||
{
|
||||
"name": "async-lock",
|
||||
"description": "Lock on asynchronous code",
|
||||
"version": "1.2.8",
|
||||
"author": {
|
||||
"name": "Rogier Schouten",
|
||||
"url": "https://github.com/rogierschouten/",
|
||||
"email": "github@workingcode.ninja"
|
||||
},
|
||||
"private": false,
|
||||
"homepage": "https://github.com/rogierschouten/async-lock",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/rogierschouten/async-lock.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/rogierschouten/async-lock/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"lock",
|
||||
"async",
|
||||
"concurrency",
|
||||
"critical",
|
||||
"section",
|
||||
"mutex"
|
||||
],
|
||||
"engines": {},
|
||||
"scripts": {
|
||||
"start": "grunt",
|
||||
"test": "grunt test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bluebird": "^3.5.1",
|
||||
"grunt": "^1.0.4",
|
||||
"grunt-cli": "^1.2.0",
|
||||
"grunt-contrib-clean": "^1.1.0",
|
||||
"grunt-contrib-jshint": "^1.1.0",
|
||||
"grunt-contrib-watch": "^1.1.0",
|
||||
"grunt-env": "^1.0.1",
|
||||
"grunt-mocha-test": "^0.13.3",
|
||||
"load-grunt-tasks": "^4.0.0",
|
||||
"lodash": "^4.17.20",
|
||||
"mocha": "^7.1.2",
|
||||
"q": "^1.5.1",
|
||||
"should": "^13.2.1"
|
||||
}
|
||||
}
|
1
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/.eslintignore
generated
vendored
@ -1 +0,0 @@
|
||||
coverage/
|
17
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/.eslintrc
generated
vendored
@ -1,17 +0,0 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"func-name-matching": 0,
|
||||
"id-length": 0,
|
||||
"new-cap": [2, {
|
||||
"capIsNewExceptions": [
|
||||
"GetIntrinsic",
|
||||
],
|
||||
}],
|
||||
"no-magic-numbers": 0,
|
||||
"operator-linebreak": [2, "before"],
|
||||
},
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/call-bind
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
13
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/.nycrc
generated
vendored
@ -1,13 +0,0 @@
|
||||
{
|
||||
"all": true,
|
||||
"check-coverage": false,
|
||||
"reporter": ["text-summary", "text", "html", "json"],
|
||||
"lines": 86,
|
||||
"statements": 85.93,
|
||||
"functions": 82.43,
|
||||
"branches": 76.06,
|
||||
"exclude": [
|
||||
"coverage",
|
||||
"test"
|
||||
]
|
||||
}
|
42
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/CHANGELOG.md
generated
vendored
@ -1,42 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d)
|
||||
|
||||
## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1)
|
||||
- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e)
|
||||
- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb)
|
||||
- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71)
|
||||
- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee)
|
||||
- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2)
|
||||
- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8)
|
||||
- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532)
|
||||
- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6)
|
||||
|
||||
## v1.0.0 - 2020-10-30
|
||||
|
||||
### Commits
|
||||
|
||||
- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50)
|
||||
- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df)
|
||||
- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65)
|
||||
- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249)
|
||||
- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13)
|
||||
- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4)
|
||||
- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717)
|
||||
- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af)
|
||||
- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650)
|
||||
- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f)
|
21
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/LICENSE
generated
vendored
@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Jordan Harband
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
2
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/README.md
generated
vendored
@ -1,2 +0,0 @@
|
||||
# call-bind
|
||||
Robustly `.call.bind()` a function.
|
15
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/callBound.js
generated
vendored
@ -1,15 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var callBind = require('./');
|
||||
|
||||
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
||||
|
||||
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
||||
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
||||
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
||||
return callBind(intrinsic);
|
||||
}
|
||||
return intrinsic;
|
||||
};
|
47
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/index.js
generated
vendored
@ -1,47 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
||||
var $call = GetIntrinsic('%Function.prototype.call%');
|
||||
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
||||
|
||||
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
||||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
||||
var $max = GetIntrinsic('%Math.max%');
|
||||
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
$defineProperty = null;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = function callBind(originalFunction) {
|
||||
var func = $reflectApply(bind, $call, arguments);
|
||||
if ($gOPD && $defineProperty) {
|
||||
var desc = $gOPD(func, 'length');
|
||||
if (desc.configurable) {
|
||||
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
||||
$defineProperty(
|
||||
func,
|
||||
'length',
|
||||
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
||||
);
|
||||
}
|
||||
}
|
||||
return func;
|
||||
};
|
||||
|
||||
var applyBind = function applyBind() {
|
||||
return $reflectApply(bind, $apply, arguments);
|
||||
};
|
||||
|
||||
if ($defineProperty) {
|
||||
$defineProperty(module.exports, 'apply', { value: applyBind });
|
||||
} else {
|
||||
module.exports.apply = applyBind;
|
||||
}
|
80
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/package.json
generated
vendored
@ -1,80 +0,0 @@
|
||||
{
|
||||
"name": "call-bind",
|
||||
"version": "1.0.2",
|
||||
"description": "Robustly `.call.bind()` a function",
|
||||
"main": "index.js",
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./index.js"
|
||||
],
|
||||
"./callBound": [
|
||||
{
|
||||
"default": "./callBound.js"
|
||||
},
|
||||
"./callBound.js"
|
||||
],
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "safe-publish-latest",
|
||||
"lint": "eslint --ext=.js,.mjs .",
|
||||
"pretest": "npm run lint",
|
||||
"tests-only": "nyc tape 'test/*'",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"version": "auto-changelog && git add CHANGELOG.md",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/ljharb/call-bind.git"
|
||||
},
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"ecmascript",
|
||||
"es",
|
||||
"js",
|
||||
"callbind",
|
||||
"callbound",
|
||||
"call",
|
||||
"bind",
|
||||
"bound",
|
||||
"call-bind",
|
||||
"call-bound",
|
||||
"function",
|
||||
"es-abstract"
|
||||
],
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/ljharb/call-bind/issues"
|
||||
},
|
||||
"homepage": "https://github.com/ljharb/call-bind#readme",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^17.3.0",
|
||||
"aud": "^1.1.3",
|
||||
"auto-changelog": "^2.2.1",
|
||||
"eslint": "^7.17.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^1.1.4",
|
||||
"tape": "^5.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1",
|
||||
"get-intrinsic": "^1.0.2"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
}
|
||||
}
|
55
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/test/callBound.js
generated
vendored
@ -1,55 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
var callBound = require('../callBound');
|
||||
|
||||
test('callBound', function (t) {
|
||||
// static primitive
|
||||
t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
|
||||
t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
|
||||
|
||||
// static non-function object
|
||||
t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
|
||||
t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
|
||||
t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
|
||||
t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
|
||||
|
||||
// static function
|
||||
t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
|
||||
t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
|
||||
|
||||
// prototype primitive
|
||||
t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
|
||||
t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
|
||||
|
||||
// prototype function
|
||||
t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself');
|
||||
t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself');
|
||||
t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original');
|
||||
t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original');
|
||||
|
||||
t['throws'](
|
||||
function () { callBound('does not exist'); },
|
||||
SyntaxError,
|
||||
'nonexistent intrinsic throws'
|
||||
);
|
||||
t['throws'](
|
||||
function () { callBound('does not exist', true); },
|
||||
SyntaxError,
|
||||
'allowMissing arg still throws for unknown intrinsic'
|
||||
);
|
||||
|
||||
/* globals WeakRef: false */
|
||||
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
|
||||
st['throws'](
|
||||
function () { callBound('WeakRef'); },
|
||||
TypeError,
|
||||
'real but absent intrinsic throws'
|
||||
);
|
||||
st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
66
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/call-bind/test/index.js
generated
vendored
@ -1,66 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var callBind = require('../');
|
||||
var bind = require('function-bind');
|
||||
|
||||
var test = require('tape');
|
||||
|
||||
/*
|
||||
* older engines have length nonconfigurable
|
||||
* in io.js v3, it is configurable except on bound functions, hence the .bind()
|
||||
*/
|
||||
var functionsHaveConfigurableLengths = !!(
|
||||
Object.getOwnPropertyDescriptor
|
||||
&& Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable
|
||||
);
|
||||
|
||||
test('callBind', function (t) {
|
||||
var sentinel = { sentinel: true };
|
||||
var func = function (a, b) {
|
||||
// eslint-disable-next-line no-invalid-this
|
||||
return [this, a, b];
|
||||
};
|
||||
t.equal(func.length, 2, 'original function length is 2');
|
||||
t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
|
||||
t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args');
|
||||
t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args');
|
||||
|
||||
var bound = callBind(func);
|
||||
t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
||||
t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args');
|
||||
t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args');
|
||||
t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args');
|
||||
|
||||
var boundR = callBind(func, sentinel);
|
||||
t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
||||
t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args');
|
||||
t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args');
|
||||
t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args');
|
||||
|
||||
var boundArg = callBind(func, sentinel, 1);
|
||||
t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
||||
t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args');
|
||||
t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
|
||||
t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args');
|
||||
|
||||
t.test('callBind.apply', function (st) {
|
||||
var aBound = callBind.apply(func);
|
||||
st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args');
|
||||
st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
|
||||
st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
|
||||
|
||||
var aBoundArg = callBind.apply(func);
|
||||
st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args');
|
||||
st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
|
||||
st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
|
||||
|
||||
var aBoundR = callBind.apply(func, sentinel);
|
||||
st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args');
|
||||
st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args');
|
||||
st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
@ -1,33 +0,0 @@
|
||||
Changelog
|
||||
=========
|
||||
|
||||
# 2.x
|
||||
|
||||
## 2.1.x
|
||||
|
||||
### 2.1.0
|
||||
|
||||
- Now compatible with all versions of Node.js ([PR #22](https://github.com/patrick-steele-idem/child-process-promise/pull/22) by [@olsonpm](https://github.com/olsonpm) with modification)
|
||||
|
||||
## 2.0.x
|
||||
|
||||
### 2.0.1
|
||||
|
||||
- Minor cleanup
|
||||
|
||||
### 2.0.0
|
||||
|
||||
#### Major changes
|
||||
|
||||
- Switched from [q](https://github.com/kriskowal/q) to [native ES2015 promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
|
||||
- This module now uses various ES2015 functionality only available in Node.js 4.0+
|
||||
- Despite the major version being incremented, `v2.x` maintains backwards compatibility with `v1.x`
|
||||
|
||||
#### Breaking changes
|
||||
|
||||
- This library now requires Node.js 4.0+
|
||||
- If you are using Node.js <4 you should use `child-process-promise@^1.0.0`
|
||||
|
||||
# 1.x
|
||||
|
||||
- Initial release
|
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Patrick Steele-Idem <pnidem@gmail.com> (psteeleidem.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
@ -1,74 +0,0 @@
|
||||
child-process-promise
|
||||
=====================
|
||||
|
||||
[](https://travis-ci.org/patrick-steele-idem/child-process-promise)
|
||||
[](https://www.npmjs.com/package/child-process-promise)
|
||||
[](http://npm-stat.com/charts.html?package=child-process-promise)
|
||||
|
||||
Simple wrapper around the `child_process` module that makes use of promises
|
||||
|
||||
# Installation
|
||||
```
|
||||
npm install child-process-promise --save
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
## exec
|
||||
```javascript
|
||||
var exec = require('child-process-promise').exec;
|
||||
|
||||
exec('echo hello')
|
||||
.then(function (result) {
|
||||
var stdout = result.stdout;
|
||||
var stderr = result.stderr;
|
||||
console.log('stdout: ', stdout);
|
||||
console.log('stderr: ', stderr);
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.error('ERROR: ', err);
|
||||
});
|
||||
```
|
||||
|
||||
## spawn
|
||||
```javascript
|
||||
var spawn = require('child-process-promise').spawn;
|
||||
|
||||
var promise = spawn('echo', ['hello']);
|
||||
|
||||
var childProcess = promise.childProcess;
|
||||
|
||||
console.log('[spawn] childProcess.pid: ', childProcess.pid);
|
||||
childProcess.stdout.on('data', function (data) {
|
||||
console.log('[spawn] stdout: ', data.toString());
|
||||
});
|
||||
childProcess.stderr.on('data', function (data) {
|
||||
console.log('[spawn] stderr: ', data.toString());
|
||||
});
|
||||
|
||||
promise.then(function () {
|
||||
console.log('[spawn] done!');
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.error('[spawn] ERROR: ', err);
|
||||
});
|
||||
```
|
||||
### Options
|
||||
|
||||
#### capture
|
||||
Type: `Array`
|
||||
Default: `[]`
|
||||
|
||||
Pass an additional `capture` option to buffer the result of `stdout` and/or `stderr`
|
||||
|
||||
```javascript
|
||||
var spawn = require('child-process-promise').spawn;
|
||||
|
||||
spawn('echo', ['hello'], { capture: [ 'stdout', 'stderr' ]})
|
||||
.then(function (result) {
|
||||
console.log('[spawn] stdout: ', result.stdout.toString());
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.error('[spawn] stderr: ', err.stderr);
|
||||
});
|
||||
```
|
@ -1,7 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
if (require('node-version').major >= 4) {
|
||||
module.exports = require('./lib');
|
||||
} else {
|
||||
module.exports = require('./lib-es5');
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
var ChildProcessError = function (_Error) {
|
||||
_inherits(ChildProcessError, _Error);
|
||||
|
||||
function ChildProcessError(message, code, childProcess, stdout, stderr) {
|
||||
_classCallCheck(this, ChildProcessError);
|
||||
|
||||
var _this = _possibleConstructorReturn(this, (ChildProcessError.__proto__ || Object.getPrototypeOf(ChildProcessError)).call(this, message));
|
||||
|
||||
Error.captureStackTrace(_this, _this.constructor);
|
||||
_this.name = _this.constructor.name;
|
||||
_this.code = code;
|
||||
_this.childProcess = childProcess;
|
||||
_this.stdout = stdout;
|
||||
_this.stderr = stderr;
|
||||
return _this;
|
||||
}
|
||||
|
||||
return ChildProcessError;
|
||||
}(Error);
|
||||
|
||||
module.exports = ChildProcessError;
|
@ -1,87 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
var Promise;
|
||||
|
||||
if (require('node-version').major >= 4) {
|
||||
Promise = global.Promise;
|
||||
} else {
|
||||
// Don't use the native Promise in Node.js <4 since it doesn't support subclassing
|
||||
Promise = require('promise-polyfill');
|
||||
}
|
||||
|
||||
var ChildProcessPromise = function (_Promise) {
|
||||
_inherits(ChildProcessPromise, _Promise);
|
||||
|
||||
function ChildProcessPromise(executor) {
|
||||
_classCallCheck(this, ChildProcessPromise);
|
||||
|
||||
var resolve;
|
||||
var reject;
|
||||
|
||||
var _this = _possibleConstructorReturn(this, (ChildProcessPromise.__proto__ || Object.getPrototypeOf(ChildProcessPromise)).call(this, function (_resolve, _reject) {
|
||||
resolve = _resolve;
|
||||
reject = _reject;
|
||||
|
||||
if (executor) {
|
||||
executor(resolve, reject);
|
||||
}
|
||||
}));
|
||||
|
||||
_this._cpResolve = resolve;
|
||||
_this._cpReject = reject;
|
||||
_this.childProcess = undefined;
|
||||
return _this;
|
||||
}
|
||||
|
||||
_createClass(ChildProcessPromise, [{
|
||||
key: 'progress',
|
||||
value: function progress(callback) {
|
||||
var _this2 = this;
|
||||
|
||||
process.nextTick(function () {
|
||||
callback(_this2.childProcess);
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
}, {
|
||||
key: 'then',
|
||||
value: function then(onFulfilled, onRejected) {
|
||||
var newPromise = _get(ChildProcessPromise.prototype.__proto__ || Object.getPrototypeOf(ChildProcessPromise.prototype), 'then', this).call(this, onFulfilled, onRejected);
|
||||
newPromise.childProcess = this.childProcess;
|
||||
return newPromise;
|
||||
}
|
||||
}, {
|
||||
key: 'catch',
|
||||
value: function _catch(onRejected) {
|
||||
var newPromise = _get(ChildProcessPromise.prototype.__proto__ || Object.getPrototypeOf(ChildProcessPromise.prototype), 'catch', this).call(this, onRejected);
|
||||
newPromise.childProcess = this.childProcess;
|
||||
return newPromise;
|
||||
}
|
||||
}, {
|
||||
key: 'done',
|
||||
value: function done() {
|
||||
this.catch(function (e) {
|
||||
process.nextTick(function () {
|
||||
throw e;
|
||||
});
|
||||
});
|
||||
}
|
||||
}]);
|
||||
|
||||
return ChildProcessPromise;
|
||||
}(Promise);
|
||||
|
||||
ChildProcessPromise.prototype.fail = ChildProcessPromise.prototype.catch;
|
||||
|
||||
module.exports = ChildProcessPromise;
|
@ -1,166 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var child_process = require('child_process');
|
||||
var crossSpawn = require('cross-spawn');
|
||||
var ChildProcessPromise = require('./ChildProcessPromise');
|
||||
var ChildProcessError = require('./ChildProcessError');
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
|
||||
/**
|
||||
* Promise wrapper for exec, execFile
|
||||
*
|
||||
* @param {String} method
|
||||
* @param {...*} args
|
||||
* @return {Promise}
|
||||
*/
|
||||
function doExec(method, args) {
|
||||
var cp;
|
||||
var cpPromise = new ChildProcessPromise();
|
||||
var reject = cpPromise._cpReject;
|
||||
var resolve = cpPromise._cpResolve;
|
||||
|
||||
var finalArgs = slice.call(args, 0);
|
||||
finalArgs.push(callback);
|
||||
|
||||
cp = child_process[method].apply(child_process, finalArgs);
|
||||
|
||||
function callback(err, stdout, stderr) {
|
||||
if (err) {
|
||||
var commandStr = args[0] + (Array.isArray(args[1]) ? ' ' + args[1].join(' ') : '');
|
||||
err.message += ' `' + commandStr + '` (exited with error code ' + err.code + ')';
|
||||
err.stdout = stdout;
|
||||
err.stderr = stderr;
|
||||
var cpError = new ChildProcessError(err.message, err.code, child_process, stdout, stderr);
|
||||
reject(cpError);
|
||||
} else {
|
||||
resolve({
|
||||
childProcess: cp,
|
||||
stdout: stdout,
|
||||
stderr: stderr
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
cpPromise.childProcess = cp;
|
||||
|
||||
return cpPromise;
|
||||
}
|
||||
|
||||
/**
|
||||
* `exec` as Promised
|
||||
*
|
||||
* @param {String} command
|
||||
* @param {Object} options
|
||||
* @return {Promise}
|
||||
*/
|
||||
function exec() {
|
||||
return doExec('exec', arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* `execFile` as Promised
|
||||
*
|
||||
* @param {String} command
|
||||
* @param {Array} args
|
||||
* @param {Object} options
|
||||
* @return {Promise}
|
||||
*/
|
||||
function execFile() {
|
||||
return doExec('execFile', arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* `spawn` as Promised
|
||||
*
|
||||
* @param {String} command
|
||||
* @param {Array} args
|
||||
* @param {Object} options
|
||||
* @return {Promise}
|
||||
*/
|
||||
function doSpawn(method, command, args, options) {
|
||||
var result = {};
|
||||
|
||||
var cp;
|
||||
var cpPromise = new ChildProcessPromise();
|
||||
var reject = cpPromise._cpReject;
|
||||
var resolve = cpPromise._cpResolve;
|
||||
|
||||
var successfulExitCodes = options && options.successfulExitCodes || [0];
|
||||
|
||||
cp = method(command, args, options);
|
||||
|
||||
// Don't return the whole Buffered result by default.
|
||||
var captureStdout = false;
|
||||
var captureStderr = false;
|
||||
|
||||
var capture = options && options.capture;
|
||||
if (capture) {
|
||||
for (var i = 0, len = capture.length; i < len; i++) {
|
||||
var cur = capture[i];
|
||||
if (cur === 'stdout') {
|
||||
captureStdout = true;
|
||||
} else if (cur === 'stderr') {
|
||||
captureStderr = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result.childProcess = cp;
|
||||
|
||||
if (captureStdout) {
|
||||
result.stdout = '';
|
||||
|
||||
cp.stdout.on('data', function (data) {
|
||||
result.stdout += data;
|
||||
});
|
||||
}
|
||||
|
||||
if (captureStderr) {
|
||||
result.stderr = '';
|
||||
|
||||
cp.stderr.on('data', function (data) {
|
||||
result.stderr += data;
|
||||
});
|
||||
}
|
||||
|
||||
cp.on('error', reject);
|
||||
|
||||
cp.on('close', function (code) {
|
||||
if (successfulExitCodes.indexOf(code) === -1) {
|
||||
var commandStr = command + (args.length ? ' ' + args.join(' ') : '');
|
||||
var message = '`' + commandStr + '` failed with code ' + code;
|
||||
var err = new ChildProcessError(message, code, cp);
|
||||
|
||||
if (captureStderr) {
|
||||
err.stderr = result.stderr.toString();
|
||||
}
|
||||
|
||||
if (captureStdout) {
|
||||
err.stdout = result.stdout.toString();
|
||||
}
|
||||
|
||||
reject(err);
|
||||
} else {
|
||||
result.code = code;
|
||||
resolve(result);
|
||||
}
|
||||
});
|
||||
|
||||
cpPromise.childProcess = cp;
|
||||
|
||||
return cpPromise;
|
||||
}
|
||||
|
||||
function spawn(command, args, options) {
|
||||
return doSpawn(crossSpawn, command, args, options);
|
||||
}
|
||||
|
||||
function fork(modulePath, args, options) {
|
||||
return doSpawn(child_process.fork, modulePath, args, options);
|
||||
}
|
||||
|
||||
exports.exec = exec;
|
||||
exports.execFile = execFile;
|
||||
exports.spawn = spawn;
|
||||
exports.fork = fork;
|
@ -1,18 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
class ChildProcessError extends Error {
|
||||
constructor(message, code, childProcess, stdout, stderr) {
|
||||
super(message);
|
||||
Error.captureStackTrace(this, this.constructor);
|
||||
this.name = this.constructor.name;
|
||||
this.code = code;
|
||||
this.childProcess = childProcess;
|
||||
this.stdout = stdout;
|
||||
this.stderr = stderr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = ChildProcessError;
|
@ -1,62 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var Promise;
|
||||
|
||||
if (require('node-version').major >= 4) {
|
||||
Promise = global.Promise;
|
||||
} else {
|
||||
// Don't use the native Promise in Node.js <4 since it doesn't support subclassing
|
||||
Promise = require('promise-polyfill');
|
||||
}
|
||||
|
||||
class ChildProcessPromise extends Promise {
|
||||
constructor(executor) {
|
||||
var resolve;
|
||||
var reject;
|
||||
|
||||
super((_resolve, _reject) => {
|
||||
resolve = _resolve;
|
||||
reject = _reject;
|
||||
|
||||
if (executor) {
|
||||
executor(resolve, reject);
|
||||
}
|
||||
});
|
||||
|
||||
this._cpResolve = resolve;
|
||||
this._cpReject = reject;
|
||||
this.childProcess = undefined;
|
||||
}
|
||||
|
||||
progress(callback) {
|
||||
process.nextTick(() => {
|
||||
callback(this.childProcess);
|
||||
});
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
then(onFulfilled, onRejected) {
|
||||
var newPromise = super.then(onFulfilled, onRejected);
|
||||
newPromise.childProcess = this.childProcess;
|
||||
return newPromise;
|
||||
}
|
||||
|
||||
catch(onRejected) {
|
||||
var newPromise = super.catch(onRejected);
|
||||
newPromise.childProcess = this.childProcess;
|
||||
return newPromise;
|
||||
}
|
||||
|
||||
done() {
|
||||
this.catch((e) => {
|
||||
process.nextTick(() => {
|
||||
throw e;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ChildProcessPromise.prototype.fail = ChildProcessPromise.prototype.catch;
|
||||
|
||||
module.exports = ChildProcessPromise;
|
@ -1,165 +0,0 @@
|
||||
'use strict';
|
||||
var child_process = require('child_process');
|
||||
var crossSpawn = require('cross-spawn');
|
||||
var ChildProcessPromise = require('./ChildProcessPromise');
|
||||
var ChildProcessError = require('./ChildProcessError');
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
|
||||
/**
|
||||
* Promise wrapper for exec, execFile
|
||||
*
|
||||
* @param {String} method
|
||||
* @param {...*} args
|
||||
* @return {Promise}
|
||||
*/
|
||||
function doExec(method, args) {
|
||||
var cp;
|
||||
var cpPromise = new ChildProcessPromise();
|
||||
var reject = cpPromise._cpReject;
|
||||
var resolve = cpPromise._cpResolve;
|
||||
|
||||
var finalArgs = slice.call(args, 0);
|
||||
finalArgs.push(callback);
|
||||
|
||||
cp = child_process[method].apply(child_process, finalArgs);
|
||||
|
||||
function callback(err, stdout, stderr) {
|
||||
if (err) {
|
||||
var commandStr = args[0] + (Array.isArray(args[1]) ? (' ' + args[1].join(' ')) : '');
|
||||
err.message += ' `' + commandStr + '` (exited with error code ' + err.code + ')';
|
||||
err.stdout = stdout;
|
||||
err.stderr = stderr;
|
||||
var cpError = new ChildProcessError(err.message, err.code, child_process, stdout, stderr);
|
||||
reject(cpError);
|
||||
} else {
|
||||
resolve({
|
||||
childProcess: cp,
|
||||
stdout: stdout,
|
||||
stderr: stderr
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
cpPromise.childProcess = cp;
|
||||
|
||||
return cpPromise;
|
||||
}
|
||||
|
||||
/**
|
||||
* `exec` as Promised
|
||||
*
|
||||
* @param {String} command
|
||||
* @param {Object} options
|
||||
* @return {Promise}
|
||||
*/
|
||||
function exec() {
|
||||
return doExec('exec', arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* `execFile` as Promised
|
||||
*
|
||||
* @param {String} command
|
||||
* @param {Array} args
|
||||
* @param {Object} options
|
||||
* @return {Promise}
|
||||
*/
|
||||
function execFile() {
|
||||
return doExec('execFile', arguments);
|
||||
}
|
||||
|
||||
/**
|
||||
* `spawn` as Promised
|
||||
*
|
||||
* @param {String} command
|
||||
* @param {Array} args
|
||||
* @param {Object} options
|
||||
* @return {Promise}
|
||||
*/
|
||||
function doSpawn(method, command, args, options) {
|
||||
var result = {};
|
||||
|
||||
var cp;
|
||||
var cpPromise = new ChildProcessPromise();
|
||||
var reject = cpPromise._cpReject;
|
||||
var resolve = cpPromise._cpResolve;
|
||||
|
||||
var successfulExitCodes = (options && options.successfulExitCodes) || [0];
|
||||
|
||||
cp = method(command, args, options);
|
||||
|
||||
// Don't return the whole Buffered result by default.
|
||||
var captureStdout = false;
|
||||
var captureStderr = false;
|
||||
|
||||
var capture = options && options.capture;
|
||||
if (capture) {
|
||||
for (var i = 0, len = capture.length; i < len; i++) {
|
||||
var cur = capture[i];
|
||||
if (cur === 'stdout') {
|
||||
captureStdout = true;
|
||||
} else if (cur === 'stderr') {
|
||||
captureStderr = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result.childProcess = cp;
|
||||
|
||||
if (captureStdout) {
|
||||
result.stdout = '';
|
||||
|
||||
cp.stdout.on('data', function(data) {
|
||||
result.stdout += data;
|
||||
});
|
||||
}
|
||||
|
||||
if (captureStderr) {
|
||||
result.stderr = '';
|
||||
|
||||
cp.stderr.on('data', function(data) {
|
||||
result.stderr += data;
|
||||
});
|
||||
}
|
||||
|
||||
cp.on('error', reject);
|
||||
|
||||
cp.on('close', function(code) {
|
||||
if (successfulExitCodes.indexOf(code) === -1) {
|
||||
var commandStr = command + (args.length ? (' ' + args.join(' ')) : '');
|
||||
var message = '`' + commandStr + '` failed with code ' + code;
|
||||
var err = new ChildProcessError(message, code, cp);
|
||||
|
||||
if (captureStderr) {
|
||||
err.stderr = result.stderr.toString();
|
||||
}
|
||||
|
||||
if (captureStdout) {
|
||||
err.stdout = result.stdout.toString();
|
||||
}
|
||||
|
||||
reject(err);
|
||||
} else {
|
||||
result.code = code;
|
||||
resolve(result);
|
||||
}
|
||||
});
|
||||
|
||||
cpPromise.childProcess = cp;
|
||||
|
||||
return cpPromise;
|
||||
}
|
||||
|
||||
function spawn(command, args, options) {
|
||||
return doSpawn(crossSpawn, command, args, options);
|
||||
}
|
||||
|
||||
function fork(modulePath, args, options) {
|
||||
return doSpawn(child_process.fork, modulePath, args, options);
|
||||
}
|
||||
|
||||
exports.exec = exec;
|
||||
exports.execFile = execFile;
|
||||
exports.spawn = spawn;
|
||||
exports.fork = fork;
|
@ -1,58 +0,0 @@
|
||||
{
|
||||
"name": "child-process-promise",
|
||||
"description": "Simple wrapper around the \"child_process\" module that makes use of promises",
|
||||
"main": "./index.js",
|
||||
"files": [
|
||||
"lib",
|
||||
"lib-es5",
|
||||
"Readme.md"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint lib/*js test/*js",
|
||||
"test": "npm run mocha",
|
||||
"mocha": "mocha --ui bdd --reporter spec ./test/",
|
||||
"prepublish": "babel lib --out-dir lib-es5"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/patrick-steele-idem/child-process-promise.git"
|
||||
},
|
||||
"keywords": [
|
||||
"child",
|
||||
"process",
|
||||
"promises"
|
||||
],
|
||||
"author": "Patrick Steele-Idem <pnidem@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/patrick-steele-idem/child-process-promise/issues"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "http://registry.npmjs.org/"
|
||||
},
|
||||
"dependencies": {
|
||||
"cross-spawn": "^4.0.2",
|
||||
"node-version": "^1.0.0",
|
||||
"promise-polyfill": "^6.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.11.4",
|
||||
"babel-plugin-check-es2015-constants": "^6.8.0",
|
||||
"babel-plugin-transform-es2015-block-scoping": "^6.10.1",
|
||||
"babel-preset-es2015": "^6.13.2",
|
||||
"chai": "^3.5.0",
|
||||
"eslint": "^0.10.2",
|
||||
"jshint": "^2.9.1",
|
||||
"mocha": "^2.4.5"
|
||||
},
|
||||
"version": "2.2.1",
|
||||
"babel": {
|
||||
"presets": [
|
||||
"es2015"
|
||||
],
|
||||
"plugins": [
|
||||
"check-es2015-constants",
|
||||
"transform-es2015-block-scoping"
|
||||
]
|
||||
}
|
||||
}
|
19
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/cross-spawn/LICENSE
generated
vendored
@ -1,19 +0,0 @@
|
||||
Copyright (c) 2014 IndigoUnited
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
71
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/cross-spawn/README.md
generated
vendored
@ -1,71 +0,0 @@
|
||||
# cross-spawn
|
||||
|
||||
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
|
||||
|
||||
[npm-url]:https://npmjs.org/package/cross-spawn
|
||||
[downloads-image]:http://img.shields.io/npm/dm/cross-spawn.svg
|
||||
[npm-image]:http://img.shields.io/npm/v/cross-spawn.svg
|
||||
[travis-url]:https://travis-ci.org/IndigoUnited/node-cross-spawn
|
||||
[travis-image]:http://img.shields.io/travis/IndigoUnited/node-cross-spawn/master.svg
|
||||
[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
|
||||
[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
|
||||
[david-dm-url]:https://david-dm.org/IndigoUnited/node-cross-spawn
|
||||
[david-dm-image]:https://img.shields.io/david/IndigoUnited/node-cross-spawn.svg
|
||||
[david-dm-dev-url]:https://david-dm.org/IndigoUnited/node-cross-spawn#info=devDependencies
|
||||
[david-dm-dev-image]:https://img.shields.io/david/dev/IndigoUnited/node-cross-spawn.svg
|
||||
|
||||
A cross platform solution to node's spawn and spawnSync.
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
`$ npm install cross-spawn`
|
||||
|
||||
If you are using `spawnSync` on node 0.10 or older, you will also need to install `spawn-sync`:
|
||||
|
||||
`$ npm install spawn-sync`
|
||||
|
||||
|
||||
## Why
|
||||
|
||||
Node has issues when using spawn on Windows:
|
||||
|
||||
- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
|
||||
- It does not support [shebangs](http://pt.wikipedia.org/wiki/Shebang)
|
||||
- It does not allow you to run `del` or `dir`
|
||||
- It does not properly escape arguments with spaces or special characters
|
||||
|
||||
All these issues are handled correctly by `cross-spawn`.
|
||||
There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
|
||||
|
||||
```javascript
|
||||
var spawn = require('cross-spawn');
|
||||
|
||||
// Spawn NPM asynchronously
|
||||
var child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
|
||||
|
||||
// Spawn NPM synchronously
|
||||
var results = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
|
||||
```
|
||||
|
||||
## Caveat
|
||||
|
||||
On Windows, cross-spawn will only spawn `cmd.exe` if necessary. If the extension
|
||||
of the executable is `.exe` or `.com`, it will spawn it directly. If you wish
|
||||
to override this behavior and *always* spawn a shell, pass the `{shell: true}`
|
||||
option.
|
||||
|
||||
|
||||
## Tests
|
||||
|
||||
`$ npm test`
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
|
59
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/cross-spawn/index.js
generated
vendored
@ -1,59 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var cp = require('child_process');
|
||||
var parse = require('./lib/parse');
|
||||
var enoent = require('./lib/enoent');
|
||||
|
||||
var cpSpawnSync = cp.spawnSync;
|
||||
|
||||
function spawn(command, args, options) {
|
||||
var parsed;
|
||||
var spawned;
|
||||
|
||||
// Parse the arguments
|
||||
parsed = parse(command, args, options);
|
||||
|
||||
// Spawn the child process
|
||||
spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
|
||||
|
||||
// Hook into child process "exit" event to emit an error if the command
|
||||
// does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
||||
enoent.hookChildProcess(spawned, parsed);
|
||||
|
||||
return spawned;
|
||||
}
|
||||
|
||||
function spawnSync(command, args, options) {
|
||||
var parsed;
|
||||
var result;
|
||||
|
||||
if (!cpSpawnSync) {
|
||||
try {
|
||||
cpSpawnSync = require('spawn-sync'); // eslint-disable-line global-require
|
||||
} catch (ex) {
|
||||
throw new Error(
|
||||
'In order to use spawnSync on node 0.10 or older, you must ' +
|
||||
'install spawn-sync:\n\n' +
|
||||
' npm install spawn-sync --save'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Parse the arguments
|
||||
parsed = parse(command, args, options);
|
||||
|
||||
// Spawn the child process
|
||||
result = cpSpawnSync(parsed.command, parsed.args, parsed.options);
|
||||
|
||||
// Analyze if the command does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
||||
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = spawn;
|
||||
module.exports.spawn = spawn;
|
||||
module.exports.sync = spawnSync;
|
||||
|
||||
module.exports._parse = parse;
|
||||
module.exports._enoent = enoent;
|
73
vscode/.vscode/extensions/matangover.mypy-0.3.1/node_modules/cross-spawn/lib/enoent.js
generated
vendored
@ -1,73 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
var isWin = process.platform === 'win32';
|
||||
var resolveCommand = require('./resolveCommand');
|
||||
|
||||
var isNode10 = process.version.indexOf('v0.10.') === 0;
|
||||
|
||||
function notFoundError(command, syscall) {
|
||||
var err;
|
||||
|
||||
err = new Error(syscall + ' ' + command + ' ENOENT');
|
||||
err.code = err.errno = 'ENOENT';
|
||||
err.syscall = syscall + ' ' + command;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
function hookChildProcess(cp, parsed) {
|
||||
var originalEmit;
|
||||
|
||||
if (!isWin) {
|
||||
return;
|
||||
}
|
||||
|
||||
originalEmit = cp.emit;
|
||||
cp.emit = function (name, arg1) {
|
||||
var err;
|
||||
|
||||
// If emitting "exit" event and exit code is 1, we need to check if
|
||||
// the command exists and emit an "error" instead
|
||||
// See: https://github.com/IndigoUnited/node-cross-spawn/issues/16
|
||||
if (name === 'exit') {
|
||||
err = verifyENOENT(arg1, parsed, 'spawn');
|
||||
|
||||
if (err) {
|
||||
return originalEmit.call(cp, 'error', err);
|
||||
}
|
||||
}
|
||||
|
||||
return originalEmit.apply(cp, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function verifyENOENT(status, parsed) {
|
||||
if (isWin && status === 1 && !parsed.file) {
|
||||
return notFoundError(parsed.original, 'spawn');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function verifyENOENTSync(status, parsed) {
|
||||
if (isWin && status === 1 && !parsed.file) {
|
||||
return notFoundError(parsed.original, 'spawnSync');
|
||||
}
|
||||
|
||||
// If we are in node 10, then we are using spawn-sync; if it exited
|
||||
// with -1 it probably means that the command does not exist
|
||||
if (isNode10 && status === -1) {
|
||||
parsed.file = isWin ? parsed.file : resolveCommand(parsed.original);
|
||||
|
||||
if (!parsed.file) {
|
||||
return notFoundError(parsed.original, 'spawnSync');
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
module.exports.hookChildProcess = hookChildProcess;
|
||||
module.exports.verifyENOENT = verifyENOENT;
|
||||
module.exports.verifyENOENTSync = verifyENOENTSync;
|
||||
module.exports.notFoundError = notFoundError;
|