@zuplo/cli 1.37.0 → 1.39.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.
|
@@ -26,7 +26,7 @@ export default {
|
|
|
26
26
|
describe: "The API Key from Zuplo",
|
|
27
27
|
envVar: "API_KEY",
|
|
28
28
|
})
|
|
29
|
-
.demandOption(["api-key", "name", "value", "is-
|
|
29
|
+
.demandOption(["api-key", "name", "value", "is-secret", "branch"])
|
|
30
30
|
.middleware([setBlocking]);
|
|
31
31
|
},
|
|
32
32
|
handler: async (argv) => {
|
package/dist/convert/engine.js
CHANGED
|
@@ -15,9 +15,22 @@ export function convertRoutes(routesConfig) {
|
|
|
15
15
|
pathObject = paths[pathObjectKey];
|
|
16
16
|
const operationKey = route.methods.map((m) => m.toLowerCase()).join(",");
|
|
17
17
|
const operation = {};
|
|
18
|
+
if (route.excludeFromOpenApi) {
|
|
19
|
+
operation["x-internal"] = true;
|
|
20
|
+
}
|
|
18
21
|
operation["summary"] = route.summary;
|
|
19
22
|
operation["description"] = route.description;
|
|
20
23
|
operation["operationId"] = route.operationId;
|
|
24
|
+
const routeWithOpenApi = route;
|
|
25
|
+
if (routeWithOpenApi.parameters) {
|
|
26
|
+
operation["parameters"] = routeWithOpenApi.parameters;
|
|
27
|
+
}
|
|
28
|
+
if (routeWithOpenApi.responses) {
|
|
29
|
+
operation["responses"] = routeWithOpenApi.responses;
|
|
30
|
+
}
|
|
31
|
+
if (routeWithOpenApi.tags) {
|
|
32
|
+
operation["tags"] = routeWithOpenApi.tags;
|
|
33
|
+
}
|
|
21
34
|
const xZuploRoute = {};
|
|
22
35
|
if (route.corsPolicy)
|
|
23
36
|
xZuploRoute["corsPolicy"] = route.corsPolicy;
|
|
@@ -33,6 +33,10 @@ function escapeRegExp(value) {
|
|
|
33
33
|
function generateTestContents(argv) {
|
|
34
34
|
return `
|
|
35
35
|
|
|
36
|
+
// Load environment variables
|
|
37
|
+
import { load } from "https://deno.land/std@0.185.0/dotenv/mod.ts";
|
|
38
|
+
await load();
|
|
39
|
+
|
|
36
40
|
export class TestHelper {
|
|
37
41
|
static get TEST_URL() {
|
|
38
42
|
const url = "${argv.endpoint}";
|
|
@@ -42,6 +46,10 @@ function generateTestContents(argv) {
|
|
|
42
46
|
|
|
43
47
|
throw new Error("TEST_URL is not set. Pass --endpoint <URL> to \`zuplo test\` on the CLI to set a value.");
|
|
44
48
|
}
|
|
49
|
+
|
|
50
|
+
static get environment() {
|
|
51
|
+
return Deno.env.toObject();
|
|
52
|
+
}
|
|
45
53
|
}
|
|
46
54
|
|
|
47
55
|
import {
|
|
@@ -51,7 +59,7 @@ function generateTestContents(argv) {
|
|
|
51
59
|
beforeEach,
|
|
52
60
|
describe as originalDescribe,
|
|
53
61
|
it,
|
|
54
|
-
} from "https://deno.land/std@0.
|
|
62
|
+
} from "https://deno.land/std@0.185.0/testing/bdd.ts";
|
|
55
63
|
|
|
56
64
|
// We want to be able to disable test sanitizers by default to
|
|
57
65
|
// make tests easier/more familiar to write.
|
package/dist/test/invoke-test.js
CHANGED
|
@@ -28,7 +28,7 @@ async function locateDeno(dir) {
|
|
|
28
28
|
export async function runTests(argv) {
|
|
29
29
|
const denoExecutable = await locateDenoExecutable();
|
|
30
30
|
if (denoExecutable) {
|
|
31
|
-
const args = ["test", "--allow-net", "--no-check"];
|
|
31
|
+
const args = ["test", "--allow-env", "--allow-net", "--no-check"];
|
|
32
32
|
if (argv.filter) {
|
|
33
33
|
args.push("--filter", argv.filter);
|
|
34
34
|
}
|