@openbuilder/cli 0.50.44 → 0.50.46
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-BKC6yG6z.js} +2 -2
- package/dist/chunks/{Banner-BlktOjfl.js.map → Banner-BKC6yG6z.js.map} +1 -1
- package/dist/chunks/{cli-auth-ChCnxlFl.js → cli-auth-BgiGSBOt.js} +4 -4
- package/dist/chunks/{cli-auth-ChCnxlFl.js.map → cli-auth-BgiGSBOt.js.map} +1 -1
- package/dist/chunks/{index-oFqGtEeF.js → index-ZNRLfdj5.js} +2 -2
- package/dist/chunks/{index-oFqGtEeF.js.map → index-ZNRLfdj5.js.map} +1 -1
- package/dist/chunks/{init-BsQ3dhwf.js → init-IQRjA1g3.js} +5 -6
- package/dist/chunks/{init-BsQ3dhwf.js.map → init-IQRjA1g3.js.map} +1 -1
- package/dist/chunks/{init-tui-Dvk6Ndvl.js → init-tui-B4jfmo3U.js} +5 -6
- package/dist/chunks/{init-tui-Dvk6Ndvl.js.map → init-tui-B4jfmo3U.js.map} +1 -1
- package/dist/chunks/{login-BhtodVsj.js → login-CrIcDJpS.js} +2 -2
- package/dist/chunks/{login-BhtodVsj.js.map → login-CrIcDJpS.js.map} +1 -1
- package/dist/chunks/{logout-CDDASeuQ.js → logout-BxgiczmY.js} +2 -2
- package/dist/chunks/{logout-CDDASeuQ.js.map → logout-BxgiczmY.js.map} +1 -1
- package/dist/chunks/{main-tui-Cklcr3FX.js → main-tui-NPDVPKol.js} +7 -8
- package/dist/chunks/{main-tui-Cklcr3FX.js.map → main-tui-NPDVPKol.js.map} +1 -1
- package/dist/chunks/{port-allocator-Ct3ioni4.js → port-allocator-DuAZe2_S.js} +3 -4
- package/dist/chunks/{port-allocator-Ct3ioni4.js.map → port-allocator-DuAZe2_S.js.map} +1 -1
- package/dist/chunks/{run-wycadErJ.js → run-Yh3YjeLl.js} +10 -16
- package/dist/chunks/{run-wycadErJ.js.map → run-Yh3YjeLl.js.map} +1 -1
- package/dist/chunks/{start-CQKEEma-.js → start-B-brfyVy.js} +5 -6
- package/dist/chunks/{start-CQKEEma-.js.map → start-B-brfyVy.js.map} +1 -1
- package/dist/chunks/{theme-CktnrDZj.js → theme-DOjeB8BU.js} +13 -8
- package/dist/chunks/{theme-CktnrDZj.js.map → theme-DOjeB8BU.js.map} +1 -1
- package/dist/chunks/{use-app-Cj2bzWaw.js → use-app-DozfqdJj.js} +2 -2
- package/dist/chunks/{use-app-Cj2bzWaw.js.map → use-app-DozfqdJj.js.map} +1 -1
- package/dist/chunks/{useBuildState-pcDGDakI.js → useBuildState-DV6wurQ2.js} +2 -2
- package/dist/chunks/{useBuildState-pcDGDakI.js.map → useBuildState-DV6wurQ2.js.map} +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/index.js +205 -2734
- package/dist/index.js.map +1 -1
- package/dist/instrument.js +7 -64162
- package/dist/instrument.js.map +1 -1
- package/package.json +2 -11
- package/dist/chunks/_commonjsHelpers-h-Bqc03Z.js +0 -34
- package/dist/chunks/_commonjsHelpers-h-Bqc03Z.js.map +0 -1
- package/dist/chunks/exports-ij9sv4UM.js +0 -7793
- package/dist/chunks/exports-ij9sv4UM.js.map +0 -1
- package/scripts/install-vendor-deps.js +0 -34
- package/scripts/install-vendor.js +0 -167
- package/scripts/prepare-release.js +0 -83
- package/vendor/ai-sdk-provider-claude-code-LOCAL.tgz +0 -0
- package/vendor/sentry-core-LOCAL.tgz +0 -0
- package/vendor/sentry-nextjs-LOCAL.tgz +0 -0
- package/vendor/sentry-node-LOCAL.tgz +0 -0
- package/vendor/sentry-node-core-LOCAL.tgz +0 -0
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { execFileSync } from 'node:child_process';
|
|
3
|
-
import { existsSync } from 'node:fs';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const __dirname = path.dirname(__filename);
|
|
9
|
-
|
|
10
|
-
const packageRoot = path.join(__dirname, '..');
|
|
11
|
-
const nodeModules = path.join(packageRoot, 'node_modules');
|
|
12
|
-
|
|
13
|
-
if (!existsSync(nodeModules)) {
|
|
14
|
-
process.exit(0);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
execFileSync(
|
|
19
|
-
'node',
|
|
20
|
-
['-e', "require('node:module').createRequire(require('node:url').pathToFileURL(process.cwd() + '/node_modules/@sentry/node/package.json')).resolve('@opentelemetry/sdk-trace-base')"],
|
|
21
|
-
{ cwd: packageRoot, stdio: 'pipe' },
|
|
22
|
-
);
|
|
23
|
-
} catch (error) {
|
|
24
|
-
console.log('Installing @opentelemetry/sdk-trace-base via pnpm...');
|
|
25
|
-
try {
|
|
26
|
-
execFileSync('pnpm', ['install', '@opentelemetry/sdk-trace-base@^2.1.0'], {
|
|
27
|
-
cwd: packageRoot,
|
|
28
|
-
stdio: 'inherit',
|
|
29
|
-
});
|
|
30
|
-
} catch (installError) {
|
|
31
|
-
console.warn('Warning: Failed to install @opentelemetry/sdk-trace-base automatically. Please install it manually.');
|
|
32
|
-
console.warn(installError instanceof Error ? installError.message : String(installError));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Install vendor-patched Sentry packages that ship with the CLI bundle.
|
|
4
|
-
* We unpack the tarballs that live in ./vendor into node_modules/@sentry/*
|
|
5
|
-
* so the CLI always runs with the patched builds even when installed offline.
|
|
6
|
-
*/
|
|
7
|
-
import { execFileSync } from 'node:child_process';
|
|
8
|
-
import { existsSync, mkdirSync, rmSync, lstatSync, readlinkSync, readdirSync } from 'node:fs';
|
|
9
|
-
import path from 'node:path';
|
|
10
|
-
import { fileURLToPath } from 'node:url';
|
|
11
|
-
|
|
12
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
-
const __dirname = path.dirname(__filename);
|
|
14
|
-
const packageRoot = path.join(__dirname, '..');
|
|
15
|
-
const vendorDir = path.join(packageRoot, 'vendor');
|
|
16
|
-
|
|
17
|
-
// Detect the correct node_modules location for both npm and pnpm
|
|
18
|
-
// The vendor packages MUST be installed in the same node_modules tree as the CLI
|
|
19
|
-
// to ensure proper Node.js module resolution. npm may create empty placeholder directories
|
|
20
|
-
// in nested node_modules, so we need to install there to override them.
|
|
21
|
-
function findNodeModules() {
|
|
22
|
-
// Local node_modules inside the package (npm style for bundled deps)
|
|
23
|
-
const localNodeModules = path.join(packageRoot, 'node_modules');
|
|
24
|
-
|
|
25
|
-
// Parent node_modules (pnpm global style: @openbuilder/cli -> @openbuilder -> node_modules)
|
|
26
|
-
const parentNodeModules = path.join(packageRoot, '..', '..');
|
|
27
|
-
|
|
28
|
-
// Always prefer local node_modules if it exists - this ensures vendor packages
|
|
29
|
-
// are in the same resolution tree as the CLI package
|
|
30
|
-
if (existsSync(localNodeModules)) {
|
|
31
|
-
return localNodeModules;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Fall back to parent for pnpm global installs where there's no local node_modules
|
|
35
|
-
if (existsSync(path.join(parentNodeModules, '@openbuilder')) ||
|
|
36
|
-
existsSync(path.join(parentNodeModules, '@sentry'))) {
|
|
37
|
-
return parentNodeModules;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Default to local (will be created)
|
|
41
|
-
return localNodeModules;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const nodeModules = findNodeModules();
|
|
45
|
-
|
|
46
|
-
const packages = [
|
|
47
|
-
{ name: 'core', tarball: 'sentry-core-LOCAL.tgz', scope: '@sentry' },
|
|
48
|
-
{ name: 'node', tarball: 'sentry-node-LOCAL.tgz', scope: '@sentry' },
|
|
49
|
-
{ name: 'node-core', tarball: 'sentry-node-core-LOCAL.tgz', scope: '@sentry' },
|
|
50
|
-
{ name: 'nextjs', tarball: 'sentry-nextjs-LOCAL.tgz', scope: '@sentry' },
|
|
51
|
-
{ name: 'ai-sdk-provider-claude-code', tarball: 'ai-sdk-provider-claude-code-LOCAL.tgz', scope: '' }, // No scope for this package
|
|
52
|
-
];
|
|
53
|
-
|
|
54
|
-
// Silent mode by default, only show output if VERBOSE env var is set
|
|
55
|
-
const isVerbose = process.env.VERBOSE === '1' || process.env.VERBOSE === 'true';
|
|
56
|
-
const log = isVerbose ? console.log : () => {};
|
|
57
|
-
|
|
58
|
-
log('Installing vendor Sentry packages...');
|
|
59
|
-
log(` Vendor directory: ${vendorDir}`);
|
|
60
|
-
log(` Target node_modules: ${nodeModules}`);
|
|
61
|
-
|
|
62
|
-
if (!existsSync(vendorDir)) {
|
|
63
|
-
log('No vendor directory found, skipping...');
|
|
64
|
-
process.exit(0);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
const missing = packages.filter(
|
|
68
|
-
({ tarball }) => !existsSync(path.join(vendorDir, tarball)),
|
|
69
|
-
);
|
|
70
|
-
|
|
71
|
-
if (missing.length) {
|
|
72
|
-
log(
|
|
73
|
-
`Vendor tarballs not found for: ${missing
|
|
74
|
-
.map(({ tarball }) => tarball)
|
|
75
|
-
.join(', ')}, skipping...`,
|
|
76
|
-
);
|
|
77
|
-
process.exit(0);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
try {
|
|
81
|
-
mkdirSync(nodeModules, { recursive: true });
|
|
82
|
-
mkdirSync(path.join(nodeModules, '@sentry'), { recursive: true });
|
|
83
|
-
|
|
84
|
-
for (const { name, tarball, scope } of packages) {
|
|
85
|
-
const source = path.join(vendorDir, tarball);
|
|
86
|
-
const destination = scope
|
|
87
|
-
? path.join(nodeModules, scope, name)
|
|
88
|
-
: path.join(nodeModules, name);
|
|
89
|
-
const extractTarget = resolveExtractionTarget(destination);
|
|
90
|
-
|
|
91
|
-
execFileSync(
|
|
92
|
-
'tar',
|
|
93
|
-
['-xzf', source, '--strip-components', '1', '-C', extractTarget],
|
|
94
|
-
{ stdio: 'pipe' },
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
log(` ✓ ${scope ? `${scope}/${name}` : name}`);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Ensure jsonc-parser is available for ai-sdk-provider-claude-code
|
|
101
|
-
// This is needed because the vendored package imports it but in global installs
|
|
102
|
-
// with pnpm, the dependency hoisting doesn't always work correctly
|
|
103
|
-
const aiSdkProviderDir = path.join(nodeModules, 'ai-sdk-provider-claude-code');
|
|
104
|
-
|
|
105
|
-
if (existsSync(aiSdkProviderDir)) {
|
|
106
|
-
try {
|
|
107
|
-
// Try to find jsonc-parser in various locations
|
|
108
|
-
let jsoncParserSource = path.join(nodeModules, 'jsonc-parser');
|
|
109
|
-
|
|
110
|
-
// If not found directly, try to find it in the pnpm store (for global installs)
|
|
111
|
-
if (!existsSync(jsoncParserSource)) {
|
|
112
|
-
// In pnpm global installs, node_modules is at .pnpm/<package>@<version>/node_modules
|
|
113
|
-
// The store is at .pnpm/ level, so we need to go up: node_modules -> <package> -> .pnpm
|
|
114
|
-
const pnpmStoreDir = path.join(nodeModules, '..', '..');
|
|
115
|
-
|
|
116
|
-
if (existsSync(pnpmStoreDir)) {
|
|
117
|
-
const entries = readdirSync(pnpmStoreDir);
|
|
118
|
-
const jsoncParserEntry = entries.find((entry) => entry.startsWith('jsonc-parser@'));
|
|
119
|
-
|
|
120
|
-
if (jsoncParserEntry) {
|
|
121
|
-
jsoncParserSource = path.join(pnpmStoreDir, jsoncParserEntry, 'node_modules', 'jsonc-parser');
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if (existsSync(jsoncParserSource)) {
|
|
127
|
-
const jsoncParserDest = path.join(aiSdkProviderDir, 'node_modules', 'jsonc-parser');
|
|
128
|
-
|
|
129
|
-
mkdirSync(path.join(aiSdkProviderDir, 'node_modules'), { recursive: true });
|
|
130
|
-
|
|
131
|
-
// Remove existing symlink/directory if it exists
|
|
132
|
-
rmSync(jsoncParserDest, { recursive: true, force: true });
|
|
133
|
-
|
|
134
|
-
// Create symlink to jsonc-parser
|
|
135
|
-
execFileSync('ln', ['-s', jsoncParserSource, jsoncParserDest], { stdio: 'pipe' });
|
|
136
|
-
|
|
137
|
-
log(` ✓ Linked jsonc-parser for ai-sdk-provider-claude-code`);
|
|
138
|
-
} else {
|
|
139
|
-
log(` ⚠ jsonc-parser not found, skipping symlink`);
|
|
140
|
-
}
|
|
141
|
-
} catch (error) {
|
|
142
|
-
// Non-fatal error, log and continue
|
|
143
|
-
log(` ⚠ Could not link jsonc-parser: ${error instanceof Error ? error.message : String(error)}`);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
log('✓ Vendor packages installed successfully');
|
|
148
|
-
} catch (error) {
|
|
149
|
-
console.warn('Warning: Could not install vendor packages, using published versions');
|
|
150
|
-
console.warn(error instanceof Error ? error.message : String(error));
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
function resolveExtractionTarget(destination) {
|
|
154
|
-
try {
|
|
155
|
-
const stat = lstatSync(destination);
|
|
156
|
-
if (stat.isSymbolicLink()) {
|
|
157
|
-
const linkTarget = readlinkSync(destination);
|
|
158
|
-
return path.resolve(path.dirname(destination), linkTarget);
|
|
159
|
-
}
|
|
160
|
-
} catch (error) {
|
|
161
|
-
// Path does not exist yet.
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
rmSync(destination, { recursive: true, force: true });
|
|
165
|
-
mkdirSync(destination, { recursive: true });
|
|
166
|
-
return destination;
|
|
167
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Prepare package.json for publishing
|
|
4
|
-
*
|
|
5
|
-
* This script:
|
|
6
|
-
* 1. Replaces file: dependencies with npm versions (for Sentry/vendor packages)
|
|
7
|
-
* 2. REMOVES @openbuilder/agent-core from dependencies (it's bundled by tsup)
|
|
8
|
-
*
|
|
9
|
-
* The vendor files are still included, and postinstall will replace npm versions with vendor versions
|
|
10
|
-
*/
|
|
11
|
-
import { readFileSync, writeFileSync } from 'fs';
|
|
12
|
-
import { join, dirname } from 'path';
|
|
13
|
-
import { fileURLToPath } from 'url';
|
|
14
|
-
|
|
15
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
16
|
-
const __dirname = dirname(__filename);
|
|
17
|
-
const packageJsonPath = join(__dirname, '../package.json');
|
|
18
|
-
|
|
19
|
-
console.log('Preparing package.json for release...');
|
|
20
|
-
console.log('');
|
|
21
|
-
|
|
22
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
23
|
-
|
|
24
|
-
// Replace file: dependencies with npm versions
|
|
25
|
-
const replacements = {
|
|
26
|
-
'@sentry/core': '^10.17.0',
|
|
27
|
-
'@sentry/node': '^10.17.0',
|
|
28
|
-
'@sentry/node-core': '^10.17.0',
|
|
29
|
-
'@sentry/nextjs': '^10.17.0',
|
|
30
|
-
'ai-sdk-provider-claude-code': '^2.1.0', // Use npm version, postinstall will replace with vendor
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
let modified = false;
|
|
34
|
-
|
|
35
|
-
for (const [pkg, version] of Object.entries(replacements)) {
|
|
36
|
-
if (packageJson.dependencies[pkg] && packageJson.dependencies[pkg].startsWith('file:')) {
|
|
37
|
-
console.log(` Replacing ${pkg}: ${packageJson.dependencies[pkg]} → ${version}`);
|
|
38
|
-
packageJson.dependencies[pkg] = version;
|
|
39
|
-
modified = true;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// REMOVE workspace dependencies - they're bundled into dist/ by rollup
|
|
44
|
-
// This eliminates npm 404 errors since these packages don't exist on npm
|
|
45
|
-
const workspaceDeps = ['@openbuilder/agent-core', '@openbuilder/opencode-client'];
|
|
46
|
-
for (const dep of workspaceDeps) {
|
|
47
|
-
if (packageJson.dependencies[dep]) {
|
|
48
|
-
console.log(` Removing ${dep} (bundled by rollup)`);
|
|
49
|
-
delete packageJson.dependencies[dep];
|
|
50
|
-
modified = true;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// REMOVE react and ink ecosystem - they're bundled by rollup to prevent multiple React instances
|
|
55
|
-
// When these are both bundled AND listed as dependencies, multiple React instances get loaded
|
|
56
|
-
// causing "Cannot read properties of null (reading 'useState')" errors
|
|
57
|
-
const bundledReactEcosystem = ['react', 'ink', 'ink-select-input', 'ink-spinner', 'ink-text-input'];
|
|
58
|
-
for (const dep of bundledReactEcosystem) {
|
|
59
|
-
if (packageJson.dependencies[dep]) {
|
|
60
|
-
console.log(` Removing ${dep} (bundled by rollup to prevent multiple React instances)`);
|
|
61
|
-
delete packageJson.dependencies[dep];
|
|
62
|
-
modified = true;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Remove bundledDependencies if it exists (no longer needed)
|
|
67
|
-
if (packageJson.bundledDependencies) {
|
|
68
|
-
console.log(` Removing bundledDependencies (agent-core is inlined, not bundled)`);
|
|
69
|
-
delete packageJson.bundledDependencies;
|
|
70
|
-
modified = true;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (modified) {
|
|
74
|
-
writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8');
|
|
75
|
-
console.log('');
|
|
76
|
-
console.log('✓ package.json updated for release');
|
|
77
|
-
console.log('');
|
|
78
|
-
console.log('Note: This modifies package.json. After publishing, run:');
|
|
79
|
-
console.log(' git checkout apps/runner/package.json');
|
|
80
|
-
console.log(' to restore workspace:* dependency for local development');
|
|
81
|
-
} else {
|
|
82
|
-
console.log('✓ package.json already prepared for release');
|
|
83
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|