@amerged/ohmyhost-cli 0.1.19 → 0.1.20
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/README.md +1 -1
- package/dist/bin.js +2 -2
- package/dist/{chunk-57UUB7RK.js → chunk-2VVAKEZO.js} +1292 -296
- package/dist/{chunk-4HFQ54FP.js → chunk-7D2RFLWM.js} +7 -3
- package/dist/credential-store.js +5 -1
- package/dist/index.js +66 -6
- package/package.json +1 -1
- package/src/apps/product-cli/cli.ts +337 -92
- package/src/apps/product-cli/command.ts +111 -6
- package/src/apps/product-cli/composition.ts +748 -120
- package/src/apps/product-cli/credential-store.ts +5 -3
- package/src/apps/product-cli/index.ts +2 -0
- package/src/apps/product-cli/product-api.ts +4 -4
- package/src/apps/product-cli/profile-store.ts +609 -0
- package/src/apps/product-cli/project-link-store.ts +169 -20
- package/src/apps/product-cli/runtime-contract.ts +15 -4
- package/src/apps/product-cli/workspace.ts +75 -13
|
@@ -48,10 +48,12 @@ var CredentialStoreIntegrityError = class extends Error {
|
|
|
48
48
|
this.name = "CredentialStoreIntegrityError";
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
var
|
|
51
|
+
var LEGACY_CREDENTIAL_ACCOUNT = "credential";
|
|
52
52
|
var NativeNapiKeyringCredentialStore = class {
|
|
53
|
+
account;
|
|
53
54
|
createEntry;
|
|
54
|
-
constructor(createEntry = void 0, serviceName = "ohmyhost") {
|
|
55
|
+
constructor(createEntry = void 0, serviceName = "ohmyhost", account = LEGACY_CREDENTIAL_ACCOUNT) {
|
|
56
|
+
this.account = account;
|
|
55
57
|
this.createEntry = createEntry ?? createNativeEntryFactory(serviceName);
|
|
56
58
|
}
|
|
57
59
|
async read() {
|
|
@@ -73,7 +75,7 @@ var NativeNapiKeyringCredentialStore = class {
|
|
|
73
75
|
throw new CredentialStoreIntegrityError();
|
|
74
76
|
}
|
|
75
77
|
entry() {
|
|
76
|
-
return this.createEntry(
|
|
78
|
+
return this.createEntry(this.account);
|
|
77
79
|
}
|
|
78
80
|
};
|
|
79
81
|
var parseVerifiedCredential = (serialized) => {
|
|
@@ -132,7 +134,9 @@ export {
|
|
|
132
134
|
__toESM,
|
|
133
135
|
CredentialStoreUnavailableError,
|
|
134
136
|
CredentialStoreIntegrityError,
|
|
137
|
+
LEGACY_CREDENTIAL_ACCOUNT,
|
|
135
138
|
NativeNapiKeyringCredentialStore,
|
|
139
|
+
createNativeEntryFactory,
|
|
136
140
|
serializeCredential,
|
|
137
141
|
parseCredential
|
|
138
142
|
};
|
package/dist/credential-store.js
CHANGED
|
@@ -2,14 +2,18 @@ import { createRequire as __ohmyhostCreateRequire } from "node:module"; const re
|
|
|
2
2
|
import {
|
|
3
3
|
CredentialStoreIntegrityError,
|
|
4
4
|
CredentialStoreUnavailableError,
|
|
5
|
+
LEGACY_CREDENTIAL_ACCOUNT,
|
|
5
6
|
NativeNapiKeyringCredentialStore,
|
|
7
|
+
createNativeEntryFactory,
|
|
6
8
|
parseCredential,
|
|
7
9
|
serializeCredential
|
|
8
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7D2RFLWM.js";
|
|
9
11
|
export {
|
|
10
12
|
CredentialStoreIntegrityError,
|
|
11
13
|
CredentialStoreUnavailableError,
|
|
14
|
+
LEGACY_CREDENTIAL_ACCOUNT,
|
|
12
15
|
NativeNapiKeyringCredentialStore,
|
|
16
|
+
createNativeEntryFactory,
|
|
13
17
|
parseCredential,
|
|
14
18
|
serializeCredential
|
|
15
19
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { createRequire as __ohmyhostCreateRequire } from "node:module"; const require = __ohmyhostCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
|
+
ACCOUNT_SENSITIVE_PROBLEMS,
|
|
4
|
+
AccountVerificationError,
|
|
3
5
|
GeneratedSdkProductApi,
|
|
4
6
|
GeneratedSdkSessionRevoker,
|
|
5
7
|
InteractiveSessionRequiredError,
|
|
6
8
|
InvalidCommandError,
|
|
7
9
|
LifecycleTransportError,
|
|
10
|
+
LinkedProjectAmbiguousError,
|
|
11
|
+
NativeKeyringProfileRegistry,
|
|
8
12
|
NetworkTransportError,
|
|
9
13
|
OwnerOnlyProjectLinkStore,
|
|
10
14
|
ProductApiAuthenticationError,
|
|
11
15
|
ProductCli,
|
|
16
|
+
ProfileIndexFiles,
|
|
17
|
+
ProfileLimitError,
|
|
18
|
+
ProfileNameConflictError,
|
|
19
|
+
ProfileOrganizationFixedError,
|
|
20
|
+
ProfileSelectionError,
|
|
12
21
|
ProviderCapabilityBlockedError,
|
|
13
22
|
PsqlUnavailableError,
|
|
14
23
|
PublicResponseTooLargeError,
|
|
@@ -20,12 +29,23 @@ import {
|
|
|
20
29
|
StderrDeviceAuthorizationPresenter,
|
|
21
30
|
TokenRefreshRejectedError,
|
|
22
31
|
UserTokenFileError,
|
|
32
|
+
assertVerifiedLogin,
|
|
33
|
+
chooseLinkedProject,
|
|
23
34
|
chooseWorkspace,
|
|
35
|
+
classifyCliFailure,
|
|
24
36
|
cliMetadataResult,
|
|
25
37
|
createAuthenticatedProductTransport,
|
|
26
38
|
createBoundedFetch,
|
|
27
39
|
createProductionAuthenticatedProductApi,
|
|
40
|
+
defaultProfileName,
|
|
41
|
+
describeProfile,
|
|
42
|
+
extractProfileName,
|
|
28
43
|
initializeRepository,
|
|
44
|
+
isProfileName,
|
|
45
|
+
isProfileUserId,
|
|
46
|
+
linkedOrganization,
|
|
47
|
+
listSavedProfiles,
|
|
48
|
+
loadProfiles,
|
|
29
49
|
parseAccountProfile,
|
|
30
50
|
parseCloudflareDnsAuthorization,
|
|
31
51
|
parseCloudflareDnsAuthorizationStatus,
|
|
@@ -40,24 +60,34 @@ import {
|
|
|
40
60
|
parseSafeProblem,
|
|
41
61
|
parseWithLinkedProject,
|
|
42
62
|
prepareUserTokenFile,
|
|
63
|
+
profileIndexDirectory,
|
|
64
|
+
profileLimitAction,
|
|
65
|
+
profileSelectionError,
|
|
66
|
+
publicProfile,
|
|
43
67
|
publicWorkspace,
|
|
44
68
|
readBoundedResponseBody,
|
|
45
|
-
|
|
69
|
+
readProjectLinks,
|
|
46
70
|
readSecretValueFromStandardInput,
|
|
47
71
|
recognizedCommandLabel,
|
|
72
|
+
removeLegacyProjectLink,
|
|
48
73
|
resolveProductCliEnvironment,
|
|
49
74
|
runProductionCli,
|
|
75
|
+
sameLogin,
|
|
76
|
+
selectProfile,
|
|
77
|
+
selectProfileForOrganization,
|
|
50
78
|
selectWorkspace,
|
|
51
|
-
|
|
79
|
+
verifiedUserId,
|
|
52
80
|
workspaceOf
|
|
53
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-2VVAKEZO.js";
|
|
54
82
|
import {
|
|
55
83
|
CredentialStoreIntegrityError,
|
|
56
84
|
CredentialStoreUnavailableError,
|
|
85
|
+
LEGACY_CREDENTIAL_ACCOUNT,
|
|
57
86
|
NativeNapiKeyringCredentialStore,
|
|
87
|
+
createNativeEntryFactory,
|
|
58
88
|
parseCredential,
|
|
59
89
|
serializeCredential
|
|
60
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-7D2RFLWM.js";
|
|
61
91
|
|
|
62
92
|
// apps/product-cli/dist/file-credential-store.js
|
|
63
93
|
import { constants, lstat, mkdir, open, rename, unlink } from "node:fs/promises";
|
|
@@ -196,19 +226,29 @@ var OwnerOnlyFileCredentialStore = class {
|
|
|
196
226
|
};
|
|
197
227
|
var isMissing = (error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
|
|
198
228
|
export {
|
|
229
|
+
ACCOUNT_SENSITIVE_PROBLEMS,
|
|
230
|
+
AccountVerificationError,
|
|
199
231
|
CredentialStoreIntegrityError,
|
|
200
232
|
CredentialStoreUnavailableError,
|
|
201
233
|
GeneratedSdkProductApi,
|
|
202
234
|
GeneratedSdkSessionRevoker,
|
|
203
235
|
InteractiveSessionRequiredError,
|
|
204
236
|
InvalidCommandError,
|
|
237
|
+
LEGACY_CREDENTIAL_ACCOUNT,
|
|
205
238
|
LifecycleTransportError,
|
|
239
|
+
LinkedProjectAmbiguousError,
|
|
240
|
+
NativeKeyringProfileRegistry,
|
|
206
241
|
NativeNapiKeyringCredentialStore,
|
|
207
242
|
NetworkTransportError,
|
|
208
243
|
OwnerOnlyFileCredentialStore,
|
|
209
244
|
OwnerOnlyProjectLinkStore,
|
|
210
245
|
ProductApiAuthenticationError,
|
|
211
246
|
ProductCli,
|
|
247
|
+
ProfileIndexFiles,
|
|
248
|
+
ProfileLimitError,
|
|
249
|
+
ProfileNameConflictError,
|
|
250
|
+
ProfileOrganizationFixedError,
|
|
251
|
+
ProfileSelectionError,
|
|
212
252
|
ProviderCapabilityBlockedError,
|
|
213
253
|
PsqlUnavailableError,
|
|
214
254
|
PublicResponseTooLargeError,
|
|
@@ -220,12 +260,24 @@ export {
|
|
|
220
260
|
StderrDeviceAuthorizationPresenter,
|
|
221
261
|
TokenRefreshRejectedError,
|
|
222
262
|
UserTokenFileError,
|
|
263
|
+
assertVerifiedLogin,
|
|
264
|
+
chooseLinkedProject,
|
|
223
265
|
chooseWorkspace,
|
|
266
|
+
classifyCliFailure,
|
|
224
267
|
cliMetadataResult,
|
|
225
268
|
createAuthenticatedProductTransport,
|
|
226
269
|
createBoundedFetch,
|
|
270
|
+
createNativeEntryFactory,
|
|
227
271
|
createProductionAuthenticatedProductApi,
|
|
272
|
+
defaultProfileName,
|
|
273
|
+
describeProfile,
|
|
274
|
+
extractProfileName,
|
|
228
275
|
initializeRepository,
|
|
276
|
+
isProfileName,
|
|
277
|
+
isProfileUserId,
|
|
278
|
+
linkedOrganization,
|
|
279
|
+
listSavedProfiles,
|
|
280
|
+
loadProfiles,
|
|
229
281
|
parseAccountProfile,
|
|
230
282
|
parseCloudflareDnsAuthorization,
|
|
231
283
|
parseCloudflareDnsAuthorizationStatus,
|
|
@@ -241,15 +293,23 @@ export {
|
|
|
241
293
|
parseSafeProblem,
|
|
242
294
|
parseWithLinkedProject,
|
|
243
295
|
prepareUserTokenFile,
|
|
296
|
+
profileIndexDirectory,
|
|
297
|
+
profileLimitAction,
|
|
298
|
+
profileSelectionError,
|
|
299
|
+
publicProfile,
|
|
244
300
|
publicWorkspace,
|
|
245
301
|
readBoundedResponseBody,
|
|
246
|
-
|
|
302
|
+
readProjectLinks,
|
|
247
303
|
readSecretValueFromStandardInput,
|
|
248
304
|
recognizedCommandLabel,
|
|
305
|
+
removeLegacyProjectLink,
|
|
249
306
|
resolveProductCliEnvironment,
|
|
250
307
|
runProductionCli,
|
|
308
|
+
sameLogin,
|
|
309
|
+
selectProfile,
|
|
310
|
+
selectProfileForOrganization,
|
|
251
311
|
selectWorkspace,
|
|
252
|
-
selectedWorkspaceId,
|
|
253
312
|
serializeCredential,
|
|
313
|
+
verifiedUserId,
|
|
254
314
|
workspaceOf
|
|
255
315
|
};
|