@liquidmetal-ai/raindrop 0.7.0 → 0.8.1

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.
Files changed (178) hide show
  1. package/README.md +408 -73
  2. package/bin/cjs-shims.js +7 -0
  3. package/bin/run.js +20 -2
  4. package/bundle/chunk-5GH4FS6C.js +12148 -0
  5. package/bundle/chunk-6B4I2CKP.js +231 -0
  6. package/bundle/chunk-6UE75KX2.js +4481 -0
  7. package/bundle/chunk-AU3EGGJP.js +44 -0
  8. package/bundle/chunk-CDQRD3JA.js +75 -0
  9. package/bundle/chunk-CMCEP64V.js +380 -0
  10. package/bundle/chunk-CW5ZHVPX.js +292 -0
  11. package/bundle/chunk-G6NE675D.js +238720 -0
  12. package/bundle/chunk-GLIYVKQA.js +48 -0
  13. package/bundle/chunk-KXEV6E63.js +133 -0
  14. package/bundle/chunk-MCRKUPJY.js +4515 -0
  15. package/bundle/chunk-MGM2L2T3.js +805 -0
  16. package/bundle/chunk-MVQYQJHI.js +502 -0
  17. package/bundle/chunk-NG7CZTTE.js +147 -0
  18. package/bundle/chunk-PU4RCSXF.js +22452 -0
  19. package/bundle/chunk-VXAZKB3J.js +292 -0
  20. package/bundle/chunk-W2L3MYN6.js +4480 -0
  21. package/bundle/chunk-XYJACVNA.js +231 -0
  22. package/bundle/commands/annotation/get.js +153 -0
  23. package/bundle/commands/annotation/list.js +226 -0
  24. package/bundle/commands/annotation/put.js +177 -0
  25. package/bundle/commands/auth/list.js +75 -0
  26. package/bundle/commands/auth/login.js +1654 -0
  27. package/bundle/commands/auth/logout.js +27 -0
  28. package/bundle/commands/auth/select.js +53 -0
  29. package/bundle/commands/bucket/create-credential.js +173 -0
  30. package/bundle/commands/bucket/delete-credential.js +140 -0
  31. package/bundle/commands/bucket/get-credential.js +151 -0
  32. package/bundle/commands/bucket/list-credentials.js +148 -0
  33. package/bundle/commands/build/branch.js +126 -0
  34. package/bundle/commands/build/checkout.js +198 -0
  35. package/bundle/commands/build/clone.js +153 -0
  36. package/bundle/commands/build/delete.js +227 -0
  37. package/bundle/commands/build/deploy.js +160 -0
  38. package/bundle/commands/build/env/get.js +105 -0
  39. package/bundle/commands/build/env/set.js +115 -0
  40. package/bundle/commands/build/find.js +333 -0
  41. package/bundle/commands/build/generate.js +75 -0
  42. package/bundle/commands/build/init.js +76 -0
  43. package/bundle/commands/build/list.js +11 -0
  44. package/bundle/commands/build/sandbox.js +65 -0
  45. package/bundle/commands/build/start.js +84 -0
  46. package/bundle/commands/build/status.js +1839 -0
  47. package/bundle/commands/build/stop.js +84 -0
  48. package/bundle/commands/build/tools/check.js +32 -0
  49. package/bundle/commands/build/tools/fmt.js +49 -0
  50. package/bundle/commands/build/unsandbox.js +65 -0
  51. package/bundle/commands/build/upload.js +83 -0
  52. package/bundle/commands/build/validate.js +71 -0
  53. package/bundle/commands/build/workos/delete.js +86 -0
  54. package/bundle/commands/build/workos/env/attach.js +134 -0
  55. package/bundle/commands/build/workos/env/create.js +176 -0
  56. package/bundle/commands/build/workos/env/delete.js +84 -0
  57. package/bundle/commands/build/workos/env/detach.js +115 -0
  58. package/bundle/commands/build/workos/env/get.js +117 -0
  59. package/bundle/commands/build/workos/env/list.js +139 -0
  60. package/bundle/commands/build/workos/env/set.js +138 -0
  61. package/bundle/commands/build/workos/invite.js +91 -0
  62. package/bundle/commands/build/workos/setup.js +124 -0
  63. package/bundle/commands/build/workos/status.js +93 -0
  64. package/bundle/commands/dns/create.js +128 -0
  65. package/bundle/commands/dns/delete.js +80 -0
  66. package/bundle/commands/dns/get.js +167 -0
  67. package/bundle/commands/dns/list.js +193 -0
  68. package/bundle/commands/dns/records/create.js +150 -0
  69. package/bundle/commands/dns/records/delete.js +76 -0
  70. package/bundle/commands/dns/records/get.js +118 -0
  71. package/bundle/commands/dns/records/list.js +153 -0
  72. package/bundle/commands/dns/records/update.js +146 -0
  73. package/bundle/commands/logs/query.js +237 -0
  74. package/bundle/commands/logs/tail.js +155 -0
  75. package/bundle/commands/mcp/install-claude.js +220 -0
  76. package/bundle/commands/mcp/install-gemini.js +220 -0
  77. package/bundle/commands/mcp/install-goose.js +232 -0
  78. package/bundle/commands/mcp/status.js +153 -0
  79. package/bundle/commands/object/delete.js +180 -0
  80. package/bundle/commands/object/get.js +209 -0
  81. package/bundle/commands/object/list.js +206 -0
  82. package/bundle/commands/object/put.js +211 -0
  83. package/bundle/commands/query/chunk-search.js +123 -0
  84. package/bundle/commands/query/document.js +126 -0
  85. package/bundle/commands/query/events.js +98 -0
  86. package/bundle/commands/query/reindex.js +147 -0
  87. package/bundle/commands/query/search.js +169 -0
  88. package/bundle/commands/tail.js +31 -0
  89. package/bundle/index.js +51 -0
  90. package/dist/base-command.d.ts +6 -0
  91. package/dist/base-command.d.ts.map +1 -1
  92. package/dist/base-command.js +14 -1
  93. package/dist/build.d.ts +2 -1
  94. package/dist/build.d.ts.map +1 -1
  95. package/dist/build.js +169 -51
  96. package/dist/codegen.d.ts +1 -1
  97. package/dist/codegen.d.ts.map +1 -1
  98. package/dist/codegen.js +17 -3
  99. package/dist/codegen.test.js +44 -0
  100. package/dist/commands/build/checkout.d.ts.map +1 -1
  101. package/dist/commands/build/checkout.js +4 -0
  102. package/dist/commands/build/delete.d.ts.map +1 -1
  103. package/dist/commands/build/delete.js +6 -3
  104. package/dist/commands/build/deploy.d.ts.map +1 -1
  105. package/dist/commands/build/deploy.js +10 -2
  106. package/dist/commands/build/find.d.ts +1 -0
  107. package/dist/commands/build/find.d.ts.map +1 -1
  108. package/dist/commands/build/find.js +33 -2
  109. package/dist/commands/build/validate.d.ts.map +1 -1
  110. package/dist/commands/build/validate.js +0 -1
  111. package/dist/commands/build/workos/delete.d.ts +18 -0
  112. package/dist/commands/build/workos/delete.d.ts.map +1 -0
  113. package/dist/commands/build/workos/delete.js +72 -0
  114. package/dist/commands/build/workos/env/attach.d.ts +24 -0
  115. package/dist/commands/build/workos/env/attach.d.ts.map +1 -0
  116. package/dist/commands/build/workos/env/attach.js +111 -0
  117. package/dist/commands/build/workos/env/create.d.ts +26 -0
  118. package/dist/commands/build/workos/env/create.d.ts.map +1 -0
  119. package/dist/commands/build/workos/env/create.js +156 -0
  120. package/dist/commands/build/workos/env/delete.d.ts +20 -0
  121. package/dist/commands/build/workos/env/delete.d.ts.map +1 -0
  122. package/dist/commands/build/workos/env/delete.js +61 -0
  123. package/dist/commands/build/workos/env/detach.d.ts +21 -0
  124. package/dist/commands/build/workos/env/detach.d.ts.map +1 -0
  125. package/dist/commands/build/workos/env/detach.js +94 -0
  126. package/dist/commands/build/workos/env/get.d.ts +20 -0
  127. package/dist/commands/build/workos/env/get.d.ts.map +1 -0
  128. package/dist/commands/build/workos/env/get.js +94 -0
  129. package/dist/commands/build/workos/env/list.d.ts +18 -0
  130. package/dist/commands/build/workos/env/list.d.ts.map +1 -0
  131. package/dist/commands/build/workos/env/list.js +114 -0
  132. package/dist/commands/build/workos/env/set.d.ts +27 -0
  133. package/dist/commands/build/workos/env/set.d.ts.map +1 -0
  134. package/dist/commands/build/workos/env/set.js +115 -0
  135. package/dist/commands/build/workos/invite.d.ts +21 -0
  136. package/dist/commands/build/workos/invite.d.ts.map +1 -0
  137. package/dist/commands/build/workos/invite.js +68 -0
  138. package/dist/commands/build/workos/setup.d.ts +20 -0
  139. package/dist/commands/build/workos/setup.d.ts.map +1 -0
  140. package/dist/commands/build/workos/setup.js +106 -0
  141. package/dist/commands/build/workos/status.d.ts +18 -0
  142. package/dist/commands/build/workos/status.d.ts.map +1 -0
  143. package/dist/commands/build/workos/status.js +70 -0
  144. package/dist/commands/mcp/install-claude.d.ts.map +1 -1
  145. package/dist/commands/mcp/install-claude.js +0 -2
  146. package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
  147. package/dist/commands/mcp/install-gemini.js +0 -2
  148. package/dist/commands/mcp/install-goose.d.ts.map +1 -1
  149. package/dist/commands/mcp/install-goose.js +0 -2
  150. package/dist/deploy.d.ts.map +1 -1
  151. package/dist/deploy.js +2 -2
  152. package/dist/index.d.ts +2 -0
  153. package/dist/index.d.ts.map +1 -1
  154. package/dist/index.js +4 -0
  155. package/oclif.manifest.json +4544 -2466
  156. package/package.json +8 -5
  157. package/templates/claude-code/debug-raindrop-app.md +89 -0
  158. package/templates/claude-code/new-raindrop-app.md +10 -6
  159. package/templates/claude-code/reattach-raindrop-session.md +50 -12
  160. package/templates/claude-code/update-raindrop-app.md +61 -9
  161. package/templates/db/node_modules/.bin/prisma +2 -2
  162. package/templates/db/node_modules/.bin/prisma-kysely +2 -2
  163. package/templates/db/node_modules/.bin/tsc +2 -2
  164. package/templates/db/node_modules/.bin/tsserver +2 -2
  165. package/templates/db/node_modules/.bin/zx +2 -2
  166. package/templates/gemini-code/debug-raindrop-app.toml +86 -0
  167. package/templates/gemini-code/new-raindrop-app.toml +9 -5
  168. package/templates/gemini-code/reattach-raindrop-session.toml +9 -11
  169. package/templates/gemini-code/update-raindrop-app.toml +55 -10
  170. package/templates/goose/debug-raindrop-app.yaml +91 -0
  171. package/templates/goose/new-raindrop-app.yaml +12 -7
  172. package/templates/goose/reattach-raindrop-session.yaml +11 -4
  173. package/templates/goose/update-raindrop-app.yaml +57 -5
  174. package/templates/init/src/_app/auth.ts +18 -0
  175. package/templates/init/src/_app/cors.ts +64 -0
  176. package/dist/tsconfig.tsbuildinfo +0 -1
  177. package/templates/claude-code/raindrop-guidelines.md +0 -322
  178. package/templates/gemini-code/raindrop-guidelines.md +0 -322
