@gravity-rail/cli 0.7.0 → 0.7.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-rail/cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Gravity Rail CLI — manage workspaces from the command line",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,6 +18,10 @@
18
18
  "./cli-utils": {
19
19
  "types": "./dist/cli-utils.d.ts",
20
20
  "import": "./dist/cli-utils.js"
21
+ },
22
+ "./register-special-commands": {
23
+ "types": "./dist/register-special-commands.d.ts",
24
+ "import": "./dist/register-special-commands.js"
21
25
  }
22
26
  },
23
27
  "files": [
@@ -39,14 +43,16 @@
39
43
  "node": ">=18"
40
44
  },
41
45
  "scripts": {
42
- "build": "tsup",
46
+ "build": "tsup && cp src/register-special-commands.d.ts dist/register-special-commands.d.ts",
47
+ "generate:skill-docs": "tsx scripts/generate-skill-docs.ts",
43
48
  "clean": "rm -rf dist",
44
49
  "typecheck": "tsc --noEmit",
45
50
  "test": "jest --forceExit",
46
51
  "test:ci": "jest --forceExit --passWithNoTests --coverage --coverageReporters=json-summary --coverageReporters=text-summary"
47
52
  },
48
53
  "dependencies": {
49
- "@gravity-rail/sdk": "^0.7.0"
54
+ "@gravity-rail/sdk": "^0.7.1",
55
+ "undici": "^6.24.0"
50
56
  },
51
57
  "devDependencies": {
52
58
  "@types/jest": "^30.0.0",
@@ -1,36 +0,0 @@
1
- #!/usr/bin/env node
2
- import { requireAuth, startAccountPhoneVerify, confirmAccountPhoneVerify } from './chunk-3EO4COHB.js';
3
- import './chunk-XRBVAFCB.js';
4
- import * as readline from 'readline/promises';
5
- import { stdout, stdin } from 'process';
6
-
7
- var TCPA_NOTICE = "By verifying you agree to receive calls and SMS from Gravity Rail at this number.";
8
- async function accountVerifyPhoneCommand(hctx) {
9
- const ctx = requireAuth(hctx.ctx);
10
- const phoneArg = typeof hctx.args.phone === "string" ? hctx.args.phone : void 0;
11
- process.stderr.write(`${TCPA_NOTICE}
12
- `);
13
- const phone = phoneArg ?? await promptLine("Phone number (E.164, e.g. +15551234567): ");
14
- if (!phone.trim()) {
15
- throw new Error("Phone number is required");
16
- }
17
- await startAccountPhoneVerify(ctx, phone.trim());
18
- process.stderr.write("Verification code sent via SMS.\n");
19
- const code = await promptLine("Enter 6-digit code: ");
20
- await confirmAccountPhoneVerify(ctx, code.trim());
21
- process.stderr.write(
22
- "Phone verified. You can use `gr concierge chat --call` or `gr concierge chat --sms`.\n"
23
- );
24
- }
25
- async function promptLine(question) {
26
- const rl = readline.createInterface({ input: stdin, output: stdout });
27
- try {
28
- return await rl.question(question) ?? "";
29
- } finally {
30
- rl.close();
31
- }
32
- }
33
-
34
- export { accountVerifyPhoneCommand };
35
- //# sourceMappingURL=account-verify-phone-4LRJZT5I.js.map
36
- //# sourceMappingURL=account-verify-phone-4LRJZT5I.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/commands/account-verify-phone.ts"],"names":["input","output"],"mappings":";;;;;;AAUA,IAAM,WAAA,GACH,mFAAA;AAEH,eAAsB,0BAA0B,IAAA,EAA4C;AACzF,EAAA,MAAM,GAAA,GAAM,WAAA,CAAY,IAAA,CAAK,GAAG,CAAA;AAChC,EAAA,MAAM,QAAA,GAAW,OAAO,IAAA,CAAK,IAAA,CAAK,UAAU,QAAA,GAAW,IAAA,CAAK,KAAK,KAAA,GAAQ,MAAA;AAEzE,EAAA,OAAA,CAAQ,MAAA,CAAO,KAAA,CAAM,CAAA,EAAG,WAAW;AAAA,CAAI,CAAA;AAEvC,EAAA,MAAM,KAAA,GAAQ,QAAA,IAAa,MAAM,UAAA,CAAW,2CAA2C,CAAA;AACvF,EAAA,IAAI,CAAC,KAAA,CAAM,IAAA,EAAK,EAAG;AAChB,IAAA,MAAM,IAAI,MAAM,0BAA0B,CAAA;AAAA,EAC7C;AAEA,EAAA,MAAM,uBAAA,CAAwB,GAAA,EAAK,KAAA,CAAM,IAAA,EAAM,CAAA;AAC/C,EAAA,OAAA,CAAQ,MAAA,CAAO,MAAM,mCAAmC,CAAA;AAExD,EAAA,MAAM,IAAA,GAAO,MAAM,UAAA,CAAW,sBAAsB,CAAA;AACpD,EAAA,MAAM,yBAAA,CAA0B,GAAA,EAAK,IAAA,CAAK,IAAA,EAAM,CAAA;AAChD,EAAA,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,IACZ;AAAA,GACH;AACH;AAEA,eAAe,WAAW,QAAA,EAAmC;AAC1D,EAAA,MAAM,EAAA,GAAc,QAAA,CAAA,eAAA,CAAgB,SAAEA,KAAA,UAAOC,QAAQ,CAAA;AACrD,EAAA,IAAI;AACD,IAAA,OAAQ,MAAM,EAAA,CAAG,QAAA,CAAS,QAAQ,CAAA,IAAM,EAAA;AAAA,EAC3C,CAAA,SAAE;AACC,IAAA,EAAA,CAAG,KAAA,EAAM;AAAA,EACZ;AACH","file":"account-verify-phone-4LRJZT5I.js","sourcesContent":["/**\n * `gr account verify-phone` — verify account phone for concierge PSTN/SMS.\n */\n\nimport * as readline from 'node:readline/promises';\nimport { stdin as input, stdout as output } from 'node:process';\nimport { confirmAccountPhoneVerify, startAccountPhoneVerify } from '../lib/concierge-api';\nimport { requireAuth } from '../lib/context';\nimport type { CommandHandlerContext } from '../lib/types';\n\nconst TCPA_NOTICE =\n 'By verifying you agree to receive calls and SMS from Gravity Rail at this number.';\n\nexport async function accountVerifyPhoneCommand(hctx: CommandHandlerContext): Promise<void> {\n const ctx = requireAuth(hctx.ctx);\n const phoneArg = typeof hctx.args.phone === 'string' ? hctx.args.phone : undefined;\n\n process.stderr.write(`${TCPA_NOTICE}\\n`);\n\n const phone = phoneArg ?? (await promptLine('Phone number (E.164, e.g. +15551234567): '));\n if (!phone.trim()) {\n throw new Error('Phone number is required');\n }\n\n await startAccountPhoneVerify(ctx, phone.trim());\n process.stderr.write('Verification code sent via SMS.\\n');\n\n const code = await promptLine('Enter 6-digit code: ');\n await confirmAccountPhoneVerify(ctx, code.trim());\n process.stderr.write(\n 'Phone verified. You can use `gr concierge chat --call` or `gr concierge chat --sms`.\\n'\n );\n}\n\nasync function promptLine(question: string): Promise<string> {\n const rl = readline.createInterface({ input, output });\n try {\n return (await rl.question(question)) ?? '';\n } finally {\n rl.close();\n }\n}\n"]}