@openbuilder/cli 0.50.33 → 0.50.36
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/chunks/{Banner-BlktOjfl.js → Banner-C-FTiOIR.js} +2 -2
- package/dist/chunks/auto-update-Dq2PFvjt.js +0 -1
- package/dist/chunks/build-D0qYqIq0.js +0 -1
- package/dist/chunks/cleanup-qVTsA3tk.js +0 -1
- package/dist/chunks/cli-auth-ChCnxlFl.js +0 -1
- package/dist/chunks/cli-error-BjQwvWtK.js +0 -1
- package/dist/chunks/config-BGP1jZJ4.js +0 -1
- package/dist/chunks/config-manager-BkbjtN-H.js +0 -1
- package/dist/chunks/database-BvAbD4sP.js +0 -1
- package/dist/chunks/database-setup-BYjIRAmT.js +0 -1
- package/dist/chunks/{init-BsQ3dhwf.js → init-DNyPS_SR.js} +9 -9
- package/dist/chunks/{init-tui-Dvk6Ndvl.js → init-tui-EFMXj-MG.js} +8 -8
- package/dist/chunks/logger-ZpJi7chw.js +0 -1
- package/dist/chunks/login-BhtodVsj.js +0 -1
- package/dist/chunks/logout-CDDASeuQ.js +0 -1
- package/dist/chunks/{main-tui-Cklcr3FX.js → main-tui-D-SG-Ba5.js} +10 -10
- package/dist/chunks/manager-CvGX9qqe.js +0 -1
- package/dist/chunks/{port-allocator-Ct3ioni4.js → port-allocator-B0q7xkLs.js} +34 -2
- package/dist/chunks/process-killer-CaUL7Kpl.js +0 -1
- package/dist/chunks/prompts-1QbE_bRr.js +0 -1
- package/dist/chunks/repo-cloner-CpOQjFSo.js +0 -1
- package/dist/chunks/repo-detector-B_oj696o.js +0 -1
- package/dist/chunks/{run-wycadErJ.js → run-Cor14S0I.js} +28 -15
- package/dist/chunks/runner-logger-instance-nDWv2h2T.js +0 -1
- package/dist/chunks/spinner-BJL9zWAJ.js +0 -1
- package/dist/chunks/{start-CQKEEma-.js → start-k9iGDVWo.js} +7 -8
- package/dist/chunks/start-traditional-uoLZXdxm.js +0 -1
- package/dist/chunks/status-cS8YwtUx.js +0 -1
- package/dist/chunks/theme-DhorI2Hb.js +43 -0
- package/dist/chunks/upgrade-CKjl4HlB.js +0 -1
- package/dist/chunks/{useBuildState-pcDGDakI.js → useBuildState-DscLOZLl.js} +2 -2
- package/dist/chunks/vendor-ai-sdk-CSJ0bw9X.js +1970 -0
- package/dist/chunks/{theme-CktnrDZj.js → vendor-react-CXgiD1Dl.js} +227 -47
- package/dist/chunks/vendor-sentry-CqA9P3UG.js +71910 -0
- package/dist/cli/index.js +5 -6
- package/dist/index.js +106 -2044
- package/dist/instrument.js +37 -64119
- package/package.json +1 -1
- package/dist/chunks/Banner-BlktOjfl.js.map +0 -1
- package/dist/chunks/_commonjsHelpers-h-Bqc03Z.js +0 -34
- package/dist/chunks/_commonjsHelpers-h-Bqc03Z.js.map +0 -1
- package/dist/chunks/auto-update-Dq2PFvjt.js.map +0 -1
- package/dist/chunks/build-D0qYqIq0.js.map +0 -1
- package/dist/chunks/cleanup-qVTsA3tk.js.map +0 -1
- package/dist/chunks/cli-auth-ChCnxlFl.js.map +0 -1
- package/dist/chunks/cli-error-BjQwvWtK.js.map +0 -1
- package/dist/chunks/config-BGP1jZJ4.js.map +0 -1
- package/dist/chunks/config-manager-BkbjtN-H.js.map +0 -1
- package/dist/chunks/database-BvAbD4sP.js.map +0 -1
- package/dist/chunks/database-setup-BYjIRAmT.js.map +0 -1
- package/dist/chunks/devtools-7A3EXJhY.js +0 -75
- package/dist/chunks/devtools-7A3EXJhY.js.map +0 -1
- package/dist/chunks/exports-ij9sv4UM.js +0 -7793
- package/dist/chunks/exports-ij9sv4UM.js.map +0 -1
- package/dist/chunks/index-oFqGtEeF.js +0 -119
- package/dist/chunks/index-oFqGtEeF.js.map +0 -1
- package/dist/chunks/init-BsQ3dhwf.js.map +0 -1
- package/dist/chunks/init-tui-Dvk6Ndvl.js.map +0 -1
- package/dist/chunks/logger-ZpJi7chw.js.map +0 -1
- package/dist/chunks/login-BhtodVsj.js.map +0 -1
- package/dist/chunks/logout-CDDASeuQ.js.map +0 -1
- package/dist/chunks/main-tui-Cklcr3FX.js.map +0 -1
- package/dist/chunks/manager-CvGX9qqe.js.map +0 -1
- package/dist/chunks/port-allocator-Ct3ioni4.js.map +0 -1
- package/dist/chunks/process-killer-CaUL7Kpl.js.map +0 -1
- package/dist/chunks/prompts-1QbE_bRr.js.map +0 -1
- package/dist/chunks/repo-cloner-CpOQjFSo.js.map +0 -1
- package/dist/chunks/repo-detector-B_oj696o.js.map +0 -1
- package/dist/chunks/run-wycadErJ.js.map +0 -1
- package/dist/chunks/runner-logger-instance-nDWv2h2T.js.map +0 -1
- package/dist/chunks/spinner-BJL9zWAJ.js.map +0 -1
- package/dist/chunks/start-CQKEEma-.js.map +0 -1
- package/dist/chunks/start-traditional-uoLZXdxm.js.map +0 -1
- package/dist/chunks/status-cS8YwtUx.js.map +0 -1
- package/dist/chunks/theme-CktnrDZj.js.map +0 -1
- package/dist/chunks/upgrade-CKjl4HlB.js.map +0 -1
- package/dist/chunks/use-app-Cj2bzWaw.js +0 -10
- package/dist/chunks/use-app-Cj2bzWaw.js.map +0 -1
- package/dist/chunks/useBuildState-pcDGDakI.js.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/instrument.js.map +0 -1
|
@@ -1,16 +1,48 @@
|
|
|
1
1
|
// OpenBuilder CLI - Built with Rollup
|
|
2
|
+
import moduleModule__default from 'module';
|
|
3
|
+
import require$$5 from 'events';
|
|
4
|
+
import require$$0$1 from 'assert';
|
|
5
|
+
import WebSocket from 'ws';
|
|
6
|
+
import devtools$1 from 'react-devtools-core';
|
|
2
7
|
import { PassThrough, Stream } from 'node:stream';
|
|
3
8
|
import process$1, { env, cwd } from 'node:process';
|
|
4
|
-
import { a as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers-h-Bqc03Z.js';
|
|
5
|
-
import require$$0$1 from 'assert';
|
|
6
|
-
import require$$5 from 'events';
|
|
7
9
|
import chalk from 'chalk';
|
|
8
10
|
import os__default from 'node:os';
|
|
9
11
|
import { EventEmitter } from 'node:events';
|
|
10
12
|
import * as fs from 'node:fs';
|
|
11
|
-
import moduleModule__default from 'module';
|
|
12
13
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
13
14
|
|
|
15
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
16
|
+
|
|
17
|
+
function getDefaultExportFromCjs (x) {
|
|
18
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getAugmentedNamespace(n) {
|
|
22
|
+
if (n.__esModule) return n;
|
|
23
|
+
var f = n.default;
|
|
24
|
+
if (typeof f == "function") {
|
|
25
|
+
var a = function a () {
|
|
26
|
+
if (this instanceof a) {
|
|
27
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
28
|
+
}
|
|
29
|
+
return f.apply(this, arguments);
|
|
30
|
+
};
|
|
31
|
+
a.prototype = f.prototype;
|
|
32
|
+
} else a = {};
|
|
33
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
34
|
+
Object.keys(n).forEach(function (k) {
|
|
35
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
36
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return n[k];
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
return a;
|
|
44
|
+
}
|
|
45
|
+
|
|
14
46
|
var react = {exports: {}};
|
|
15
47
|
|
|
16
48
|
var react_production = {};
|
|
@@ -36794,12 +36826,87 @@ const styles = (node, style = {}) => {
|
|
|
36794
36826
|
applyGapStyles(node, style);
|
|
36795
36827
|
};
|
|
36796
36828
|
|
|
36829
|
+
// Ignoring missing types error to avoid adding another dependency for this hack to work
|
|
36830
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
36831
|
+
const customGlobal = global;
|
|
36832
|
+
// These things must exist before importing `react-devtools-core`
|
|
36833
|
+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
|
36834
|
+
customGlobal.WebSocket ||= WebSocket;
|
|
36835
|
+
customGlobal.window ||= global;
|
|
36836
|
+
customGlobal.self ||= global;
|
|
36837
|
+
// Filter out Ink's internal components from devtools for a cleaner view.
|
|
36838
|
+
// Also, ince `react-devtools-shared` package isn't published on npm, we can't
|
|
36839
|
+
// use its types, that's why there are hard-coded values in `type` fields below.
|
|
36840
|
+
// See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24
|
|
36841
|
+
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
|
|
36842
|
+
{
|
|
36843
|
+
// ComponentFilterElementType
|
|
36844
|
+
type: 1,
|
|
36845
|
+
// ElementTypeHostComponent
|
|
36846
|
+
value: 7,
|
|
36847
|
+
isEnabled: true,
|
|
36848
|
+
},
|
|
36849
|
+
{
|
|
36850
|
+
// ComponentFilterDisplayName
|
|
36851
|
+
type: 2,
|
|
36852
|
+
value: 'InternalApp',
|
|
36853
|
+
isEnabled: true,
|
|
36854
|
+
isValid: true,
|
|
36855
|
+
},
|
|
36856
|
+
{
|
|
36857
|
+
// ComponentFilterDisplayName
|
|
36858
|
+
type: 2,
|
|
36859
|
+
value: 'InternalAppContext',
|
|
36860
|
+
isEnabled: true,
|
|
36861
|
+
isValid: true,
|
|
36862
|
+
},
|
|
36863
|
+
{
|
|
36864
|
+
// ComponentFilterDisplayName
|
|
36865
|
+
type: 2,
|
|
36866
|
+
value: 'InternalStdoutContext',
|
|
36867
|
+
isEnabled: true,
|
|
36868
|
+
isValid: true,
|
|
36869
|
+
},
|
|
36870
|
+
{
|
|
36871
|
+
// ComponentFilterDisplayName
|
|
36872
|
+
type: 2,
|
|
36873
|
+
value: 'InternalStderrContext',
|
|
36874
|
+
isEnabled: true,
|
|
36875
|
+
isValid: true,
|
|
36876
|
+
},
|
|
36877
|
+
{
|
|
36878
|
+
// ComponentFilterDisplayName
|
|
36879
|
+
type: 2,
|
|
36880
|
+
value: 'InternalStdinContext',
|
|
36881
|
+
isEnabled: true,
|
|
36882
|
+
isValid: true,
|
|
36883
|
+
},
|
|
36884
|
+
{
|
|
36885
|
+
// ComponentFilterDisplayName
|
|
36886
|
+
type: 2,
|
|
36887
|
+
value: 'InternalFocusContext',
|
|
36888
|
+
isEnabled: true,
|
|
36889
|
+
isValid: true,
|
|
36890
|
+
},
|
|
36891
|
+
];
|
|
36892
|
+
|
|
36893
|
+
/* eslint-disable import/order */
|
|
36894
|
+
// eslint-disable-next-line import/no-unassigned-import
|
|
36895
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
36896
|
+
devtools$1.initialize();
|
|
36897
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
36898
|
+
devtools$1.connectToDevTools();
|
|
36899
|
+
|
|
36900
|
+
var devtools = /*#__PURE__*/Object.freeze({
|
|
36901
|
+
__proto__: null
|
|
36902
|
+
});
|
|
36903
|
+
|
|
36797
36904
|
// We need to conditionally perform devtools connection to avoid
|
|
36798
36905
|
// accidentally breaking other third-party code.
|
|
36799
36906
|
// See https://github.com/vadimdemedes/ink/issues/384
|
|
36800
36907
|
if (process$1.env['DEV'] === 'true') {
|
|
36801
36908
|
try {
|
|
36802
|
-
await
|
|
36909
|
+
await Promise.resolve().then(function () { return devtools; });
|
|
36803
36910
|
}
|
|
36804
36911
|
catch (error) {
|
|
36805
36912
|
if (error.code === 'ERR_MODULE_NOT_FOUND') {
|
|
@@ -39740,6 +39847,11 @@ const useInput = (inputHandler, options = {}) => {
|
|
|
39740
39847
|
}, [options.isActive, stdin, internal_exitOnCtrlC, inputHandler]);
|
|
39741
39848
|
};
|
|
39742
39849
|
|
|
39850
|
+
/**
|
|
39851
|
+
`useApp` is a React hook that exposes a method to manually exit the app (unmount).
|
|
39852
|
+
*/
|
|
39853
|
+
const useApp = () => reactExports.useContext(AppContext);
|
|
39854
|
+
|
|
39743
39855
|
/**
|
|
39744
39856
|
`useStdout` is a React hook that exposes the stdout stream where Ink renders your app.
|
|
39745
39857
|
*/
|
|
@@ -40172,46 +40284,114 @@ function requireJsxRuntime () {
|
|
|
40172
40284
|
|
|
40173
40285
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
40174
40286
|
|
|
40175
|
-
|
|
40176
|
-
|
|
40177
|
-
|
|
40178
|
-
|
|
40179
|
-
|
|
40180
|
-
|
|
40181
|
-
|
|
40182
|
-
|
|
40183
|
-
|
|
40184
|
-
|
|
40185
|
-
|
|
40186
|
-
|
|
40187
|
-
|
|
40188
|
-
|
|
40189
|
-
|
|
40190
|
-
|
|
40191
|
-
|
|
40192
|
-
}
|
|
40193
|
-
|
|
40194
|
-
|
|
40195
|
-
|
|
40196
|
-
|
|
40197
|
-
|
|
40198
|
-
|
|
40199
|
-
|
|
40200
|
-
|
|
40201
|
-
|
|
40202
|
-
|
|
40203
|
-
|
|
40204
|
-
|
|
40205
|
-
|
|
40206
|
-
|
|
40207
|
-
|
|
40208
|
-
|
|
40209
|
-
|
|
40210
|
-
|
|
40211
|
-
|
|
40212
|
-
|
|
40213
|
-
|
|
40214
|
-
}
|
|
40287
|
+
function TextInput({ value: originalValue, placeholder = '', focus = true, mask, highlightPastedText = false, showCursor = true, onChange, onSubmit, }) {
|
|
40288
|
+
const [state, setState] = reactExports.useState({
|
|
40289
|
+
cursorOffset: (originalValue || '').length,
|
|
40290
|
+
cursorWidth: 0,
|
|
40291
|
+
});
|
|
40292
|
+
const { cursorOffset, cursorWidth } = state;
|
|
40293
|
+
reactExports.useEffect(() => {
|
|
40294
|
+
setState(previousState => {
|
|
40295
|
+
if (!focus || !showCursor) {
|
|
40296
|
+
return previousState;
|
|
40297
|
+
}
|
|
40298
|
+
const newValue = originalValue || '';
|
|
40299
|
+
if (previousState.cursorOffset > newValue.length - 1) {
|
|
40300
|
+
return {
|
|
40301
|
+
cursorOffset: newValue.length,
|
|
40302
|
+
cursorWidth: 0,
|
|
40303
|
+
};
|
|
40304
|
+
}
|
|
40305
|
+
return previousState;
|
|
40306
|
+
});
|
|
40307
|
+
}, [originalValue, focus, showCursor]);
|
|
40308
|
+
const cursorActualWidth = highlightPastedText ? cursorWidth : 0;
|
|
40309
|
+
const value = mask ? mask.repeat(originalValue.length) : originalValue;
|
|
40310
|
+
let renderedValue = value;
|
|
40311
|
+
let renderedPlaceholder = placeholder ? chalk.grey(placeholder) : undefined;
|
|
40312
|
+
// Fake mouse cursor, because it's too inconvenient to deal with actual cursor and ansi escapes
|
|
40313
|
+
if (showCursor && focus) {
|
|
40314
|
+
renderedPlaceholder =
|
|
40315
|
+
placeholder.length > 0
|
|
40316
|
+
? chalk.inverse(placeholder[0]) + chalk.grey(placeholder.slice(1))
|
|
40317
|
+
: chalk.inverse(' ');
|
|
40318
|
+
renderedValue = value.length > 0 ? '' : chalk.inverse(' ');
|
|
40319
|
+
let i = 0;
|
|
40320
|
+
for (const char of value) {
|
|
40321
|
+
renderedValue +=
|
|
40322
|
+
i >= cursorOffset - cursorActualWidth && i <= cursorOffset
|
|
40323
|
+
? chalk.inverse(char)
|
|
40324
|
+
: char;
|
|
40325
|
+
i++;
|
|
40326
|
+
}
|
|
40327
|
+
if (value.length > 0 && cursorOffset === value.length) {
|
|
40328
|
+
renderedValue += chalk.inverse(' ');
|
|
40329
|
+
}
|
|
40330
|
+
}
|
|
40331
|
+
useInput((input, key) => {
|
|
40332
|
+
if (key.upArrow ||
|
|
40333
|
+
key.downArrow ||
|
|
40334
|
+
(key.ctrl && input === 'c') ||
|
|
40335
|
+
key.tab ||
|
|
40336
|
+
(key.shift && key.tab)) {
|
|
40337
|
+
return;
|
|
40338
|
+
}
|
|
40339
|
+
if (key.return) {
|
|
40340
|
+
if (onSubmit) {
|
|
40341
|
+
onSubmit(originalValue);
|
|
40342
|
+
}
|
|
40343
|
+
return;
|
|
40344
|
+
}
|
|
40345
|
+
let nextCursorOffset = cursorOffset;
|
|
40346
|
+
let nextValue = originalValue;
|
|
40347
|
+
let nextCursorWidth = 0;
|
|
40348
|
+
if (key.leftArrow) {
|
|
40349
|
+
if (showCursor) {
|
|
40350
|
+
nextCursorOffset--;
|
|
40351
|
+
}
|
|
40352
|
+
}
|
|
40353
|
+
else if (key.rightArrow) {
|
|
40354
|
+
if (showCursor) {
|
|
40355
|
+
nextCursorOffset++;
|
|
40356
|
+
}
|
|
40357
|
+
}
|
|
40358
|
+
else if (key.backspace || key.delete) {
|
|
40359
|
+
if (cursorOffset > 0) {
|
|
40360
|
+
nextValue =
|
|
40361
|
+
originalValue.slice(0, cursorOffset - 1) +
|
|
40362
|
+
originalValue.slice(cursorOffset, originalValue.length);
|
|
40363
|
+
nextCursorOffset--;
|
|
40364
|
+
}
|
|
40365
|
+
}
|
|
40366
|
+
else {
|
|
40367
|
+
nextValue =
|
|
40368
|
+
originalValue.slice(0, cursorOffset) +
|
|
40369
|
+
input +
|
|
40370
|
+
originalValue.slice(cursorOffset, originalValue.length);
|
|
40371
|
+
nextCursorOffset += input.length;
|
|
40372
|
+
if (input.length > 1) {
|
|
40373
|
+
nextCursorWidth = input.length;
|
|
40374
|
+
}
|
|
40375
|
+
}
|
|
40376
|
+
if (cursorOffset < 0) {
|
|
40377
|
+
nextCursorOffset = 0;
|
|
40378
|
+
}
|
|
40379
|
+
if (cursorOffset > originalValue.length) {
|
|
40380
|
+
nextCursorOffset = originalValue.length;
|
|
40381
|
+
}
|
|
40382
|
+
setState({
|
|
40383
|
+
cursorOffset: nextCursorOffset,
|
|
40384
|
+
cursorWidth: nextCursorWidth,
|
|
40385
|
+
});
|
|
40386
|
+
if (nextValue !== originalValue) {
|
|
40387
|
+
onChange(nextValue);
|
|
40388
|
+
}
|
|
40389
|
+
}, { isActive: focus });
|
|
40390
|
+
return (React.createElement(Text, null, placeholder
|
|
40391
|
+
? value.length > 0
|
|
40392
|
+
? renderedValue
|
|
40393
|
+
: renderedPlaceholder
|
|
40394
|
+
: renderedValue));
|
|
40395
|
+
}
|
|
40215
40396
|
|
|
40216
|
-
export {
|
|
40217
|
-
//# sourceMappingURL=theme-CktnrDZj.js.map
|
|
40397
|
+
export { Box as B, React as R, Text as T, getDefaultExportFromCjs as a, useStdout as b, TextInput as c, useApp as d, render as e, getAugmentedNamespace as g, jsxRuntimeExports as j, reactExports as r, useInput as u };
|