@suronai/cli 0.1.20 → 0.1.21

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": "@suronai/cli",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "CLI for Suron — suron login, init, whoami, rotate",
5
5
  "type": "module",
6
6
  "bin": {
@@ -154,8 +154,8 @@ function sanitiseName(name) {
154
154
  * CJS: require("dotenv").config();
155
155
  *
156
156
  * Replaces with the correct form based on the project type:
157
- * ESM: import { Suron } from "@suronai/sdk"; await Suron();
158
- * CJS: const { Suron } = require("@suronai/sdk"); await Suron();
157
+ * ESM: import { config } from "@suronai/sdk"; await config();
158
+ * CJS: const { config } = require("@suronai/sdk"); await config();
159
159
  *
160
160
  * @param {string} cwd
161
161
  * @param {boolean} isEsm
@@ -205,11 +205,11 @@ async function patchEntryPoint(cwd, isEsm) {
205
205
  console.log(" " + c.red("-") + " " + c.dim(match[0].replace(/\n/g, "\n - ")));
206
206
  console.log(" " + c.dim("With:"));
207
207
  if (isEsm) {
208
- console.log(" " + c.green("+") + " " + c.cyan("import") + " { Suron } from " + c.green("'@suronai/sdk'"));
209
- console.log(" " + c.green("+") + " " + c.cyan("await") + " Suron()");
208
+ console.log(" " + c.green("+") + " " + c.cyan("import") + " { config } from " + c.green("'@suronai/sdk'"));
209
+ console.log(" " + c.green("+") + " " + c.cyan("await") + " config()");
210
210
  } else {
211
- console.log(" " + c.green("+") + " const { Suron } = " + c.cyan("require") + "(" + c.green("'@suronai/sdk'") + ")");
212
- console.log(" " + c.green("+") + " " + c.cyan("await") + " Suron()");
211
+ console.log(" " + c.green("+") + " const { config } = " + c.cyan("require") + "(" + c.green("'@suronai/sdk'") + ")");
212
+ console.log(" " + c.green("+") + " " + c.cyan("await") + " config()");
213
213
  }
214
214
  console.log();
215
215
 
@@ -224,8 +224,8 @@ async function patchEntryPoint(cwd, isEsm) {
224
224
 
225
225
  // Perform the replacement
226
226
  const replacement = isEsm
227
- ? `import { Suron } from '@suronai/sdk';\nawait Suron();`
228
- : `const { Suron } = require('@suronai/sdk');\nawait Suron();`;
227
+ ? `import { config } from '@suronai/sdk';\nawait config();`
228
+ : `const { config } = require('@suronai/sdk');\nawait config();`;
229
229
 
230
230
  const patched = src.replace(pattern, replacement);
231
231
 
@@ -242,11 +242,11 @@ async function patchEntryPoint(cwd, isEsm) {
242
242
  /** @param {boolean} isEsm */
243
243
  function printSnippet(isEsm) {
244
244
  if (isEsm) {
245
- console.log(" " + c.cyan("import") + " { Suron } from " + c.green("'@suronai/sdk'"));
246
- console.log(" " + c.cyan("await") + " Suron()");
245
+ console.log(" " + c.cyan("import") + " { config } from " + c.green("'@suronai/sdk'"));
246
+ console.log(" " + c.cyan("await") + " config()");
247
247
  } else {
248
- console.log(" const { Suron } = " + c.cyan("require") + "(" + c.green("'@suronai/sdk'") + ")");
249
- console.log(" " + c.cyan("await") + " Suron()");
248
+ console.log(" const { config } = " + c.cyan("require") + "(" + c.green("'@suronai/sdk'") + ")");
249
+ console.log(" " + c.cyan("await") + " config()");
250
250
  }
251
251
  console.log();
252
252
  }