@project-ajax/cli 0.0.15 → 0.0.16
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 +0 -2
- package/dist/api/client.d.ts.map +1 -1
- package/dist/commands/auth.d.ts.map +1 -1
- package/dist/commands/auth.impl.d.ts +2 -3
- package/dist/commands/auth.impl.d.ts.map +1 -1
- package/dist/commands/auth.impl.js +52 -33
- package/dist/commands/auth.js +0 -27
- package/dist/commands/deploy.impl.d.ts.map +1 -1
- package/dist/commands/deploy.impl.js +6 -7
- package/dist/commands/exec.impl.js +1 -1
- package/dist/commands/utils/testing.d.ts +20 -5
- package/dist/commands/utils/testing.d.ts.map +1 -1
- package/dist/commands/utils/testing.js +66 -25
- package/dist/config.d.ts +144 -42
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +321 -139
- package/dist/deploy.d.ts +2 -1
- package/dist/deploy.d.ts.map +1 -1
- package/dist/flags.d.ts +2 -3
- package/dist/flags.d.ts.map +1 -1
- package/dist/flags.js +4 -10
- package/dist/handler.d.ts.map +1 -1
- package/dist/handler.js +13 -9
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +2 -3
- package/dist/token.d.ts +35 -0
- package/dist/token.d.ts.map +1 -0
- package/dist/token.js +58 -0
- package/package.json +5 -2
package/dist/api/client.d.ts
CHANGED
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { IO } from "../io.js";
|
|
5
5
|
import { Result } from "./result.js";
|
|
6
|
-
export type Environment = "local" | "staging" | "dev" | "prod";
|
|
7
6
|
interface ApiClientConfig {
|
|
8
7
|
token: string;
|
|
9
|
-
environment: Environment;
|
|
10
8
|
baseUrl?: string | undefined;
|
|
11
9
|
cellId: string;
|
|
12
10
|
writer: IO;
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client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,GAAG,IAAI,CAAC;YACxB,SAAS,EAAE,MAAM,CAAC;YAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;SACvB,CAAC,CAAC;KACH,EACD,QAAQ,CACR,CACD;IASD;;OAEG;IACG,UAAU,CACf,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACX,OAAO,CACT,MAAM,CACL;QACC,IAAI,EAAE,MAAM,CAAC;KACb,EACD,QAAQ,CACR,CACD;CASD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,wEAmCvB,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { GlobalFlags } from "../flags.js";
|
|
2
2
|
import { type HandlerContext } from "../handler.js";
|
|
3
|
-
export declare function runLogin(context: HandlerContext
|
|
4
|
-
export declare const login: (this: import("../context.js").LocalContext, flags: GlobalFlags
|
|
3
|
+
export declare function runLogin(context: HandlerContext): Promise<void>;
|
|
4
|
+
export declare const login: (this: import("../context.js").LocalContext, flags: GlobalFlags) => Promise<void>;
|
|
5
5
|
export declare const show: (this: import("../context.js").LocalContext, flags: GlobalFlags) => Promise<void>;
|
|
6
|
-
export declare const logout: (this: import("../context.js").LocalContext, flags: GlobalFlags) => Promise<void>;
|
|
7
6
|
//# sourceMappingURL=auth.impl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.impl.d.ts","sourceRoot":"","sources":["../../src/commands/auth.impl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.impl.d.ts","sourceRoot":"","sources":["../../src/commands/auth.impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AA2ElE,wBAAsB,QAAQ,CAAC,OAAO,EAAE,cAAc,iBA2CrD;AA0ED,eAAO,MAAM,KAAK,mFAKhB,CAAC;AAEH,eAAO,MAAM,IAAI,mFAGf,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { buildHandler } from "../handler.js";
|
|
2
|
+
import { fetchToken, parseToken } from "../token.js";
|
|
2
3
|
import { openNotionUrl } from "../utils/openUrl.js";
|
|
4
|
+
const NEW_SPACE_VALUE = "__new_space__";
|
|
3
5
|
async function loginFetch(baseUrl, endpoint, body) {
|
|
4
6
|
const url = `${baseUrl}/api/v3${endpoint}`;
|
|
5
7
|
const response = await fetch(url, {
|
|
@@ -30,26 +32,48 @@ async function pollLoginRedeem(baseUrl, sessionId, timeoutMs = 3e5, intervalMs =
|
|
|
30
32
|
}
|
|
31
33
|
return { status: "expired" };
|
|
32
34
|
}
|
|
33
|
-
async function runLogin(context
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
async function runLogin(context) {
|
|
36
|
+
const cachedSpaces = context.config.getCachedSpaces();
|
|
37
|
+
if (process.stdin.isTTY && cachedSpaces.length > 0) {
|
|
38
|
+
const choices = [
|
|
39
|
+
...cachedSpaces.map((space) => ({
|
|
40
|
+
name: space.name,
|
|
41
|
+
value: space.id
|
|
42
|
+
})),
|
|
43
|
+
{
|
|
44
|
+
name: "Authenticate with new space",
|
|
45
|
+
value: NEW_SPACE_VALUE
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
const selectedValue = await context.io.select({
|
|
49
|
+
message: "Select a space",
|
|
50
|
+
choices,
|
|
51
|
+
noTTY: "Run 'workers auth login' to authenticate, or set WORKERS_TOKEN."
|
|
52
|
+
});
|
|
53
|
+
if (selectedValue !== NEW_SPACE_VALUE) {
|
|
54
|
+
const spaceId = selectedValue;
|
|
55
|
+
const token = await fetchToken(spaceId);
|
|
56
|
+
if (token) {
|
|
57
|
+
context.config.switchToSpace(spaceId);
|
|
58
|
+
const space = cachedSpaces.find((s) => s.id === spaceId);
|
|
59
|
+
context.io.writeErr(`Switched to space: ${space?.name ?? spaceId}`);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
context.io.writeErr(
|
|
63
|
+
"Token not found for this space. Starting browser login..."
|
|
64
|
+
);
|
|
43
65
|
}
|
|
44
|
-
await context.config.update(update2);
|
|
45
|
-
context.io.writeErr("Successfully logged in!");
|
|
46
|
-
return;
|
|
47
66
|
}
|
|
67
|
+
await runBrowserLogin(context);
|
|
68
|
+
}
|
|
69
|
+
async function runBrowserLogin(context) {
|
|
70
|
+
const environment = context.config.environment;
|
|
71
|
+
const baseURL = context.config.baseURL;
|
|
48
72
|
context.io.writeErr("Starting browser login...\n");
|
|
49
73
|
let initResponse;
|
|
50
74
|
try {
|
|
51
75
|
initResponse = await loginFetch(
|
|
52
|
-
|
|
76
|
+
baseURL,
|
|
53
77
|
"/workersCliLoginInit",
|
|
54
78
|
{}
|
|
55
79
|
);
|
|
@@ -74,7 +98,7 @@ async function runLogin(context, token) {
|
|
|
74
98
|
context.io.writeErr("(Press Ctrl+C to cancel)\n");
|
|
75
99
|
let redeemResponse;
|
|
76
100
|
try {
|
|
77
|
-
redeemResponse = await pollLoginRedeem(
|
|
101
|
+
redeemResponse = await pollLoginRedeem(baseURL, sessionId);
|
|
78
102
|
} catch (error) {
|
|
79
103
|
context.io.writeErr(
|
|
80
104
|
`Login failed: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -89,30 +113,25 @@ async function runLogin(context, token) {
|
|
|
89
113
|
context.io.writeErr("Login failed. Please try again.");
|
|
90
114
|
process.exit(1);
|
|
91
115
|
}
|
|
92
|
-
const
|
|
116
|
+
const tokenInfo = parseToken(redeemResponse.token);
|
|
117
|
+
await context.config.login({
|
|
118
|
+
environment,
|
|
93
119
|
token: redeemResponse.token,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
await context.config.update(update);
|
|
100
|
-
context.io.writeErr("\u2713 Successfully logged in!");
|
|
120
|
+
spaceId: tokenInfo.spaceId,
|
|
121
|
+
spaceName: redeemResponse.spaceName,
|
|
122
|
+
cellId: tokenInfo.cellId
|
|
123
|
+
});
|
|
124
|
+
context.io.writeErr("Logged in.");
|
|
101
125
|
}
|
|
102
|
-
const login = buildHandler(async function(_
|
|
103
|
-
await runLogin(this
|
|
126
|
+
const login = buildHandler(async function(_) {
|
|
127
|
+
await runLogin(this);
|
|
104
128
|
});
|
|
105
|
-
const show = buildHandler(function() {
|
|
106
|
-
this.
|
|
107
|
-
});
|
|
108
|
-
const logout = buildHandler(async function() {
|
|
109
|
-
await this.config.update({
|
|
110
|
-
token: null
|
|
111
|
-
});
|
|
129
|
+
const show = buildHandler(async function() {
|
|
130
|
+
const tokenAndInfo = await this.config.getToken();
|
|
131
|
+
this.io.writeOut(`${tokenAndInfo?.[0] ?? ""}`);
|
|
112
132
|
});
|
|
113
133
|
export {
|
|
114
134
|
login,
|
|
115
|
-
logout,
|
|
116
135
|
runLogin,
|
|
117
136
|
show
|
|
118
137
|
};
|
package/dist/commands/auth.js
CHANGED
|
@@ -10,25 +10,9 @@ const authCommands = buildRouteMap({
|
|
|
10
10
|
brief: "Login to the Project Ajax platform via browser authentication",
|
|
11
11
|
fullDescription: `
|
|
12
12
|
Opens a browser window for you to authenticate and select a workspace.
|
|
13
|
-
A verification code will be displayed in the terminal - make sure it matches
|
|
14
|
-
what you see in your browser before confirming.
|
|
15
|
-
|
|
16
|
-
Alternatively, you can pass a token directly (for automation or CI environments):
|
|
17
|
-
workers auth login <token>
|
|
18
13
|
`.trim()
|
|
19
14
|
},
|
|
20
15
|
parameters: {
|
|
21
|
-
positional: {
|
|
22
|
-
kind: "tuple",
|
|
23
|
-
parameters: [
|
|
24
|
-
{
|
|
25
|
-
brief: "A Workers API token (optional, for CI/automation)",
|
|
26
|
-
parse: String,
|
|
27
|
-
placeholder: "api-token",
|
|
28
|
-
optional: true
|
|
29
|
-
}
|
|
30
|
-
]
|
|
31
|
-
},
|
|
32
16
|
flags: {
|
|
33
17
|
...globalFlags
|
|
34
18
|
}
|
|
@@ -45,17 +29,6 @@ Alternatively, you can pass a token directly (for automation or CI environments)
|
|
|
45
29
|
}
|
|
46
30
|
},
|
|
47
31
|
loader: () => import("./auth.impl.js").then((m) => m.show)
|
|
48
|
-
}),
|
|
49
|
-
logout: buildCommand({
|
|
50
|
-
docs: {
|
|
51
|
-
brief: "Unset the token for the CLI"
|
|
52
|
-
},
|
|
53
|
-
parameters: {
|
|
54
|
-
flags: {
|
|
55
|
-
...globalFlags
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
loader: () => import("./auth.impl.js").then((m) => m.logout)
|
|
59
32
|
})
|
|
60
33
|
}
|
|
61
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.impl.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.impl.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,UAAU,WAAW;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"deploy.impl.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.impl.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,UAAU,WAAW;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,MAAM,iGAmFjB,CAAC"}
|
|
@@ -4,10 +4,10 @@ import { deployWorker } from "../deploy.js";
|
|
|
4
4
|
import { buildHandler } from "../handler.js";
|
|
5
5
|
import { runLogin } from "./auth.impl.js";
|
|
6
6
|
const deploy = buildHandler(async function(flags) {
|
|
7
|
-
if (!this.config.
|
|
7
|
+
if (!await this.config.getToken()) {
|
|
8
8
|
await runLogin(this);
|
|
9
9
|
}
|
|
10
|
-
const
|
|
10
|
+
const [token, tokenInfo] = await this.config.mustGetToken();
|
|
11
11
|
const workerId = this.config.workerId;
|
|
12
12
|
const environment = this.config.environment;
|
|
13
13
|
if (!environment) {
|
|
@@ -16,9 +16,8 @@ const deploy = buildHandler(async function(flags) {
|
|
|
16
16
|
const workerPath = this.process.cwd();
|
|
17
17
|
const apiClient = new ApiClient({
|
|
18
18
|
token,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
cellId,
|
|
19
|
+
baseUrl: this.config.baseURL,
|
|
20
|
+
cellId: tokenInfo.cellId,
|
|
22
21
|
writer: this.io
|
|
23
22
|
});
|
|
24
23
|
const authedContext = { ...this, apiClient };
|
|
@@ -60,9 +59,9 @@ const deploy = buildHandler(async function(flags) {
|
|
|
60
59
|
}
|
|
61
60
|
if (Result.isSuccess(result)) {
|
|
62
61
|
const { workerId: workerId2 } = Result.unwrap(result);
|
|
63
|
-
|
|
62
|
+
this.config.setWorker(workerId2);
|
|
64
63
|
this.io.writeErr("\u2713 Successfully deployed worker");
|
|
65
|
-
const workerUrl = `${this.config.
|
|
64
|
+
const workerUrl = `${this.config.baseURL}/__workers__/${workerId2}`;
|
|
66
65
|
this.io.writeErr("");
|
|
67
66
|
this.io.writeErr(`Worker Dashboard: ${workerUrl}`);
|
|
68
67
|
} else {
|
|
@@ -129,7 +129,7 @@ ${usageHint}`);
|
|
|
129
129
|
}
|
|
130
130
|
});
|
|
131
131
|
function showUrls(context, workerId, collectionId) {
|
|
132
|
-
const baseUrl = context.config.
|
|
132
|
+
const baseUrl = context.config.baseURL;
|
|
133
133
|
context.io.writeErr("");
|
|
134
134
|
const workerUrl = `${baseUrl}/__workers__/${workerId}`;
|
|
135
135
|
context.io.writeErr(`Worker Dashboard: ${workerUrl}`);
|
|
@@ -1,13 +1,28 @@
|
|
|
1
|
-
import { Config, type
|
|
1
|
+
import { Config, type LocalConfig, type SpaceCache } from "../../config.js";
|
|
2
2
|
import type { LocalContext } from "../../context.js";
|
|
3
3
|
import type { GlobalFlags } from "../../flags.js";
|
|
4
|
-
|
|
4
|
+
import type { TokenInfo } from "../../token.js";
|
|
5
5
|
export declare const baseFlags: GlobalFlags;
|
|
6
|
-
export declare function
|
|
7
|
-
|
|
6
|
+
export declare function preventConfigResolution(): void;
|
|
7
|
+
export declare function createAndLoadConfig(args?: {
|
|
8
|
+
globalConfig?: SpaceCache;
|
|
9
|
+
localConfig?: LocalConfig;
|
|
8
10
|
env?: Partial<NodeJS.ProcessEnv>;
|
|
9
11
|
flags?: Partial<GlobalFlags>;
|
|
10
|
-
}): Promise<
|
|
12
|
+
}): Promise<Config>;
|
|
11
13
|
export declare function createBaseContext(): LocalContext;
|
|
12
14
|
export declare function cleanupTmpDirectories(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Generates a v1 token string with the given token info. The token is not valid
|
|
17
|
+
* due to an invalid signature.
|
|
18
|
+
*
|
|
19
|
+
* @param args Optional token info to use for the token
|
|
20
|
+
* @returns A v1 token string
|
|
21
|
+
*/
|
|
22
|
+
export declare function generateV1Token(args?: {
|
|
23
|
+
spaceId?: string;
|
|
24
|
+
cellId?: string;
|
|
25
|
+
}, opts?: {
|
|
26
|
+
mock?: boolean;
|
|
27
|
+
}): [string, TokenInfo];
|
|
13
28
|
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/commands/utils/testing.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/commands/utils/testing.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD,eAAO,MAAM,SAAS,EAAE,WAEvB,CAAC;AAEF,wBAAgB,uBAAuB,SAGtC;AAED,wBAAsB,mBAAmB,CACxC,IAAI,GAAE;IACL,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,GAAG,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CACxB,GACJ,OAAO,CAAC,MAAM,CAAC,CAoBjB;AAED,wBAAgB,iBAAiB,IAAI,YAAY,CAQhD;AAID,wBAAsB,qBAAqB,kBAU1C;AA2BD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC9B,IAAI,GAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO,EAChD,IAAI,GAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAoB,GACxC,CAAC,MAAM,EAAE,SAAS,CAAC,CAuBrB"}
|
|
@@ -1,29 +1,36 @@
|
|
|
1
1
|
import * as fs from "node:fs";
|
|
2
|
-
import
|
|
2
|
+
import * as fsp from "node:fs/promises";
|
|
3
3
|
import * as os from "node:os";
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
5
|
import * as path from "node:path";
|
|
6
|
+
import { getPassword } from "cross-keychain";
|
|
7
|
+
import { vi } from "vitest";
|
|
6
8
|
import { Config } from "../../config.js";
|
|
7
9
|
import { IO } from "../../io.js";
|
|
8
|
-
const tmpDirectories = [];
|
|
9
10
|
const baseFlags = {
|
|
10
11
|
debug: false
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}) {
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
function preventConfigResolution() {
|
|
14
|
+
vi.spyOn(Config, "resolveSpaceCachePath").mockImplementation(() => "");
|
|
15
|
+
vi.spyOn(Config, "resolveLocalConfigPath").mockImplementation(() => "");
|
|
16
|
+
}
|
|
17
|
+
async function createAndLoadConfig(args = {}) {
|
|
18
|
+
const globalConfig = args.globalConfig ?? Config.emptySpaceCache;
|
|
19
|
+
const localConfig = args.localConfig ?? Config.emptyLocalConfig;
|
|
20
|
+
const { globalPath, localPath } = await createConfigFiles({
|
|
21
|
+
globalConfig,
|
|
22
|
+
localConfig
|
|
23
|
+
});
|
|
24
|
+
const config = Config.load({
|
|
25
|
+
spaceCachePath: globalPath,
|
|
26
|
+
localPath,
|
|
27
|
+
env: args.env ?? {},
|
|
21
28
|
flags: {
|
|
22
29
|
...baseFlags,
|
|
23
|
-
...flags ?? {}
|
|
30
|
+
...args.flags ?? {}
|
|
24
31
|
}
|
|
25
32
|
});
|
|
26
|
-
return
|
|
33
|
+
return config;
|
|
27
34
|
}
|
|
28
35
|
function createBaseContext() {
|
|
29
36
|
return {
|
|
@@ -34,25 +41,59 @@ function createBaseContext() {
|
|
|
34
41
|
process
|
|
35
42
|
};
|
|
36
43
|
}
|
|
44
|
+
let tmpDirectories = [];
|
|
37
45
|
async function cleanupTmpDirectories() {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
await Promise.all(
|
|
47
|
+
tmpDirectories.map(
|
|
48
|
+
(dir) => fsp.rm(dir, { recursive: true, force: true }).catch((error) => {
|
|
49
|
+
console.error(`Error removing temporary directory ${dir}:`, error);
|
|
50
|
+
})
|
|
51
|
+
)
|
|
52
|
+
);
|
|
53
|
+
tmpDirectories = [];
|
|
44
54
|
}
|
|
45
|
-
async function
|
|
46
|
-
const dir = await mkdtemp(path.join(tmpdir(), "cmd-test-"));
|
|
55
|
+
async function createConfigFiles(args) {
|
|
56
|
+
const dir = await fsp.mkdtemp(path.join(tmpdir(), "cmd-test-"));
|
|
47
57
|
tmpDirectories.push(dir);
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
58
|
+
const globalPath = path.join(dir, "global.json");
|
|
59
|
+
const localPath = path.join(dir, "local.json");
|
|
60
|
+
await fsp.writeFile(
|
|
61
|
+
globalPath,
|
|
62
|
+
JSON.stringify(args.globalConfig, null, 2),
|
|
63
|
+
"utf-8"
|
|
64
|
+
);
|
|
65
|
+
await fsp.writeFile(
|
|
66
|
+
localPath,
|
|
67
|
+
JSON.stringify(args.localConfig, null, 2),
|
|
68
|
+
"utf-8"
|
|
69
|
+
);
|
|
70
|
+
return { globalPath, localPath };
|
|
71
|
+
}
|
|
72
|
+
function generateV1Token(args = {}, opts = { mock: false }) {
|
|
73
|
+
const payload = {
|
|
74
|
+
spaceId: args.spaceId ?? "space-1",
|
|
75
|
+
cellId: args.cellId ?? "cell-1"
|
|
76
|
+
};
|
|
77
|
+
const encodedPayload = Buffer.from(JSON.stringify(payload)).toString(
|
|
78
|
+
"base64url"
|
|
79
|
+
);
|
|
80
|
+
const token = `v1.user.${encodedPayload}.signature`;
|
|
81
|
+
if (opts.mock) {
|
|
82
|
+
vi.mocked(getPassword).mockResolvedValue(token);
|
|
83
|
+
}
|
|
84
|
+
return [
|
|
85
|
+
token,
|
|
86
|
+
{
|
|
87
|
+
spaceId: payload.spaceId,
|
|
88
|
+
cellId: payload.cellId
|
|
89
|
+
}
|
|
90
|
+
];
|
|
51
91
|
}
|
|
52
92
|
export {
|
|
53
93
|
baseFlags,
|
|
54
94
|
cleanupTmpDirectories,
|
|
55
95
|
createAndLoadConfig,
|
|
56
96
|
createBaseContext,
|
|
57
|
-
|
|
97
|
+
generateV1Token,
|
|
98
|
+
preventConfigResolution
|
|
58
99
|
};
|
package/dist/config.d.ts
CHANGED
|
@@ -1,63 +1,165 @@
|
|
|
1
|
+
import z from "zod";
|
|
1
2
|
import type { GlobalFlags } from "./flags.js";
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { type TokenInfo } from "./token.js";
|
|
4
|
+
export declare const Environment: z.ZodLiteral<"local" | "dev" | "stg" | "prod">;
|
|
5
|
+
export type Environment = z.infer<typeof Environment>;
|
|
6
|
+
declare const SpaceCache: z.ZodObject<{
|
|
7
|
+
version: z.ZodLiteral<"1">;
|
|
8
|
+
spaces: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
9
|
+
id: z.ZodString;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
cellId: z.ZodString;
|
|
12
|
+
}, z.z.core.$strip>>;
|
|
13
|
+
}, z.z.core.$strip>;
|
|
14
|
+
export type SpaceCache = z.infer<typeof SpaceCache>;
|
|
15
|
+
declare const LocalConfig: z.ZodObject<{
|
|
16
|
+
version: z.ZodLiteral<"1">;
|
|
17
|
+
environment: z.ZodLiteral<"local" | "dev" | "stg" | "prod">;
|
|
18
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
19
|
+
spaceId: z.ZodNullable<z.ZodString>;
|
|
20
|
+
workerId: z.ZodNullable<z.ZodString>;
|
|
21
|
+
}, z.z.core.$strip>;
|
|
22
|
+
export type LocalConfig = z.infer<typeof LocalConfig>;
|
|
23
|
+
export declare class NoSuitableConfigFileError extends Error {
|
|
24
|
+
constructor();
|
|
13
25
|
}
|
|
14
26
|
/**
|
|
15
|
-
* Manages configuration for the
|
|
16
|
-
*
|
|
17
|
-
* Environment variables take precedence over the config file.
|
|
27
|
+
* Manages configuration for the command line interface.
|
|
18
28
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* | WORKERS_TOKEN | token | The token to use for authentication |
|
|
22
|
-
* | WORKERS_ENVIRONMENT | environment | The environment to use |
|
|
23
|
-
* | WORKERS_WORKER_ID | workerId | The worker ID to use |
|
|
24
|
-
* | WORKERS_BASE_URL | baseUrl | The base URL to use |
|
|
29
|
+
* Order of precedence: Command-line flags, environment variables, local config
|
|
30
|
+
* files, where appropriate.
|
|
25
31
|
*/
|
|
26
32
|
export declare class Config {
|
|
27
33
|
#private;
|
|
28
34
|
constructor(opts: {
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
spaceCachePath: string;
|
|
36
|
+
spaceCache: SpaceCache;
|
|
37
|
+
localConfigPath: string;
|
|
38
|
+
localConfig: LocalConfig;
|
|
39
|
+
environment: Environment;
|
|
40
|
+
baseURL: string;
|
|
41
|
+
spaceId: string | null;
|
|
42
|
+
workerId: string | null;
|
|
43
|
+
token: string | null;
|
|
31
44
|
});
|
|
32
|
-
get
|
|
33
|
-
get
|
|
34
|
-
get
|
|
45
|
+
get environment(): Environment;
|
|
46
|
+
get baseURL(): string;
|
|
47
|
+
get spaceId(): string | null;
|
|
35
48
|
get workerId(): string | null;
|
|
36
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Get the list of cached spaces.
|
|
51
|
+
*
|
|
52
|
+
* @returns An array of cached spaces with id, name, and cellId.
|
|
53
|
+
*/
|
|
54
|
+
getCachedSpaces(): Array<{
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
cellId: string;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Get the token and token information from the keychain.
|
|
61
|
+
*
|
|
62
|
+
* @returns The token and token information, or null if no token is found.
|
|
63
|
+
*/
|
|
64
|
+
getToken(): Promise<[token: string, tokenInfo: TokenInfo] | null>;
|
|
65
|
+
/**
|
|
66
|
+
* Get the token and token information from the keychain.
|
|
67
|
+
*
|
|
68
|
+
* Throws an error if no token is found.
|
|
69
|
+
*
|
|
70
|
+
* @returns The token and token information.
|
|
71
|
+
*/
|
|
72
|
+
mustGetToken(): Promise<[token: string, tokenInfo: TokenInfo]>;
|
|
73
|
+
/**
|
|
74
|
+
* Log in by updating the local configuration and the space cache, and
|
|
75
|
+
* storing the token in the keychain.
|
|
76
|
+
*
|
|
77
|
+
* @param args The arguments to login.
|
|
78
|
+
* @param args.environment The environment to login to.
|
|
79
|
+
* @param args.token The token to login with.
|
|
80
|
+
* @param args.spaceId The space ID to login to.
|
|
81
|
+
* @param args.spaceName The space name to login to.
|
|
82
|
+
* @param args.cellId The cell ID to login to.
|
|
83
|
+
*/
|
|
84
|
+
login(args: {
|
|
85
|
+
environment: Environment;
|
|
37
86
|
token: string;
|
|
38
87
|
spaceId: string;
|
|
88
|
+
spaceName: string;
|
|
39
89
|
cellId: string;
|
|
40
|
-
}
|
|
90
|
+
}): Promise<void>;
|
|
41
91
|
/**
|
|
42
|
-
*
|
|
92
|
+
* Set the worker ID.
|
|
43
93
|
*
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
94
|
+
* @param workerId The worker ID to set.
|
|
95
|
+
*/
|
|
96
|
+
setWorker(workerId: string): void;
|
|
97
|
+
/**
|
|
98
|
+
* Switch to an existing cached space.
|
|
48
99
|
*
|
|
49
|
-
*
|
|
100
|
+
* This updates the local configuration to use the specified space.
|
|
101
|
+
* The token for this space should already exist in the keychain.
|
|
102
|
+
*
|
|
103
|
+
* @param spaceId The space ID to switch to.
|
|
104
|
+
* @throws Error if the space is not in the cache.
|
|
105
|
+
*/
|
|
106
|
+
switchToSpace(spaceId: string): void;
|
|
107
|
+
/**
|
|
108
|
+
* Resolve the space cache path.
|
|
109
|
+
*
|
|
110
|
+
* @param opts Options for resolving the space cache path.
|
|
111
|
+
* @param opts.filePath The path to the space cache file.
|
|
112
|
+
* @param opts.env The environment variables.
|
|
113
|
+
* @returns The path to the space cache file.
|
|
114
|
+
*/
|
|
115
|
+
static resolveSpaceCachePath(opts: {
|
|
116
|
+
filePath?: string;
|
|
117
|
+
env: NodeJS.ProcessEnv;
|
|
118
|
+
}): string;
|
|
119
|
+
/**
|
|
120
|
+
* Resolve the local config path.
|
|
121
|
+
*
|
|
122
|
+
* @param opts Options for resolving the local config path.
|
|
123
|
+
* @param opts.filePath The path to the local config file.
|
|
124
|
+
* @returns
|
|
125
|
+
*/
|
|
126
|
+
static resolveLocalConfigPath(opts?: {
|
|
127
|
+
filePath?: string;
|
|
128
|
+
}): string;
|
|
129
|
+
/**
|
|
130
|
+
* Load config from space cache and local config files, then resolve them to
|
|
131
|
+
* a final config for this execution of the command line interface.
|
|
132
|
+
*
|
|
133
|
+
* If the local config is v0, it will be upgraded to v1.
|
|
134
|
+
*
|
|
135
|
+
* Overrides:
|
|
136
|
+
*
|
|
137
|
+
* - Environment: WORKERS_ENVIRONMENT or --env flag
|
|
138
|
+
* - Token: WORKERS_TOKEN or --token flag
|
|
139
|
+
* - Base URL: WORKERS_BASE_URL or --base-url flag
|
|
140
|
+
*
|
|
141
|
+
* @param opts The options to load the config from.
|
|
142
|
+
* @param opts.spaceCachePath The path to the space cache file.
|
|
143
|
+
* @param opts.localPath The path to the local config file.
|
|
144
|
+
* @param opts.env The process environment.
|
|
145
|
+
* @param opts.processEnv The process environment.
|
|
146
|
+
* @param opts.flags The global flags.
|
|
147
|
+
* @returns The resolved config.
|
|
50
148
|
*/
|
|
51
|
-
update(config: Partial<ConfigMap>): Promise<void>;
|
|
52
149
|
static load(opts: {
|
|
53
|
-
|
|
54
|
-
|
|
150
|
+
spaceCachePath: string;
|
|
151
|
+
localPath: string;
|
|
152
|
+
env: NodeJS.ProcessEnv;
|
|
55
153
|
flags: GlobalFlags;
|
|
56
|
-
}):
|
|
154
|
+
}): Config;
|
|
155
|
+
/**
|
|
156
|
+
* The empty local config.
|
|
157
|
+
*/
|
|
158
|
+
static get emptyLocalConfig(): LocalConfig;
|
|
159
|
+
/**
|
|
160
|
+
* The empty space cache.
|
|
161
|
+
*/
|
|
162
|
+
static get emptySpaceCache(): SpaceCache;
|
|
57
163
|
}
|
|
58
|
-
export
|
|
59
|
-
spaceId: string;
|
|
60
|
-
userId: string;
|
|
61
|
-
cellId: string;
|
|
62
|
-
};
|
|
164
|
+
export {};
|
|
63
165
|
//# sourceMappingURL=config.d.ts.map
|