jitsu-cli 2.14.0-beta.93 → 2.14.0-beta.97

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Jitsu Labs, Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jitsu-cli",
3
- "version": "2.14.0-beta.93",
3
+ "version": "2.14.0-beta.97",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/jitsucom/jitsu",
@@ -67,10 +67,14 @@ async function deployFunctions({ host, apikey, name: names }, projectDir, packag
67
67
  const selected = names ? names.flatMap(n => n.split(",")).map(n => n.trim()) : undefined;
68
68
  const dir = `dist/${kind}s`;
69
69
  const functionsDir = path.resolve(projectDir, dir);
70
+ if (!existsSync(functionsDir)) {
71
+ console.warn(`No ${b(dir)} directory found, skipping ${kind}s. Please make sure that you have built the project.`);
72
+ return;
73
+ }
70
74
  const functionsFiles = readdirSync(functionsDir);
71
75
  if (functionsFiles.length === 0) {
72
- console.warn(red(`Can't find function files in ${b(dir)} directory. Please make sure that you have built the project.`));
73
- process.exit(1);
76
+ console.warn(`No ${kind} files found in ${b(dir)}, skipping. Please make sure that you have built the project.`);
77
+ return;
74
78
  }
75
79
  const selectedFiles = [];
76
80
  if (selected) {
package/dist/main.js CHANGED
@@ -43147,12 +43147,14 @@ async function deployFunctions({ host, apikey, name: names }, projectDir2, packa
43147
43147
  const selected = names ? names.flatMap((n) => n.split(",")).map((n) => n.trim()) : void 0;
43148
43148
  const dir = `dist/${kind2}s`;
43149
43149
  const functionsDir = import_path2.default.resolve(projectDir2, dir);
43150
+ if (!(0, import_fs5.existsSync)(functionsDir)) {
43151
+ console.warn(`No ${b(dir)} directory found, skipping ${kind2}s. Please make sure that you have built the project.`);
43152
+ return;
43153
+ }
43150
43154
  const functionsFiles = (0, import_fs5.readdirSync)(functionsDir);
43151
43155
  if (functionsFiles.length === 0) {
43152
- console.warn(
43153
- red(`Can't find function files in ${b(dir)} directory. Please make sure that you have built the project.`)
43154
- );
43155
- process.exit(1);
43156
+ console.warn(`No ${kind2} files found in ${b(dir)}, skipping. Please make sure that you have built the project.`);
43157
+ return;
43156
43158
  }
43157
43159
  const selectedFiles = [];
43158
43160
  if (selected) {
@@ -43340,7 +43342,7 @@ var fs4 = __toESM(require("fs"));
43340
43342
  // package.json
43341
43343
  var package_default = {
43342
43344
  name: "jitsu-cli",
43343
- version: "2.14.0-beta.93",
43345
+ version: "2.14.0-beta.97",
43344
43346
  repository: {
43345
43347
  type: "git",
43346
43348
  url: "https://github.com/jitsucom/jitsu",