@liquidmetal-ai/raindrop 0.13.0 → 0.15.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/README.md +327 -89
- package/bundle/build-CBEGQPJT.js +62 -0
- package/bundle/{chunk-IEF2XC25.js → chunk-2PH3PHH3.js} +5 -3
- package/bundle/{chunk-4HZ22KOV.js → chunk-3CMR7ES5.js} +4 -4
- package/bundle/{chunk-JSBM2JYW.js → chunk-3EYKCHIK.js} +1 -1
- package/bundle/chunk-5XHDP4VK.js +1697 -0
- package/bundle/{chunk-TSQK4HH6.js → chunk-674GMSXY.js} +1 -1
- package/bundle/{chunk-PS3WZBDF.js → chunk-6L4V66WZ.js} +1105 -2728
- package/bundle/{chunk-5245CEUM.js → chunk-AGG7JZVH.js} +2 -2
- package/bundle/{chunk-3GFKUF5D.js → chunk-B3IY2XS6.js} +4 -2
- package/bundle/{chunk-WIDI65NO.js → chunk-CBAXTRCS.js} +1 -1
- package/bundle/{chunk-JLVDTXO2.js → chunk-DPV5HIG7.js} +4 -4
- package/bundle/{chunk-36GNZK4A.js → chunk-EVXLXWP7.js} +1 -1
- package/bundle/{chunk-4YVU5KEQ.js → chunk-HN3AAKRY.js} +4 -2
- package/bundle/{chunk-NVNEQXHN.js → chunk-IGLE4Y3B.js} +7 -5
- package/bundle/{chunk-FGSYWVBA.js → chunk-IQ6HFRA6.js} +1 -1
- package/bundle/{chunk-O3QZDJ75.js → chunk-JQONDSHY.js} +2 -2
- package/bundle/{chunk-W4IPOFZC.js → chunk-KADMFJLN.js} +8 -6
- package/bundle/chunk-KG5BLUGU.js +246 -0
- package/bundle/{chunk-V5LHJTYS.js → chunk-KLOYSTZY.js} +13 -2
- package/bundle/{chunk-ETC5VU7H.js → chunk-KXHVSLAI.js} +1 -1
- package/bundle/{chunk-Y4WFGNPM.js → chunk-L6FRQULN.js} +1 -1
- package/bundle/{chunk-3QCVYSRU.js → chunk-LT3BFQ4O.js} +1 -1
- package/bundle/{chunk-KQZJHBNG.js → chunk-MBLKVNI5.js} +1 -1
- package/bundle/{chunk-6AIUQUUM.js → chunk-MFMVJZW6.js} +71 -15
- package/bundle/{chunk-25T7MEKO.js → chunk-MJBLNWG3.js} +1 -1
- package/bundle/{chunk-MSJ33O5Y.js → chunk-NRCQIE3Z.js} +95 -115
- package/bundle/{chunk-XKKPPSPC.js → chunk-OCYTN4IH.js} +2 -2
- package/bundle/{chunk-2GAMWFJE.js → chunk-QEF5D4VE.js} +1 -1
- package/bundle/{chunk-4B3QYXBA.js → chunk-T7MQCLXF.js} +5 -3
- package/bundle/{chunk-LDFYPOXJ.js → chunk-TFQY5TSY.js} +1 -1
- package/bundle/{chunk-BWK4MC7Y.js → chunk-USZXZZAR.js} +8 -6
- package/bundle/{chunk-ER2RCPCY.js → chunk-V54KHS5B.js} +2 -2
- package/bundle/{chunk-YSKASURB.js → chunk-V6J23FL2.js} +1 -1
- package/bundle/{chunk-UHSTDJ7X.js → chunk-VN2QYX4C.js} +1 -1
- package/bundle/{chunk-Z4OWKG7J.js → chunk-VOT5MMEY.js} +1 -1
- package/bundle/{chunk-W6GU26WO.js → chunk-WG6BDFPZ.js} +1 -1
- package/bundle/{chunk-AK77X5GL.js → chunk-XX74I5RK.js} +4 -2
- package/bundle/{chunk-6BT265R3.js → chunk-YQCRWPNI.js} +1 -1
- package/bundle/commands/annotation/get.js +3 -3
- package/bundle/commands/annotation/list.js +3 -3
- package/bundle/commands/annotation/put.js +3 -3
- package/bundle/commands/auth/apikey.js +2 -2
- package/bundle/commands/auth/list.js +2 -2
- package/bundle/commands/auth/login.js +2 -2
- package/bundle/commands/auth/logout.js +2 -2
- package/bundle/commands/auth/select.js +3 -3
- package/bundle/commands/bucket/create-credential.js +2 -2
- package/bundle/commands/bucket/delete-credential.js +2 -2
- package/bundle/commands/bucket/get-credential.js +2 -2
- package/bundle/commands/bucket/list-credentials.js +2 -2
- package/bundle/commands/build/actor/setup.js +124 -0
- package/bundle/commands/build/branch.js +10 -10
- package/bundle/commands/build/bucket-events/setup.js +146 -0
- package/bundle/commands/build/checkout.js +8 -8
- package/bundle/commands/build/clone.js +6 -6
- package/bundle/commands/build/delete.js +8 -8
- package/bundle/commands/build/deploy.js +10 -10
- package/bundle/commands/build/env/get.js +3 -3
- package/bundle/commands/build/env/list.js +2 -2
- package/bundle/commands/build/env/set.js +3 -3
- package/bundle/commands/build/env.js +2 -2
- package/bundle/commands/build/features.js +192 -0
- package/bundle/commands/build/find.js +4 -4
- package/bundle/commands/build/generate.js +52 -3
- package/bundle/commands/build/init-workspace.js +3 -3
- package/bundle/commands/build/init.js +15 -3
- package/bundle/commands/build/list.js +5 -5
- package/bundle/commands/build/queue/setup.js +133 -0
- package/bundle/commands/build/sandbox.js +6 -6
- package/bundle/commands/build/smartbucket/setup.js +165 -0
- package/bundle/commands/build/smartmemory/setup.js +171 -0
- package/bundle/commands/build/smartsql/setup.js +167 -0
- package/bundle/commands/build/start.js +2 -2
- package/bundle/commands/build/status.js +5 -5
- package/bundle/commands/build/stop.js +2 -2
- package/bundle/commands/build/stripe/dashboard.js +3 -3
- package/bundle/commands/build/stripe/onboard.js +3 -3
- package/bundle/commands/build/stripe/setup.js +3 -3
- package/bundle/commands/build/stripe/start.js +14 -14
- package/bundle/commands/build/stripe/status.js +3 -3
- package/bundle/commands/build/stripe/subscription/create.js +4 -4
- package/bundle/commands/build/stripe/subscription/get.js +4 -4
- package/bundle/commands/build/stripe/subscription/update.js +4 -4
- package/bundle/commands/build/tools/check.js +2 -2
- package/bundle/commands/build/tools/fmt.js +2 -2
- package/bundle/commands/build/unsandbox.js +6 -6
- package/bundle/commands/build/upload.js +5 -5
- package/bundle/commands/build/validate.js +85 -14
- package/bundle/commands/build/workos/delete.js +6 -6
- package/bundle/commands/build/workos/env/attach.js +3 -3
- package/bundle/commands/build/workos/env/attached.js +3 -3
- package/bundle/commands/build/workos/env/create.js +3 -3
- package/bundle/commands/build/workos/env/delete.js +3 -3
- package/bundle/commands/build/workos/env/detach.js +3 -3
- package/bundle/commands/build/workos/env/dev-login.js +3 -3
- package/bundle/commands/build/workos/env/get.js +3 -3
- package/bundle/commands/build/workos/env/list.js +3 -3
- package/bundle/commands/build/workos/env/set.js +3 -3
- package/bundle/commands/build/workos/invite.js +3 -3
- package/bundle/commands/build/workos/jwt.js +172 -0
- package/bundle/commands/build/workos/setup.js +3 -3
- package/bundle/commands/build/workos/status.js +3 -3
- package/bundle/commands/dns/create.js +2 -2
- package/bundle/commands/dns/delete.js +6 -6
- package/bundle/commands/dns/get.js +6 -6
- package/bundle/commands/dns/list.js +3 -3
- package/bundle/commands/dns/records/create.js +2 -2
- package/bundle/commands/dns/records/delete.js +3 -3
- package/bundle/commands/dns/records/get.js +2 -2
- package/bundle/commands/dns/records/list.js +2 -2
- package/bundle/commands/dns/records/update.js +2 -2
- package/bundle/commands/doctor.js +309 -0
- package/bundle/commands/logs/query.js +3 -3
- package/bundle/commands/logs/tail.js +3 -3
- package/bundle/commands/mcp/install-claude.js +2 -2
- package/bundle/commands/mcp/install-gemini.js +2 -2
- package/bundle/commands/mcp/install-goose.js +2 -2
- package/bundle/commands/mcp/status.js +2 -2
- package/bundle/commands/object/delete.js +5 -37
- package/bundle/commands/object/get.js +5 -37
- package/bundle/commands/object/list.js +7 -39
- package/bundle/commands/object/put.js +5 -37
- package/bundle/commands/query/chunk-search.js +14 -46
- package/bundle/commands/query/document.js +17 -55
- package/bundle/commands/query/events.js +2 -2
- package/bundle/commands/query/reindex.js +2 -2
- package/bundle/commands/query/search.js +14 -46
- package/bundle/commands/tail.js +2 -2
- package/bundle/index.js +1 -1
- package/dist/commands/build/actor/setup.d.ts +22 -0
- package/dist/commands/build/actor/setup.d.ts.map +1 -0
- package/dist/commands/build/actor/setup.js +116 -0
- package/dist/commands/build/bucket-events/setup.d.ts +22 -0
- package/dist/commands/build/bucket-events/setup.d.ts.map +1 -0
- package/dist/commands/build/bucket-events/setup.js +134 -0
- package/dist/commands/build/features.d.ts +19 -0
- package/dist/commands/build/features.d.ts.map +1 -0
- package/dist/commands/build/features.js +97 -0
- package/dist/commands/build/generate.d.ts +2 -0
- package/dist/commands/build/generate.d.ts.map +1 -1
- package/dist/commands/build/generate.js +52 -0
- package/dist/commands/build/init.d.ts.map +1 -1
- package/dist/commands/build/init.js +10 -0
- package/dist/commands/build/queue/setup.d.ts +21 -0
- package/dist/commands/build/queue/setup.d.ts.map +1 -0
- package/dist/commands/build/queue/setup.js +120 -0
- package/dist/commands/build/smartbucket/setup.d.ts +23 -0
- package/dist/commands/build/smartbucket/setup.d.ts.map +1 -0
- package/dist/commands/build/smartbucket/setup.js +167 -0
- package/dist/commands/build/smartmemory/setup.d.ts +23 -0
- package/dist/commands/build/smartmemory/setup.d.ts.map +1 -0
- package/dist/commands/build/smartmemory/setup.js +172 -0
- package/dist/commands/build/smartsql/setup.d.ts +23 -0
- package/dist/commands/build/smartsql/setup.d.ts.map +1 -0
- package/dist/commands/build/smartsql/setup.js +169 -0
- package/dist/commands/build/validate.d.ts +2 -0
- package/dist/commands/build/validate.d.ts.map +1 -1
- package/dist/commands/build/validate.js +80 -8
- package/dist/commands/build/workos/jwt.d.ts +23 -0
- package/dist/commands/build/workos/jwt.d.ts.map +1 -0
- package/dist/commands/build/workos/jwt.js +172 -0
- package/dist/commands/doctor.d.ts +27 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +328 -0
- package/dist/commands/object/delete.d.ts +0 -2
- package/dist/commands/object/delete.d.ts.map +1 -1
- package/dist/commands/object/delete.js +3 -38
- package/dist/commands/object/get.d.ts +0 -2
- package/dist/commands/object/get.d.ts.map +1 -1
- package/dist/commands/object/get.js +3 -38
- package/dist/commands/object/list.d.ts +0 -2
- package/dist/commands/object/list.d.ts.map +1 -1
- package/dist/commands/object/list.js +5 -40
- package/dist/commands/object/put.d.ts +0 -2
- package/dist/commands/object/put.d.ts.map +1 -1
- package/dist/commands/object/put.js +3 -38
- package/dist/commands/query/chunk-search.d.ts +0 -2
- package/dist/commands/query/chunk-search.d.ts.map +1 -1
- package/dist/commands/query/chunk-search.js +12 -46
- package/dist/commands/query/document.d.ts +1 -3
- package/dist/commands/query/document.d.ts.map +1 -1
- package/dist/commands/query/document.js +16 -60
- package/dist/commands/query/search.d.ts +0 -2
- package/dist/commands/query/search.d.ts.map +1 -1
- package/dist/commands/query/search.js +12 -46
- package/dist/feature-catalog.d.ts +28 -0
- package/dist/feature-catalog.d.ts.map +1 -0
- package/dist/feature-catalog.js +104 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -2
- package/oclif.manifest.json +4811 -3433
- package/package.json +3 -3
- package/templates/examples/smartbucket-minimal.ts.hbs +87 -0
- package/templates/examples/smartmemory-minimal.ts.hbs +82 -0
- package/templates/examples/smartsql-minimal.ts.hbs +69 -0
- package/templates/handlers/actor/index.test.ts.hbs +48 -85
- package/templates/handlers/actor/index.ts.hbs +16 -316
- package/templates/handlers/bucket-event-notification/index.ts.hbs +32 -235
- package/templates/handlers/bucket-event-observer.ts.hbs +79 -0
- package/templates/handlers/http-service/index.test.ts.hbs +3 -0
- package/templates/handlers/http-service/index.ts.hbs +43 -15
- package/templates/handlers/queue-consumer-setup.ts.hbs +45 -0
- package/templates/handlers/task/index.test.ts.hbs +30 -112
- package/templates/handlers/task/index.ts.hbs +19 -58
- package/templates/init/RAINDROP.md.hbs +97 -1
- package/templates/init/eslint.config.js +43 -0
- package/templates/init/package.json.hbs +4 -1
- package/templates/init/tsconfig.json +3 -3
- package/bundle/chunk-23UBI7BN.js +0 -48
- package/bundle/chunk-2QWMBNE3.js +0 -384
- package/bundle/chunk-45IYWQDC.js +0 -384
- package/bundle/chunk-5YUO23QU.js +0 -4585
- package/bundle/chunk-6MIGCNUO.js +0 -75
- package/bundle/chunk-7ZJWA6HP.js +0 -805
- package/bundle/chunk-AIYVX2M7.js +0 -44
- package/bundle/chunk-BB5TNIEM.js +0 -48
- package/bundle/chunk-BUR3HFKH.js +0 -488
- package/bundle/chunk-BYSBS7KT.js +0 -488
- package/bundle/chunk-CX3RWI62.js +0 -28658
- package/bundle/chunk-DLH7MI57.js +0 -305
- package/bundle/chunk-E3WJIYJZ.js +0 -12148
- package/bundle/chunk-EX7NOPRF.js +0 -12148
- package/bundle/chunk-F76JQS2J.js +0 -231
- package/bundle/chunk-FBOXMVKD.js +0 -28679
- package/bundle/chunk-FTPZ6SQW.js +0 -238909
- package/bundle/chunk-H3CFZ7ZH.js +0 -74
- package/bundle/chunk-HXOILVWA.js +0 -384
- package/bundle/chunk-IMP7O5AC.js +0 -22452
- package/bundle/chunk-IPYOAKRE.js +0 -231
- package/bundle/chunk-J7HN6XF2.js +0 -4461
- package/bundle/chunk-JOLOAALA.js +0 -231
- package/bundle/chunk-JZ2G4Q35.js +0 -4585
- package/bundle/chunk-KVAWPWF7.js +0 -231
- package/bundle/chunk-MEUAAIXV.js +0 -28657
- package/bundle/chunk-QBWFE57Z.js +0 -384
- package/bundle/chunk-SP3LOXPC.js +0 -46
- package/bundle/chunk-T7C564PR.js +0 -28678
- package/bundle/chunk-UFH545WJ.js +0 -22452
- package/bundle/chunk-UHVMPWM5.js +0 -315
- package/bundle/chunk-VB7ZTSZV.js +0 -1089
- package/bundle/chunk-VBIJDFMJ.js +0 -384
- package/bundle/chunk-VR7RLTE3.js +0 -231
- package/bundle/chunk-WFZUJLEC.js +0 -231
- package/bundle/chunk-YDGJTLVZ.js +0 -133
- package/bundle/chunk-YPNQ7UFK.js +0 -502
- package/bundle/chunk-YXFDRMSN.js +0 -384
- package/dist/lib/dns-utils.d.ts +0 -7
- package/dist/lib/dns-utils.d.ts.map +0 -1
- package/dist/lib/dns-utils.js +0 -44
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import {
|
|
2
|
+
refreshToken
|
|
3
|
+
} from "../../../chunk-KG5BLUGU.js";
|
|
4
|
+
import {
|
|
5
|
+
BaseCommand
|
|
6
|
+
} from "../../../chunk-NRCQIE3Z.js";
|
|
7
|
+
import {
|
|
8
|
+
require_lib
|
|
9
|
+
} from "../../../chunk-6L4V66WZ.js";
|
|
10
|
+
import {
|
|
11
|
+
__toESM,
|
|
12
|
+
init_cjs_shims
|
|
13
|
+
} from "../../../chunk-5XHDP4VK.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/build/workos/jwt.ts
|
|
16
|
+
init_cjs_shims();
|
|
17
|
+
var import_core = __toESM(require_lib(), 1);
|
|
18
|
+
import * as fs from "node:fs/promises";
|
|
19
|
+
import path from "node:path";
|
|
20
|
+
function decodeJWTPayload(token) {
|
|
21
|
+
try {
|
|
22
|
+
const parts = token.split(".");
|
|
23
|
+
if (parts.length !== 3) {
|
|
24
|
+
throw new Error("Invalid JWT format");
|
|
25
|
+
}
|
|
26
|
+
const payload = parts[1];
|
|
27
|
+
if (!payload) {
|
|
28
|
+
throw new Error("Invalid JWT format: missing payload");
|
|
29
|
+
}
|
|
30
|
+
const decoded = JSON.parse(Buffer.from(payload, "base64url").toString());
|
|
31
|
+
return decoded;
|
|
32
|
+
} catch (error) {
|
|
33
|
+
throw new Error(`Failed to decode JWT: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function isTokenExpired(token) {
|
|
37
|
+
try {
|
|
38
|
+
const payload = decodeJWTPayload(token);
|
|
39
|
+
if (!payload.exp) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
const now = Math.floor(Date.now() / 1e3);
|
|
43
|
+
return payload.exp < now;
|
|
44
|
+
} catch {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async function readSession(sessionFile) {
|
|
49
|
+
try {
|
|
50
|
+
const data = await fs.readFile(sessionFile, "utf8");
|
|
51
|
+
return JSON.parse(data);
|
|
52
|
+
} catch {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
var Jwt = class extends BaseCommand {
|
|
57
|
+
static args = {};
|
|
58
|
+
static description = "Get the JWT from the dev-login session (refreshing if expired)";
|
|
59
|
+
static examples = [
|
|
60
|
+
`<%= config.bin %> <%= command.id %>
|
|
61
|
+
Get JWT from the default session file (.auth.json)
|
|
62
|
+
|
|
63
|
+
<%= config.bin %> <%= command.id %> --session-file /path/to/.auth.json
|
|
64
|
+
Get JWT from a specific session file
|
|
65
|
+
|
|
66
|
+
<%= config.bin %> <%= command.id %> --client-id client_xxx
|
|
67
|
+
Get JWT with explicit client ID for refresh
|
|
68
|
+
`
|
|
69
|
+
];
|
|
70
|
+
static flags = {
|
|
71
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
72
|
+
root: import_core.Flags.string({
|
|
73
|
+
description: "root directory",
|
|
74
|
+
required: false,
|
|
75
|
+
default: process.cwd()
|
|
76
|
+
}),
|
|
77
|
+
manifest: import_core.Flags.string({
|
|
78
|
+
description: "project manifest",
|
|
79
|
+
required: false,
|
|
80
|
+
default: "raindrop.manifest"
|
|
81
|
+
}),
|
|
82
|
+
application: import_core.Flags.string({
|
|
83
|
+
char: "a",
|
|
84
|
+
description: "application name",
|
|
85
|
+
required: false
|
|
86
|
+
}),
|
|
87
|
+
"client-id": import_core.Flags.string({
|
|
88
|
+
description: "WorkOS client ID (for token refresh)",
|
|
89
|
+
required: false,
|
|
90
|
+
env: "WORKOS_CLIENT_ID"
|
|
91
|
+
}),
|
|
92
|
+
"session-file": import_core.Flags.string({
|
|
93
|
+
description: "path to session file",
|
|
94
|
+
required: false
|
|
95
|
+
})
|
|
96
|
+
};
|
|
97
|
+
async run() {
|
|
98
|
+
const { root, "client-id": clientIdFlag, "session-file": sessionFileFlag } = this.flags;
|
|
99
|
+
const sessionFile = sessionFileFlag || path.join(root, ".auth.json");
|
|
100
|
+
const session = await readSession(sessionFile);
|
|
101
|
+
if (!session) {
|
|
102
|
+
this.error(
|
|
103
|
+
`No session file found at ${sessionFile}. Run 'raindrop build workos env dev-login' first.`,
|
|
104
|
+
{ exit: 1 }
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
if (!session.access_token) {
|
|
108
|
+
this.error("Session file exists but contains no access token.", { exit: 1 });
|
|
109
|
+
}
|
|
110
|
+
let accessToken = session.access_token;
|
|
111
|
+
if (isTokenExpired(accessToken)) {
|
|
112
|
+
if (!session.refresh_token) {
|
|
113
|
+
this.error("Token is expired and no refresh token is available. Run `raindrop build workos env dev-login` again.", { exit: 1 });
|
|
114
|
+
}
|
|
115
|
+
let clientId = clientIdFlag;
|
|
116
|
+
if (!clientId) {
|
|
117
|
+
try {
|
|
118
|
+
const envInfo = await this.fetchClientId();
|
|
119
|
+
clientId = envInfo;
|
|
120
|
+
} catch (error) {
|
|
121
|
+
const err = error;
|
|
122
|
+
this.error(
|
|
123
|
+
`Client ID required for token refresh. Provide --client-id or ensure WorkOS environment is attached.
|
|
124
|
+
Error: ${err.message}`,
|
|
125
|
+
{ exit: 1 }
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
const refreshedSession = await refreshToken({
|
|
131
|
+
clientId,
|
|
132
|
+
sessionFile
|
|
133
|
+
});
|
|
134
|
+
accessToken = refreshedSession.access_token;
|
|
135
|
+
} catch (error) {
|
|
136
|
+
const err = error;
|
|
137
|
+
this.error(`Failed to refresh token: ${err.message}. Run \`raindrop build workos env dev-login\` again.`, { exit: 1 });
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
console.log(accessToken);
|
|
141
|
+
}
|
|
142
|
+
async fetchClientId() {
|
|
143
|
+
const { valueOf } = await import("../../../build-CBEGQPJT.js");
|
|
144
|
+
const apps = await this.loadManifest();
|
|
145
|
+
const app = apps.find((a) => valueOf(a.name) === this.flags.application) || apps[0];
|
|
146
|
+
if (!app) {
|
|
147
|
+
throw new Error("No application found in manifest. Specify --client-id.");
|
|
148
|
+
}
|
|
149
|
+
const applicationName = valueOf(app.name);
|
|
150
|
+
const config = await this.loadConfig();
|
|
151
|
+
const versionId = config.versionId;
|
|
152
|
+
if (!versionId) {
|
|
153
|
+
throw new Error("No version ID found. Deploy your application first with: raindrop build deploy");
|
|
154
|
+
}
|
|
155
|
+
const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
|
|
156
|
+
const response = await workosService.getEnvironmentForApplication({
|
|
157
|
+
userId,
|
|
158
|
+
organizationId,
|
|
159
|
+
applicationName,
|
|
160
|
+
versionId
|
|
161
|
+
});
|
|
162
|
+
if (!response.environment?.clientId) {
|
|
163
|
+
throw new Error(
|
|
164
|
+
`No WorkOS environment attached to ${applicationName}. Attach one with: raindrop build workos env attach <env-name>`
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
return response.environment.clientId;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
export {
|
|
171
|
+
Jwt as default
|
|
172
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
source_default
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-V6J23FL2.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseCommand
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-TFQY5TSY.js";
|
|
7
7
|
import {
|
|
8
8
|
__toESM,
|
|
9
9
|
init_cjs_shims,
|
|
10
10
|
readState,
|
|
11
11
|
require_lib
|
|
12
|
-
} from "../../../chunk-
|
|
12
|
+
} from "../../../chunk-KLOYSTZY.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/build/workos/setup.ts
|
|
15
15
|
init_cjs_shims();
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
source_default
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-V6J23FL2.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseCommand
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-TFQY5TSY.js";
|
|
7
7
|
import {
|
|
8
8
|
__toESM,
|
|
9
9
|
init_cjs_shims,
|
|
10
10
|
require_lib,
|
|
11
11
|
valueOf
|
|
12
|
-
} from "../../../chunk-
|
|
12
|
+
} from "../../../chunk-KLOYSTZY.js";
|
|
13
13
|
|
|
14
14
|
// src/commands/build/workos/status.ts
|
|
15
15
|
init_cjs_shims();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM,
|
|
6
6
|
init_cjs_shims,
|
|
7
7
|
require_lib
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/dns/create.ts
|
|
11
11
|
init_cjs_shims();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveDnsNameToZoneId
|
|
3
|
-
} from "../../chunk-UHSTDJ7X.js";
|
|
4
1
|
import {
|
|
5
2
|
esm_default
|
|
6
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-YQCRWPNI.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveDnsNameToZoneId
|
|
6
|
+
} from "../../chunk-VN2QYX4C.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseCommand
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM,
|
|
12
12
|
init_cjs_shims,
|
|
13
13
|
require_lib
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/dns/delete.ts
|
|
17
17
|
init_cjs_shims();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveDnsNameToZoneId
|
|
3
|
-
} from "../../chunk-UHSTDJ7X.js";
|
|
4
1
|
import {
|
|
5
2
|
source_default
|
|
6
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-V6J23FL2.js";
|
|
4
|
+
import {
|
|
5
|
+
resolveDnsNameToZoneId
|
|
6
|
+
} from "../../chunk-VN2QYX4C.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseCommand
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM,
|
|
12
12
|
init_cjs_shims,
|
|
13
13
|
require_lib
|
|
14
|
-
} from "../../chunk-
|
|
14
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
15
15
|
|
|
16
16
|
// src/commands/dns/get.ts
|
|
17
17
|
init_cjs_shims();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
source_default
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-V6J23FL2.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseCommand
|
|
6
|
-
} from "../../chunk-
|
|
6
|
+
} from "../../chunk-TFQY5TSY.js";
|
|
7
7
|
import {
|
|
8
8
|
__toESM,
|
|
9
9
|
init_cjs_shims,
|
|
10
10
|
require_lib
|
|
11
|
-
} from "../../chunk-
|
|
11
|
+
} from "../../chunk-KLOYSTZY.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/dns/list.ts
|
|
14
14
|
init_cjs_shims();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCommand
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-TFQY5TSY.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM,
|
|
6
6
|
init_cjs_shims,
|
|
7
7
|
require_lib
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-KLOYSTZY.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/dns/records/create.ts
|
|
11
11
|
init_cjs_shims();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
esm_default
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-YQCRWPNI.js";
|
|
4
4
|
import {
|
|
5
5
|
BaseCommand
|
|
6
|
-
} from "../../../chunk-
|
|
6
|
+
} from "../../../chunk-TFQY5TSY.js";
|
|
7
7
|
import {
|
|
8
8
|
__toESM,
|
|
9
9
|
init_cjs_shims,
|
|
10
10
|
require_lib
|
|
11
|
-
} from "../../../chunk-
|
|
11
|
+
} from "../../../chunk-KLOYSTZY.js";
|
|
12
12
|
|
|
13
13
|
// src/commands/dns/records/delete.ts
|
|
14
14
|
init_cjs_shims();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCommand
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-TFQY5TSY.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM,
|
|
6
6
|
init_cjs_shims,
|
|
7
7
|
require_lib
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-KLOYSTZY.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/dns/records/get.ts
|
|
11
11
|
init_cjs_shims();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCommand
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-TFQY5TSY.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM,
|
|
6
6
|
init_cjs_shims,
|
|
7
7
|
require_lib
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-KLOYSTZY.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/dns/records/list.ts
|
|
11
11
|
init_cjs_shims();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BaseCommand
|
|
3
|
-
} from "../../../chunk-
|
|
3
|
+
} from "../../../chunk-TFQY5TSY.js";
|
|
4
4
|
import {
|
|
5
5
|
__toESM,
|
|
6
6
|
init_cjs_shims,
|
|
7
7
|
require_lib
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-KLOYSTZY.js";
|
|
9
9
|
|
|
10
10
|
// src/commands/dns/records/update.ts
|
|
11
11
|
init_cjs_shims();
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BaseCommand
|
|
3
|
+
} from "../chunk-TFQY5TSY.js";
|
|
4
|
+
import {
|
|
5
|
+
__toESM,
|
|
6
|
+
init_cjs_shims,
|
|
7
|
+
readState,
|
|
8
|
+
require_lib
|
|
9
|
+
} from "../chunk-KLOYSTZY.js";
|
|
10
|
+
|
|
11
|
+
// src/commands/doctor.ts
|
|
12
|
+
init_cjs_shims();
|
|
13
|
+
var import_core = __toESM(require_lib(), 1);
|
|
14
|
+
import * as os from "os";
|
|
15
|
+
import * as path from "path";
|
|
16
|
+
var Doctor = class _Doctor extends BaseCommand {
|
|
17
|
+
static description = "Display diagnostic information for troubleshooting and support";
|
|
18
|
+
static examples = [
|
|
19
|
+
`<%= config.bin %> <%= command.id %>`,
|
|
20
|
+
`<%= config.bin %> <%= command.id %> --output json`,
|
|
21
|
+
`<%= config.bin %> <%= command.id %> --root /path/to/project`
|
|
22
|
+
];
|
|
23
|
+
static flags = {
|
|
24
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
25
|
+
root: import_core.Flags.string({
|
|
26
|
+
char: "r",
|
|
27
|
+
description: "root directory of the project",
|
|
28
|
+
required: false,
|
|
29
|
+
default: process.cwd()
|
|
30
|
+
}),
|
|
31
|
+
manifest: import_core.Flags.string({
|
|
32
|
+
description: "project manifest file",
|
|
33
|
+
required: false,
|
|
34
|
+
default: "raindrop.manifest"
|
|
35
|
+
}),
|
|
36
|
+
output: import_core.Flags.string({
|
|
37
|
+
char: "o",
|
|
38
|
+
description: "output format",
|
|
39
|
+
default: "text",
|
|
40
|
+
options: ["text", "json"]
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
async run() {
|
|
44
|
+
const { flags } = await this.parse(_Doctor);
|
|
45
|
+
let aiAgent;
|
|
46
|
+
let aiAgentVersion;
|
|
47
|
+
if (flags.output !== "json") {
|
|
48
|
+
const result = await this.promptForAIAgent();
|
|
49
|
+
aiAgent = result.agent;
|
|
50
|
+
aiAgentVersion = result.version;
|
|
51
|
+
}
|
|
52
|
+
const diagnostics = await this.collectDiagnostics(flags, aiAgent, aiAgentVersion);
|
|
53
|
+
if (flags.output === "json") {
|
|
54
|
+
console.log(JSON.stringify(diagnostics, null, 2));
|
|
55
|
+
} else {
|
|
56
|
+
this.displayDiagnostics(diagnostics);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
async promptForAIAgent() {
|
|
60
|
+
const { createInterface } = await import("readline");
|
|
61
|
+
const { execSync } = await import("child_process");
|
|
62
|
+
this.log("");
|
|
63
|
+
this.log("Which AI coding assistant are you using? (This helps our support team)");
|
|
64
|
+
this.log("Examples: Claude Code, Cursor, Windsurf, GitHub Copilot, VS Code, etc.");
|
|
65
|
+
this.log("");
|
|
66
|
+
const rl = createInterface({
|
|
67
|
+
input: process.stdin,
|
|
68
|
+
output: process.stderr
|
|
69
|
+
// Use stderr to match BaseCommand.log behavior
|
|
70
|
+
});
|
|
71
|
+
return new Promise((resolve) => {
|
|
72
|
+
rl.question("AI Agent (or press Enter to skip): ", (answer) => {
|
|
73
|
+
rl.close();
|
|
74
|
+
const agent = answer.trim() || void 0;
|
|
75
|
+
if (!agent) {
|
|
76
|
+
resolve({ agent: void 0, version: void 0 });
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
let version;
|
|
80
|
+
try {
|
|
81
|
+
const commandName = agent.split(" ")[0]?.toLowerCase().trim();
|
|
82
|
+
if (commandName) {
|
|
83
|
+
const versionOutput = execSync(`${commandName} --version`, {
|
|
84
|
+
encoding: "utf-8",
|
|
85
|
+
timeout: 2e3,
|
|
86
|
+
// 2 second timeout
|
|
87
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
88
|
+
// Ignore stdin and stderr
|
|
89
|
+
}).trim();
|
|
90
|
+
version = versionOutput;
|
|
91
|
+
}
|
|
92
|
+
} catch {
|
|
93
|
+
}
|
|
94
|
+
resolve({ agent, version });
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async collectDiagnostics(flags, aiAgent, aiAgentVersion) {
|
|
99
|
+
const diagnostics = {
|
|
100
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
101
|
+
versions: await this.collectVersionInfo(flags),
|
|
102
|
+
authentication: await this.collectAuthInfo(),
|
|
103
|
+
environment: this.collectEnvironmentInfo(aiAgent, aiAgentVersion)
|
|
104
|
+
};
|
|
105
|
+
try {
|
|
106
|
+
diagnostics.project = await this.collectProjectInfo(flags);
|
|
107
|
+
} catch {
|
|
108
|
+
}
|
|
109
|
+
return diagnostics;
|
|
110
|
+
}
|
|
111
|
+
async collectVersionInfo(flags) {
|
|
112
|
+
const versions = {
|
|
113
|
+
cli: this.config.version,
|
|
114
|
+
node: process.version,
|
|
115
|
+
os: `${os.type()} ${os.release()}`,
|
|
116
|
+
platform: os.platform(),
|
|
117
|
+
arch: os.arch()
|
|
118
|
+
};
|
|
119
|
+
try {
|
|
120
|
+
versions.framework = await this.raindropFrameworkVersion(flags.root);
|
|
121
|
+
} catch {
|
|
122
|
+
}
|
|
123
|
+
try {
|
|
124
|
+
const { execSync } = await import("child_process");
|
|
125
|
+
const npmVersion = execSync("npm --version", { encoding: "utf-8" }).trim();
|
|
126
|
+
versions.npm = npmVersion;
|
|
127
|
+
} catch {
|
|
128
|
+
}
|
|
129
|
+
return versions;
|
|
130
|
+
}
|
|
131
|
+
async collectProjectInfo(flags) {
|
|
132
|
+
const { existsSync, readFileSync } = await import("fs");
|
|
133
|
+
const manifestPath = path.isAbsolute(flags.manifest) ? flags.manifest : path.join(flags.root, flags.manifest);
|
|
134
|
+
const projectInfo = {
|
|
135
|
+
root: flags.root,
|
|
136
|
+
manifest: manifestPath,
|
|
137
|
+
manifestExists: existsSync(manifestPath),
|
|
138
|
+
manifestValid: false
|
|
139
|
+
};
|
|
140
|
+
if (projectInfo.manifestExists) {
|
|
141
|
+
try {
|
|
142
|
+
projectInfo.manifestContent = readFileSync(manifestPath, "utf-8");
|
|
143
|
+
} catch (error) {
|
|
144
|
+
projectInfo.manifestContent = `Error reading manifest: ${error instanceof Error ? error.message : String(error)}`;
|
|
145
|
+
}
|
|
146
|
+
try {
|
|
147
|
+
const apps = await this.loadManifest();
|
|
148
|
+
projectInfo.manifestValid = apps.length > 0;
|
|
149
|
+
} catch (error) {
|
|
150
|
+
projectInfo.manifestValid = false;
|
|
151
|
+
projectInfo.manifestErrors = [error instanceof Error ? error.message : String(error)];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
projectInfo.config = await this.loadConfig();
|
|
156
|
+
} catch {
|
|
157
|
+
}
|
|
158
|
+
return projectInfo;
|
|
159
|
+
}
|
|
160
|
+
async collectAuthInfo() {
|
|
161
|
+
const configDir = this.config.configDir;
|
|
162
|
+
const authInfo = {
|
|
163
|
+
configDir,
|
|
164
|
+
tokenStatus: "unknown",
|
|
165
|
+
organizationCount: 0
|
|
166
|
+
};
|
|
167
|
+
try {
|
|
168
|
+
const state = await readState(configDir);
|
|
169
|
+
authInfo.organizationCount = Object.keys(state.organizationIdToBearerToken).length;
|
|
170
|
+
if (state.currentOrganizationId) {
|
|
171
|
+
const currentOrg = state.organizationIdToBearerToken[state.currentOrganizationId];
|
|
172
|
+
if (currentOrg) {
|
|
173
|
+
authInfo.organizationId = state.currentOrganizationId;
|
|
174
|
+
authInfo.userEmailMasked = this.maskEmail(currentOrg.userEmail);
|
|
175
|
+
authInfo.tokenStatus = "valid";
|
|
176
|
+
} else {
|
|
177
|
+
authInfo.tokenStatus = "missing";
|
|
178
|
+
}
|
|
179
|
+
} else {
|
|
180
|
+
authInfo.tokenStatus = "missing";
|
|
181
|
+
}
|
|
182
|
+
} catch {
|
|
183
|
+
authInfo.tokenStatus = "missing";
|
|
184
|
+
}
|
|
185
|
+
return authInfo;
|
|
186
|
+
}
|
|
187
|
+
maskEmail(email) {
|
|
188
|
+
if (!email || !email.includes("@")) {
|
|
189
|
+
return "***";
|
|
190
|
+
}
|
|
191
|
+
const [localPart, domain] = email.split("@");
|
|
192
|
+
if (!localPart || !domain) {
|
|
193
|
+
return "***";
|
|
194
|
+
}
|
|
195
|
+
const visibleChars = Math.min(2, localPart.length);
|
|
196
|
+
const masked = localPart.slice(0, visibleChars) + "***";
|
|
197
|
+
return `${masked}@${domain}`;
|
|
198
|
+
}
|
|
199
|
+
collectEnvironmentInfo(aiAgent, aiAgentVersion) {
|
|
200
|
+
const env = process.env;
|
|
201
|
+
const relevantEnvVars = {};
|
|
202
|
+
const varsToCheck = [
|
|
203
|
+
"LIQUIDMETAL_RAINBOW_AUTH_SERVICE",
|
|
204
|
+
"RAINDROP_CATALOG_SERVICE",
|
|
205
|
+
"TERM_PROGRAM",
|
|
206
|
+
"TERM",
|
|
207
|
+
"SHELL",
|
|
208
|
+
"CI",
|
|
209
|
+
"GITHUB_ACTIONS",
|
|
210
|
+
"GITLAB_CI",
|
|
211
|
+
"CIRCLECI"
|
|
212
|
+
];
|
|
213
|
+
for (const varName of varsToCheck) {
|
|
214
|
+
if (env[varName]) {
|
|
215
|
+
relevantEnvVars[varName] = env[varName];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return {
|
|
219
|
+
aiAgent,
|
|
220
|
+
aiAgentVersion,
|
|
221
|
+
terminal: env.TERM_PROGRAM || env.TERM || "unknown",
|
|
222
|
+
shell: env.SHELL || "unknown",
|
|
223
|
+
relevantEnvVars
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
displayDiagnostics(diagnostics) {
|
|
227
|
+
this.log("");
|
|
228
|
+
this.log("\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557");
|
|
229
|
+
this.log("\u2551 Raindrop CLI Diagnostic Information \u2551");
|
|
230
|
+
this.log("\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D");
|
|
231
|
+
this.log("");
|
|
232
|
+
this.log("\u{1F4E6} Versions:");
|
|
233
|
+
this.log(` CLI: ${diagnostics.versions.cli}`);
|
|
234
|
+
this.log(` Node.js: ${diagnostics.versions.node}`);
|
|
235
|
+
if (diagnostics.versions.npm) {
|
|
236
|
+
this.log(` npm: ${diagnostics.versions.npm}`);
|
|
237
|
+
}
|
|
238
|
+
if (diagnostics.versions.framework) {
|
|
239
|
+
this.log(` Framework: ${diagnostics.versions.framework}`);
|
|
240
|
+
}
|
|
241
|
+
this.log(` OS: ${diagnostics.versions.os}`);
|
|
242
|
+
this.log(` Platform: ${diagnostics.versions.platform}`);
|
|
243
|
+
this.log(` Arch: ${diagnostics.versions.arch}`);
|
|
244
|
+
this.log("");
|
|
245
|
+
if (diagnostics.environment.aiAgent) {
|
|
246
|
+
this.log("\u{1F916} AI Agent:");
|
|
247
|
+
this.log(` Name: ${diagnostics.environment.aiAgent}`);
|
|
248
|
+
if (diagnostics.environment.aiAgentVersion) {
|
|
249
|
+
this.log(` Version: ${diagnostics.environment.aiAgentVersion}`);
|
|
250
|
+
}
|
|
251
|
+
this.log("");
|
|
252
|
+
}
|
|
253
|
+
this.log("\u{1F510} Authentication:");
|
|
254
|
+
this.log(` Config Dir: ${diagnostics.authentication.configDir}`);
|
|
255
|
+
this.log(` Status: ${diagnostics.authentication.tokenStatus}`);
|
|
256
|
+
if (diagnostics.authentication.organizationId) {
|
|
257
|
+
this.log(` Org ID: ${diagnostics.authentication.organizationId}`);
|
|
258
|
+
}
|
|
259
|
+
if (diagnostics.authentication.userEmailMasked) {
|
|
260
|
+
this.log(` User: ${diagnostics.authentication.userEmailMasked}`);
|
|
261
|
+
}
|
|
262
|
+
this.log(` Orgs: ${diagnostics.authentication.organizationCount}`);
|
|
263
|
+
this.log("");
|
|
264
|
+
if (diagnostics.project) {
|
|
265
|
+
this.log("\u{1F4C1} Project:");
|
|
266
|
+
this.log(` Root: ${diagnostics.project.root}`);
|
|
267
|
+
this.log(` Manifest: ${diagnostics.project.manifest}`);
|
|
268
|
+
this.log(` Exists: ${diagnostics.project.manifestExists ? "\u2713" : "\u2717"}`);
|
|
269
|
+
if (diagnostics.project.manifestExists) {
|
|
270
|
+
this.log(` Valid: ${diagnostics.project.manifestValid ? "\u2713" : "\u2717"}`);
|
|
271
|
+
if (diagnostics.project.manifestErrors && diagnostics.project.manifestErrors.length > 0) {
|
|
272
|
+
this.log(" Errors:");
|
|
273
|
+
for (const error of diagnostics.project.manifestErrors) {
|
|
274
|
+
this.log(` ${error}`);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
if (diagnostics.project.manifestContent) {
|
|
278
|
+
this.log("");
|
|
279
|
+
this.log(" Manifest Content:");
|
|
280
|
+
this.log(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
281
|
+
const lines = diagnostics.project.manifestContent.split("\n");
|
|
282
|
+
for (const line of lines) {
|
|
283
|
+
this.log(` ${line}`);
|
|
284
|
+
}
|
|
285
|
+
this.log(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (diagnostics.project.config) {
|
|
289
|
+
this.log(" Config:");
|
|
290
|
+
if (diagnostics.project.config.versionId) {
|
|
291
|
+
this.log(` Version ID: ${diagnostics.project.config.versionId}`);
|
|
292
|
+
}
|
|
293
|
+
if (diagnostics.project.config.lock) {
|
|
294
|
+
this.log(` Lock: ${diagnostics.project.config.lock}`);
|
|
295
|
+
}
|
|
296
|
+
this.log(` Sandbox: ${diagnostics.project.config.sandbox ? "enabled" : "disabled"}`);
|
|
297
|
+
}
|
|
298
|
+
this.log("");
|
|
299
|
+
}
|
|
300
|
+
this.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
|
|
301
|
+
this.log("");
|
|
302
|
+
this.log("\u{1F4A1} To output as JSON: raindrop doctor --output json");
|
|
303
|
+
this.log("");
|
|
304
|
+
this.log(`Collected at: ${diagnostics.timestamp}`);
|
|
305
|
+
}
|
|
306
|
+
};
|
|
307
|
+
export {
|
|
308
|
+
Doctor as default
|
|
309
|
+
};
|