@contentful/experience-design-system-cli 2.35.1-dev-build-c4a4d1cd.0 → 2.35.1-dev-build-b020833b.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/dist/app.js CHANGED
@@ -251,6 +251,52 @@ ${candidates.join("\n")}`);
251
251
  return found;
252
252
  }
253
253
 
254
+ // packages/experience-design-system-cli/src/tui/import/spawn-v1-import.ts
255
+ function buildArgs(options) {
256
+ const args = ["import"];
257
+ if (options.project) {
258
+ args.push("--project", options.project);
259
+ }
260
+ return args;
261
+ }
262
+ async function spawnV1Import(options = {}) {
263
+ const cliPath = findLegacyCliPath();
264
+ const args = buildArgs(options);
265
+ return new Promise((resolvePromise) => {
266
+ const child = spawn("node", [cliPath, ...args], {
267
+ stdio: "inherit"
268
+ });
269
+ child.on("close", (code) => {
270
+ resolvePromise({ exitCode: code ?? 1, result: void 0, stdout: "", stderr: "" });
271
+ });
272
+ child.on("error", (err) => {
273
+ resolvePromise({ exitCode: 1, result: void 0, stdout: "", stderr: err.message });
274
+ });
275
+ });
276
+ }
277
+
278
+ // packages/experience-design-system-cli/src/tui/import/terminal-input.ts
279
+ function getTerminalHandle() {
280
+ return process.stdin._handle;
281
+ }
282
+ async function stopReadingTerminal() {
283
+ await new Promise((resolve) => setImmediate(resolve));
284
+ const handle = getTerminalHandle();
285
+ if (!handle?.readStop) return;
286
+ handle.reading = false;
287
+ handle.readStop();
288
+ }
289
+ function startReadingTerminal() {
290
+ const handle = getTerminalHandle();
291
+ if (!handle?.readStart) return;
292
+ handle.reading = true;
293
+ handle.readStart();
294
+ }
295
+
296
+ // packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
297
+ import { useEffect as useEffect3 } from "react";
298
+ import { Box as Box3, Text as Text3, useInput as useInput3 } from "ink";
299
+
254
300
  // packages/experience-design-system-cli/src/tui/debug-store.ts
255
301
  import { mkdir as mkdir2, writeFile as writeFile2 } from "node:fs/promises";
256
302
  import { existsSync as existsSync3, readdirSync } from "node:fs";
@@ -315,9 +361,6 @@ var SESSION_ID = generateSessionId();
315
361
  function sessionDebugDir() {
316
362
  return join5(sessionsRootDir(), SESSION_ID);
317
363
  }
318
- async function debugSessionDirIfEnabled() {
319
- return await isDebugModeEnabled() ? sessionDebugDir() : void 0;
320
- }
321
364
  void isDebugModeEnabled().then((enabled) => {
322
365
  if (!enabled) return void 0;
323
366
  return mkdir2(sessionDebugDir(), { recursive: true });
@@ -425,53 +468,7 @@ process.once("SIGINT", () => {
425
468
  });
426
469
  });
427
470
 
428
- // packages/experience-design-system-cli/src/tui/import/spawn-v1-import.ts
429
- function buildArgs(options) {
430
- const args = ["import"];
431
- if (options.project) {
432
- args.push("--project", options.project);
433
- }
434
- return args;
435
- }
436
- async function spawnV1Import(options = {}) {
437
- const cliPath = findLegacyCliPath();
438
- const args = buildArgs(options);
439
- const debugSessionDir = await debugSessionDirIfEnabled();
440
- return new Promise((resolvePromise) => {
441
- const child = spawn("node", [cliPath, ...args], {
442
- stdio: "inherit",
443
- env: debugSessionDir ? { ...process.env, EDS_DEBUG_SESSION_DIR: debugSessionDir } : process.env
444
- });
445
- child.on("close", (code) => {
446
- resolvePromise({ exitCode: code ?? 1, result: void 0, stdout: "", stderr: "" });
447
- });
448
- child.on("error", (err) => {
449
- resolvePromise({ exitCode: 1, result: void 0, stdout: "", stderr: err.message });
450
- });
451
- });
452
- }
453
-
454
- // packages/experience-design-system-cli/src/tui/import/terminal-input.ts
455
- function getTerminalHandle() {
456
- return process.stdin._handle;
457
- }
458
- async function stopReadingTerminal() {
459
- await new Promise((resolve) => setImmediate(resolve));
460
- const handle = getTerminalHandle();
461
- if (!handle?.readStop) return;
462
- handle.reading = false;
463
- handle.readStop();
464
- }
465
- function startReadingTerminal() {
466
- const handle = getTerminalHandle();
467
- if (!handle?.readStart) return;
468
- handle.reading = true;
469
- handle.readStart();
470
- }
471
-
472
471
  // packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
473
- import { useEffect as useEffect3 } from "react";
474
- import { Box as Box3, Text as Text3, useInput as useInput3 } from "ink";
475
472
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
476
473
  function HelpScreen({ onDone }) {
477
474
  useEffect3(() => {
package/dist/index.js CHANGED
@@ -297,6 +297,60 @@ var init_PageContainer = __esm({
297
297
  }
298
298
  });
299
299
 
300
+ // packages/experience-design-system-cli/src/tui/import/spawn-v1-import.ts
301
+ import { spawn as spawn2 } from "node:child_process";
302
+ function buildArgs(options) {
303
+ const args = ["import"];
304
+ if (options.project) {
305
+ args.push("--project", options.project);
306
+ }
307
+ return args;
308
+ }
309
+ async function spawnV1Import(options = {}) {
310
+ const cliPath = findLegacyCliPath();
311
+ const args = buildArgs(options);
312
+ return new Promise((resolvePromise) => {
313
+ const child = spawn2("node", [cliPath, ...args], {
314
+ stdio: "inherit"
315
+ });
316
+ child.on("close", (code) => {
317
+ resolvePromise({ exitCode: code ?? 1, result: void 0, stdout: "", stderr: "" });
318
+ });
319
+ child.on("error", (err) => {
320
+ resolvePromise({ exitCode: 1, result: void 0, stdout: "", stderr: err.message });
321
+ });
322
+ });
323
+ }
324
+ var init_spawn_v1_import = __esm({
325
+ "packages/experience-design-system-cli/src/tui/import/spawn-v1-import.ts"() {
326
+ "use strict";
327
+ init_legacy_cli_path();
328
+ }
329
+ });
330
+
331
+ // packages/experience-design-system-cli/src/tui/import/terminal-input.ts
332
+ function getTerminalHandle() {
333
+ return process.stdin._handle;
334
+ }
335
+ async function stopReadingTerminal() {
336
+ await new Promise((resolve) => setImmediate(resolve));
337
+ const handle = getTerminalHandle();
338
+ if (!handle?.readStop) return;
339
+ handle.reading = false;
340
+ handle.readStop();
341
+ }
342
+ function startReadingTerminal() {
343
+ const handle = getTerminalHandle();
344
+ if (!handle?.readStart) return;
345
+ handle.reading = true;
346
+ handle.readStart();
347
+ }
348
+ var init_terminal_input = __esm({
349
+ "packages/experience-design-system-cli/src/tui/import/terminal-input.ts"() {
350
+ "use strict";
351
+ }
352
+ });
353
+
300
354
  // packages/experience-design-system-cli/src/tui/settings/debug-mode/debug-mode-store.ts
301
355
  import { mkdir, readFile, writeFile } from "node:fs/promises";
302
356
  import { dirname as dirname2, join as join4 } from "node:path";
@@ -363,9 +417,6 @@ function generateSessionId() {
363
417
  function sessionDebugDir() {
364
418
  return join5(sessionsRootDir(), SESSION_ID);
365
419
  }
366
- async function debugSessionDirIfEnabled() {
367
- return await isDebugModeEnabled() ? sessionDebugDir() : void 0;
368
- }
369
420
  async function isDebugModeEnabled() {
370
421
  try {
371
422
  return (await readDebugModeSetting()).enabled;
@@ -484,63 +535,6 @@ var init_debug_store = __esm({
484
535
  }
485
536
  });
486
537
 
487
- // packages/experience-design-system-cli/src/tui/import/spawn-v1-import.ts
488
- import { spawn as spawn2 } from "node:child_process";
489
- function buildArgs(options) {
490
- const args = ["import"];
491
- if (options.project) {
492
- args.push("--project", options.project);
493
- }
494
- return args;
495
- }
496
- async function spawnV1Import(options = {}) {
497
- const cliPath = findLegacyCliPath();
498
- const args = buildArgs(options);
499
- const debugSessionDir = await debugSessionDirIfEnabled();
500
- return new Promise((resolvePromise) => {
501
- const child = spawn2("node", [cliPath, ...args], {
502
- stdio: "inherit",
503
- env: debugSessionDir ? { ...process.env, EDS_DEBUG_SESSION_DIR: debugSessionDir } : process.env
504
- });
505
- child.on("close", (code) => {
506
- resolvePromise({ exitCode: code ?? 1, result: void 0, stdout: "", stderr: "" });
507
- });
508
- child.on("error", (err) => {
509
- resolvePromise({ exitCode: 1, result: void 0, stdout: "", stderr: err.message });
510
- });
511
- });
512
- }
513
- var init_spawn_v1_import = __esm({
514
- "packages/experience-design-system-cli/src/tui/import/spawn-v1-import.ts"() {
515
- "use strict";
516
- init_legacy_cli_path();
517
- init_debug_store();
518
- }
519
- });
520
-
521
- // packages/experience-design-system-cli/src/tui/import/terminal-input.ts
522
- function getTerminalHandle() {
523
- return process.stdin._handle;
524
- }
525
- async function stopReadingTerminal() {
526
- await new Promise((resolve) => setImmediate(resolve));
527
- const handle = getTerminalHandle();
528
- if (!handle?.readStop) return;
529
- handle.reading = false;
530
- handle.readStop();
531
- }
532
- function startReadingTerminal() {
533
- const handle = getTerminalHandle();
534
- if (!handle?.readStart) return;
535
- handle.reading = true;
536
- handle.readStart();
537
- }
538
- var init_terminal_input = __esm({
539
- "packages/experience-design-system-cli/src/tui/import/terminal-input.ts"() {
540
- "use strict";
541
- }
542
- });
543
-
544
538
  // packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
545
539
  import { useEffect as useEffect3 } from "react";
546
540
  import { Box as Box3, Text as Text3, useInput as useInput3 } from "ink";
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.35.1-dev-build-c4a4d1cd.0",
3
+ "version": "2.35.1-dev-build-b020833b.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,6 +1,5 @@
1
1
  type Status = 'success' | 'error';
2
2
  type ExitMethod = 'saved' | 'discarded' | 'crashed';
3
- export declare function debugSessionDirIfEnabled(): Promise<string | undefined>;
4
3
  export declare function startDebugRun({ flow, step, menuOption, inputs, }: {
5
4
  flow: string;
6
5
  step: string;