@ductape/cli 0.2.1 → 0.2.2

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.
@@ -33,7 +33,7 @@ export async function runStart(opts) {
33
33
  '--build-arg',
34
34
  `VITE_API_BASE_URL=${apiBase}`,
35
35
  '--build-arg',
36
- 'VITE_APP_ENV=development',
36
+ 'VITE_APP_ENV=self',
37
37
  'workbench',
38
38
  ], platformDir);
39
39
  if (buildCode !== 0)
@@ -28,9 +28,23 @@ function unwrapOne(result) {
28
28
  return result;
29
29
  }
30
30
  // —— Products (integrations REST + sdk-proxy for update) ——
31
+ const PRODUCT_LIST_ARRAY_FIELDS = [
32
+ 'apps', 'caches', 'quota', 'fallback', 'storage', 'brokers',
33
+ 'sessions', 'messageBrokers', 'functions', 'variables', 'auths',
34
+ 'databases', 'graphs', 'jobs', 'healthchecks', 'notifications',
35
+ 'features', 'vectors', 'agents', 'models', 'steps_data',
36
+ ];
37
+ function summarizeProduct(p) {
38
+ if (!p || typeof p !== 'object')
39
+ return p;
40
+ const out = { ...p };
41
+ for (const field of PRODUCT_LIST_ARRAY_FIELDS)
42
+ delete out[field];
43
+ return out;
44
+ }
31
45
  export async function listProducts(ctx, status = 'all') {
32
46
  const result = await client(ctx).getPath(`/integrations/v1/workspace/${ctx.workspaceId}/${status}`, workspaceAuthQuery(ctx));
33
- return unwrapList(result);
47
+ return unwrapList(result).map(summarizeProduct);
34
48
  }
35
49
  export async function getProduct(ctx, opts) {
36
50
  const q = workspaceAuthQuery(ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Ductape CLI — local platform, login, link projects, and manage resources via the proxy (Workbench-compatible)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -44,7 +44,7 @@ export async function runStart(opts: {
44
44
  '--build-arg',
45
45
  `VITE_API_BASE_URL=${apiBase}`,
46
46
  '--build-arg',
47
- 'VITE_APP_ENV=development',
47
+ 'VITE_APP_ENV=self',
48
48
  'workbench',
49
49
  ],
50
50
  platformDir,
@@ -34,6 +34,20 @@ function unwrapOne<T>(result: unknown): T {
34
34
 
35
35
  // —— Products (integrations REST + sdk-proxy for update) ——
36
36
 
37
+ const PRODUCT_LIST_ARRAY_FIELDS = [
38
+ 'apps', 'caches', 'quota', 'fallback', 'storage', 'brokers',
39
+ 'sessions', 'messageBrokers', 'functions', 'variables', 'auths',
40
+ 'databases', 'graphs', 'jobs', 'healthchecks', 'notifications',
41
+ 'features', 'vectors', 'agents', 'models', 'steps_data',
42
+ ];
43
+
44
+ function summarizeProduct(p: unknown): unknown {
45
+ if (!p || typeof p !== 'object') return p;
46
+ const out: Record<string, unknown> = { ...(p as Record<string, unknown>) };
47
+ for (const field of PRODUCT_LIST_ARRAY_FIELDS) delete out[field];
48
+ return out;
49
+ }
50
+
37
51
  export async function listProducts(
38
52
  ctx: WorkspaceContext,
39
53
  status = 'all',
@@ -42,7 +56,7 @@ export async function listProducts(
42
56
  `/integrations/v1/workspace/${ctx.workspaceId}/${status}`,
43
57
  workspaceAuthQuery(ctx),
44
58
  );
45
- return unwrapList(result);
59
+ return unwrapList<unknown>(result).map(summarizeProduct);
46
60
  }
47
61
 
48
62
  export async function getProduct(