@uniswap/ai-toolkit-nx-claude 0.5.37 → 0.5.38-next.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.
@@ -4,6 +4,14 @@
4
4
  * Interactive setup for Slack OAuth credentials when they don't exist.
5
5
  * Creates ~/.config/claude-code/slack-env.sh with proper permissions.
6
6
  */
7
+ /**
8
+ * Wrap a value in single quotes for safe interpolation into a sourced bash file.
9
+ *
10
+ * Single-quoting makes `$`, backticks, `"`, and `\` all literal/inert when the
11
+ * file is sourced. Embedded single quotes are handled with the POSIX idiom:
12
+ * close the quote, emit an escaped quote, then reopen. e.g. `a'b` -> `'a'\''b'`.
13
+ */
14
+ export declare function shSingleQuote(value: string): string;
7
15
  /**
8
16
  * Check if slack-env.sh exists and offer to update it
9
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"slack-setup.d.ts","sourceRoot":"","sources":["../../../../../../src/scripts/claude-plus/slack-setup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsIH;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CA6D9E;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CA0BzE"}
1
+ {"version":3,"file":"slack-setup.d.ts","sourceRoot":"","sources":["../../../../../../src/scripts/claude-plus/slack-setup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD;AAuHD;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CA6D9E;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CA0BzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"slack-token.d.ts","sourceRoot":"","sources":["../../../../../../src/scripts/claude-plus/slack-token.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgTH;;GAEG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDnF"}
1
+ {"version":3,"file":"slack-token.d.ts","sourceRoot":"","sources":["../../../../../../src/scripts/claude-plus/slack-token.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+SH;;GAEG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDnF"}
@@ -31,7 +31,7 @@ var require_package = __commonJS({
31
31
  "packages/ai-toolkit-nx-claude/package.json"(exports2, module2) {
32
32
  module2.exports = {
33
33
  name: "@uniswap/ai-toolkit-nx-claude",
34
- version: "0.5.37-next.0",
34
+ version: "0.5.37",
35
35
  private: false,
36
36
  main: "./dist/index.cjs",
37
37
  module: "./dist/index.cjs",
@@ -322,6 +322,9 @@ function isUsingCustomConfigDir() {
322
322
  // packages/ai-toolkit-nx-claude/src/scripts/claude-plus/slack-setup.ts
323
323
  var SLACK_ENV_DIR = path2.join(os2.homedir(), ".config", "claude-code");
324
324
  var SLACK_ENV_PATH = path2.join(SLACK_ENV_DIR, "slack-env.sh");
325
+ function shSingleQuote(value) {
326
+ return `'${value.replace(/'/g, `'\\''`)}'`;
327
+ }
325
328
  function createReadlineInterface() {
326
329
  return readline.createInterface({
327
330
  input: process.stdin,
@@ -400,8 +403,8 @@ function createSlackEnvFile(credentials) {
400
403
  #
401
404
  # Or set these as environment variables in your shell profile.
402
405
 
403
- export SLACK_REFRESH_URL="${credentials.refreshUrl}"
404
- export SLACK_REFRESH_TOKEN="${credentials.refreshToken}"
406
+ export SLACK_REFRESH_URL=${shSingleQuote(credentials.refreshUrl)}
407
+ export SLACK_REFRESH_TOKEN=${shSingleQuote(credentials.refreshToken)}
405
408
  `;
406
409
  fs.writeFileSync(SLACK_ENV_PATH, content, { mode: 384 });
407
410
  }
@@ -655,10 +658,8 @@ function updateRefreshToken(newRefreshToken, verbose) {
655
658
  }
656
659
  displayDebug("Updating refresh token in slack-env.sh...", verbose);
657
660
  let content = fs2.readFileSync(SLACK_ENV_PATH2, "utf-8");
658
- content = content.replace(
659
- /export SLACK_REFRESH_TOKEN=.*/,
660
- `export SLACK_REFRESH_TOKEN="${newRefreshToken}"`
661
- );
661
+ const newLine = `export SLACK_REFRESH_TOKEN=${shSingleQuote(newRefreshToken)}`;
662
+ content = content.replace(/export SLACK_REFRESH_TOKEN=.*/, () => newLine);
662
663
  fs2.writeFileSync(SLACK_ENV_PATH2, content);
663
664
  displayDebug("Refresh token updated successfully", verbose);
664
665
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniswap/ai-toolkit-nx-claude",
3
- "version": "0.5.37",
3
+ "version": "0.5.38-next.1",
4
4
  "private": false,
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.cjs",