@zuplo/cli 1.14.0 → 1.16.0

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.
@@ -3,7 +3,7 @@ class Settings {
3
3
  return process.env.ZUPLO_DEVELOPER_API_ENDPOINT ?? "https://dev.zuplo.com";
4
4
  }
5
5
  get MAX_POLL_RETRIES() {
6
- return parseInt(process.env.MAX_POLL_RETRIES ?? "60");
6
+ return parseInt(process.env.MAX_POLL_RETRIES ?? "90");
7
7
  }
8
8
  get POLL_INTERVAL() {
9
9
  return parseInt(process.env.POLL_INTERVAL ?? "1000");
@@ -1,4 +1,5 @@
1
1
  import ignore from "ignore";
2
+ import minimatch from "minimatch";
2
3
  import { existsSync, mkdirSync, readFileSync, writeFileSync, } from "node:fs";
3
4
  import { join, relative, sep } from "node:path";
4
5
  import { simpleGit } from "simple-git";
@@ -20,13 +21,15 @@ export async function archive(dir) {
20
21
  const normalizedPath = stats.isDirectory()
21
22
  ? join(relative(process.cwd(), path), sep)
22
23
  : join(relative(process.cwd(), path));
23
- if (normalizedPath === "/") {
24
+ if (minimatch(normalizedPath, "/", { windowsPathsNoEscape: true })) {
24
25
  return true;
25
26
  }
26
- if (normalizedPath === ".zuplo/") {
27
+ if (minimatch(normalizedPath, ".zuplo/", { windowsPathsNoEscape: true })) {
27
28
  return true;
28
29
  }
29
- if (normalizedPath === `.zuplo/${DEPLOYER_METADATA_FILE}`) {
30
+ if (minimatch(normalizedPath, `.zuplo/${DEPLOYER_METADATA_FILE}`, {
31
+ windowsPathsNoEscape: true,
32
+ })) {
30
33
  return true;
31
34
  }
32
35
  const result = ignoreFn.ignores(normalizedPath);
@@ -33,8 +33,15 @@ function escapeRegExp(value) {
33
33
  function generateTestContents(argv) {
34
34
  return `
35
35
 
36
- export const TestHelper = {
37
- TEST_URL: "${argv.endpoint ?? undefined}"
36
+ export class TestHelper {
37
+ static get TEST_URL() {
38
+ const url = "${argv.endpoint}";
39
+ if (url !== "undefined") {
40
+ return url;
41
+ }
42
+
43
+ throw new Error("TEST_URL is not set. Pass --endpoint <URL> to \`zuplo test\` on the CLI to set a value.");
44
+ }
38
45
  }
39
46
 
40
47
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zuplo/cli",
3
- "version": "1.14.0",
3
+ "version": "1.16.0",
4
4
  "type": "module",
5
5
  "repository": "https://github.com/zuplo/cli",
6
6
  "author": "Zuplo, Inc.",