@@ -0,0 +1,138 @@
1
+ import {
2
+ source_default
3
+ } from "../../../../chunk-MVQYQJHI.js";
4
+ import {
5
+ BaseCommand
6
+ } from "../../../../chunk-MCRKUPJY.js";
7
+ import {
8
+ EnvironmentType,
9
+ __toESM,
10
+ init_cjs_shims,
11
+ require_lib
12
+ } from "../../../../chunk-G6NE675D.js";
13
+
14
+ // src/commands/build/workos/env/set.ts
15
+ init_cjs_shims();
16
+ var import_core = __toESM(require_lib(), 1);
17
+ var Set = class extends BaseCommand {
18
+ static args = {
19
+ appName: import_core.Args.string({
20
+ description: "raindrop app name",
21
+ required: true
22
+ })
23
+ };
24
+ static description = "Configure complete WorkOS environment for a Raindrop app (including production environments)";
25
+ static examples = [
26
+ `<%= config.bin %> <%= command.id %> my-app \\
27
+ --environment-id env_123 \\
28
+ --client-id client_123 \\
29
+ --api-key sk_test_123 \\
30
+ --workos-organization-id org_456 \\
31
+ --workos-connect-hostname auth.myapp.com \\
32
+ --type production
33
+
34
+ Configure a production WorkOS environment
35
+ `
36
+ ];
37
+ static flags = {
38
+ ...BaseCommand.HIDDEN_FLAGS,
39
+ environmentId: import_core.Flags.string({
40
+ description: "WorkOS environment ID",
41
+ required: true
42
+ }),
43
+ clientId: import_core.Flags.string({
44
+ description: "WorkOS client ID",
45
+ required: true
46
+ }),
47
+ apiKey: import_core.Flags.string({
48
+ description: "WorkOS API key value",
49
+ required: true
50
+ }),
51
+ workosOrganizationId: import_core.Flags.string({
52
+ description: "WorkOS organization ID",
53
+ required: true
54
+ }),
55
+ workosConnectHostname: import_core.Flags.string({
56
+ description: "WorkOS Connect hostname (e.g., auth.myapp.com)",
57
+ required: true
58
+ }),
59
+ workosApiHostname: import_core.Flags.string({
60
+ description: "WorkOS API hostname",
61
+ default: "api.workos.com"
62
+ }),
63
+ type: import_core.Flags.string({
64
+ description: "environment type",
65
+ default: "staging",
66
+ options: ["staging", "production"]
67
+ }),
68
+ output: import_core.Flags.string({
69
+ char: "o",
70
+ description: "output format",
71
+ default: "text",
72
+ options: ["text", "json"]
73
+ })
74
+ };
75
+ async run() {
76
+ const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
77
+ try {
78
+ await workosService.setEnvironment({
79
+ userId,
80
+ organizationId,
81
+ environmentName: this.args.appName,
82
+ environmentId: this.flags.environmentId,
83
+ clientId: this.flags.clientId,
84
+ apiKeyValue: this.flags.apiKey,
85
+ environmentType: this.flags.type === "staging" ? EnvironmentType.STAGING : EnvironmentType.PRODUCTION,
86
+ workosOrganizationId: this.flags.workosOrganizationId,
87
+ workosConnectHostname: this.flags.workosConnectHostname,
88
+ workosApiHostname: this.flags.workosApiHostname
89
+ });
90
+ switch (this.flags.output) {
91
+ case "json":
92
+ console.log(
93
+ JSON.stringify(
94
+ {
95
+ success: true,
96
+ appName: this.args.appName,
97
+ environmentId: this.flags.environmentId,
98
+ clientId: this.flags.clientId,
99
+ environmentType: this.flags.type,
100
+ workosOrganizationId: this.flags.workosOrganizationId,
101
+ workosConnectHostname: this.flags.workosConnectHostname,
102
+ workosApiHostname: this.flags.workosApiHostname
103
+ },
104
+ null,
105
+ 2
106
+ )
107
+ );
108
+ break;
109
+ case "text":
110
+ default:
111
+ this.log(source_default.green("\u2713") + ` WorkOS environment configured for ${source_default.bold(this.args.appName)}`);
112
+ this.log("");
113
+ this.log(` ${source_default.cyan("App Name:")} ${this.args.appName}`);
114
+ this.log(` ${source_default.cyan("Environment ID:")} ${this.flags.environmentId}`);
115
+ this.log(` ${source_default.cyan("Client ID:")} ${this.flags.clientId}`);
116
+ this.log(` ${source_default.cyan("Environment:")} ${this.flags.type}`);
117
+ this.log(` ${source_default.cyan("WorkOS Organization:")} ${this.flags.workosOrganizationId}`);
118
+ this.log(` ${source_default.cyan("Connect Hostname:")} ${this.flags.workosConnectHostname}`);
119
+ this.log(` ${source_default.cyan("API Hostname:")} ${this.flags.workosApiHostname}`);
120
+ this.log("");
121
+ this.log(source_default.dim("API key has been stored securely."));
122
+ break;
123
+ }
124
+ } catch (error) {
125
+ const err = error;
126
+ if (err.message.includes("team not found")) {
127
+ this.error(
128
+ "WorkOS integration not activated. Run: raindrop build workos setup --admin-email <email>",
129
+ { exit: 1 }
130
+ );
131
+ }
132
+ this.error(`Failed to configure WorkOS environment: ${err.message}`, { exit: 1 });
133
+ }
134
+ }
135
+ };
136
+ export {
137
+ Set as default
138
+ };
@@ -0,0 +1,91 @@
1
+ import {
2
+ source_default
3
+ } from "../../../chunk-MVQYQJHI.js";
4
+ import {
5
+ BaseCommand
6
+ } from "../../../chunk-MCRKUPJY.js";
7
+ import {
8
+ __toESM,
9
+ init_cjs_shims,
10
+ require_lib
11
+ } from "../../../chunk-G6NE675D.js";
12
+
13
+ // src/commands/build/workos/invite.ts
14
+ init_cjs_shims();
15
+ var import_core = __toESM(require_lib(), 1);
16
+ var Invite = class extends BaseCommand {
17
+ static args = {
18
+ email: import_core.Args.string({
19
+ description: "email address to invite",
20
+ required: true
21
+ })
22
+ };
23
+ static description = "Invite a user to join the WorkOS team";
24
+ static examples = [
25
+ `<%= config.bin %> <%= command.id %> user@example.com --role admin
26
+ Invite a user as admin
27
+
28
+ <%= config.bin %> <%= command.id %> user@example.com --role member
29
+ Invite a user as member
30
+ `
31
+ ];
32
+ static flags = {
33
+ ...BaseCommand.HIDDEN_FLAGS,
34
+ role: import_core.Flags.string({
35
+ description: "role slug for the invited user (e.g., admin, member)",
36
+ required: true
37
+ }),
38
+ output: import_core.Flags.string({
39
+ char: "o",
40
+ description: "output format",
41
+ default: "text",
42
+ options: ["text", "json"]
43
+ })
44
+ };
45
+ async run() {
46
+ const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
47
+ try {
48
+ await workosService.inviteTeamMember({
49
+ userId,
50
+ organizationId,
51
+ email: this.args.email,
52
+ roleSlug: this.flags.role
53
+ });
54
+ switch (this.flags.output) {
55
+ case "json":
56
+ console.log(
57
+ JSON.stringify(
58
+ {
59
+ success: true,
60
+ email: this.args.email,
61
+ role: this.flags.role
62
+ },
63
+ null,
64
+ 2
65
+ )
66
+ );
67
+ break;
68
+ case "text":
69
+ default:
70
+ this.log(source_default.green("\u2713") + ` Invitation sent to ${source_default.bold(this.args.email)}`);
71
+ this.log("");
72
+ this.log(` ${source_default.cyan("Role:")} ${this.flags.role}`);
73
+ this.log("");
74
+ this.log(source_default.dim("The user will receive an email invitation to join the team."));
75
+ break;
76
+ }
77
+ } catch (error) {
78
+ const err = error;
79
+ if (err.message.includes("not found")) {
80
+ this.error(
81
+ "WorkOS integration not activated. Run: raindrop build workos setup --admin-email <email>",
82
+ { exit: 1 }
83
+ );
84
+ }
85
+ this.error(`Failed to invite team member: ${err.message}`, { exit: 1 });
86
+ }
87
+ }
88
+ };
89
+ export {
90
+ Invite as default
91
+ };
@@ -0,0 +1,124 @@
1
+ import {
2
+ source_default
3
+ } from "../../../chunk-MVQYQJHI.js";
4
+ import {
5
+ BaseCommand
6
+ } from "../../../chunk-MCRKUPJY.js";
7
+ import {
8
+ __toESM,
9
+ init_cjs_shims,
10
+ readState,
11
+ require_lib
12
+ } from "../../../chunk-G6NE675D.js";
13
+
14
+ // src/commands/build/workos/setup.ts
15
+ init_cjs_shims();
16
+ var import_core = __toESM(require_lib(), 1);
17
+ var Setup = class extends BaseCommand {
18
+ static args = {};
19
+ static description = "Activate WorkOS integration by creating a team";
20
+ static examples = [
21
+ `<%= config.bin %> <%= command.id %>
22
+ Activate WorkOS integration using defaults from config
23
+
24
+ <%= config.bin %> <%= command.id %> --admin-email admin@example.com
25
+ Activate with explicit admin email
26
+
27
+ <%= config.bin %> <%= command.id %> --admin-email admin@example.com --name "Acme Inc"
28
+ Activate with explicit organization name
29
+
30
+ <%= config.bin %> <%= command.id %> --output json
31
+ Get JSON output with team details
32
+ `
33
+ ];
34
+ static flags = {
35
+ ...BaseCommand.HIDDEN_FLAGS,
36
+ adminEmail: import_core.Flags.string({
37
+ description: "email address for the team admin (defaults to user email from config)",
38
+ required: false
39
+ }),
40
+ name: import_core.Flags.string({
41
+ description: "organization name (defaults to organization name from config)",
42
+ required: false
43
+ }),
44
+ output: import_core.Flags.string({
45
+ char: "o",
46
+ description: "output format",
47
+ default: "text",
48
+ options: ["text", "json", "table"]
49
+ })
50
+ };
51
+ async run() {
52
+ const state = await readState(this.config.configDir);
53
+ let defaultAdminEmail;
54
+ let defaultOrgName;
55
+ if (state.currentOrganizationId) {
56
+ const token = state.organizationIdToBearerToken[state.currentOrganizationId];
57
+ if (token) {
58
+ defaultAdminEmail = token.userEmail;
59
+ defaultOrgName = token.organizationName;
60
+ }
61
+ }
62
+ const adminEmail = this.flags.adminEmail || defaultAdminEmail;
63
+ const name = this.flags.name || defaultOrgName;
64
+ if (!adminEmail) {
65
+ this.error("Admin email is required. Please specify --admin-email or ensure you are logged in.", { exit: 1 });
66
+ }
67
+ const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
68
+ try {
69
+ const response = await workosService.createTeam({
70
+ userId,
71
+ organizationId,
72
+ adminEmail,
73
+ name
74
+ });
75
+ if (!response.team) {
76
+ this.error("Failed to create WorkOS team: no team returned", { exit: 1 });
77
+ }
78
+ switch (this.flags.output) {
79
+ case "json":
80
+ console.log(
81
+ JSON.stringify(
82
+ {
83
+ id: response.team.id,
84
+ name: response.team.name,
85
+ createdAt: response.team.createdAt,
86
+ updatedAt: response.team.updatedAt
87
+ },
88
+ null,
89
+ 2
90
+ )
91
+ );
92
+ break;
93
+ case "table":
94
+ console.table({
95
+ "Team ID": response.team.id,
96
+ "Team Name": response.team.name,
97
+ "Created": response.team.createdAt ? new Date(Number(response.team.createdAt.seconds) * 1e3).toLocaleString() : "N/A",
98
+ "Updated": response.team.updatedAt ? new Date(Number(response.team.updatedAt.seconds) * 1e3).toLocaleString() : "N/A"
99
+ });
100
+ break;
101
+ case "text":
102
+ default:
103
+ this.log(source_default.green("\u2713") + " WorkOS integration activated successfully!");
104
+ this.log("");
105
+ this.log(source_default.bold("Team Details:"));
106
+ this.log(` ${source_default.cyan("Team ID:")} ${response.team.id}`);
107
+ this.log(` ${source_default.cyan("Team Name:")} ${response.team.name}`);
108
+ this.log(` ${source_default.cyan("Created:")} ${response.team.createdAt ? new Date(Number(response.team.createdAt.seconds) * 1e3).toLocaleString() : "N/A"}`);
109
+ this.log("");
110
+ this.log(source_default.dim("Next steps:"));
111
+ this.log(source_default.dim(" \u2022 Check your email for the team admin invitation"));
112
+ this.log(source_default.dim(" \u2022 Create environments for your apps: raindrop build workos env create <app-name>"));
113
+ this.log(source_default.dim(" \u2022 Invite team members: raindrop build workos invite <email> --role <role>"));
114
+ break;
115
+ }
116
+ } catch (error) {
117
+ const err = error;
118
+ this.error(`Failed to create WorkOS team: ${err.message}`, { exit: 1 });
119
+ }
120
+ }
121
+ };
122
+ export {
123
+ Setup as default
124
+ };
@@ -0,0 +1,93 @@
1
+ import {
2
+ source_default
3
+ } from "../../../chunk-MVQYQJHI.js";
4
+ import {
5
+ BaseCommand
6
+ } from "../../../chunk-MCRKUPJY.js";
7
+ import {
8
+ __toESM,
9
+ init_cjs_shims,
10
+ require_lib
11
+ } from "../../../chunk-G6NE675D.js";
12
+
13
+ // src/commands/build/workos/status.ts
14
+ init_cjs_shims();
15
+ var import_core = __toESM(require_lib(), 1);
16
+ var Status = class extends BaseCommand {
17
+ static args = {};
18
+ static description = "View WorkOS team information";
19
+ static examples = [
20
+ `<%= config.bin %> <%= command.id %>
21
+ View WorkOS team status
22
+
23
+ <%= config.bin %> <%= command.id %> --output json
24
+ Get JSON output with team details
25
+ `
26
+ ];
27
+ static flags = {
28
+ ...BaseCommand.HIDDEN_FLAGS,
29
+ output: import_core.Flags.string({
30
+ char: "o",
31
+ description: "output format",
32
+ default: "text",
33
+ options: ["text", "json", "table"]
34
+ })
35
+ };
36
+ async run() {
37
+ const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
38
+ try {
39
+ const response = await workosService.getTeam({
40
+ userId,
41
+ organizationId
42
+ });
43
+ if (!response.team) {
44
+ this.error("No WorkOS team found for this organization", { exit: 1 });
45
+ }
46
+ switch (this.flags.output) {
47
+ case "json":
48
+ console.log(
49
+ JSON.stringify(
50
+ {
51
+ id: response.team.id,
52
+ name: response.team.name,
53
+ createdAt: response.team.createdAt,
54
+ updatedAt: response.team.updatedAt
55
+ },
56
+ null,
57
+ 2
58
+ )
59
+ );
60
+ break;
61
+ case "table":
62
+ console.table({
63
+ "Team ID": response.team.id,
64
+ "Team Name": response.team.name,
65
+ "Created": response.team.createdAt ? new Date(Number(response.team.createdAt.seconds) * 1e3).toLocaleString() : "N/A",
66
+ "Updated": response.team.updatedAt ? new Date(Number(response.team.updatedAt.seconds) * 1e3).toLocaleString() : "N/A"
67
+ });
68
+ break;
69
+ case "text":
70
+ default:
71
+ this.log(source_default.bold("WorkOS Team Status"));
72
+ this.log("");
73
+ this.log(` ${source_default.cyan("Team ID:")} ${response.team.id}`);
74
+ this.log(` ${source_default.cyan("Team Name:")} ${response.team.name}`);
75
+ this.log(` ${source_default.cyan("Created:")} ${response.team.createdAt ? new Date(Number(response.team.createdAt.seconds) * 1e3).toLocaleString() : "N/A"}`);
76
+ this.log(` ${source_default.cyan("Updated:")} ${response.team.updatedAt ? new Date(Number(response.team.updatedAt.seconds) * 1e3).toLocaleString() : "N/A"}`);
77
+ break;
78
+ }
79
+ } catch (error) {
80
+ const err = error;
81
+ if (err.message.includes("not found")) {
82
+ this.error(
83
+ "WorkOS integration not activated. Run: raindrop build workos setup --admin-email <email>",
84
+ { exit: 1 }
85
+ );
86
+ }
87
+ this.error(`Failed to get WorkOS team: ${err.message}`, { exit: 1 });
88
+ }
89
+ }
90
+ };
91
+ export {
92
+ Status as default
93
+ };
@@ -0,0 +1,128 @@
1
+ import {
2
+ BaseCommand
3
+ } from "../../chunk-MCRKUPJY.js";
4
+ import {
5
+ __toESM,
6
+ init_cjs_shims,
7
+ require_lib
8
+ } from "../../chunk-G6NE675D.js";
9
+
10
+ // src/commands/dns/create.ts
11
+ init_cjs_shims();
12
+ var import_core = __toESM(require_lib(), 1);
13
+ var Create = class extends BaseCommand {
14
+ static args = {
15
+ domain: import_core.Args.string({
16
+ description: "Fully qualified domain name (e.g., example.com)",
17
+ required: true
18
+ })
19
+ };
20
+ static description = "Create a new DNS zone";
21
+ static examples = [
22
+ `<%= config.bin %> <%= command.id %> example.com
23
+ Creates a new full DNS zone for example.com
24
+ `,
25
+ `<%= config.bin %> <%= command.id %> subdomain.example.com --description "My subdomain zone"
26
+ Creates a new DNS zone with a description
27
+ `,
28
+ `<%= config.bin %> <%= command.id %> example.com --type partial --jump-start
29
+ Creates a partial DNS zone with jump start enabled
30
+ `
31
+ ];
32
+ static flags = {
33
+ ...BaseCommand.HIDDEN_FLAGS,
34
+ description: import_core.Flags.string({
35
+ char: "d",
36
+ description: "Description for the DNS zone"
37
+ }),
38
+ jumpStart: import_core.Flags.boolean({
39
+ char: "j",
40
+ description: "Enable CloudFlare jump start (automatically detect and create DNS records)",
41
+ default: false
42
+ }),
43
+ type: import_core.Flags.string({
44
+ description: "DNS zone type configuration (full or partial)",
45
+ default: "full",
46
+ options: ["full", "partial"]
47
+ }),
48
+ zoneType: import_core.Flags.string({
49
+ char: "t",
50
+ description: "Legacy zone type for internal use",
51
+ default: "custom",
52
+ options: ["custom", "tenant"],
53
+ hidden: true
54
+ }),
55
+ tags: import_core.Flags.string({
56
+ description: "Comma-separated list of tags",
57
+ multiple: true
58
+ }),
59
+ output: import_core.Flags.string({
60
+ char: "o",
61
+ description: "output format",
62
+ default: "text",
63
+ options: ["text", "json"]
64
+ })
65
+ };
66
+ async run() {
67
+ const { client: dnsService, userId, organizationId } = await this.dnsService();
68
+ try {
69
+ this.log(`Creating DNS zone for ${this.args.domain}...`);
70
+ const typeEnum = this.flags.type === "partial" ? 2 : 1;
71
+ const response = await dnsService.createDNSZone({
72
+ organizationId,
73
+ userId,
74
+ fullyQualifiedDomainName: this.args.domain,
75
+ jumpStart: this.flags.jumpStart,
76
+ type: typeEnum,
77
+ description: this.flags.description
78
+ });
79
+ if (!response.zone) {
80
+ this.error("Failed to create DNS zone: No zone returned", { exit: 1 });
81
+ return;
82
+ }
83
+ switch (this.flags.output) {
84
+ case "json":
85
+ console.log(JSON.stringify({
86
+ zone: {
87
+ organizationId: response.zone.organizationId,
88
+ fullyQualifiedDomainName: response.zone.fullyQualifiedDomainName,
89
+ zoneType: response.zone.zoneType,
90
+ status: response.zone.status,
91
+ nameServers: response.zone.nameServers,
92
+ description: response.zone.description,
93
+ createdAt: response.zone.createdAt,
94
+ updatedAt: response.zone.updatedAt,
95
+ tags: response.zone.tags
96
+ }
97
+ }, null, 2));
98
+ break;
99
+ case "text":
100
+ default:
101
+ this.log("\n\u2705 DNS zone created successfully!\n");
102
+ this.log(`Domain: ${response.zone.fullyQualifiedDomainName}`);
103
+ this.log(`Status: ${response.zone.status}`);
104
+ this.log(`Type: ${response.zone.zoneType}`);
105
+ if (response.zone.nameServers && response.zone.nameServers.length > 0) {
106
+ this.log("\nNameservers:");
107
+ for (const ns of response.zone.nameServers) {
108
+ this.log(` - ${ns}`);
109
+ }
110
+ this.log("\n\u{1F4DD} Update your domain registrar to use these nameservers.");
111
+ }
112
+ if (response.zone.description) {
113
+ this.log(`
114
+ Description: ${response.zone.description}`);
115
+ }
116
+ if (response.zone.tags && response.zone.tags.length > 0) {
117
+ this.log(`Tags: ${response.zone.tags.join(", ")}`);
118
+ }
119
+ break;
120
+ }
121
+ } catch (error) {
122
+ this.error(`Failed to create DNS zone: ${error}`, { exit: 1 });
123
+ }
124
+ }
125
+ };
126
+ export {
127
+ Create as default
128
+ };
@@ -0,0 +1,80 @@
1
+ import {
2
+ resolveDnsNameToZoneId
3
+ } from "../../chunk-GLIYVKQA.js";
4
+ import {
5
+ esm_default
6
+ } from "../../chunk-5GH4FS6C.js";
7
+ import {
8
+ BaseCommand
9
+ } from "../../chunk-MCRKUPJY.js";
10
+ import {
11
+ __toESM,
12
+ init_cjs_shims,
13
+ require_lib
14
+ } from "../../chunk-G6NE675D.js";
15
+
16
+ // src/commands/dns/delete.ts
17
+ init_cjs_shims();
18
+ var import_core = __toESM(require_lib(), 1);
19
+ var Delete = class extends BaseCommand {
20
+ static args = {
21
+ dnsName: import_core.Args.string({
22
+ description: "DNS name to delete (e.g., example.com)",
23
+ required: true
24
+ })
25
+ };
26
+ static description = "Delete a DNS zone";
27
+ static examples = [
28
+ `<%= config.bin %> <%= command.id %> example.com
29
+ Deletes the DNS zone for example.com
30
+ `,
31
+ `<%= config.bin %> <%= command.id %> subdomain.example.com --force
32
+ Deletes the DNS zone without confirmation prompt
33
+ `
34
+ ];
35
+ static flags = {
36
+ ...BaseCommand.HIDDEN_FLAGS,
37
+ force: import_core.Flags.boolean({
38
+ char: "f",
39
+ description: "Skip confirmation prompt",
40
+ default: false
41
+ })
42
+ };
43
+ async run() {
44
+ const { client: dnsService, userId, organizationId } = await this.dnsService();
45
+ try {
46
+ const zoneId = await resolveDnsNameToZoneId(
47
+ dnsService,
48
+ organizationId,
49
+ userId,
50
+ this.args.dnsName
51
+ );
52
+ if (!this.flags.force) {
53
+ const shouldDelete = await esm_default({
54
+ message: `Are you sure you want to delete DNS zone for ${this.args.dnsName}? This action cannot be undone.`,
55
+ default: false
56
+ });
57
+ if (!shouldDelete) {
58
+ this.log("Deletion cancelled");
59
+ return;
60
+ }
61
+ }
62
+ this.log(`Deleting DNS zone for ${this.args.dnsName}...`);
63
+ const response = await dnsService.deleteDNSZone({
64
+ organizationId,
65
+ userId,
66
+ zoneId
67
+ });
68
+ if (response.success) {
69
+ this.log(`\u2705 DNS zone for ${this.args.dnsName} deleted successfully`);
70
+ } else {
71
+ this.error("Failed to delete DNS zone", { exit: 1 });
72
+ }
73
+ } catch (error) {
74
+ this.error(`Failed to delete DNS zone: ${error}`, { exit: 1 });
75
+ }
76
+ }
77
+ };
78
+ export {
79
+ Delete as default
80
+ };