@elevasis/sdk 0.5.10 → 0.5.12
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/cli.cjs +249 -280
- package/dist/index.d.ts +3 -4
- package/dist/index.js +5 -29
- package/dist/templates.js +191 -187
- package/dist/worker/index.js +79 -22
- package/package.json +1 -3
- package/reference/_navigation.md +3 -3
- package/reference/cli/index.mdx +51 -45
- package/reference/concepts/index.mdx +2 -2
- package/reference/deployment/api.mdx +8 -8
- package/reference/deployment/command-center-ui.mdx +4 -4
- package/reference/deployment/command-view.mdx +3 -3
- package/reference/deployment/index.mdx +7 -7
- package/reference/framework/agent.mdx +4 -4
- package/reference/framework/documentation.mdx +7 -7
- package/reference/framework/index.mdx +2 -2
- package/reference/framework/memory.mdx +1 -1
- package/reference/framework/project-structure.mdx +20 -30
- package/reference/getting-started/index.mdx +20 -32
- package/reference/index.mdx +6 -5
- package/reference/platform-tools/index.mdx +4 -4
- package/reference/resources/index.mdx +3 -3
- package/reference/resources/patterns.mdx +3 -3
- package/reference/resources/types.mdx +2 -2
- package/reference/roadmap/index.mdx +1 -1
- package/reference/runtime/index.mdx +3 -3
- package/reference/security/credentials.mdx +3 -3
- package/reference/troubleshooting/common-errors.mdx +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -3049,9 +3049,8 @@ declare class ResourceRegistry {
|
|
|
3049
3049
|
* List all resources for an organization
|
|
3050
3050
|
* Returns ResourceDefinition metadata (not full definitions)
|
|
3051
3051
|
*
|
|
3052
|
-
*
|
|
3053
|
-
*
|
|
3054
|
-
* - Production: Returns only prod resources (filters out dev)
|
|
3052
|
+
* All resources are returned regardless of server environment.
|
|
3053
|
+
* Pass an explicit `environment` filter to get only 'dev' or 'prod' resources.
|
|
3055
3054
|
*/
|
|
3056
3055
|
listResourcesForOrganization(organizationName: string, environment?: ResourceStatus$1): ResourceList;
|
|
3057
3056
|
/**
|
|
@@ -6334,7 +6333,7 @@ type ResourceStatus = 'dev' | 'prod';
|
|
|
6334
6333
|
* Organization is derived from the ELEVASIS_PLATFORM_KEY -- not configured here.
|
|
6335
6334
|
*/
|
|
6336
6335
|
interface ElevasConfig {
|
|
6337
|
-
/** Managed by `elevasis init` and `elevasis update`. Do not set manually. */
|
|
6336
|
+
/** Managed by `elevasis-sdk init` and `elevasis-sdk update`. Do not set manually. */
|
|
6338
6337
|
templateVersion?: number;
|
|
6339
6338
|
defaultStatus?: ResourceStatus;
|
|
6340
6339
|
dev?: {
|
package/dist/index.js
CHANGED
|
@@ -142,18 +142,6 @@ var DOMAIN_MAP = {
|
|
|
142
142
|
[DOMAINS.DIAGNOSTIC]: DIAGNOSTIC_DOMAIN
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
// ../core/src/execution/core/server/environment.ts
|
|
146
|
-
function detectEnvironment() {
|
|
147
|
-
const env = process.env.NODE_ENV || "development";
|
|
148
|
-
if (env === "production") return "production";
|
|
149
|
-
if (env === "staging") return "staging";
|
|
150
|
-
return "development";
|
|
151
|
-
}
|
|
152
|
-
function canExecuteResource(resource, environment) {
|
|
153
|
-
const env = environment || detectEnvironment();
|
|
154
|
-
return env === "production" ? resource.status === "prod" : true;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
145
|
// ../core/src/execution/engine/base/errors.ts
|
|
158
146
|
var ExecutionError2 = class extends Error {
|
|
159
147
|
/**
|
|
@@ -3225,9 +3213,8 @@ var ResourceRegistry = class {
|
|
|
3225
3213
|
* List all resources for an organization
|
|
3226
3214
|
* Returns ResourceDefinition metadata (not full definitions)
|
|
3227
3215
|
*
|
|
3228
|
-
*
|
|
3229
|
-
*
|
|
3230
|
-
* - Production: Returns only prod resources (filters out dev)
|
|
3216
|
+
* All resources are returned regardless of server environment.
|
|
3217
|
+
* Pass an explicit `environment` filter to get only 'dev' or 'prod' resources.
|
|
3231
3218
|
*/
|
|
3232
3219
|
listResourcesForOrganization(organizationName, environment) {
|
|
3233
3220
|
const orgResources = this.registry[organizationName];
|
|
@@ -3240,7 +3227,6 @@ var ResourceRegistry = class {
|
|
|
3240
3227
|
environment
|
|
3241
3228
|
};
|
|
3242
3229
|
}
|
|
3243
|
-
const currentEnv = detectEnvironment();
|
|
3244
3230
|
const workflows = (orgResources.workflows || []).map((def) => ({
|
|
3245
3231
|
resourceId: def.config.resourceId,
|
|
3246
3232
|
name: def.config.name,
|
|
@@ -3249,12 +3235,7 @@ var ResourceRegistry = class {
|
|
|
3249
3235
|
type: def.config.type,
|
|
3250
3236
|
status: def.config.status,
|
|
3251
3237
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
3252
|
-
})).filter((resource) =>
|
|
3253
|
-
if (environment) {
|
|
3254
|
-
return resource.status === environment;
|
|
3255
|
-
}
|
|
3256
|
-
return canExecuteResource(resource, currentEnv);
|
|
3257
|
-
});
|
|
3238
|
+
})).filter((resource) => !environment || resource.status === environment);
|
|
3258
3239
|
const agents = (orgResources.agents || []).map((def) => ({
|
|
3259
3240
|
resourceId: def.config.resourceId,
|
|
3260
3241
|
name: def.config.name,
|
|
@@ -3264,18 +3245,13 @@ var ResourceRegistry = class {
|
|
|
3264
3245
|
status: def.config.status,
|
|
3265
3246
|
sessionCapable: def.config.sessionCapable ?? false,
|
|
3266
3247
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
3267
|
-
})).filter((resource) =>
|
|
3268
|
-
if (environment) {
|
|
3269
|
-
return resource.status === environment;
|
|
3270
|
-
}
|
|
3271
|
-
return canExecuteResource(resource, currentEnv);
|
|
3272
|
-
});
|
|
3248
|
+
})).filter((resource) => !environment || resource.status === environment);
|
|
3273
3249
|
return {
|
|
3274
3250
|
workflows,
|
|
3275
3251
|
agents,
|
|
3276
3252
|
total: workflows.length + agents.length,
|
|
3277
3253
|
organizationName,
|
|
3278
|
-
environment
|
|
3254
|
+
environment
|
|
3279
3255
|
};
|
|
3280
3256
|
}
|
|
3281
3257
|
/**
|