apiblaze 0.1.21 → 0.1.22
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/dist/index.js +13 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -206,7 +206,7 @@ var import_commander = require("commander");
|
|
|
206
206
|
var import_chalk10 = __toESM(require("chalk"));
|
|
207
207
|
|
|
208
208
|
// package.json
|
|
209
|
-
var version = "0.1.
|
|
209
|
+
var version = "0.1.22";
|
|
210
210
|
|
|
211
211
|
// src/index.ts
|
|
212
212
|
init_types();
|
|
@@ -719,6 +719,16 @@ function fail(message) {
|
|
|
719
719
|
console.error(import_chalk5.default.red(`Error: ${message}`));
|
|
720
720
|
process.exit(1);
|
|
721
721
|
}
|
|
722
|
+
function printCurlExample(url, apiKey) {
|
|
723
|
+
console.log();
|
|
724
|
+
console.log(` ${import_chalk5.default.dim("Try it with curl:")}`);
|
|
725
|
+
if (apiKey) {
|
|
726
|
+
console.log(` ${import_chalk5.default.cyan(`curl ${url} \\`)}`);
|
|
727
|
+
console.log(` ${import_chalk5.default.cyan(` -H "X-API-Key: ${apiKey}"`)}`);
|
|
728
|
+
} else {
|
|
729
|
+
console.log(` ${import_chalk5.default.cyan(`curl ${url}`)}`);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
722
732
|
var VALID_AUTH = ["api_key", "none", "oauth"];
|
|
723
733
|
async function runCreate(opts = {}) {
|
|
724
734
|
const creds = loadCredentials();
|
|
@@ -899,6 +909,7 @@ async function runCreate(opts = {}) {
|
|
|
899
909
|
console.log(import_chalk5.default.dim(` (Separate keys were also created for: ${otherEnvs.join(", ")}.)`));
|
|
900
910
|
}
|
|
901
911
|
}
|
|
912
|
+
printCurlExample(proxyUrl, auth === "none" ? void 0 : adminKey);
|
|
902
913
|
console.log();
|
|
903
914
|
}
|
|
904
915
|
async function runAnonymousCreate(opts) {
|
|
@@ -1009,6 +1020,7 @@ async function runAnonymousCreate(opts) {
|
|
|
1009
1020
|
console.log(` ${import_chalk5.default.bold.green(apiKey)}`);
|
|
1010
1021
|
console.log(import_chalk5.default.dim("\n Save this now \u2014 send it as the X-API-Key header. It may not be shown again."));
|
|
1011
1022
|
}
|
|
1023
|
+
if (prodEndpoint) printCurlExample(prodEndpoint, apiKey);
|
|
1012
1024
|
if (result.claim_url) {
|
|
1013
1025
|
console.log();
|
|
1014
1026
|
console.log(` ${import_chalk5.default.yellow("\u26A0 Anonymous proxy \u2014 claim it to your account within 30 days or it expires:")}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apiblaze",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Dev tunnel CLI for APIblaze — route localhost projects through your APIblaze endpoints",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apiblaze",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"build": "tsup",
|
|
27
27
|
"build:watch": "tsup --watch",
|
|
28
28
|
"typecheck": "tsc --noEmit",
|
|
29
|
-
"prepublishOnly": "npm run build && npm run typecheck"
|
|
29
|
+
"prepublishOnly": "npm run build && npm run typecheck",
|
|
30
|
+
"release": "bash scripts/release.sh"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
33
|
"chalk": "^4.1.2",
|