added vscode extensions
This commit is contained in:
parent
7cde0829be
commit
26e2a50441
316 changed files with 37301 additions and 0 deletions
2
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/.gitgnore
vendored
Normal file
2
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/.gitgnore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
node_modules/
|
||||
demo.txt
|
||||
40
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/.vsixmanifest
vendored
Normal file
40
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/.vsixmanifest
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<?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="fastify-snippets" Version="0.0.5" Publisher="paulzhang"/>
|
||||
<DisplayName>Fastify code snippets</DisplayName>
|
||||
<Description xml:space="preserve">Contains the code snippets for fastify web framework development in VS Code editor</Description>
|
||||
<Tags>snippet</Tags>
|
||||
<Categories>Snippets</Categories>
|
||||
<GalleryFlags>Public</GalleryFlags>
|
||||
<Badges></Badges>
|
||||
<Properties>
|
||||
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="0.10.x" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/paulZzhang/fastify-snippets" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/paulZzhang/fastify-snippets" />
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/paulZzhang/fastify-snippets" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
|
||||
|
||||
|
||||
</Properties>
|
||||
|
||||
<Icon>extension/images/full-logo.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.Icons.Default" Path="extension/images/full-logo.png" Addressable="true" />
|
||||
</Assets>
|
||||
</PackageManifest>
|
||||
28
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/README.md
vendored
Normal file
28
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/README.md
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/paulZzhang/fastify-snippets/master/images/full-logo.png" width="650" height="auto"/>
|
||||
</div>
|
||||
|
||||
## VS Code Fastify code snippets
|
||||
|
||||
| Trigger | Content |
|
||||
| ----------------------------: | ----------------------------------------------------------------------------------------------------- |
|
||||
| `f.module→` | Create fastify module |
|
||||
| `f.get→` | a get router |
|
||||
| `f.post→` | a post router |
|
||||
| `f.request.body→` | the request body |
|
||||
| `f.request.query→` | the parsed querystring |
|
||||
| `f.request.params→` | the params matching the URL |
|
||||
| `f.request.headers→` | the headers |
|
||||
| `f.request.raw→` | the incoming HTTP request from Node core (you can use the alias req) |
|
||||
| `f.request.id→` | the request id |
|
||||
| `f.reply.code→` | the request id |
|
||||
| `f.reply.getHeader→` | Retrieve value of already set header |
|
||||
| `f.reply.removeHeader→` | Removed the value of a previously set header |
|
||||
| `f.reply.hasHeader→` | Determine if a header has been set |
|
||||
| `f.reply.type→` | Sets the header Content-Type |
|
||||
| `f.reply.redirect→` | Redirect to the specified url, the status code is optional (default to 302) |
|
||||
| `f.reply.serialize→` | Serializes the specified payload using the default json serializer and returns the serialized payload |
|
||||
| `f.reply.serializer→` | Sets a custom serializer for the payload |
|
||||
| `f.reply.send→` | Sends the payload to the user, could be a plain text, a buffer, JSON, stream, or an Error object |
|
||||
| `f.reply.sent→` | A boolean value that you can use if you need to know if send has already been called |
|
||||
| `f.reply.res→` | The http.ServerResponse from Node core |
|
||||
1
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/demo.txt
vendored
Normal file
1
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/demo.txt
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
vsce publish
|
||||
BIN
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/images/full-logo.png
vendored
Normal file
BIN
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/images/full-logo.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 207 KiB |
33
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/package.json
vendored
Normal file
33
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/package.json
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"name": "fastify-snippets",
|
||||
"description": "Contains the code snippets for fastify web framework development in VS Code editor",
|
||||
"version": "0.0.5",
|
||||
"displayName": "Fastify code snippets",
|
||||
"publisher": "paulzhang",
|
||||
"icon": "images/full-logo.png",
|
||||
"license": "SEE LICENSE IN LICENSE.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paulZzhang/fastify-snippets"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "0.10.x"
|
||||
},
|
||||
"categories": [
|
||||
"Snippets"
|
||||
],
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": "javascript",
|
||||
"path": "./snippets/snippets.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"__metadata": {
|
||||
"id": "06fc37a4-e524-4d7d-af9f-16808dcb37f7",
|
||||
"publisherId": "fa1c5f87-ae0a-441c-9070-16b019094558",
|
||||
"publisherDisplayName": "paulzhang",
|
||||
"installedTimestamp": 1632689171087
|
||||
}
|
||||
}
|
||||
175
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/snippets/snippets.json
vendored
Normal file
175
.vscode/extensions/paulzhang.fastify-snippets-0.0.5/snippets/snippets.json
vendored
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
{
|
||||
"fastify_module": {
|
||||
"prefix": "f.module",
|
||||
"body":
|
||||
"'use strict' \n module.exports = async function(fastify, opts, next) { \n\t $0 \n}\n",
|
||||
"description": "Create fastify module"
|
||||
},
|
||||
"fastify_method_get": {
|
||||
"prefix": "f.get",
|
||||
"body":
|
||||
"\tfastify.get('${1:path}', async function(request, reply) {\n\t $0 \n})\n",
|
||||
"description": "a get router."
|
||||
},
|
||||
"fastify_method_post": {
|
||||
"prefix": "f.post",
|
||||
"body":
|
||||
"\tfastify.post('${1:path}', async function(request, reply) {\n\t $0 \n})\n",
|
||||
"description": "a post router."
|
||||
},
|
||||
"fastify_request_body": {
|
||||
"prefix": "f.request.body",
|
||||
"body": "const body = request.body$0",
|
||||
"description": "the request body"
|
||||
},
|
||||
"fastify_request_query": {
|
||||
"prefix": "f.request.query",
|
||||
"body": "const query = request.query$0",
|
||||
"description": "the parsed querystring"
|
||||
},
|
||||
"fastify_request_params": {
|
||||
"prefix": "f.request.params",
|
||||
"body": "const params = request.params$0",
|
||||
"description": "the params matching the URL"
|
||||
},
|
||||
"fastify_request_headers": {
|
||||
"prefix": "f.request.headers",
|
||||
"body": "const headers = request.headers$0",
|
||||
"description": "the headers"
|
||||
},
|
||||
"fastify_request_raw": {
|
||||
"prefix": "f.request.raw",
|
||||
"body": "const rawReq = request.raw$0",
|
||||
"description":
|
||||
"the incoming HTTP request from Node core (you can use the alias req)"
|
||||
},
|
||||
"fastify_request_id": {
|
||||
"prefix": "f.request.id",
|
||||
"body": "const requestId = request.id$0",
|
||||
"description": "the request id"
|
||||
},
|
||||
"fastify_reply_code": {
|
||||
"prefix": "f.reply.code",
|
||||
"body": "reply.code(${1:200})$0",
|
||||
"description": "Sets the status code"
|
||||
},
|
||||
"fastify_reply_header": {
|
||||
"prefix": "f.reply.code",
|
||||
"body": "reply.header(${2:name}, ${1:value})$0",
|
||||
"description": "Sets a response header"
|
||||
},
|
||||
"fastify_reply_getHeader": {
|
||||
"prefix": "f.reply.getHeader",
|
||||
"body": "reply.getHeader(${1:name})$0",
|
||||
"description": "Retrieve value of already set header"
|
||||
},
|
||||
"fastify_reply_removeHeader": {
|
||||
"prefix": "f.reply.removeHeader",
|
||||
"body": "reply.removeHeader(${1:name})$0",
|
||||
"description": "Removed the value of a previously set header"
|
||||
},
|
||||
"fastify_reply_hasHeader": {
|
||||
"prefix": "f.reply.hasHeader",
|
||||
"body": "reply.hasHeader(${1:name})$0",
|
||||
"description": "Determine if a header has been set"
|
||||
},
|
||||
"fastify_reply_type": {
|
||||
"prefix": "f.reply.type",
|
||||
"body": "reply.type(${1:value})$0",
|
||||
"description": "Sets the header Content-Type"
|
||||
},
|
||||
"fastify_reply_redirect": {
|
||||
"prefix": "f.reply.redirect",
|
||||
"body": "reply.redirect([${2:code}],${1:url}$0",
|
||||
"description":
|
||||
"Redirect to the specified url, the status code is optional (default to 302)"
|
||||
},
|
||||
"fastify_reply_serialize": {
|
||||
"prefix": "f.reply.serialize",
|
||||
"body": "reply.serialize(${1:payload}$0",
|
||||
"description":
|
||||
"Serializes the specified payload using the default json serializer and returns the serialized payload"
|
||||
},
|
||||
"fastify_reply_serializer": {
|
||||
"prefix": "f.reply.serializer",
|
||||
"body": "reply.serializer(${1:function}$0",
|
||||
"description": "Sets a custom serializer for the payload"
|
||||
},
|
||||
"fastify_reply_send": {
|
||||
"prefix": "f.reply.send",
|
||||
"body": "reply.send(${1:payload}$0",
|
||||
"description":
|
||||
"Sends the payload to the user, could be a plain text, a buffer, JSON, stream, or an Error object"
|
||||
},
|
||||
"fastify_reply_sent": {
|
||||
"prefix": "f.reply.sent",
|
||||
"body": "reply.sent(${1:payload}$0",
|
||||
"description":
|
||||
"A boolean value that you can use if you need to know if send has already been called"
|
||||
},
|
||||
"fastify_reply_res": {
|
||||
"prefix": "f.reply.res",
|
||||
"body": "const rawRes = reply.res",
|
||||
"description": "The http.ServerResponse from Node core"
|
||||
},
|
||||
"fastify_request_log_info": {
|
||||
"prefix": "f.request.log.info",
|
||||
"body": "request.log.info(${1:msg})$0",
|
||||
"description": "Print the request log with info level"
|
||||
},
|
||||
"fastify_request_log_fatal": {
|
||||
"prefix": "f.request.log.fatal",
|
||||
"body": "request.log.fatal(${1:msg})$0",
|
||||
"description": "Print the request log with fatal level"
|
||||
},
|
||||
"fastify_request_log_error": {
|
||||
"prefix": "f.request.log.error",
|
||||
"body": "request.log.error(${1:msg})$0",
|
||||
"description": "Print the request log with error level"
|
||||
},
|
||||
"fastify_request_log_warn": {
|
||||
"prefix": "f.request.log.warn",
|
||||
"body": "request.log.warn(${1:msg})$0",
|
||||
"description": "Print the request log with warn level"
|
||||
},
|
||||
"fastify_request_log_debug": {
|
||||
"prefix": "f.request.log.debug",
|
||||
"body": "request.log.debug(${1:msg})$0",
|
||||
"description": "Print the request log with debug level"
|
||||
},
|
||||
"fastify_request_log_trace": {
|
||||
"prefix": "f.request.log.trace",
|
||||
"body": "request.log.trace(${1:msg})$0",
|
||||
"description": "Print the request log with trace level"
|
||||
},
|
||||
"fastify_log_info": {
|
||||
"prefix": "f.log.info",
|
||||
"body": "fastify.log.info(${1:msg})$0",
|
||||
"description": "Print the fastify log with info level"
|
||||
},
|
||||
"fastify_log_fatal": {
|
||||
"prefix": "f.log.fatal",
|
||||
"body": "fastify.log.fatal(${1:msg})$0",
|
||||
"description": "Print the fastify log with fatal level"
|
||||
},
|
||||
"fastify_log_error": {
|
||||
"prefix": "f.log.error",
|
||||
"body": "fastify.log.error(${1:msg})$0",
|
||||
"description": "Print the fastify log with error level"
|
||||
},
|
||||
"fastify_log_warn": {
|
||||
"prefix": "f.log.warn",
|
||||
"body": "fastify.log.warn(${1:msg})$0",
|
||||
"description": "Print the fastify log with warn level"
|
||||
},
|
||||
"fastify_log_debug": {
|
||||
"prefix": "f.log.debug",
|
||||
"body": "fastify.log.debug(${1:msg})$0",
|
||||
"description": "Print the fastify log with debug level"
|
||||
},
|
||||
"fastify_log_trace": {
|
||||
"prefix": "f.log.trace",
|
||||
"body": "fastify.log.trace(${1:msg})$0",
|
||||
"description": "Print the fastify log with trace level"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue