@positronic/cli 0.0.72 → 0.0.74
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/src/cli.js +86 -109
- package/dist/src/commands/auth.js +8 -34
- package/dist/src/commands/users.js +15 -14
- package/dist/src/components/auth-login.js +1 -1
- package/dist/src/components/project-auth-setup.js +1 -1
- package/dist/src/components/schedule-list.js +1 -1
- package/dist/src/components/store-explorer.js +2 -2
- package/dist/src/components/users-create.js +2 -4
- package/dist/src/components/users-delete.js +5 -5
- package/dist/src/components/users-keys-add.js +71 -17
- package/dist/src/components/users-keys-list.js +5 -5
- package/dist/src/components/users-keys-remove.js +5 -5
- package/dist/src/components/users-list.js +2 -11
- package/dist/src/components/whoami.js +71 -0
- package/dist/src/hooks/useApi.js +2 -2
- package/dist/src/lib/jwt-auth.js +1 -1
- package/dist/src/lib/ssh-key-utils.js +17 -0
- package/dist/types/cli.d.ts.map +1 -1
- package/dist/types/commands/auth.d.ts +5 -18
- package/dist/types/commands/auth.d.ts.map +1 -1
- package/dist/types/commands/users.d.ts +13 -12
- package/dist/types/commands/users.d.ts.map +1 -1
- package/dist/types/components/users-create.d.ts.map +1 -1
- package/dist/types/components/users-delete.d.ts +2 -2
- package/dist/types/components/users-delete.d.ts.map +1 -1
- package/dist/types/components/users-keys-add.d.ts +4 -3
- package/dist/types/components/users-keys-add.d.ts.map +1 -1
- package/dist/types/components/users-keys-list.d.ts +2 -2
- package/dist/types/components/users-keys-list.d.ts.map +1 -1
- package/dist/types/components/users-keys-remove.d.ts +2 -2
- package/dist/types/components/users-keys-remove.d.ts.map +1 -1
- package/dist/types/components/users-list.d.ts.map +1 -1
- package/dist/types/components/whoami.d.ts +8 -0
- package/dist/types/components/whoami.d.ts.map +1 -0
- package/dist/types/lib/ssh-key-utils.d.ts +5 -0
- package/dist/types/lib/ssh-key-utils.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/src/components/auth-format-jwk-key.js +0 -457
- package/dist/src/components/auth-list.js +0 -66
- package/dist/src/components/auth-status.js +0 -113
- package/dist/types/components/auth-format-jwk-key.d.ts +0 -6
- package/dist/types/components/auth-format-jwk-key.d.ts.map +0 -1
- package/dist/types/components/auth-list.d.ts +0 -8
- package/dist/types/components/auth-list.d.ts.map +0 -1
- package/dist/types/components/auth-status.d.ts +0 -8
- package/dist/types/components/auth-status.d.ts.map +0 -1
|
@@ -169,9 +169,9 @@ import { Box, Text, useInput, useApp } from 'ink';
|
|
|
169
169
|
import { ErrorComponent } from './error.js';
|
|
170
170
|
import { useApiDelete, useApiGet } from '../hooks/useApi.js';
|
|
171
171
|
export var UsersKeysRemove = function(param) {
|
|
172
|
-
var
|
|
172
|
+
var userName = param.userName, fingerprint = param.fingerprint, force = param.force;
|
|
173
173
|
var exit = useApp().exit;
|
|
174
|
-
var _useApiGet = useApiGet("/users/".concat(
|
|
174
|
+
var _useApiGet = useApiGet("/users/".concat(userName)), user = _useApiGet.data, loadingUser = _useApiGet.loading, userError = _useApiGet.error;
|
|
175
175
|
var _useApiDelete = useApiDelete('key'), deleting = _useApiDelete.loading, deleteError = _useApiDelete.error, execute = _useApiDelete.execute;
|
|
176
176
|
var _useState = _sliced_to_array(useState(force), 2), confirmed = _useState[0], setConfirmed = _useState[1];
|
|
177
177
|
var _useState1 = _sliced_to_array(useState(false), 2), deleted = _useState1[0], setDeleted = _useState1[1];
|
|
@@ -196,7 +196,7 @@ export var UsersKeysRemove = function(param) {
|
|
|
196
196
|
]);
|
|
197
197
|
return [
|
|
198
198
|
4,
|
|
199
|
-
execute("/users/".concat(
|
|
199
|
+
execute("/users/".concat(userName, "/keys/").concat(encodeURIComponent(fingerprint)))
|
|
200
200
|
];
|
|
201
201
|
case 2:
|
|
202
202
|
_state.sent();
|
|
@@ -220,7 +220,7 @@ export var UsersKeysRemove = function(param) {
|
|
|
220
220
|
})();
|
|
221
221
|
}, [
|
|
222
222
|
execute,
|
|
223
|
-
|
|
223
|
+
userName,
|
|
224
224
|
fingerprint,
|
|
225
225
|
deletionStarted
|
|
226
226
|
]);
|
|
@@ -260,7 +260,7 @@ export var UsersKeysRemove = function(param) {
|
|
|
260
260
|
if (!user) {
|
|
261
261
|
return /*#__PURE__*/ React.createElement(Box, null, /*#__PURE__*/ React.createElement(Text, {
|
|
262
262
|
color: "red"
|
|
263
|
-
}, "User not found: ",
|
|
263
|
+
}, "User not found: ", userName));
|
|
264
264
|
}
|
|
265
265
|
if (deleted) {
|
|
266
266
|
return /*#__PURE__*/ React.createElement(Box, {
|
|
@@ -63,11 +63,7 @@ export var UsersList = function() {
|
|
|
63
63
|
var columns = {
|
|
64
64
|
name: {
|
|
65
65
|
header: 'Name',
|
|
66
|
-
width:
|
|
67
|
-
},
|
|
68
|
-
id: {
|
|
69
|
-
header: 'ID',
|
|
70
|
-
width: 36
|
|
66
|
+
width: 30
|
|
71
67
|
},
|
|
72
68
|
created: {
|
|
73
69
|
header: 'Created',
|
|
@@ -92,18 +88,13 @@ export var UsersList = function() {
|
|
|
92
88
|
}, padRight(columns.name.header, columns.name.width)), /*#__PURE__*/ React.createElement(Text, null, " "), /*#__PURE__*/ React.createElement(Text, {
|
|
93
89
|
bold: true,
|
|
94
90
|
color: "cyan"
|
|
95
|
-
}, padRight(columns.id.header, columns.id.width)), /*#__PURE__*/ React.createElement(Text, null, " "), /*#__PURE__*/ React.createElement(Text, {
|
|
96
|
-
bold: true,
|
|
97
|
-
color: "cyan"
|
|
98
91
|
}, padRight(columns.created.header, columns.created.width))), /*#__PURE__*/ React.createElement(Box, null, /*#__PURE__*/ React.createElement(Text, {
|
|
99
92
|
dimColor: true
|
|
100
93
|
}, '─'.repeat(totalWidth))), sortedUsers.map(function(user) {
|
|
101
94
|
return /*#__PURE__*/ React.createElement(Box, {
|
|
102
|
-
key: user.
|
|
95
|
+
key: user.name
|
|
103
96
|
}, /*#__PURE__*/ React.createElement(Text, null, padRight(truncate(user.name, columns.name.width), columns.name.width)), /*#__PURE__*/ React.createElement(Text, null, " "), /*#__PURE__*/ React.createElement(Text, {
|
|
104
97
|
dimColor: true
|
|
105
|
-
}, padRight(user.id, columns.id.width)), /*#__PURE__*/ React.createElement(Text, null, " "), /*#__PURE__*/ React.createElement(Text, {
|
|
106
|
-
dimColor: true
|
|
107
98
|
}, padRight(formatDate(user.createdAt), columns.created.width)));
|
|
108
99
|
})));
|
|
109
100
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Box, Text } from 'ink';
|
|
3
|
+
import { ErrorComponent } from './error.js';
|
|
4
|
+
import { useApiGet } from '../hooks/useApi.js';
|
|
5
|
+
import { resolvePrivateKeyPath } from '../lib/ssh-key-utils.js';
|
|
6
|
+
import { readLocalAuth } from '../lib/local-auth.js';
|
|
7
|
+
export var Whoami = function(param) {
|
|
8
|
+
var configManager = param.configManager, projectRootPath = param.projectRootPath;
|
|
9
|
+
var _useApiGet = useApiGet('/auth/whoami'), data = _useApiGet.data, loading = _useApiGet.loading, error = _useApiGet.error;
|
|
10
|
+
// Determine local key info
|
|
11
|
+
var envPath = process.env.POSITRONIC_PRIVATE_KEY;
|
|
12
|
+
var localKeyPath = projectRootPath ? readLocalAuth(projectRootPath) : null;
|
|
13
|
+
var configuredPath;
|
|
14
|
+
if (envPath) {
|
|
15
|
+
configuredPath = envPath;
|
|
16
|
+
} else if (localKeyPath) {
|
|
17
|
+
configuredPath = localKeyPath;
|
|
18
|
+
} else {
|
|
19
|
+
configuredPath = configManager.getPrivateKeyPath();
|
|
20
|
+
}
|
|
21
|
+
var activeKeyPath = resolvePrivateKeyPath(configuredPath);
|
|
22
|
+
var keySource;
|
|
23
|
+
if (envPath) {
|
|
24
|
+
keySource = 'environment variable';
|
|
25
|
+
} else if (localKeyPath) {
|
|
26
|
+
keySource = 'local project';
|
|
27
|
+
} else {
|
|
28
|
+
var globalKeyPath = configManager.getDefaultPrivateKeyPath();
|
|
29
|
+
var currentProject = configManager.getCurrentProject();
|
|
30
|
+
var projectKeyPath = currentProject ? configManager.getProjectPrivateKeyPath(currentProject.name) : undefined;
|
|
31
|
+
if (projectKeyPath && currentProject) {
|
|
32
|
+
keySource = 'project "'.concat(currentProject.name, '"');
|
|
33
|
+
} else if (globalKeyPath) {
|
|
34
|
+
keySource = 'global config';
|
|
35
|
+
} else {
|
|
36
|
+
keySource = 'default fallback';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (error) {
|
|
40
|
+
return /*#__PURE__*/ React.createElement(ErrorComponent, {
|
|
41
|
+
error: error
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
if (loading) {
|
|
45
|
+
return /*#__PURE__*/ React.createElement(Box, null, /*#__PURE__*/ React.createElement(Text, null, "Checking identity..."));
|
|
46
|
+
}
|
|
47
|
+
if (!data) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return /*#__PURE__*/ React.createElement(Box, {
|
|
51
|
+
flexDirection: "column",
|
|
52
|
+
paddingTop: 1,
|
|
53
|
+
paddingBottom: 1
|
|
54
|
+
}, /*#__PURE__*/ React.createElement(Text, null, /*#__PURE__*/ React.createElement(Text, {
|
|
55
|
+
bold: true
|
|
56
|
+
}, "Logged in as:"), ' ', /*#__PURE__*/ React.createElement(Text, {
|
|
57
|
+
color: "green"
|
|
58
|
+
}, data.name), data.isRoot && /*#__PURE__*/ React.createElement(Text, {
|
|
59
|
+
dimColor: true
|
|
60
|
+
}, " (root)")), /*#__PURE__*/ React.createElement(Box, {
|
|
61
|
+
marginTop: 1,
|
|
62
|
+
flexDirection: "column",
|
|
63
|
+
paddingLeft: 2
|
|
64
|
+
}, /*#__PURE__*/ React.createElement(Text, null, /*#__PURE__*/ React.createElement(Text, {
|
|
65
|
+
bold: true
|
|
66
|
+
}, "Key:"), " ", activeKeyPath), /*#__PURE__*/ React.createElement(Text, null, /*#__PURE__*/ React.createElement(Text, {
|
|
67
|
+
bold: true
|
|
68
|
+
}, "Source:"), " ", /*#__PURE__*/ React.createElement(Text, {
|
|
69
|
+
dimColor: true
|
|
70
|
+
}, keySource))));
|
|
71
|
+
};
|
package/dist/src/hooks/useApi.js
CHANGED
|
@@ -221,12 +221,12 @@ import { apiClient, isApiLocalDevMode } from '../commands/helpers.js';
|
|
|
221
221
|
var ROOT_KEY_NOT_CONFIGURED_ERROR = {
|
|
222
222
|
title: 'Root Key Not Configured',
|
|
223
223
|
message: 'The server does not have a root authentication key configured.',
|
|
224
|
-
details: "
|
|
224
|
+
details: "The server does not have a ROOT_PUBLIC_KEY secret configured. Add it in your server configuration."
|
|
225
225
|
};
|
|
226
226
|
var AUTH_REQUIRED_ERROR = {
|
|
227
227
|
title: 'Authentication Required',
|
|
228
228
|
message: 'Your request could not be authenticated.',
|
|
229
|
-
details: "Run 'px
|
|
229
|
+
details: "Run 'px login' to configure your SSH key, or check that your key is registered on the server."
|
|
230
230
|
};
|
|
231
231
|
var ROOT_ACCESS_REQUIRED_ERROR = {
|
|
232
232
|
title: 'Root Access Required',
|
package/dist/src/lib/jwt-auth.js
CHANGED
|
@@ -258,7 +258,7 @@ var authProjectRootPath = null;
|
|
|
258
258
|
}
|
|
259
259
|
var keyPath = resolvePrivateKeyPath(configuredPath);
|
|
260
260
|
if (!existsSync(keyPath)) {
|
|
261
|
-
this.initError = new Error("Private key not found at ".concat(keyPath, ". Run 'px
|
|
261
|
+
this.initError = new Error("Private key not found at ".concat(keyPath, ". Run 'px login' to configure your SSH key, or set POSITRONIC_PRIVATE_KEY environment variable."));
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
264
|
this.privateKey = loadPrivateKey(keyPath);
|
|
@@ -150,6 +150,23 @@ import { execSync } from 'child_process';
|
|
|
150
150
|
algorithm: sshKey.type
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Convert an SSH public key string to JWK format
|
|
155
|
+
* Like convertSSHPubKeyToJWK but accepts the key content directly instead of a file path
|
|
156
|
+
*/ export function convertSSHPubKeyStringToJWK(pubKeyContent) {
|
|
157
|
+
var sshKey = sshpk.parseKey(pubKeyContent.trim(), 'auto');
|
|
158
|
+
var fingerprint = sshKey.fingerprint('sha256').toString();
|
|
159
|
+
var pem = sshKey.toString('pem');
|
|
160
|
+
var keyObject = createPublicKey(pem);
|
|
161
|
+
var jwk = keyObject.export({
|
|
162
|
+
format: 'jwk'
|
|
163
|
+
});
|
|
164
|
+
return {
|
|
165
|
+
jwk: jwk,
|
|
166
|
+
fingerprint: fingerprint,
|
|
167
|
+
algorithm: sshKey.type
|
|
168
|
+
};
|
|
169
|
+
}
|
|
153
170
|
/**
|
|
154
171
|
* Load an SSH private key from a file path or environment variable
|
|
155
172
|
*/ export function loadPrivateKey(pathOrEnv) {
|
package/dist/types/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK5D,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,KAAK,GAAG,CAAC;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAoBD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK5D,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,YAAY,KAAK,GAAG,CAAC;IAC7C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAoBD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,UAAU,4BA04C3C"}
|
|
@@ -8,38 +8,25 @@ interface LoginArgs {
|
|
|
8
8
|
interface LogoutArgs {
|
|
9
9
|
project?: boolean;
|
|
10
10
|
}
|
|
11
|
-
interface FormatJwkKeyArgs {
|
|
12
|
-
pubkey?: string;
|
|
13
|
-
}
|
|
14
11
|
export declare class AuthCommand {
|
|
15
12
|
private configManager;
|
|
16
13
|
private projectRootPath?;
|
|
17
14
|
constructor(configManager?: ProjectConfigManager, projectRootPath?: string);
|
|
18
15
|
/**
|
|
19
|
-
* Handles the 'px
|
|
20
|
-
* Shows current auth configuration.
|
|
21
|
-
*/
|
|
22
|
-
status(): React.ReactElement;
|
|
23
|
-
/**
|
|
24
|
-
* Handles the 'px auth login' command.
|
|
16
|
+
* Handles the 'px login' command.
|
|
25
17
|
* Configure SSH key for authentication.
|
|
26
18
|
*/
|
|
27
19
|
login({ path, project }: ArgumentsCamelCase<LoginArgs>): React.ReactElement;
|
|
28
20
|
/**
|
|
29
|
-
* Handles the 'px
|
|
21
|
+
* Handles the 'px logout' command.
|
|
30
22
|
* Clear SSH key configuration.
|
|
31
23
|
*/
|
|
32
24
|
logout({ project }: ArgumentsCamelCase<LogoutArgs>): React.ReactElement;
|
|
33
25
|
/**
|
|
34
|
-
* Handles the 'px
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
list(): React.ReactElement;
|
|
38
|
-
/**
|
|
39
|
-
* Handles the 'px auth format-jwk-key' command.
|
|
40
|
-
* Convert an SSH public key to JWK format for ROOT_PUBLIC_KEY configuration.
|
|
26
|
+
* Handles the 'px whoami' command.
|
|
27
|
+
* Shows the current authenticated identity.
|
|
41
28
|
*/
|
|
42
|
-
|
|
29
|
+
whoami(): React.ReactElement;
|
|
43
30
|
}
|
|
44
31
|
export {};
|
|
45
32
|
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,UAAU,SAAS;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,UAAU;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,eAAe,CAAC,CAAS;gBAErB,aAAa,CAAC,EAAE,oBAAoB,EAAE,eAAe,CAAC,EAAE,MAAM;IAK1E;;;OAGG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,kBAAkB,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY;IAS3E;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,kBAAkB,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,YAAY;IAQvE;;;OAGG;IACH,MAAM,IAAI,KAAK,CAAC,YAAY;CAM7B"}
|
|
@@ -4,19 +4,20 @@ interface UsersCreateArgs {
|
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
6
|
interface UsersDeleteArgs {
|
|
7
|
-
|
|
7
|
+
name: string;
|
|
8
8
|
force: boolean;
|
|
9
9
|
}
|
|
10
|
-
interface
|
|
11
|
-
|
|
10
|
+
interface UsersListKeysArgs {
|
|
11
|
+
name: string;
|
|
12
12
|
}
|
|
13
|
-
interface
|
|
14
|
-
|
|
15
|
-
pubkeyPath
|
|
13
|
+
interface UsersAddKeyArgs {
|
|
14
|
+
name: string;
|
|
15
|
+
pubkeyPath?: string;
|
|
16
|
+
paste?: boolean;
|
|
16
17
|
label?: string;
|
|
17
18
|
}
|
|
18
|
-
interface
|
|
19
|
-
|
|
19
|
+
interface UsersRemoveKeyArgs {
|
|
20
|
+
name: string;
|
|
20
21
|
fingerprint: string;
|
|
21
22
|
force: boolean;
|
|
22
23
|
}
|
|
@@ -24,10 +25,10 @@ export declare class UsersCommand {
|
|
|
24
25
|
constructor();
|
|
25
26
|
list(): React.ReactElement;
|
|
26
27
|
create({ name }: ArgumentsCamelCase<UsersCreateArgs>): React.ReactElement;
|
|
27
|
-
delete({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
delete({ name, force }: ArgumentsCamelCase<UsersDeleteArgs>): React.ReactElement;
|
|
29
|
+
listKeys({ name }: ArgumentsCamelCase<UsersListKeysArgs>): React.ReactElement;
|
|
30
|
+
addKey({ name, pubkeyPath, paste, label, }: ArgumentsCamelCase<UsersAddKeyArgs>): React.ReactElement;
|
|
31
|
+
removeKey({ name, fingerprint, force, }: ArgumentsCamelCase<UsersRemoveKeyArgs>): React.ReactElement;
|
|
31
32
|
}
|
|
32
33
|
export {};
|
|
33
34
|
//# sourceMappingURL=users.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/commands/users.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,UAAU,eA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GACN,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,YAAY;CAO/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users-create.d.ts","sourceRoot":"","sources":["../../../src/components/users-create.tsx"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;
|
|
1
|
+
{"version":3,"file":"users-create.d.ts","sourceRoot":"","sources":["../../../src/components/users-create.tsx"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAOD,eAAO,MAAM,WAAW,GAAI,UAAU,gBAAgB,mDAwErD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface UsersDeleteProps {
|
|
2
|
-
|
|
2
|
+
userName: string;
|
|
3
3
|
force: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const UsersDelete: ({
|
|
5
|
+
export declare const UsersDelete: ({ userName, force }: UsersDeleteProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=users-delete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users-delete.d.ts","sourceRoot":"","sources":["../../../src/components/users-delete.tsx"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,
|
|
1
|
+
{"version":3,"file":"users-delete.d.ts","sourceRoot":"","sources":["../../../src/components/users-delete.tsx"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;CAChB;AAOD,eAAO,MAAM,WAAW,GAAI,qBAAqB,gBAAgB,mDA4FhE,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
interface UsersKeysAddProps {
|
|
2
|
-
|
|
3
|
-
pubkeyPath
|
|
2
|
+
userName: string;
|
|
3
|
+
pubkeyPath?: string;
|
|
4
|
+
paste?: boolean;
|
|
4
5
|
label?: string;
|
|
5
6
|
}
|
|
6
|
-
export declare const UsersKeysAdd: ({
|
|
7
|
+
export declare const UsersKeysAdd: ({ userName, pubkeyPath, paste, label }: UsersKeysAddProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
8
|
export {};
|
|
8
9
|
//# sourceMappingURL=users-keys-add.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users-keys-add.d.ts","sourceRoot":"","sources":["../../../src/components/users-keys-add.tsx"],"names":[],"mappings":"AASA,UAAU,iBAAiB;IACzB,
|
|
1
|
+
{"version":3,"file":"users-keys-add.d.ts","sourceRoot":"","sources":["../../../src/components/users-keys-add.tsx"],"names":[],"mappings":"AASA,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAcD,eAAO,MAAM,YAAY,GAAI,wCAAwC,iBAAiB,mDAqJrF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface UsersKeysListProps {
|
|
2
|
-
|
|
2
|
+
userName: string;
|
|
3
3
|
}
|
|
4
|
-
export declare const UsersKeysList: ({
|
|
4
|
+
export declare const UsersKeysList: ({ userName }: UsersKeysListProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=users-keys-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users-keys-list.d.ts","sourceRoot":"","sources":["../../../src/components/users-keys-list.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAC1B,
|
|
1
|
+
{"version":3,"file":"users-keys-list.d.ts","sourceRoot":"","sources":["../../../src/components/users-keys-list.tsx"],"names":[],"mappings":"AAKA,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAiCD,eAAO,MAAM,aAAa,GAAI,cAAc,kBAAkB,4CAkF7D,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
interface UsersKeysRemoveProps {
|
|
2
|
-
|
|
2
|
+
userName: string;
|
|
3
3
|
fingerprint: string;
|
|
4
4
|
force: boolean;
|
|
5
5
|
}
|
|
6
|
-
export declare const UsersKeysRemove: ({
|
|
6
|
+
export declare const UsersKeysRemove: ({ userName, fingerprint, force }: UsersKeysRemoveProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=users-keys-remove.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users-keys-remove.d.ts","sourceRoot":"","sources":["../../../src/components/users-keys-remove.tsx"],"names":[],"mappings":"AAKA,UAAU,oBAAoB;IAC5B,
|
|
1
|
+
{"version":3,"file":"users-keys-remove.d.ts","sourceRoot":"","sources":["../../../src/components/users-keys-remove.tsx"],"names":[],"mappings":"AAKA,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;CAChB;AAOD,eAAO,MAAM,eAAe,GAAI,kCAAkC,oBAAoB,mDA+FrF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users-list.d.ts","sourceRoot":"","sources":["../../../src/components/users-list.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"users-list.d.ts","sourceRoot":"","sources":["../../../src/components/users-list.tsx"],"names":[],"mappings":"AA6BA,eAAO,MAAM,SAAS,+CAgErB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProjectConfigManager } from '../commands/project-config-manager.js';
|
|
2
|
+
interface WhoamiProps {
|
|
3
|
+
configManager: ProjectConfigManager;
|
|
4
|
+
projectRootPath?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const Whoami: ({ configManager, projectRootPath }: WhoamiProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=whoami.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"whoami.d.ts","sourceRoot":"","sources":["../../../src/components/whoami.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAIlF,UAAU,WAAW;IACnB,aAAa,EAAE,oBAAoB,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAOD,eAAO,MAAM,MAAM,GAAI,oCAAoC,WAAW,mDAqErE,CAAC"}
|
|
@@ -21,6 +21,11 @@ export declare function discoverSSHKeys(): DiscoveredKey[];
|
|
|
21
21
|
* Uses sshpk for SSH parsing and Node.js crypto for PEM → JWK conversion
|
|
22
22
|
*/
|
|
23
23
|
export declare function convertSSHPubKeyToJWK(pubKeyPath: string): SSHKeyInfo;
|
|
24
|
+
/**
|
|
25
|
+
* Convert an SSH public key string to JWK format
|
|
26
|
+
* Like convertSSHPubKeyToJWK but accepts the key content directly instead of a file path
|
|
27
|
+
*/
|
|
28
|
+
export declare function convertSSHPubKeyStringToJWK(pubKeyContent: string): SSHKeyInfo;
|
|
24
29
|
/**
|
|
25
30
|
* Load an SSH private key from a file path or environment variable
|
|
26
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssh-key-utils.d.ts","sourceRoot":"","sources":["../../../src/lib/ssh-key-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAmB,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGrD,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,UAAU,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC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W,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,aAAa,EAAE,CAkDjD;AA0CD;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAiBpE;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,EAAE,MAAM,GAAG,UAAU,CAc7E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,UAAU,CAyBnE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,GAAG,MAAM,CAG7E;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAIlE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAoB5E;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKlD;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,OAAO,GAAE,MAA8C,GACtD,oBAAoB,CAuCtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@positronic/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.74",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"clean": "rm -rf tsconfig.tsbuildinfo dist node_modules"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@positronic/core": "^0.0.
|
|
27
|
-
"@positronic/spec": "^0.0.
|
|
28
|
-
"@positronic/template-new-project": "^0.0.
|
|
26
|
+
"@positronic/core": "^0.0.74",
|
|
27
|
+
"@positronic/spec": "^0.0.74",
|
|
28
|
+
"@positronic/template-new-project": "^0.0.74",
|
|
29
29
|
"caz": "^2.0.0",
|
|
30
30
|
"chokidar": "^3.6.0",
|
|
31
31
|
"dotenv": "^16.4.7",
|