@tolinax/ayoune-cli 2026.8.0 → 2026.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.
@@ -127,7 +127,6 @@ Examples:
127
127
  .option("--collection <col>", "Default target collection name")
128
128
  .option("--write-mode <mode>", "Write mode: insert, upsert, replace", "insert")
129
129
  .action(async (options) => {
130
- var _a;
131
130
  try {
132
131
  const opts = { ...program.opts(), ...options };
133
132
  let { name, type, uri, database, collection, writeMode } = opts;
@@ -160,7 +159,8 @@ Examples:
160
159
  const res = await apiCallHandler("config", "datatargets", "post", body, {
161
160
  responseFormat: opts.responseFormat,
162
161
  });
163
- const slug = ((_a = res.payload) === null || _a === void 0 ? void 0 : _a.slug) || name;
162
+ const created = Array.isArray(res.payload) ? res.payload[0] : res.payload;
163
+ const slug = (created === null || created === void 0 ? void 0 : created.slug) || name;
164
164
  spinner.success({ text: `Target "${slug}" created — use with: ay db copy ${slug}` });
165
165
  }
166
166
  catch (e) {
@@ -1,11 +1,13 @@
1
1
  //Initializes settings for system environment and inquirer
2
2
  // Lazy-loaded: inquirer plugins are heavy (~4000 modules incl. rxjs).
3
3
  // Only register them when an interactive prompt is actually needed.
4
+ import { createRequire } from "module";
4
5
  let _initialized = false;
5
6
  export function initializeSettings() {
6
7
  if (_initialized)
7
8
  return;
8
9
  _initialized = true;
10
+ const require = createRequire(import.meta.url);
9
11
  const inquirer = require("inquirer");
10
12
  const inquirerFuzzyPath = require("inquirer-fuzzy-path");
11
13
  const inquirerSearchList = require("inquirer-search-list");
@@ -18,11 +20,3 @@ export function initializeSettings() {
18
20
  inquirer.registerPrompt("table-input", inquirerTableInput);
19
21
  InterruptedPrompt.fromAll(inquirer);
20
22
  }
21
- /**
22
- * Returns the inquirer instance with all custom prompts registered.
23
- * Call this instead of importing inquirer directly when using custom prompt types.
24
- */
25
- export function getInquirer() {
26
- initializeSettings();
27
- return require("inquirer");
28
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-cli",
3
- "version": "2026.8.0",
3
+ "version": "2026.8.1",
4
4
  "description": "CLI for the aYOUne Business-as-a-Service platform",
5
5
  "type": "module",
6
6
  "main": "./index.js",