Socket
Socket
Sign inDemoInstall

titbit-loader

Package Overview
Dependencies
0
Maintainers
1
Versions
210
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 22.5.3 to 22.6.0-beta

23

bin/new-ctl.js

@@ -5,4 +5,6 @@ #!/usr/bin/env node

let type_context = `//以下注释为了能够在vscode中提示常用属性以及方便查阅提供,不需要可以去掉。
let type_context = `//!!注意:以下注释是为了能够在vscode中提示常用属性以及方便查阅提供,不需要可以去掉。
/**
* ---------------------- c.helper模块具备的方法 -----------------------------
*
* @typedef {object} helper

@@ -25,2 +27,4 @@ * @property {function} extName(filename: string) - 解析文件扩展名。

/**
* --------------------------------- 请求上下文 -----------------------------------------
*
* @typedef {object} context

@@ -55,2 +59,14 @@ * @property {string} version - 协议版本,字符串类型,为'1.1' 或 '2' 或 '3'。

let head_hint = `/**************************************************************
提示:
表单提交或异步请求发送的数据,对应于POST或PUT请求:
提交的请求体数据通过 c.body 获取。
路由参数通过 c.param 获取,示例:let id = c.param.id
url的查询字符串(?a=1&b=2)参数通过c.query获取,示例:let name = c.query.name
使用c.getFile(name)获取上传的文件,示例:let f = c.getFile('image')
**************************************************************/\n\n`
function fmt_ctx_param(text) {

@@ -72,2 +88,3 @@ let ctx_param = `

return `'use strict'\n\n`
+ head_hint
+ `class ${name} {\n\n`

@@ -103,3 +120,3 @@ + ` constructor() {\n`

'class', 'return', 'module', 'do', 'while', 'catch', 'try', 'break', 'boolean', 'instanceof',
'typeof', 'continue'
'typeof', 'continue', 'fetch', 'globalThis', 'queueMicrotask'
]

@@ -169,3 +186,3 @@

if (!checkName(nd.name)) {
console.error(`${nd.name} 不符合命名要求,要求字母数字,字母开头,支持下划线。(the name is illegal.)`)
console.error(`${nd.name} 不符合命名要求,要求字母数字,字母开头,支持连字符和下划线(- 和 _)。(the name is illegal.)`)
continue

@@ -172,0 +189,0 @@ }

2

package.json
{
"name": "titbit-loader",
"version": "22.5.3",
"version": "22.6.0-beta",
"description": "loader for titbit framework",

@@ -5,0 +5,0 @@ "main": "loader.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc