@ductape/cli 0.3.23 → 0.3.24
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.
|
@@ -291,7 +291,7 @@ export async function runResourceCrud(typeName, verb, opts, extraArgs) {
|
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
const method = proxyMethodForVerb(crud);
|
|
294
|
-
const proxyMethod = module === 'models' && method === 'list' ? 'fetchAll' : method;
|
|
294
|
+
const proxyMethod = (module === 'models' || module === 'feature') && method === 'list' ? 'fetchAll' : method;
|
|
295
295
|
const interactive = toInteractiveOpts(opts);
|
|
296
296
|
let tag = opts.tag ?? extraArgs[0];
|
|
297
297
|
if (!tag && ['get', 'update', 'delete'].includes(crud) && isInteractive(interactive)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SDKModule = 'product' | 'app' | 'databases' | 'graph' | 'webhooks' | 'notifications' | 'messageBrokers' | 'storage' | 'vector' | 'caches' | 'sessions' | 'quotas' | 'actions' | '
|
|
1
|
+
export type SDKModule = 'product' | 'app' | 'databases' | 'graph' | 'webhooks' | 'notifications' | 'messageBrokers' | 'storage' | 'vector' | 'caches' | 'sessions' | 'quotas' | 'actions' | 'feature' | 'jobs' | 'logs' | 'resilience' | 'health' | 'fallback' | 'secrets' | 'models' | 'cloud';
|
|
2
2
|
export interface SdkProxyContext {
|
|
3
3
|
apiUrl: string;
|
|
4
4
|
workspaceId: string;
|
package/dist/lib/resources.js
CHANGED
|
@@ -11,8 +11,8 @@ export const RESOURCE_MODULES = {
|
|
|
11
11
|
caches: 'caches',
|
|
12
12
|
job: 'jobs',
|
|
13
13
|
jobs: 'jobs',
|
|
14
|
-
feature: '
|
|
15
|
-
features: '
|
|
14
|
+
feature: 'feature',
|
|
15
|
+
features: 'feature',
|
|
16
16
|
action: 'actions',
|
|
17
17
|
actions: 'actions',
|
|
18
18
|
notification: 'notifications',
|
|
@@ -31,7 +31,9 @@ export const RESOURCE_MODULES = {
|
|
|
31
31
|
quotas: 'quotas',
|
|
32
32
|
health: 'health',
|
|
33
33
|
healthcheck: 'health',
|
|
34
|
+
healthchecks: 'health',
|
|
34
35
|
fallback: 'fallback',
|
|
36
|
+
fallbacks: 'fallback',
|
|
35
37
|
model: 'models',
|
|
36
38
|
models: 'models',
|
|
37
39
|
product: 'product',
|
|
@@ -125,6 +127,20 @@ export function buildCrudParams(module, method, productTag, args) {
|
|
|
125
127
|
if (method === 'list')
|
|
126
128
|
return [];
|
|
127
129
|
}
|
|
130
|
+
if (module === 'feature') {
|
|
131
|
+
if (method === 'list' || method === 'fetchAll')
|
|
132
|
+
return [productTag];
|
|
133
|
+
if (method === 'fetch' || method === 'delete') {
|
|
134
|
+
if (!tag)
|
|
135
|
+
throw new Error('tag is required');
|
|
136
|
+
return [tag, productTag];
|
|
137
|
+
}
|
|
138
|
+
if (method === 'update') {
|
|
139
|
+
if (!tag)
|
|
140
|
+
throw new Error('tag is required');
|
|
141
|
+
return [tag, productTag, body ?? {}];
|
|
142
|
+
}
|
|
143
|
+
}
|
|
128
144
|
// Default product-scoped components
|
|
129
145
|
if (method === 'create')
|
|
130
146
|
return [productTag, body ?? {}];
|
package/package.json
CHANGED