@getpara/cli 2.15.0 → 2.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.
- package/dist/api/client.d.ts +2 -2
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +1 -1
- package/dist/auth/polling-flow.d.ts +2 -2
- package/dist/auth/polling-flow.d.ts.map +1 -1
- package/dist/auth/polling-flow.js +3 -3
- package/dist/auth/session-manager.d.ts +3 -3
- package/dist/auth/session-manager.d.ts.map +1 -1
- package/dist/auth/session-manager.js +8 -8
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +28 -7
- package/dist/commands/auth/login.d.ts.map +1 -1
- package/dist/commands/auth/login.js +8 -9
- package/dist/commands/auth/logout.d.ts.map +1 -1
- package/dist/commands/auth/logout.js +7 -8
- package/dist/commands/auth/status.d.ts.map +1 -1
- package/dist/commands/auth/status.js +4 -5
- package/dist/commands/config.js +5 -5
- package/dist/commands/create.js +5 -5
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +3 -5
- package/dist/commands/keys/archive.d.ts.map +1 -1
- package/dist/commands/keys/archive.js +20 -10
- package/dist/commands/keys/config/branding.js +5 -5
- package/dist/commands/keys/config/categories.d.ts.map +1 -1
- package/dist/commands/keys/config/categories.js +19 -1
- package/dist/commands/keys/config/index.d.ts.map +1 -1
- package/dist/commands/keys/config/index.js +12 -4
- package/dist/commands/keys/config/ramps.js +5 -5
- package/dist/commands/keys/config/security.js +5 -5
- package/dist/commands/keys/config/setup.js +5 -5
- package/dist/commands/keys/config/webhooks.d.ts +1 -1
- package/dist/commands/keys/config/webhooks.d.ts.map +1 -1
- package/dist/commands/keys/config/webhooks.js +15 -14
- package/dist/commands/keys/create.js +3 -3
- package/dist/commands/keys/get.d.ts.map +1 -1
- package/dist/commands/keys/get.js +62 -57
- package/dist/commands/keys/list.js +3 -3
- package/dist/commands/keys/rotate.d.ts.map +1 -1
- package/dist/commands/keys/rotate.js +22 -12
- package/dist/commands/orgs/list.js +2 -2
- package/dist/commands/orgs/switch.js +2 -2
- package/dist/commands/projects/archive.js +2 -2
- package/dist/commands/projects/create.js +2 -2
- package/dist/commands/projects/list.js +2 -2
- package/dist/commands/projects/restore.js +2 -2
- package/dist/commands/projects/switch.js +2 -2
- package/dist/commands/projects/update.js +2 -2
- package/dist/commands/whoami.js +5 -5
- package/dist/config/config-manager.d.ts.map +1 -1
- package/dist/config/config-manager.js +16 -10
- package/dist/config/credential-store.d.ts +4 -4
- package/dist/config/credential-store.d.ts.map +1 -1
- package/dist/config/credential-store.js +10 -10
- package/dist/core/constants.d.ts +11 -5
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +33 -18
- package/dist/core/types.d.ts +5 -3
- package/dist/core/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -14,12 +14,12 @@ Use "para projects list --include-archived" to find archived project IDs.`)
|
|
|
14
14
|
const opts = await getGlobalOptions(cmd);
|
|
15
15
|
const formatter = createFormatter(opts);
|
|
16
16
|
const config = await resolveConfig(opts);
|
|
17
|
-
const session = await ensureAuthenticated(config.
|
|
17
|
+
const session = await ensureAuthenticated(config.backend);
|
|
18
18
|
if (!config.organizationId) {
|
|
19
19
|
throw new CliError("No organization selected. Run `para orgs switch` or pass --org <id>.");
|
|
20
20
|
}
|
|
21
21
|
const client = new ParaApiClient({
|
|
22
|
-
|
|
22
|
+
backend: config.backend,
|
|
23
23
|
sessionId: session.sessionId
|
|
24
24
|
});
|
|
25
25
|
await client.restoreProject(config.organizationId, projectId);
|
|
@@ -17,7 +17,7 @@ Required before using keys commands.`)
|
|
|
17
17
|
const opts = await getGlobalOptions(cmd);
|
|
18
18
|
const formatter = createFormatter(opts);
|
|
19
19
|
const config = await resolveConfig(opts);
|
|
20
|
-
const session = await ensureAuthenticated(config.
|
|
20
|
+
const session = await ensureAuthenticated(config.backend);
|
|
21
21
|
if (!config.organizationId) {
|
|
22
22
|
throw new CliError("No organization selected. Run `para orgs switch` or pass --org <id>.");
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ Required before using keys commands.`)
|
|
|
25
25
|
let selectedProjectName;
|
|
26
26
|
if (!selectedProjectId) {
|
|
27
27
|
const client = new ParaApiClient({
|
|
28
|
-
|
|
28
|
+
backend: config.backend,
|
|
29
29
|
sessionId: session.sessionId
|
|
30
30
|
});
|
|
31
31
|
const projects = await client.getProjects(config.organizationId);
|
|
@@ -19,7 +19,7 @@ Requires an active organization. Pass --project or use "para projects switch" fi
|
|
|
19
19
|
const opts = await getGlobalOptions(cmd);
|
|
20
20
|
const formatter = createFormatter(opts);
|
|
21
21
|
const config = await resolveConfig(opts);
|
|
22
|
-
const session = await ensureAuthenticated(config.
|
|
22
|
+
const session = await ensureAuthenticated(config.backend);
|
|
23
23
|
if (!config.organizationId) {
|
|
24
24
|
throw new CliError("No organization selected. Run `para orgs switch` or pass --org <id>.");
|
|
25
25
|
}
|
|
@@ -48,7 +48,7 @@ Requires an active organization. Pass --project or use "para projects switch" fi
|
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
const client = new ParaApiClient({
|
|
51
|
-
|
|
51
|
+
backend: config.backend,
|
|
52
52
|
sessionId: session.sessionId
|
|
53
53
|
});
|
|
54
54
|
await client.updateProject(config.organizationId, projectId, data);
|
package/dist/commands/whoami.js
CHANGED
|
@@ -8,14 +8,14 @@ function registerWhoamiCommand(program) {
|
|
|
8
8
|
helpText(`Examples:
|
|
9
9
|
$ para whoami Show your email, active org, project, and environment
|
|
10
10
|
$ para whoami --json Machine-readable output (useful in CI scripts)
|
|
11
|
-
$ para whoami -e
|
|
11
|
+
$ para whoami -e prod Check who you are with production keys`)
|
|
12
12
|
).action(async (_, cmd) => {
|
|
13
13
|
const opts = await getGlobalOptions(cmd);
|
|
14
14
|
const formatter = createFormatter(opts);
|
|
15
15
|
const config = await resolveConfig(opts);
|
|
16
|
-
const session = await ensureAuthenticated(config.
|
|
16
|
+
const session = await ensureAuthenticated(config.backend);
|
|
17
17
|
const client = new ParaApiClient({
|
|
18
|
-
|
|
18
|
+
backend: config.backend,
|
|
19
19
|
sessionId: session.sessionId
|
|
20
20
|
});
|
|
21
21
|
const status = await client.getAuthStatus();
|
|
@@ -23,7 +23,7 @@ function registerWhoamiCommand(program) {
|
|
|
23
23
|
formatter.json({
|
|
24
24
|
email: status.email,
|
|
25
25
|
userId: status.userId,
|
|
26
|
-
|
|
26
|
+
keyEnvironment: config.keyEnvironment,
|
|
27
27
|
organizationId: config.organizationId,
|
|
28
28
|
projectId: config.projectId,
|
|
29
29
|
organizations: status.organizations,
|
|
@@ -33,7 +33,7 @@ function registerWhoamiCommand(program) {
|
|
|
33
33
|
const entries = [
|
|
34
34
|
{ label: "Email", value: status.email || "N/A" },
|
|
35
35
|
{ label: "User ID", value: status.userId || "N/A" },
|
|
36
|
-
{ label: "Environment", value: config.
|
|
36
|
+
{ label: "Key Environment", value: config.keyEnvironment }
|
|
37
37
|
];
|
|
38
38
|
if (config.organizationId) {
|
|
39
39
|
const org = status.organizations?.find((o) => o.id === config.organizationId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../src/config/config-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../src/config/config-manager.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAItE,wBAAsB,aAAa,CAAC,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAWtG"}
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_BACKEND,
|
|
3
|
+
DEFAULT_KEY_ENVIRONMENT,
|
|
4
|
+
parseKeyEnvironment
|
|
5
|
+
} from "../core/constants.js";
|
|
2
6
|
import { readGlobalConfig } from "./config-store.js";
|
|
3
7
|
import { readProjectConfig } from "./project-config.js";
|
|
4
8
|
async function resolveConfig(opts, projectRoot) {
|
|
5
9
|
const globalConfig = await readGlobalConfig();
|
|
6
10
|
const projectConfig = projectRoot ? await readProjectConfig(projectRoot) : {};
|
|
7
|
-
const
|
|
11
|
+
const keyEnvironment = resolveKeyEnvironment(opts, projectConfig, globalConfig);
|
|
12
|
+
const backend = resolveBackend(opts);
|
|
8
13
|
const organizationId = resolveOrgId(opts, projectConfig, globalConfig);
|
|
9
14
|
const projectId = resolveProjectId(opts, projectConfig, globalConfig);
|
|
10
|
-
return {
|
|
15
|
+
return { backend, keyEnvironment, organizationId, projectId };
|
|
11
16
|
}
|
|
12
|
-
function
|
|
13
|
-
if (opts.
|
|
14
|
-
const envVar = process.env["PARA_ENVIRONMENT"];
|
|
15
|
-
if (envVar) return parseEnvironment(envVar);
|
|
17
|
+
function resolveKeyEnvironment(opts, projectConfig, globalConfig) {
|
|
18
|
+
if (opts.keyEnvironment) return opts.keyEnvironment;
|
|
16
19
|
if (projectConfig.environment) {
|
|
17
|
-
return
|
|
20
|
+
return parseKeyEnvironment(projectConfig.environment);
|
|
18
21
|
}
|
|
19
22
|
if (globalConfig.defaultEnvironment) {
|
|
20
|
-
return
|
|
23
|
+
return parseKeyEnvironment(globalConfig.defaultEnvironment);
|
|
21
24
|
}
|
|
22
|
-
return
|
|
25
|
+
return DEFAULT_KEY_ENVIRONMENT;
|
|
26
|
+
}
|
|
27
|
+
function resolveBackend(opts) {
|
|
28
|
+
return opts.backend ?? DEFAULT_BACKEND;
|
|
23
29
|
}
|
|
24
30
|
function resolveOrgId(opts, projectConfig, globalConfig) {
|
|
25
31
|
return opts.org || process.env["PARA_ORG_ID"] || projectConfig.organizationId || globalConfig.defaultOrganizationId;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Backend } from '../core/constants.js';
|
|
2
2
|
import type { SessionInfo } from '../core/types.js';
|
|
3
3
|
interface CredentialsFile {
|
|
4
4
|
sessions: Partial<Record<string, SessionInfo>>;
|
|
5
5
|
}
|
|
6
6
|
export declare function readCredentials(): Promise<CredentialsFile>;
|
|
7
|
-
export declare function getSession(
|
|
8
|
-
export declare function storeSession(
|
|
9
|
-
export declare function clearSession(
|
|
7
|
+
export declare function getSession(backend: Backend): Promise<SessionInfo | null>;
|
|
8
|
+
export declare function storeSession(backend: Backend, session: SessionInfo): Promise<void>;
|
|
9
|
+
export declare function clearSession(backend: Backend): Promise<void>;
|
|
10
10
|
export declare function clearAllSessions(): Promise<void>;
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=credential-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-store.d.ts","sourceRoot":"","sources":["../../src/config/credential-store.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"credential-store.d.ts","sourceRoot":"","sources":["../../src/config/credential-store.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,UAAU,eAAe;IACvB,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;CAChD;AA+CD,wBAAsB,eAAe,IAAI,OAAO,CAAC,eAAe,CAAC,CAUhE;AAsBD,wBAAsB,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAY9E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxF;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAIlE;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtD"}
|
|
@@ -3,9 +3,9 @@ import { execFile } from "node:child_process";
|
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { randomBytes } from "node:crypto";
|
|
5
5
|
import { getCredentialsPath, getParaConfigDir } from "./paths.js";
|
|
6
|
-
import {
|
|
7
|
-
function sessionKey(
|
|
8
|
-
return
|
|
6
|
+
import { Backend } from "../core/constants.js";
|
|
7
|
+
function sessionKey(backend) {
|
|
8
|
+
return backend === Backend.BETA ? Backend.PROD : backend;
|
|
9
9
|
}
|
|
10
10
|
const EMPTY_CREDENTIALS = { sessions: {} };
|
|
11
11
|
async function ensureConfigDir() {
|
|
@@ -62,24 +62,24 @@ async function writeCredentialsAtomic(data) {
|
|
|
62
62
|
}
|
|
63
63
|
await rename(tmpPath, credPath);
|
|
64
64
|
}
|
|
65
|
-
async function getSession(
|
|
65
|
+
async function getSession(backend) {
|
|
66
66
|
const creds = await readCredentials();
|
|
67
|
-
const session = creds.sessions[sessionKey(
|
|
67
|
+
const session = creds.sessions[sessionKey(backend)];
|
|
68
68
|
if (!session) return null;
|
|
69
69
|
if (session.expiresAt && Date.now() > session.expiresAt) {
|
|
70
|
-
await clearSession(
|
|
70
|
+
await clearSession(backend);
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
73
|
return session;
|
|
74
74
|
}
|
|
75
|
-
async function storeSession(
|
|
75
|
+
async function storeSession(backend, session) {
|
|
76
76
|
const creds = await readCredentials();
|
|
77
|
-
creds.sessions[sessionKey(
|
|
77
|
+
creds.sessions[sessionKey(backend)] = session;
|
|
78
78
|
await writeCredentialsAtomic(creds);
|
|
79
79
|
}
|
|
80
|
-
async function clearSession(
|
|
80
|
+
async function clearSession(backend) {
|
|
81
81
|
const creds = await readCredentials();
|
|
82
|
-
delete creds.sessions[sessionKey(
|
|
82
|
+
delete creds.sessions[sessionKey(backend)];
|
|
83
83
|
await writeCredentialsAtomic(creds);
|
|
84
84
|
}
|
|
85
85
|
async function clearAllSessions() {
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
export declare const CLI_VERSION: string;
|
|
2
2
|
export declare const CLI_NAME = "para";
|
|
3
3
|
export declare const USER_AGENT: string;
|
|
4
|
-
export declare enum
|
|
4
|
+
export declare enum Backend {
|
|
5
5
|
DEV = "DEV",
|
|
6
6
|
SANDBOX = "SANDBOX",
|
|
7
7
|
BETA = "BETA",
|
|
8
8
|
PROD = "PROD"
|
|
9
9
|
}
|
|
10
|
-
export declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
export declare enum KeyEnvironment {
|
|
11
|
+
BETA = "beta",
|
|
12
|
+
PROD = "prod"
|
|
13
|
+
}
|
|
14
|
+
export declare const DEFAULT_BACKEND = Backend.PROD;
|
|
15
|
+
export declare const DEFAULT_KEY_ENVIRONMENT = KeyEnvironment.BETA;
|
|
16
|
+
export declare const BASE_URLS: Record<Backend, string>;
|
|
17
|
+
export declare const PORTAL_URLS: Record<Backend, string>;
|
|
18
|
+
export declare function parseBackend(value: string): Backend;
|
|
19
|
+
export declare function parseKeyEnvironment(value: string): KeyEnvironment;
|
|
14
20
|
export declare const DEV_PORTAL_API_KEY = "d0b61c2c8865aaa2fb12886651627271";
|
|
15
21
|
export declare enum ExitCode {
|
|
16
22
|
SUCCESS = 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,QAAc,CAAC;AACvC,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,UAAU,QAAgC,CAAC;AAExD,oBAAY,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,QAAc,CAAC;AACvC,eAAO,MAAM,QAAQ,SAAS,CAAC;AAC/B,eAAO,MAAM,UAAU,QAAgC,CAAC;AAExD,oBAAY,OAAO;IACjB,GAAG,QAAQ;IACX,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,oBAAY,cAAc;IACxB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,uBAAuB,sBAAsB,CAAC;AAE3D,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAK7C,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAK/C,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOnD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAKjE;AAGD,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;AAErE,oBAAY,QAAQ;IAClB,OAAO,IAAI;IACX,aAAa,IAAI;IACjB,WAAW,IAAI;IACf,aAAa,IAAI;IACjB,YAAY,IAAI;IAChB,SAAS,IAAI;IACb,SAAS,IAAI;IACb,YAAY,IAAI;IAChB,aAAa,IAAI;IACjB,WAAW,MAAM;CAClB"}
|
package/dist/core/constants.js
CHANGED
|
@@ -4,14 +4,20 @@ const pkg = require2("../../package.json");
|
|
|
4
4
|
const CLI_VERSION = pkg.version;
|
|
5
5
|
const CLI_NAME = "para";
|
|
6
6
|
const USER_AGENT = `@getpara/cli/${CLI_VERSION}`;
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return
|
|
13
|
-
})(
|
|
14
|
-
|
|
7
|
+
var Backend = /* @__PURE__ */ ((Backend2) => {
|
|
8
|
+
Backend2["DEV"] = "DEV";
|
|
9
|
+
Backend2["SANDBOX"] = "SANDBOX";
|
|
10
|
+
Backend2["BETA"] = "BETA";
|
|
11
|
+
Backend2["PROD"] = "PROD";
|
|
12
|
+
return Backend2;
|
|
13
|
+
})(Backend || {});
|
|
14
|
+
var KeyEnvironment = /* @__PURE__ */ ((KeyEnvironment2) => {
|
|
15
|
+
KeyEnvironment2["BETA"] = "beta";
|
|
16
|
+
KeyEnvironment2["PROD"] = "prod";
|
|
17
|
+
return KeyEnvironment2;
|
|
18
|
+
})(KeyEnvironment || {});
|
|
19
|
+
const DEFAULT_BACKEND = "PROD" /* PROD */;
|
|
20
|
+
const DEFAULT_KEY_ENVIRONMENT = "beta" /* BETA */;
|
|
15
21
|
const BASE_URLS = {
|
|
16
22
|
["DEV" /* DEV */]: "http://localhost:8080",
|
|
17
23
|
["SANDBOX" /* SANDBOX */]: "https://api.sandbox.getpara.com",
|
|
@@ -20,17 +26,23 @@ const BASE_URLS = {
|
|
|
20
26
|
};
|
|
21
27
|
const PORTAL_URLS = {
|
|
22
28
|
["DEV" /* DEV */]: "http://localhost:5173",
|
|
23
|
-
["SANDBOX" /* SANDBOX */]: "https://developer.sandbox.
|
|
24
|
-
["BETA" /* BETA */]: "https://developer.getpara.com",
|
|
29
|
+
["SANDBOX" /* SANDBOX */]: "https://developer.sandbox.getpara.com",
|
|
30
|
+
["BETA" /* BETA */]: "https://developer.beta.getpara.com",
|
|
25
31
|
["PROD" /* PROD */]: "https://developer.getpara.com"
|
|
26
32
|
};
|
|
27
|
-
function
|
|
33
|
+
function parseBackend(value) {
|
|
28
34
|
const upper = value.toUpperCase();
|
|
29
|
-
if (upper in
|
|
30
|
-
return
|
|
35
|
+
if (upper in Backend) {
|
|
36
|
+
return Backend[upper];
|
|
31
37
|
}
|
|
32
|
-
const valid = Object.keys(
|
|
33
|
-
throw new Error(`Invalid
|
|
38
|
+
const valid = Object.keys(Backend).join(", ");
|
|
39
|
+
throw new Error(`Invalid backend "${value}". Valid values: ${valid}`);
|
|
40
|
+
}
|
|
41
|
+
function parseKeyEnvironment(value) {
|
|
42
|
+
const lower = value.toLowerCase();
|
|
43
|
+
if (lower === "beta") return "beta" /* BETA */;
|
|
44
|
+
if (lower === "prod") return "prod" /* PROD */;
|
|
45
|
+
throw new Error(`Invalid environment "${value}". Valid values: beta, prod`);
|
|
34
46
|
}
|
|
35
47
|
const DEV_PORTAL_API_KEY = "d0b61c2c8865aaa2fb12886651627271";
|
|
36
48
|
var ExitCode = /* @__PURE__ */ ((ExitCode2) => {
|
|
@@ -48,13 +60,16 @@ var ExitCode = /* @__PURE__ */ ((ExitCode2) => {
|
|
|
48
60
|
})(ExitCode || {});
|
|
49
61
|
export {
|
|
50
62
|
BASE_URLS,
|
|
63
|
+
Backend,
|
|
51
64
|
CLI_NAME,
|
|
52
65
|
CLI_VERSION,
|
|
53
|
-
|
|
66
|
+
DEFAULT_BACKEND,
|
|
67
|
+
DEFAULT_KEY_ENVIRONMENT,
|
|
54
68
|
DEV_PORTAL_API_KEY,
|
|
55
|
-
Environment,
|
|
56
69
|
ExitCode,
|
|
70
|
+
KeyEnvironment,
|
|
57
71
|
PORTAL_URLS,
|
|
58
72
|
USER_AGENT,
|
|
59
|
-
|
|
73
|
+
parseBackend,
|
|
74
|
+
parseKeyEnvironment
|
|
60
75
|
};
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Backend, KeyEnvironment } from './constants.js';
|
|
2
2
|
export interface GlobalOptions {
|
|
3
3
|
json: boolean;
|
|
4
|
-
|
|
4
|
+
backend: Backend;
|
|
5
|
+
keyEnvironment: KeyEnvironment;
|
|
5
6
|
org?: string;
|
|
6
7
|
project?: string;
|
|
7
8
|
quiet: boolean;
|
|
8
9
|
noInput: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface ResolvedConfig {
|
|
11
|
-
|
|
12
|
+
backend: Backend;
|
|
13
|
+
keyEnvironment: KeyEnvironment;
|
|
12
14
|
organizationId?: string;
|
|
13
15
|
projectId?: string;
|
|
14
16
|
}
|
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,cAAc,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
4
4
|
"description": "Unified CLI for Para SDK - project scaffolding, diagnostics, and API key management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"license": "MIT",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "fbe96a062b308d04105213378c12c38ee973c798"
|
|
60
60
|
}
|