create-faas-app 5.0.0-beta.3 → 5.0.0-beta.5

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
@@ -15,6 +15,6 @@ npx create-faas-app --name faasjs
15
15
  bunx create-faas-app --name faasjs
16
16
  ```
17
17
 
18
- ## Variables
18
+ ## Functions
19
19
 
20
- - [default](variables/default.md)
20
+ - [main](functions/main.md)
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
- declare const _default: Promise<void>;
1
+ import * as commander from 'commander';
2
2
 
3
- export { _default as default };
3
+ declare function main(): Promise<commander.Command>;
4
+
5
+ export { main };
package/dist/index.js CHANGED
@@ -164,13 +164,11 @@ commander.storeOptionsAsProperties(false).allowUnknownOption(true).name("create-
164
164
  action_default(commander);
165
165
  async function main() {
166
166
  try {
167
- if (!process.env.CI && process.argv[0] !== "fake")
168
- await commander.parseAsync(process.argv);
167
+ await commander.parseAsync(process.argv);
169
168
  } catch (error) {
170
169
  console.error(error);
171
- process.exit(1);
172
170
  }
171
+ return commander;
173
172
  }
174
- var index_default = main();
175
173
 
176
- module.exports = index_default;
174
+ exports.main = main;
package/dist/index.mjs CHANGED
@@ -162,13 +162,11 @@ commander.storeOptionsAsProperties(false).allowUnknownOption(true).name("create-
162
162
  action_default(commander);
163
163
  async function main() {
164
164
  try {
165
- if (!process.env.CI && process.argv[0] !== "fake")
166
- await commander.parseAsync(process.argv);
165
+ await commander.parseAsync(process.argv);
167
166
  } catch (error) {
168
167
  console.error(error);
169
- process.exit(1);
170
168
  }
169
+ return commander;
171
170
  }
172
- var index_default = main();
173
171
 
174
- export { index_default as default };
172
+ export { main };
package/index.mjs ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { main } from './dist/index.mjs'
4
+
5
+ main(process.argv)
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "create-faas-app",
3
- "version": "5.0.0-beta.3",
3
+ "version": "5.0.0-beta.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
8
8
  "types": "dist/index.d.ts",
9
9
  "bin": {
10
- "create-faas-app": "index.cjs"
10
+ "create-faas-app": "index.mjs"
11
11
  },
12
12
  "homepage": "https://faasjs.com/doc/create-faas-app",
13
13
  "repository": {
package/index.cjs DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require('./dist/index')