@liquidmetal-ai/raindrop 0.6.4 → 0.8.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 +440 -73
- package/bin/cjs-shims.js +7 -0
- package/bin/run.js +20 -2
- package/bundle/chunk-5GH4FS6C.js +12148 -0
- package/bundle/chunk-6B4I2CKP.js +231 -0
- package/bundle/chunk-6UE75KX2.js +4481 -0
- package/bundle/chunk-AU3EGGJP.js +44 -0
- package/bundle/chunk-CDQRD3JA.js +75 -0
- package/bundle/chunk-CMCEP64V.js +380 -0
- package/bundle/chunk-CW5ZHVPX.js +292 -0
- package/bundle/chunk-G6NE675D.js +238720 -0
- package/bundle/chunk-GLIYVKQA.js +48 -0
- package/bundle/chunk-KXEV6E63.js +133 -0
- package/bundle/chunk-MCRKUPJY.js +4515 -0
- package/bundle/chunk-MGM2L2T3.js +805 -0
- package/bundle/chunk-MVQYQJHI.js +502 -0
- package/bundle/chunk-NG7CZTTE.js +147 -0
- package/bundle/chunk-PU4RCSXF.js +22452 -0
- package/bundle/chunk-VXAZKB3J.js +292 -0
- package/bundle/chunk-W2L3MYN6.js +4480 -0
- package/bundle/chunk-XYJACVNA.js +231 -0
- package/bundle/commands/annotation/get.js +153 -0
- package/bundle/commands/annotation/list.js +226 -0
- package/bundle/commands/annotation/put.js +177 -0
- package/bundle/commands/auth/list.js +75 -0
- package/bundle/commands/auth/login.js +1654 -0
- package/bundle/commands/auth/logout.js +27 -0
- package/bundle/commands/auth/select.js +53 -0
- package/bundle/commands/bucket/create-credential.js +173 -0
- package/bundle/commands/bucket/delete-credential.js +140 -0
- package/bundle/commands/bucket/get-credential.js +151 -0
- package/bundle/commands/bucket/list-credentials.js +148 -0
- package/bundle/commands/build/branch.js +126 -0
- package/bundle/commands/build/checkout.js +198 -0
- package/bundle/commands/build/clone.js +153 -0
- package/bundle/commands/build/delete.js +227 -0
- package/bundle/commands/build/deploy.js +160 -0
- package/bundle/commands/build/env/get.js +105 -0
- package/bundle/commands/build/env/set.js +115 -0
- package/bundle/commands/build/find.js +333 -0
- package/bundle/commands/build/generate.js +75 -0
- package/bundle/commands/build/init.js +76 -0
- package/bundle/commands/build/list.js +11 -0
- package/bundle/commands/build/sandbox.js +65 -0
- package/bundle/commands/build/start.js +84 -0
- package/bundle/commands/build/status.js +1839 -0
- package/bundle/commands/build/stop.js +84 -0
- package/bundle/commands/build/tools/check.js +32 -0
- package/bundle/commands/build/tools/fmt.js +49 -0
- package/bundle/commands/build/unsandbox.js +65 -0
- package/bundle/commands/build/upload.js +83 -0
- package/bundle/commands/build/validate.js +71 -0
- package/bundle/commands/build/workos/delete.js +86 -0
- package/bundle/commands/build/workos/env/attach.js +134 -0
- package/bundle/commands/build/workos/env/create.js +176 -0
- package/bundle/commands/build/workos/env/delete.js +84 -0
- package/bundle/commands/build/workos/env/detach.js +115 -0
- package/bundle/commands/build/workos/env/get.js +117 -0
- package/bundle/commands/build/workos/env/list.js +139 -0
- package/bundle/commands/build/workos/env/set.js +138 -0
- package/bundle/commands/build/workos/invite.js +91 -0
- package/bundle/commands/build/workos/setup.js +124 -0
- package/bundle/commands/build/workos/status.js +93 -0
- package/bundle/commands/dns/create.js +128 -0
- package/bundle/commands/dns/delete.js +80 -0
- package/bundle/commands/dns/get.js +167 -0
- package/bundle/commands/dns/list.js +193 -0
- package/bundle/commands/dns/records/create.js +150 -0
- package/bundle/commands/dns/records/delete.js +76 -0
- package/bundle/commands/dns/records/get.js +118 -0
- package/bundle/commands/dns/records/list.js +153 -0
- package/bundle/commands/dns/records/update.js +146 -0
- package/bundle/commands/logs/query.js +237 -0
- package/bundle/commands/logs/tail.js +155 -0
- package/bundle/commands/mcp/install-claude.js +220 -0
- package/bundle/commands/mcp/install-gemini.js +220 -0
- package/bundle/commands/mcp/install-goose.js +232 -0
- package/bundle/commands/mcp/status.js +153 -0
- package/bundle/commands/object/delete.js +180 -0
- package/bundle/commands/object/get.js +209 -0
- package/bundle/commands/object/list.js +206 -0
- package/bundle/commands/object/put.js +211 -0
- package/bundle/commands/query/chunk-search.js +123 -0
- package/bundle/commands/query/document.js +126 -0
- package/bundle/commands/query/events.js +98 -0
- package/bundle/commands/query/reindex.js +147 -0
- package/bundle/commands/query/search.js +169 -0
- package/bundle/commands/tail.js +31 -0
- package/bundle/index.js +51 -0
- package/dist/base-command.d.ts +6 -0
- package/dist/base-command.d.ts.map +1 -1
- package/dist/base-command.js +21 -8
- package/dist/build.d.ts +2 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +169 -51
- package/dist/codegen.d.ts +1 -1
- package/dist/codegen.d.ts.map +1 -1
- package/dist/codegen.js +20 -3
- package/dist/codegen.test.js +59 -1
- package/dist/commands/build/checkout.d.ts +17 -0
- package/dist/commands/build/checkout.d.ts.map +1 -1
- package/dist/commands/build/checkout.js +144 -7
- package/dist/commands/build/delete.d.ts +15 -0
- package/dist/commands/build/delete.d.ts.map +1 -1
- package/dist/commands/build/delete.js +133 -0
- package/dist/commands/build/deploy.d.ts.map +1 -1
- package/dist/commands/build/deploy.js +10 -2
- package/dist/commands/build/find.d.ts +1 -0
- package/dist/commands/build/find.d.ts.map +1 -1
- package/dist/commands/build/find.js +33 -2
- package/dist/commands/build/validate.d.ts.map +1 -1
- package/dist/commands/build/validate.js +0 -1
- package/dist/commands/build/workos/delete.d.ts +18 -0
- package/dist/commands/build/workos/delete.d.ts.map +1 -0
- package/dist/commands/build/workos/delete.js +72 -0
- package/dist/commands/build/workos/env/attach.d.ts +24 -0
- package/dist/commands/build/workos/env/attach.d.ts.map +1 -0
- package/dist/commands/build/workos/env/attach.js +111 -0
- package/dist/commands/build/workos/env/create.d.ts +26 -0
- package/dist/commands/build/workos/env/create.d.ts.map +1 -0
- package/dist/commands/build/workos/env/create.js +156 -0
- package/dist/commands/build/workos/env/delete.d.ts +20 -0
- package/dist/commands/build/workos/env/delete.d.ts.map +1 -0
- package/dist/commands/build/workos/env/delete.js +61 -0
- package/dist/commands/build/workos/env/detach.d.ts +21 -0
- package/dist/commands/build/workos/env/detach.d.ts.map +1 -0
- package/dist/commands/build/workos/env/detach.js +94 -0
- package/dist/commands/build/workos/env/get.d.ts +20 -0
- package/dist/commands/build/workos/env/get.d.ts.map +1 -0
- package/dist/commands/build/workos/env/get.js +94 -0
- package/dist/commands/build/workos/env/list.d.ts +18 -0
- package/dist/commands/build/workos/env/list.d.ts.map +1 -0
- package/dist/commands/build/workos/env/list.js +114 -0
- package/dist/commands/build/workos/env/set.d.ts +27 -0
- package/dist/commands/build/workos/env/set.d.ts.map +1 -0
- package/dist/commands/build/workos/env/set.js +115 -0
- package/dist/commands/build/workos/invite.d.ts +21 -0
- package/dist/commands/build/workos/invite.d.ts.map +1 -0
- package/dist/commands/build/workos/invite.js +68 -0
- package/dist/commands/build/workos/setup.d.ts +20 -0
- package/dist/commands/build/workos/setup.d.ts.map +1 -0
- package/dist/commands/build/workos/setup.js +106 -0
- package/dist/commands/build/workos/status.d.ts +18 -0
- package/dist/commands/build/workos/status.d.ts.map +1 -0
- package/dist/commands/build/workos/status.js +70 -0
- package/dist/commands/mcp/install-claude.d.ts.map +1 -1
- package/dist/commands/mcp/install-claude.js +2 -2
- package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
- package/dist/commands/mcp/install-gemini.js +2 -2
- package/dist/commands/mcp/install-goose.d.ts +22 -0
- package/dist/commands/mcp/install-goose.d.ts.map +1 -0
- package/dist/commands/mcp/install-goose.js +252 -0
- package/dist/commands/object/delete.d.ts.map +1 -1
- package/dist/commands/object/delete.js +20 -12
- package/dist/commands/object/get.d.ts.map +1 -1
- package/dist/commands/object/get.js +20 -12
- package/dist/commands/object/list.d.ts.map +1 -1
- package/dist/commands/object/list.js +20 -12
- package/dist/commands/object/put.d.ts.map +1 -1
- package/dist/commands/object/put.js +20 -12
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -4
- package/dist/index.test.js +54 -2
- package/oclif.manifest.json +4533 -2284
- package/package.json +8 -5
- package/templates/claude-code/debug-raindrop-app.md +89 -0
- package/templates/claude-code/new-raindrop-app.md +12 -4
- package/templates/claude-code/reattach-raindrop-session.md +50 -12
- package/templates/claude-code/update-raindrop-app.md +61 -9
- package/templates/db/node_modules/.bin/prisma +2 -2
- package/templates/db/node_modules/.bin/prisma-kysely +2 -2
- package/templates/db/node_modules/.bin/tsc +2 -2
- package/templates/db/node_modules/.bin/tsserver +2 -2
- package/templates/db/node_modules/.bin/zx +2 -2
- package/templates/gemini-code/debug-raindrop-app.toml +86 -0
- package/templates/gemini-code/new-raindrop-app.toml +10 -3
- package/templates/gemini-code/reattach-raindrop-session.toml +9 -11
- package/templates/gemini-code/update-raindrop-app.toml +55 -10
- package/templates/goose/debug-raindrop-app.yaml +91 -0
- package/templates/goose/new-raindrop-app.yaml +21 -0
- package/templates/goose/reattach-raindrop-session.yaml +20 -0
- package/templates/goose/update-raindrop-app.yaml +65 -0
- package/templates/init/src/_app/auth.ts +18 -0
- package/templates/init/src/_app/cors.ts +64 -0
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/templates/claude-code/raindrop-guidelines.md +0 -322
- package/templates/gemini-code/raindrop-guidelines.md +0 -322
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
|
|
2
|
+
import { Args, Flags } from '@oclif/core';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
5
|
+
export default class Attach extends BaseCommand {
|
|
6
|
+
static args = {
|
|
7
|
+
envName: Args.string({
|
|
8
|
+
description: 'WorkOS environment name (defaults to application name)',
|
|
9
|
+
required: false,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
static description = 'Attach a WorkOS environment to an application version';
|
|
13
|
+
static examples = [
|
|
14
|
+
`<%= config.bin %> <%= command.id %>
|
|
15
|
+
Attach environment with same name as application
|
|
16
|
+
|
|
17
|
+
<%= config.bin %> <%= command.id %> my-env
|
|
18
|
+
Attach specific environment
|
|
19
|
+
|
|
20
|
+
<%= config.bin %> <%= command.id %> my-env --application my-app --versionId abc123
|
|
21
|
+
Attach to specific application and version
|
|
22
|
+
`,
|
|
23
|
+
];
|
|
24
|
+
static flags = {
|
|
25
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
26
|
+
root: Flags.string({
|
|
27
|
+
char: 'r',
|
|
28
|
+
description: 'root directory',
|
|
29
|
+
required: false,
|
|
30
|
+
default: process.cwd(),
|
|
31
|
+
}),
|
|
32
|
+
manifest: Flags.string({
|
|
33
|
+
char: 'M',
|
|
34
|
+
description: 'project manifest',
|
|
35
|
+
required: false,
|
|
36
|
+
default: 'raindrop.manifest',
|
|
37
|
+
}),
|
|
38
|
+
application: Flags.string({
|
|
39
|
+
char: 'a',
|
|
40
|
+
description: 'application name',
|
|
41
|
+
required: false,
|
|
42
|
+
}),
|
|
43
|
+
versionId: Flags.string({
|
|
44
|
+
char: 'v',
|
|
45
|
+
aliases: ['version'],
|
|
46
|
+
description: 'version ID',
|
|
47
|
+
required: false,
|
|
48
|
+
}),
|
|
49
|
+
output: Flags.string({
|
|
50
|
+
char: 'o',
|
|
51
|
+
description: 'output format',
|
|
52
|
+
default: 'text',
|
|
53
|
+
options: ['text', 'json'],
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
async run() {
|
|
57
|
+
// Load manifest to get application name
|
|
58
|
+
const apps = await this.loadManifest();
|
|
59
|
+
const app = apps.find((app) => valueOf(app.name) === this.flags.application) || apps[0];
|
|
60
|
+
if (app === undefined) {
|
|
61
|
+
this.error(`application ${this.flags.application} not found in manifest`, { exit: 1 });
|
|
62
|
+
}
|
|
63
|
+
const applicationName = valueOf(app.name);
|
|
64
|
+
// Use envName from argument, or default to application name
|
|
65
|
+
const environmentName = this.args.envName || applicationName;
|
|
66
|
+
// Load config to get version ID
|
|
67
|
+
const config = await this.loadConfig();
|
|
68
|
+
const versionId = this.flags.versionId || config.versionId;
|
|
69
|
+
if (!versionId) {
|
|
70
|
+
this.error('No version ID found. Deploy your application first with: raindrop build deploy', { exit: 1 });
|
|
71
|
+
}
|
|
72
|
+
const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
|
|
73
|
+
try {
|
|
74
|
+
await workosService.attachEnvironmentToVersion({
|
|
75
|
+
userId,
|
|
76
|
+
organizationId,
|
|
77
|
+
applicationName,
|
|
78
|
+
versionId,
|
|
79
|
+
environmentName,
|
|
80
|
+
});
|
|
81
|
+
switch (this.flags.output) {
|
|
82
|
+
case 'json':
|
|
83
|
+
console.log(JSON.stringify({
|
|
84
|
+
success: true,
|
|
85
|
+
applicationName,
|
|
86
|
+
versionId,
|
|
87
|
+
environmentName,
|
|
88
|
+
}, null, 2));
|
|
89
|
+
break;
|
|
90
|
+
case 'text':
|
|
91
|
+
default:
|
|
92
|
+
this.log(chalk.green('✓') + ` WorkOS environment attached`);
|
|
93
|
+
this.log('');
|
|
94
|
+
this.log(` ${chalk.cyan('Application:')} ${applicationName}`);
|
|
95
|
+
this.log(` ${chalk.cyan('Version ID:')} ${versionId}`);
|
|
96
|
+
this.log(` ${chalk.cyan('Environment:')} ${environmentName}`);
|
|
97
|
+
this.log('');
|
|
98
|
+
this.log(chalk.dim('The WORKOS_ENVIRONMENT variable has been set for this version.'));
|
|
99
|
+
this.log(chalk.dim('Changes will take effect after convergence completes.'));
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
const err = error;
|
|
105
|
+
if (err.message.includes('not found')) {
|
|
106
|
+
this.error(`WorkOS environment '${environmentName}' not found. Create it first with: raindrop build workos env create ${environmentName}`, { exit: 1 });
|
|
107
|
+
}
|
|
108
|
+
this.error(`Failed to attach WorkOS environment: ${err.message}`, { exit: 1 });
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
2
|
+
export default class Create extends BaseCommand<typeof Create> {
|
|
3
|
+
static args: {
|
|
4
|
+
envName: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
root: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
versionId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
noattach: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
23
|
+
};
|
|
24
|
+
run(): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../../../src/commands/build/workos/env/create.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAAoD;IAEtE,MAAM,CAAC,QAAQ,WAgBb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;;;MAuCV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAsG3B"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { EnvironmentType } from '@liquidmetal-ai/drizzle/liquidmetal/v1alpha1/workos_integration_pb';
|
|
3
|
+
import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
6
|
+
export default class Create extends BaseCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
envName: Args.string({
|
|
9
|
+
description: 'environment name (defaults to application name)',
|
|
10
|
+
required: false,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Create a WorkOS environment for a Raindrop app';
|
|
14
|
+
static examples = [
|
|
15
|
+
`<%= config.bin %> <%= command.id %>
|
|
16
|
+
Create WorkOS environment with application name and auto-attach
|
|
17
|
+
|
|
18
|
+
<%= config.bin %> <%= command.id %> my-env
|
|
19
|
+
Create environment with specific name and auto-attach
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> my-env --noattach
|
|
22
|
+
Create environment without attaching to current version
|
|
23
|
+
|
|
24
|
+
<%= config.bin %> <%= command.id %> my-env --name "Acme Inc"
|
|
25
|
+
Create with explicit organization name
|
|
26
|
+
|
|
27
|
+
<%= config.bin %> <%= command.id %> my-env --output json
|
|
28
|
+
Get JSON output
|
|
29
|
+
`,
|
|
30
|
+
];
|
|
31
|
+
static flags = {
|
|
32
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
33
|
+
root: Flags.string({
|
|
34
|
+
char: 'r',
|
|
35
|
+
description: 'root directory',
|
|
36
|
+
required: false,
|
|
37
|
+
default: process.cwd(),
|
|
38
|
+
}),
|
|
39
|
+
manifest: Flags.string({
|
|
40
|
+
char: 'M',
|
|
41
|
+
description: 'project manifest',
|
|
42
|
+
required: false,
|
|
43
|
+
default: 'raindrop.manifest',
|
|
44
|
+
}),
|
|
45
|
+
application: Flags.string({
|
|
46
|
+
char: 'a',
|
|
47
|
+
description: 'application name',
|
|
48
|
+
required: false,
|
|
49
|
+
}),
|
|
50
|
+
versionId: Flags.string({
|
|
51
|
+
char: 'v',
|
|
52
|
+
aliases: ['version'],
|
|
53
|
+
description: 'version ID',
|
|
54
|
+
required: false,
|
|
55
|
+
}),
|
|
56
|
+
name: Flags.string({
|
|
57
|
+
description: 'primary organization name (optional if cached)',
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
noattach: Flags.boolean({
|
|
61
|
+
description: 'do not attach environment to current version after creation',
|
|
62
|
+
default: false,
|
|
63
|
+
}),
|
|
64
|
+
output: Flags.string({
|
|
65
|
+
char: 'o',
|
|
66
|
+
description: 'output format',
|
|
67
|
+
default: 'text',
|
|
68
|
+
options: ['text', 'json'],
|
|
69
|
+
}),
|
|
70
|
+
};
|
|
71
|
+
async run() {
|
|
72
|
+
// Load manifest to get application name
|
|
73
|
+
const apps = await this.loadManifest();
|
|
74
|
+
const app = apps.find((app) => valueOf(app.name) === this.flags.application) || apps[0];
|
|
75
|
+
if (app === undefined) {
|
|
76
|
+
this.error(`application ${this.flags.application} not found in manifest`, { exit: 1 });
|
|
77
|
+
}
|
|
78
|
+
const applicationName = valueOf(app.name);
|
|
79
|
+
// Use envName from argument, or default to application name
|
|
80
|
+
const environmentName = this.args.envName || applicationName;
|
|
81
|
+
const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
|
|
82
|
+
try {
|
|
83
|
+
// Create the WorkOS environment
|
|
84
|
+
await workosService.createEnvironment({
|
|
85
|
+
userId,
|
|
86
|
+
organizationId,
|
|
87
|
+
environmentName,
|
|
88
|
+
environmentType: EnvironmentType.STAGING,
|
|
89
|
+
primaryOrganizationName: this.flags.name,
|
|
90
|
+
});
|
|
91
|
+
// Auto-attach to current version unless --noattach is set
|
|
92
|
+
let attached = false;
|
|
93
|
+
if (!this.flags.noattach) {
|
|
94
|
+
try {
|
|
95
|
+
const config = await this.loadConfig();
|
|
96
|
+
const versionId = this.flags.versionId || config.versionId;
|
|
97
|
+
if (versionId) {
|
|
98
|
+
await workosService.attachEnvironmentToVersion({
|
|
99
|
+
userId,
|
|
100
|
+
organizationId,
|
|
101
|
+
applicationName,
|
|
102
|
+
versionId,
|
|
103
|
+
environmentName,
|
|
104
|
+
});
|
|
105
|
+
attached = true;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (attachError) {
|
|
109
|
+
// If attach fails, still report success on creation but warn about attach failure
|
|
110
|
+
const err = attachError;
|
|
111
|
+
if (this.flags.output === 'text') {
|
|
112
|
+
this.log(chalk.yellow('Warning: ') + `Failed to auto-attach environment: ${err.message}`);
|
|
113
|
+
this.log(chalk.dim('You can manually attach with: raindrop build workos env attach ' + environmentName));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
switch (this.flags.output) {
|
|
118
|
+
case 'json':
|
|
119
|
+
console.log(JSON.stringify({
|
|
120
|
+
success: true,
|
|
121
|
+
environmentName,
|
|
122
|
+
environmentType: 'staging',
|
|
123
|
+
attached,
|
|
124
|
+
applicationName,
|
|
125
|
+
}, null, 2));
|
|
126
|
+
break;
|
|
127
|
+
case 'text':
|
|
128
|
+
default:
|
|
129
|
+
this.log(chalk.green('✓') + ` WorkOS environment created for ${chalk.bold(environmentName)}`);
|
|
130
|
+
this.log('');
|
|
131
|
+
this.log(` ${chalk.cyan('Environment:')} ${environmentName}`);
|
|
132
|
+
this.log(` ${chalk.cyan('Type:')} staging`);
|
|
133
|
+
if (attached) {
|
|
134
|
+
this.log(` ${chalk.cyan('Attached to:')} ${applicationName} (current version)`);
|
|
135
|
+
}
|
|
136
|
+
this.log('');
|
|
137
|
+
this.log(chalk.dim('The environment, organization, and API key have been automatically configured.'));
|
|
138
|
+
if (attached) {
|
|
139
|
+
this.log(chalk.dim('Environment has been attached to the current version.'));
|
|
140
|
+
}
|
|
141
|
+
this.log(chalk.dim('View details with: raindrop build workos env get ' + environmentName));
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
const err = error;
|
|
147
|
+
if (err.message.includes('team not found')) {
|
|
148
|
+
this.error('WorkOS integration not activated. Run: raindrop build workos setup --admin-email <email>', { exit: 1 });
|
|
149
|
+
}
|
|
150
|
+
if (err.message.includes('already exists')) {
|
|
151
|
+
this.error(`WorkOS environment already exists for ${environmentName}. Use 'raindrop build workos env get ${environmentName}' to view it.`, { exit: 1 });
|
|
152
|
+
}
|
|
153
|
+
this.error(`Failed to create WorkOS environment: ${err.message}`, { exit: 1 });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
2
|
+
export default class Delete extends BaseCommand<typeof Delete> {
|
|
3
|
+
static args: {
|
|
4
|
+
appName: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../../src/commands/build/workos/env/delete.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAA2E;IAE7F,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAQV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2C3B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
4
|
+
export default class Delete extends BaseCommand {
|
|
5
|
+
static args = {
|
|
6
|
+
appName: Args.string({
|
|
7
|
+
description: 'raindrop app name',
|
|
8
|
+
required: true,
|
|
9
|
+
}),
|
|
10
|
+
};
|
|
11
|
+
static description = 'Remove WorkOS environment configuration (does NOT delete from WorkOS)';
|
|
12
|
+
static examples = [
|
|
13
|
+
`<%= config.bin %> <%= command.id %> my-app
|
|
14
|
+
Remove WorkOS environment configuration for app
|
|
15
|
+
|
|
16
|
+
<%= config.bin %> <%= command.id %> my-app --output json
|
|
17
|
+
Get JSON output
|
|
18
|
+
`,
|
|
19
|
+
];
|
|
20
|
+
static flags = {
|
|
21
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
22
|
+
output: Flags.string({
|
|
23
|
+
char: 'o',
|
|
24
|
+
description: 'output format',
|
|
25
|
+
default: 'text',
|
|
26
|
+
options: ['text', 'json'],
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
async run() {
|
|
30
|
+
const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
|
|
31
|
+
try {
|
|
32
|
+
await workosService.deleteEnvironment({
|
|
33
|
+
userId,
|
|
34
|
+
organizationId,
|
|
35
|
+
environmentName: this.args.appName,
|
|
36
|
+
});
|
|
37
|
+
switch (this.flags.output) {
|
|
38
|
+
case 'json':
|
|
39
|
+
console.log(JSON.stringify({
|
|
40
|
+
success: true,
|
|
41
|
+
appName: this.args.appName,
|
|
42
|
+
}, null, 2));
|
|
43
|
+
break;
|
|
44
|
+
case 'text':
|
|
45
|
+
default:
|
|
46
|
+
this.log(chalk.green('✓') + ` WorkOS environment configuration removed for ${chalk.bold(this.args.appName)}`);
|
|
47
|
+
this.log('');
|
|
48
|
+
this.log(chalk.yellow('⚠') + ' ' + chalk.dim('Note: This only removes the configuration from Raindrop.'));
|
|
49
|
+
this.log(chalk.dim(' To delete the environment from WorkOS, manage it in the WorkOS dashboard.'));
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
const err = error;
|
|
55
|
+
if (err.message.includes('not found')) {
|
|
56
|
+
this.error(`WorkOS environment not found for ${this.args.appName}`, { exit: 1 });
|
|
57
|
+
}
|
|
58
|
+
this.error(`Failed to delete WorkOS environment: ${err.message}`, { exit: 1 });
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
2
|
+
export default class Detach extends BaseCommand<typeof Detach> {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
root: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
manifest: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
application: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
versionId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=detach.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detach.d.ts","sourceRoot":"","sources":["../../../../../src/commands/build/workos/env/detach.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,WAAW,CAAC,OAAO,MAAM,CAAC;IAC5D,MAAM,CAAC,WAAW,SAA2D;IAE7E,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;;;;;MA+BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA4D3B"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { valueOf } from '@liquidmetal-ai/drizzle/appify/build';
|
|
2
|
+
import { Flags } from '@oclif/core';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
5
|
+
export default class Detach extends BaseCommand {
|
|
6
|
+
static description = 'Detach WorkOS environment from an application version';
|
|
7
|
+
static examples = [
|
|
8
|
+
`<%= config.bin %> <%= command.id %>
|
|
9
|
+
Detach WorkOS environment from current version
|
|
10
|
+
|
|
11
|
+
<%= config.bin %> <%= command.id %> --application my-app --versionId abc123
|
|
12
|
+
Detach from specific application and version
|
|
13
|
+
`,
|
|
14
|
+
];
|
|
15
|
+
static flags = {
|
|
16
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
17
|
+
root: Flags.string({
|
|
18
|
+
char: 'r',
|
|
19
|
+
description: 'root directory',
|
|
20
|
+
required: false,
|
|
21
|
+
default: process.cwd(),
|
|
22
|
+
}),
|
|
23
|
+
manifest: Flags.string({
|
|
24
|
+
char: 'M',
|
|
25
|
+
description: 'project manifest',
|
|
26
|
+
required: false,
|
|
27
|
+
default: 'raindrop.manifest',
|
|
28
|
+
}),
|
|
29
|
+
application: Flags.string({
|
|
30
|
+
char: 'a',
|
|
31
|
+
description: 'application name',
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
34
|
+
versionId: Flags.string({
|
|
35
|
+
char: 'v',
|
|
36
|
+
aliases: ['version'],
|
|
37
|
+
description: 'version ID',
|
|
38
|
+
required: false,
|
|
39
|
+
}),
|
|
40
|
+
output: Flags.string({
|
|
41
|
+
char: 'o',
|
|
42
|
+
description: 'output format',
|
|
43
|
+
default: 'text',
|
|
44
|
+
options: ['text', 'json'],
|
|
45
|
+
}),
|
|
46
|
+
};
|
|
47
|
+
async run() {
|
|
48
|
+
// Load manifest to get application name
|
|
49
|
+
const apps = await this.loadManifest();
|
|
50
|
+
const app = apps.find((app) => valueOf(app.name) === this.flags.application) || apps[0];
|
|
51
|
+
if (app === undefined) {
|
|
52
|
+
this.error(`application ${this.flags.application} not found in manifest`, { exit: 1 });
|
|
53
|
+
}
|
|
54
|
+
const applicationName = valueOf(app.name);
|
|
55
|
+
// Load config to get version ID
|
|
56
|
+
const config = await this.loadConfig();
|
|
57
|
+
const versionId = this.flags.versionId || config.versionId;
|
|
58
|
+
if (!versionId) {
|
|
59
|
+
this.error('No version ID found. Deploy your application first with: raindrop build deploy', { exit: 1 });
|
|
60
|
+
}
|
|
61
|
+
const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
|
|
62
|
+
try {
|
|
63
|
+
await workosService.detachEnvironmentFromVersion({
|
|
64
|
+
userId,
|
|
65
|
+
organizationId,
|
|
66
|
+
applicationName,
|
|
67
|
+
versionId,
|
|
68
|
+
});
|
|
69
|
+
switch (this.flags.output) {
|
|
70
|
+
case 'json':
|
|
71
|
+
console.log(JSON.stringify({
|
|
72
|
+
success: true,
|
|
73
|
+
applicationName,
|
|
74
|
+
versionId,
|
|
75
|
+
}, null, 2));
|
|
76
|
+
break;
|
|
77
|
+
case 'text':
|
|
78
|
+
default:
|
|
79
|
+
this.log(chalk.green('✓') + ` WorkOS environment detached`);
|
|
80
|
+
this.log('');
|
|
81
|
+
this.log(` ${chalk.cyan('Application:')} ${applicationName}`);
|
|
82
|
+
this.log(` ${chalk.cyan('Version ID:')} ${versionId}`);
|
|
83
|
+
this.log('');
|
|
84
|
+
this.log(chalk.dim('The WORKOS_ENVIRONMENT variable has been removed from this version.'));
|
|
85
|
+
this.log(chalk.dim('Changes will take effect after convergence completes.'));
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
const err = error;
|
|
91
|
+
this.error(`Failed to detach WorkOS environment: ${err.message}`, { exit: 1 });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
2
|
+
export default class Get extends BaseCommand<typeof Get> {
|
|
3
|
+
static args: {
|
|
4
|
+
appName: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=get.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../../src/commands/build/workos/env/get.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,GAAI,SAAQ,WAAW,CAAC,OAAO,GAAG,CAAC;IACtD,MAAM,CAAC,IAAI;;MAKT;IAEF,MAAM,CAAC,WAAW,SAAuD;IAEzE,MAAM,CAAC,QAAQ,WAOb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAQV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA+E3B"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
4
|
+
export default class Get extends BaseCommand {
|
|
5
|
+
static args = {
|
|
6
|
+
appName: Args.string({
|
|
7
|
+
description: 'raindrop app name',
|
|
8
|
+
required: true,
|
|
9
|
+
}),
|
|
10
|
+
};
|
|
11
|
+
static description = 'Get WorkOS environment details for a Raindrop app';
|
|
12
|
+
static examples = [
|
|
13
|
+
`<%= config.bin %> <%= command.id %> my-app
|
|
14
|
+
View WorkOS environment details
|
|
15
|
+
|
|
16
|
+
<%= config.bin %> <%= command.id %> my-app --output json
|
|
17
|
+
Get JSON output
|
|
18
|
+
`,
|
|
19
|
+
];
|
|
20
|
+
static flags = {
|
|
21
|
+
...BaseCommand.HIDDEN_FLAGS,
|
|
22
|
+
output: Flags.string({
|
|
23
|
+
char: 'o',
|
|
24
|
+
description: 'output format',
|
|
25
|
+
default: 'text',
|
|
26
|
+
options: ['text', 'json', 'table'],
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
async run() {
|
|
30
|
+
const { client: workosService, userId, organizationId } = await this.workosIntegrationService();
|
|
31
|
+
try {
|
|
32
|
+
const response = await workosService.getEnvironment({
|
|
33
|
+
userId,
|
|
34
|
+
organizationId,
|
|
35
|
+
environmentName: this.args.appName,
|
|
36
|
+
});
|
|
37
|
+
if (!response.environment) {
|
|
38
|
+
this.error(`WorkOS environment not found for ${this.args.appName}`, { exit: 1 });
|
|
39
|
+
}
|
|
40
|
+
const env = response.environment;
|
|
41
|
+
switch (this.flags.output) {
|
|
42
|
+
case 'json':
|
|
43
|
+
console.log(JSON.stringify({
|
|
44
|
+
name: env.name,
|
|
45
|
+
environmentId: env.environmentId,
|
|
46
|
+
clientId: env.clientId,
|
|
47
|
+
environmentType: env.environmentType,
|
|
48
|
+
connect: env.workosConnectHostname,
|
|
49
|
+
apiHostname: env.workosApiHostname,
|
|
50
|
+
organizationId: env.workosOrganizationId,
|
|
51
|
+
}, null, 2));
|
|
52
|
+
break;
|
|
53
|
+
case 'table':
|
|
54
|
+
console.table({
|
|
55
|
+
'App Name': env.name,
|
|
56
|
+
'Environment ID': env.environmentId,
|
|
57
|
+
'Client ID': env.clientId,
|
|
58
|
+
'Type': env.environmentType || 'staging',
|
|
59
|
+
'Connect': env.workosConnectHostname || '',
|
|
60
|
+
'API': env.workosApiHostname || '',
|
|
61
|
+
'Org ID': env.workosOrganizationId || '',
|
|
62
|
+
});
|
|
63
|
+
break;
|
|
64
|
+
case 'text':
|
|
65
|
+
default:
|
|
66
|
+
this.log(chalk.bold(`WorkOS Environment: ${env.name}`));
|
|
67
|
+
this.log('');
|
|
68
|
+
this.log(` ${chalk.cyan('App Name:')} ${env.name}`);
|
|
69
|
+
this.log(` ${chalk.cyan('Environment ID:')} ${env.environmentId}`);
|
|
70
|
+
this.log(` ${chalk.cyan('Client ID:')} ${env.clientId}`);
|
|
71
|
+
this.log(` ${chalk.cyan('Type:')} ${env.environmentType || 'staging'}`);
|
|
72
|
+
if (env.workosConnectHostname) {
|
|
73
|
+
this.log(` ${chalk.cyan('Connect:')} ${env.workosConnectHostname}`);
|
|
74
|
+
}
|
|
75
|
+
if (env.workosApiHostname) {
|
|
76
|
+
this.log(` ${chalk.cyan('API:')} ${env.workosApiHostname}`);
|
|
77
|
+
}
|
|
78
|
+
if (env.workosOrganizationId) {
|
|
79
|
+
this.log(` ${chalk.cyan('Org ID:')} ${env.workosOrganizationId}`);
|
|
80
|
+
}
|
|
81
|
+
this.log('');
|
|
82
|
+
this.log(chalk.dim('Note: API key value is stored securely and not displayed.'));
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
const err = error;
|
|
88
|
+
if (err.message.includes('not found')) {
|
|
89
|
+
this.error(`WorkOS environment not found for ${this.args.appName}. Create one with: raindrop build workos env create ${this.args.appName}`, { exit: 1 });
|
|
90
|
+
}
|
|
91
|
+
this.error(`Failed to get WorkOS environment: ${err.message}`, { exit: 1 });
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../../base-command.js';
|
|
2
|
+
export default class List extends BaseCommand<typeof List> {
|
|
3
|
+
static args: {};
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
static flags: {
|
|
7
|
+
output: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
config: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
rainbowAuthService: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
raindropCatalogService: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
rainbowAuthToken: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
rainbowOrganizationId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
rainbowUserId: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
sendVersionMetadata: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../../src/commands/build/workos/env/list.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,WAAW,CAAC,OAAO,IAAI,CAAC;IACxD,MAAM,CAAC,IAAI,KAAM;IAEjB,MAAM,CAAC,WAAW,SAAuD;IAEzE,MAAM,CAAC,QAAQ,WAUb;IAEF,MAAM,CAAC,KAAK;;;;;;;;;MAQV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAmG3B"}
|