badmfck-api-server 4.1.39 → 4.1.40

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.
@@ -65,7 +65,11 @@ async function Deploy(opt) {
65
65
  console.log("Build");
66
66
  var execResult = run("npm run build");
67
67
  console.log(execResult);
68
- const items = ["./bin", "package.json"];
68
+ const items = [];
69
+ const binExists = fs_1.default.existsSync("./bin");
70
+ if (binExists) {
71
+ items.push("./bin", "package.json");
72
+ }
69
73
  if (Array.isArray(opt.includes)) {
70
74
  for (const inc of opt.includes) {
71
75
  if (typeof inc !== "string" || inc.length === 0)
@@ -80,6 +84,9 @@ async function Deploy(opt) {
80
84
  items.push(inc);
81
85
  }
82
86
  }
87
+ if (items.length === 0) {
88
+ throw new Error("Nothing to archive (no ./bin and no includes specified)");
89
+ }
83
90
  const excludes = new Set();
84
91
  const addExclude = (raw, source) => {
85
92
  if (typeof raw !== "string")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "badmfck-api-server",
3
- "version": "4.1.39",
3
+ "version": "4.1.40",
4
4
  "description": "Simple API http server based on express",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",