create-faas-app 0.0.2-beta.257 → 0.0.2-beta.302

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  创建 FaasJS 项目命令行。
4
4
 
5
- [![License: MIT](https://img.shields.io/npm/l/create-faas-app.svg)](https://github.com/faasjs/faasjs/blob/master/packages/create-faas-app/LICENSE)
5
+ [![License: MIT](https://img.shields.io/npm/l/create-faas-app.svg)](https://github.com/faasjs/faasjs/blob/main/packages/create-faas-app/LICENSE)
6
6
  [![NPM Version](https://img.shields.io/npm/v/create-faas-app.svg)](https://www.npmjs.com/package/create-faas-app)
7
7
 
8
8
  https://faasjs.com/
package/index.js CHANGED
File without changes
package/lib/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- declare const commander: import("commander").Command;
1
+ import { Command } from 'commander';
2
+ declare const commander: Command;
2
3
  export default commander;
package/lib/index.js CHANGED
@@ -47,7 +47,7 @@ async function action(options = {}) {
47
47
  name: 'value',
48
48
  message: 'Project name',
49
49
  validate: Validator.name
50
- }).then((res) => res.value);
50
+ }).then(res => res.value);
51
51
  if (!options.noprovider) {
52
52
  if (!answers.provider || Validator.provider(answers.provider) !== true)
53
53
  answers.provider = await enquirer.prompt({
@@ -64,7 +64,7 @@ async function action(options = {}) {
64
64
  message: '腾讯云'
65
65
  }
66
66
  ]
67
- }).then((res) => res.value);
67
+ }).then(res => res.value);
68
68
  if (answers.provider === 'tencentcloud') {
69
69
  if (!answers.region || Validator.region(answers.region) !== true)
70
70
  answers.region = await enquirer.prompt({
@@ -73,28 +73,28 @@ async function action(options = {}) {
73
73
  message: 'Region',
74
74
  choices: Region.concat([]),
75
75
  validate: Validator.region
76
- }).then((res) => res.value);
76
+ }).then(res => res.value);
77
77
  if (!answers.appId || Validator.appId(answers.appId) !== true)
78
78
  answers.appId = await enquirer.prompt({
79
79
  type: 'input',
80
80
  name: 'value',
81
81
  message: 'appId (from https://console.cloud.tencent.com/developer)',
82
82
  validate: Validator.appId
83
- }).then((res) => res.value);
83
+ }).then(res => res.value);
84
84
  if (!answers.secretId || Validator.secretId(answers.secretId) !== true)
85
85
  answers.secretId = await enquirer.prompt({
86
86
  type: 'input',
87
87
  name: 'value',
88
88
  message: 'secretId (from https://console.cloud.tencent.com/cam/capi)',
89
89
  validate: Validator.secretId
90
- }).then((res) => res.value);
90
+ }).then(res => res.value);
91
91
  if (!answers.secretKey || Validator.secretKey(answers.secretKey) !== true)
92
92
  answers.secretKey = await enquirer.prompt({
93
93
  type: 'input',
94
94
  name: 'value',
95
95
  message: 'secretKey (from https://console.cloud.tencent.com/cam/capi)',
96
96
  validate: Validator.secretKey
97
- }).then((res) => res.value);
97
+ }).then(res => res.value);
98
98
  }
99
99
  }
100
100
  if (typeof answers.example === 'undefined')
@@ -103,7 +103,7 @@ async function action(options = {}) {
103
103
  name: 'value',
104
104
  message: 'Add example files',
105
105
  initial: true
106
- }).then((res) => res.value);
106
+ }).then(res => res.value);
107
107
  if (!answers.name)
108
108
  return;
109
109
  fs.mkdirSync(answers.name);
@@ -231,11 +231,11 @@ export default useFunc(function () {
231
231
  });
232
232
  `);
233
233
  fs.mkdirSync(path.join(answers.name, '__tests__'));
234
- fs.writeFileSync(path.join(answers.name, '__tests__', 'index.test.ts'), `import { FuncWarpper } from '@faasjs/test';
234
+ fs.writeFileSync(path.join(answers.name, '__tests__', 'index.test.ts'), `import { FuncWarper } from '@faasjs/test';
235
235
 
236
236
  describe('hello', function () {
237
237
  test('should work', async function () {
238
- const func = new FuncWarpper(require.resolve('../index.func'));
238
+ const func = new FuncWarper(require.resolve('../index.func'));
239
239
 
240
240
  const { data } = await func.JSONhandler<string>({});
241
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-faas-app",
3
- "version": "0.0.2-beta.257",
3
+ "version": "0.0.2-beta.302",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "types": "libs/index.d.ts",
@@ -13,6 +13,10 @@
13
13
  "url": "git+https://github.com/faasjs/faasjs.git",
14
14
  "directory": "packages/create-faas-app"
15
15
  },
16
+ "bugs": {
17
+ "url": "https://github.com/faasjs/faasjs/issues"
18
+ },
19
+ "funding": "https://github.com/sponsors/faasjs",
16
20
  "scripts": {
17
21
  "prepack": "rm -rf ./lib && rollup -c"
18
22
  },
@@ -31,5 +35,8 @@
31
35
  "rollup": "*",
32
36
  "rollup-plugin-typescript2": "*"
33
37
  },
34
- "gitHead": "febe1ba20502e0b776f7efe9100abf0f82b199a0"
38
+ "engines": {
39
+ "npm": ">=8.0.0"
40
+ },
41
+ "gitHead": "b53fb35a91369afd0185fb555d98e5c9d90b54bd"
35
42
  }