@papercraneai/cli 1.9.0 → 1.9.1-beta.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/lib/dev-server.js +1 -5
- package/lib/resolver.js +22 -0
- package/package.json +2 -3
package/lib/dev-server.js
CHANGED
|
@@ -331,14 +331,10 @@ export async function generateScaffolding(workspaceDir, { npmInstall = false, ke
|
|
|
331
331
|
// postcss.config.mjs — Tailwind compilation
|
|
332
332
|
await writeScaffold(path.join(workspaceDir, 'postcss.config.mjs'), POSTCSS_CONFIG);
|
|
333
333
|
|
|
334
|
-
// next.config.mjs
|
|
335
|
-
// NOTE: next is pinned to 16.1.7 in package.json. Next.js 16.2.0 introduced
|
|
336
|
-
// a cross-origin HMR block that breaks webpack-hmr over Daytona proxy domains.
|
|
337
|
-
// To upgrade past 16.1.7, add allowedDevOrigins: ['*.daytonaproxy01.net'] to
|
|
338
|
-
// the config below.
|
|
339
334
|
const nextConfig = `/** @type {import('next').NextConfig} */
|
|
340
335
|
const nextConfig = {
|
|
341
336
|
transpilePackages: ['@papercraneai/cli', '@papercrane/dashboard-grid'],
|
|
337
|
+
allowedDevOrigins: ['*'],
|
|
342
338
|
turbopack: {
|
|
343
339
|
root: ${JSON.stringify(workspaceDir)},
|
|
344
340
|
},
|
package/lib/resolver.js
CHANGED
|
@@ -307,6 +307,28 @@ export async function resolve(node, path, ctx, params, method, inheritedScopes)
|
|
|
307
307
|
return { ok: true, result };
|
|
308
308
|
} catch (err) {
|
|
309
309
|
const upstreamError = err.response?.data || err.response?.body;
|
|
310
|
+
|
|
311
|
+
// Google Ads API errors come as { errors: [{ message, error_code, location }], request_id }
|
|
312
|
+
if (err.errors?.length) {
|
|
313
|
+
const details = err.errors.map((e) => {
|
|
314
|
+
const fieldPath = e.location?.field_path_elements
|
|
315
|
+
?.map((f) => f.field_name + (f.index != null ? `[${f.index}]` : ''))
|
|
316
|
+
.join('.');
|
|
317
|
+
return {
|
|
318
|
+
message: e.message || 'Unknown error',
|
|
319
|
+
error_code: e.error_code,
|
|
320
|
+
field: fieldPath || undefined,
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
return {
|
|
324
|
+
ok: false,
|
|
325
|
+
error: details.map((d) => d.field ? `${d.message} (field: ${d.field})` : d.message).join('; '),
|
|
326
|
+
details,
|
|
327
|
+
request_id: err.request_id,
|
|
328
|
+
status: 400,
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
|
|
310
332
|
return {
|
|
311
333
|
ok: false,
|
|
312
334
|
error: upstreamError || (err instanceof Error ? err.message : 'Unknown error occurred'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@papercraneai/cli",
|
|
3
|
-
"version": "1.9.0",
|
|
3
|
+
"version": "1.9.1-beta.0",
|
|
4
4
|
"description": "CLI tool for managing OAuth credentials for LLM integrations",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -75,9 +75,8 @@
|
|
|
75
75
|
"https-proxy-agent": "^7.0.4",
|
|
76
76
|
"input-otp": "^1.4.2",
|
|
77
77
|
"jiti": "^2.4.2",
|
|
78
|
-
"inquirer": "^8.2.6",
|
|
79
78
|
"lucide-react": "^0.559.0",
|
|
80
|
-
"next": "16.
|
|
79
|
+
"next": "^16.2.3",
|
|
81
80
|
"next-themes": "^0.4.6",
|
|
82
81
|
"open": "^8.4.2",
|
|
83
82
|
"react": "19.2.1",
|