@elevasis/sdk 1.9.0 → 1.11.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/dist/cli.cjs +228 -190
- package/dist/index.d.ts +127 -154
- package/dist/index.js +15 -139
- package/dist/test-utils/index.d.ts +8270 -0
- package/dist/test-utils/index.js +20070 -0
- package/dist/types/worker/index.d.ts +20 -1
- package/dist/worker/index.js +7 -4
- package/package.json +8 -2
- package/reference/_navigation.md +15 -1
- package/reference/_reference-manifest.json +56 -0
- package/reference/claude-config/sync-notes/2026-04-24-test-utils-and-template-tests.md +73 -0
- package/reference/claude-config/sync-notes/2026-04-24-ui-consolidation-and-sdk-cli-train.md +1 -1
- package/reference/deployment/provided-features.mdx +40 -267
- package/reference/examples/organization-model.ts +96 -564
- package/reference/packages/core/src/organization-model/README.md +101 -97
- package/reference/packages/core/src/test-utils/README.md +5 -10
- package/reference/packages/ui/src/test-utils/README.md +5 -0
- package/reference/resources/types.mdx +72 -163
- package/reference/scaffold/core/organization-graph.mdx +89 -272
- package/reference/scaffold/core/organization-model.mdx +149 -320
- package/reference/scaffold/operations/workflow-recipes.md +94 -1
- package/reference/scaffold/recipes/add-a-feature.md +102 -158
- package/reference/scaffold/recipes/add-a-resource.md +85 -158
- package/reference/scaffold/recipes/customize-organization-model.md +141 -400
- package/reference/scaffold/recipes/gate-by-feature-or-admin.md +114 -158
- package/reference/scaffold/reference/contracts.md +62 -148
- package/reference/scaffold/reference/feature-registry.md +8 -8
- package/reference/scaffold/reference/glossary.md +71 -105
- package/reference/scaffold/ui/feature-flags-and-gating.md +27 -232
- package/reference/scaffold/ui/feature-shell.mdx +50 -219
- package/reference/scaffold/ui/recipes.md +62 -397
package/dist/cli.cjs
CHANGED
|
@@ -102,8 +102,8 @@ var require_package = __commonJS({
|
|
|
102
102
|
// ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js
|
|
103
103
|
var require_main = __commonJS({
|
|
104
104
|
"../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
105
|
-
var
|
|
106
|
-
var
|
|
105
|
+
var fs2 = require("fs");
|
|
106
|
+
var path3 = require("path");
|
|
107
107
|
var os2 = require("os");
|
|
108
108
|
var crypto = require("crypto");
|
|
109
109
|
var packageJson = require_package();
|
|
@@ -211,7 +211,7 @@ var require_main = __commonJS({
|
|
|
211
211
|
if (options && options.path && options.path.length > 0) {
|
|
212
212
|
if (Array.isArray(options.path)) {
|
|
213
213
|
for (const filepath of options.path) {
|
|
214
|
-
if (
|
|
214
|
+
if (fs2.existsSync(filepath)) {
|
|
215
215
|
possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -219,15 +219,15 @@ var require_main = __commonJS({
|
|
|
219
219
|
possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
220
220
|
}
|
|
221
221
|
} else {
|
|
222
|
-
possibleVaultPath =
|
|
222
|
+
possibleVaultPath = path3.resolve(process.cwd(), ".env.vault");
|
|
223
223
|
}
|
|
224
|
-
if (
|
|
224
|
+
if (fs2.existsSync(possibleVaultPath)) {
|
|
225
225
|
return possibleVaultPath;
|
|
226
226
|
}
|
|
227
227
|
return null;
|
|
228
228
|
}
|
|
229
229
|
function _resolveHome(envPath2) {
|
|
230
|
-
return envPath2[0] === "~" ?
|
|
230
|
+
return envPath2[0] === "~" ? path3.join(os2.homedir(), envPath2.slice(1)) : envPath2;
|
|
231
231
|
}
|
|
232
232
|
function _configVault(options) {
|
|
233
233
|
const debug = Boolean(options && options.debug);
|
|
@@ -244,7 +244,7 @@ var require_main = __commonJS({
|
|
|
244
244
|
return { parsed };
|
|
245
245
|
}
|
|
246
246
|
function configDotenv(options) {
|
|
247
|
-
const dotenvPath =
|
|
247
|
+
const dotenvPath = path3.resolve(process.cwd(), ".env");
|
|
248
248
|
let encoding = "utf8";
|
|
249
249
|
const debug = Boolean(options && options.debug);
|
|
250
250
|
const quiet = options && "quiet" in options ? options.quiet : true;
|
|
@@ -268,13 +268,13 @@ var require_main = __commonJS({
|
|
|
268
268
|
}
|
|
269
269
|
let lastError;
|
|
270
270
|
const parsedAll = {};
|
|
271
|
-
for (const
|
|
271
|
+
for (const path4 of optionPaths) {
|
|
272
272
|
try {
|
|
273
|
-
const parsed = DotenvModule.parse(
|
|
273
|
+
const parsed = DotenvModule.parse(fs2.readFileSync(path4, { encoding }));
|
|
274
274
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
275
275
|
} catch (e) {
|
|
276
276
|
if (debug) {
|
|
277
|
-
_debug(`Failed to load ${
|
|
277
|
+
_debug(`Failed to load ${path4} ${e.message}`);
|
|
278
278
|
}
|
|
279
279
|
lastError = e;
|
|
280
280
|
}
|
|
@@ -289,7 +289,7 @@ var require_main = __commonJS({
|
|
|
289
289
|
const shortPaths = [];
|
|
290
290
|
for (const filePath of optionPaths) {
|
|
291
291
|
try {
|
|
292
|
-
const relative =
|
|
292
|
+
const relative = path3.relative(process.cwd(), filePath);
|
|
293
293
|
shortPaths.push(relative);
|
|
294
294
|
} catch (e) {
|
|
295
295
|
if (debug) {
|
|
@@ -1284,8 +1284,8 @@ var require_command = __commonJS({
|
|
|
1284
1284
|
"../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/lib/command.js"(exports2) {
|
|
1285
1285
|
var EventEmitter = require("events").EventEmitter;
|
|
1286
1286
|
var childProcess = require("child_process");
|
|
1287
|
-
var
|
|
1288
|
-
var
|
|
1287
|
+
var path3 = require("path");
|
|
1288
|
+
var fs2 = require("fs");
|
|
1289
1289
|
var process8 = require("process");
|
|
1290
1290
|
var { Argument: Argument2, humanReadableArgName } = require_argument();
|
|
1291
1291
|
var { CommanderError: CommanderError2 } = require_error();
|
|
@@ -2108,10 +2108,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2108
2108
|
let launchWithNode = false;
|
|
2109
2109
|
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
2110
2110
|
function findFile(baseDir, baseName) {
|
|
2111
|
-
const localBin =
|
|
2112
|
-
if (
|
|
2113
|
-
if (sourceExt.includes(
|
|
2114
|
-
const foundExt = sourceExt.find((ext) =>
|
|
2111
|
+
const localBin = path3.resolve(baseDir, baseName);
|
|
2112
|
+
if (fs2.existsSync(localBin)) return localBin;
|
|
2113
|
+
if (sourceExt.includes(path3.extname(baseName))) return void 0;
|
|
2114
|
+
const foundExt = sourceExt.find((ext) => fs2.existsSync(`${localBin}${ext}`));
|
|
2115
2115
|
if (foundExt) return `${localBin}${foundExt}`;
|
|
2116
2116
|
return void 0;
|
|
2117
2117
|
}
|
|
@@ -2122,23 +2122,23 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2122
2122
|
if (this._scriptPath) {
|
|
2123
2123
|
let resolvedScriptPath;
|
|
2124
2124
|
try {
|
|
2125
|
-
resolvedScriptPath =
|
|
2125
|
+
resolvedScriptPath = fs2.realpathSync(this._scriptPath);
|
|
2126
2126
|
} catch (err) {
|
|
2127
2127
|
resolvedScriptPath = this._scriptPath;
|
|
2128
2128
|
}
|
|
2129
|
-
executableDir =
|
|
2129
|
+
executableDir = path3.resolve(path3.dirname(resolvedScriptPath), executableDir);
|
|
2130
2130
|
}
|
|
2131
2131
|
if (executableDir) {
|
|
2132
2132
|
let localFile = findFile(executableDir, executableFile);
|
|
2133
2133
|
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
2134
|
-
const legacyName =
|
|
2134
|
+
const legacyName = path3.basename(this._scriptPath, path3.extname(this._scriptPath));
|
|
2135
2135
|
if (legacyName !== this._name) {
|
|
2136
2136
|
localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
2137
2137
|
}
|
|
2138
2138
|
}
|
|
2139
2139
|
executableFile = localFile || executableFile;
|
|
2140
2140
|
}
|
|
2141
|
-
launchWithNode = sourceExt.includes(
|
|
2141
|
+
launchWithNode = sourceExt.includes(path3.extname(executableFile));
|
|
2142
2142
|
let proc;
|
|
2143
2143
|
if (process8.platform !== "win32") {
|
|
2144
2144
|
if (launchWithNode) {
|
|
@@ -2921,7 +2921,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2921
2921
|
* @return {Command}
|
|
2922
2922
|
*/
|
|
2923
2923
|
nameFromFilename(filename) {
|
|
2924
|
-
this._name =
|
|
2924
|
+
this._name = path3.basename(filename, path3.extname(filename));
|
|
2925
2925
|
return this;
|
|
2926
2926
|
}
|
|
2927
2927
|
/**
|
|
@@ -2935,9 +2935,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
2935
2935
|
* @param {string} [path]
|
|
2936
2936
|
* @return {string|null|Command}
|
|
2937
2937
|
*/
|
|
2938
|
-
executableDir(
|
|
2939
|
-
if (
|
|
2940
|
-
this._executableDir =
|
|
2938
|
+
executableDir(path4) {
|
|
2939
|
+
if (path4 === void 0) return this._executableDir;
|
|
2940
|
+
this._executableDir = path4;
|
|
2941
2941
|
return this;
|
|
2942
2942
|
}
|
|
2943
2943
|
/**
|
|
@@ -8456,10 +8456,10 @@ var require_util = __commonJS({
|
|
|
8456
8456
|
function cloneDef2(schema) {
|
|
8457
8457
|
return mergeDefs2(schema._zod.def);
|
|
8458
8458
|
}
|
|
8459
|
-
function getElementAtPath2(obj,
|
|
8460
|
-
if (!
|
|
8459
|
+
function getElementAtPath2(obj, path3) {
|
|
8460
|
+
if (!path3)
|
|
8461
8461
|
return obj;
|
|
8462
|
-
return
|
|
8462
|
+
return path3.reduce((acc, key) => acc?.[key], obj);
|
|
8463
8463
|
}
|
|
8464
8464
|
function promiseAllObject2(promisesObj) {
|
|
8465
8465
|
const keys = Object.keys(promisesObj);
|
|
@@ -8821,11 +8821,11 @@ var require_util = __commonJS({
|
|
|
8821
8821
|
}
|
|
8822
8822
|
return false;
|
|
8823
8823
|
}
|
|
8824
|
-
function prefixIssues2(
|
|
8824
|
+
function prefixIssues2(path3, issues) {
|
|
8825
8825
|
return issues.map((iss) => {
|
|
8826
8826
|
var _a;
|
|
8827
8827
|
(_a = iss).path ?? (_a.path = []);
|
|
8828
|
-
iss.path.unshift(
|
|
8828
|
+
iss.path.unshift(path3);
|
|
8829
8829
|
return iss;
|
|
8830
8830
|
});
|
|
8831
8831
|
}
|
|
@@ -9029,7 +9029,7 @@ var require_errors2 = __commonJS({
|
|
|
9029
9029
|
}
|
|
9030
9030
|
function treeifyError2(error46, mapper = (issue2) => issue2.message) {
|
|
9031
9031
|
const result = { errors: [] };
|
|
9032
|
-
const processError = (error47,
|
|
9032
|
+
const processError = (error47, path3 = []) => {
|
|
9033
9033
|
var _a, _b;
|
|
9034
9034
|
for (const issue2 of error47.issues) {
|
|
9035
9035
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
@@ -9039,7 +9039,7 @@ var require_errors2 = __commonJS({
|
|
|
9039
9039
|
} else if (issue2.code === "invalid_element") {
|
|
9040
9040
|
processError({ issues: issue2.issues }, issue2.path);
|
|
9041
9041
|
} else {
|
|
9042
|
-
const fullpath = [...
|
|
9042
|
+
const fullpath = [...path3, ...issue2.path];
|
|
9043
9043
|
if (fullpath.length === 0) {
|
|
9044
9044
|
result.errors.push(mapper(issue2));
|
|
9045
9045
|
continue;
|
|
@@ -9071,8 +9071,8 @@ var require_errors2 = __commonJS({
|
|
|
9071
9071
|
}
|
|
9072
9072
|
function toDotPath2(_path) {
|
|
9073
9073
|
const segs = [];
|
|
9074
|
-
const
|
|
9075
|
-
for (const seg of
|
|
9074
|
+
const path3 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
9075
|
+
for (const seg of path3) {
|
|
9076
9076
|
if (typeof seg === "number")
|
|
9077
9077
|
segs.push(`[${seg}]`);
|
|
9078
9078
|
else if (typeof seg === "symbol")
|
|
@@ -24771,10 +24771,10 @@ function mergeDefs(...defs) {
|
|
|
24771
24771
|
function cloneDef(schema) {
|
|
24772
24772
|
return mergeDefs(schema._zod.def);
|
|
24773
24773
|
}
|
|
24774
|
-
function getElementAtPath(obj,
|
|
24775
|
-
if (!
|
|
24774
|
+
function getElementAtPath(obj, path3) {
|
|
24775
|
+
if (!path3)
|
|
24776
24776
|
return obj;
|
|
24777
|
-
return
|
|
24777
|
+
return path3.reduce((acc, key) => acc?.[key], obj);
|
|
24778
24778
|
}
|
|
24779
24779
|
function promiseAllObject(promisesObj) {
|
|
24780
24780
|
const keys = Object.keys(promisesObj);
|
|
@@ -25135,11 +25135,11 @@ function aborted(x, startIndex = 0) {
|
|
|
25135
25135
|
}
|
|
25136
25136
|
return false;
|
|
25137
25137
|
}
|
|
25138
|
-
function prefixIssues(
|
|
25138
|
+
function prefixIssues(path3, issues) {
|
|
25139
25139
|
return issues.map((iss) => {
|
|
25140
25140
|
var _a;
|
|
25141
25141
|
(_a = iss).path ?? (_a.path = []);
|
|
25142
|
-
iss.path.unshift(
|
|
25142
|
+
iss.path.unshift(path3);
|
|
25143
25143
|
return iss;
|
|
25144
25144
|
});
|
|
25145
25145
|
}
|
|
@@ -25301,7 +25301,7 @@ function formatError(error46, mapper = (issue2) => issue2.message) {
|
|
|
25301
25301
|
}
|
|
25302
25302
|
function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
25303
25303
|
const result = { errors: [] };
|
|
25304
|
-
const processError = (error47,
|
|
25304
|
+
const processError = (error47, path3 = []) => {
|
|
25305
25305
|
var _a, _b;
|
|
25306
25306
|
for (const issue2 of error47.issues) {
|
|
25307
25307
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
@@ -25311,7 +25311,7 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
|
25311
25311
|
} else if (issue2.code === "invalid_element") {
|
|
25312
25312
|
processError({ issues: issue2.issues }, issue2.path);
|
|
25313
25313
|
} else {
|
|
25314
|
-
const fullpath = [...
|
|
25314
|
+
const fullpath = [...path3, ...issue2.path];
|
|
25315
25315
|
if (fullpath.length === 0) {
|
|
25316
25316
|
result.errors.push(mapper(issue2));
|
|
25317
25317
|
continue;
|
|
@@ -25343,8 +25343,8 @@ function treeifyError(error46, mapper = (issue2) => issue2.message) {
|
|
|
25343
25343
|
}
|
|
25344
25344
|
function toDotPath(_path) {
|
|
25345
25345
|
const segs = [];
|
|
25346
|
-
const
|
|
25347
|
-
for (const seg of
|
|
25346
|
+
const path3 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
25347
|
+
for (const seg of path3) {
|
|
25348
25348
|
if (typeof seg === "number")
|
|
25349
25349
|
segs.push(`[${seg}]`);
|
|
25350
25350
|
else if (typeof seg === "symbol")
|
|
@@ -36610,126 +36610,6 @@ var DateRangeSchema = external_exports.object({
|
|
|
36610
36610
|
endDate: external_exports.string().datetime()
|
|
36611
36611
|
});
|
|
36612
36612
|
|
|
36613
|
-
// ../core/src/platform/registry/domains.ts
|
|
36614
|
-
var DOMAINS = {
|
|
36615
|
-
// Business domains
|
|
36616
|
-
INBOUND_PIPELINE: "inbound-pipeline",
|
|
36617
|
-
LEAD_GEN_PIPELINE: "lead-gen-pipeline",
|
|
36618
|
-
SUPPORT: "support",
|
|
36619
|
-
CLIENT_SUPPORT: "client-support",
|
|
36620
|
-
DELIVERY: "delivery",
|
|
36621
|
-
OPERATIONS: "operations",
|
|
36622
|
-
FINANCE: "finance",
|
|
36623
|
-
EXECUTIVE: "executive",
|
|
36624
|
-
INSTANTLY: "instantly",
|
|
36625
|
-
// Technical domains
|
|
36626
|
-
TESTING: "testing",
|
|
36627
|
-
INTERNAL: "internal",
|
|
36628
|
-
INTEGRATION: "integration",
|
|
36629
|
-
UTILITY: "utility",
|
|
36630
|
-
DIAGNOSTIC: "diagnostic"
|
|
36631
|
-
};
|
|
36632
|
-
var INBOUND_PIPELINE_DOMAIN = {
|
|
36633
|
-
id: DOMAINS.INBOUND_PIPELINE,
|
|
36634
|
-
name: "Inbound Pipeline",
|
|
36635
|
-
description: "End-to-end inbound client acquisition from first reply to onboarding",
|
|
36636
|
-
color: "blue"
|
|
36637
|
-
};
|
|
36638
|
-
var LEAD_GEN_PIPELINE_DOMAIN = {
|
|
36639
|
-
id: DOMAINS.LEAD_GEN_PIPELINE,
|
|
36640
|
-
name: "Lead Gen Pipeline",
|
|
36641
|
-
description: "Lead scraping, enrichment, qualification, and personalization",
|
|
36642
|
-
color: "cyan"
|
|
36643
|
-
};
|
|
36644
|
-
var SUPPORT_DOMAIN = {
|
|
36645
|
-
id: DOMAINS.SUPPORT,
|
|
36646
|
-
name: "Customer Support",
|
|
36647
|
-
description: "Ticket triage, knowledge base, escalations",
|
|
36648
|
-
color: "green"
|
|
36649
|
-
};
|
|
36650
|
-
var CLIENT_SUPPORT_DOMAIN = {
|
|
36651
|
-
id: DOMAINS.CLIENT_SUPPORT,
|
|
36652
|
-
name: "Client Support",
|
|
36653
|
-
description: "Client change requests, bug reports, and feature requests",
|
|
36654
|
-
color: "teal"
|
|
36655
|
-
};
|
|
36656
|
-
var DELIVERY_DOMAIN = {
|
|
36657
|
-
id: DOMAINS.DELIVERY,
|
|
36658
|
-
name: "Client Delivery",
|
|
36659
|
-
description: "Project execution and milestone tracking",
|
|
36660
|
-
color: "orange"
|
|
36661
|
-
};
|
|
36662
|
-
var OPERATIONS_DOMAIN = {
|
|
36663
|
-
id: DOMAINS.OPERATIONS,
|
|
36664
|
-
name: "Operations",
|
|
36665
|
-
description: "Internal business operations and administration",
|
|
36666
|
-
color: "violet"
|
|
36667
|
-
};
|
|
36668
|
-
var FINANCE_DOMAIN = {
|
|
36669
|
-
id: DOMAINS.FINANCE,
|
|
36670
|
-
name: "Finance",
|
|
36671
|
-
description: "Billing, invoicing, and financial operations",
|
|
36672
|
-
color: "pink"
|
|
36673
|
-
};
|
|
36674
|
-
var EXECUTIVE_DOMAIN = {
|
|
36675
|
-
id: DOMAINS.EXECUTIVE,
|
|
36676
|
-
name: "Executive Operations",
|
|
36677
|
-
description: "High-level business orchestration and decision-making",
|
|
36678
|
-
color: "indigo"
|
|
36679
|
-
};
|
|
36680
|
-
var TESTING_DOMAIN = {
|
|
36681
|
-
id: DOMAINS.TESTING,
|
|
36682
|
-
name: "Testing",
|
|
36683
|
-
description: "Test resources and development workflows",
|
|
36684
|
-
color: "gray"
|
|
36685
|
-
};
|
|
36686
|
-
var INTERNAL_DOMAIN = {
|
|
36687
|
-
id: DOMAINS.INTERNAL,
|
|
36688
|
-
name: "Internal",
|
|
36689
|
-
description: "Internal platform resources",
|
|
36690
|
-
color: "dark"
|
|
36691
|
-
};
|
|
36692
|
-
var INTEGRATION_DOMAIN = {
|
|
36693
|
-
id: DOMAINS.INTEGRATION,
|
|
36694
|
-
name: "Integration",
|
|
36695
|
-
description: "External service integrations",
|
|
36696
|
-
color: "teal"
|
|
36697
|
-
};
|
|
36698
|
-
var INSTANTLY_DOMAIN = {
|
|
36699
|
-
id: DOMAINS.INSTANTLY,
|
|
36700
|
-
name: "Instantly Toolkit",
|
|
36701
|
-
description: "Instantly campaign creation, analytics, and optimization",
|
|
36702
|
-
color: "lime"
|
|
36703
|
-
};
|
|
36704
|
-
var UTILITY_DOMAIN = {
|
|
36705
|
-
id: DOMAINS.UTILITY,
|
|
36706
|
-
name: "Utility",
|
|
36707
|
-
description: "Utility workflows for maintenance and diagnostics",
|
|
36708
|
-
color: "grape"
|
|
36709
|
-
};
|
|
36710
|
-
var DIAGNOSTIC_DOMAIN = {
|
|
36711
|
-
id: DOMAINS.DIAGNOSTIC,
|
|
36712
|
-
name: "Diagnostic",
|
|
36713
|
-
description: "Diagnostic workflows for testing integrations and services",
|
|
36714
|
-
color: "yellow"
|
|
36715
|
-
};
|
|
36716
|
-
var DOMAIN_MAP = {
|
|
36717
|
-
[DOMAINS.INBOUND_PIPELINE]: INBOUND_PIPELINE_DOMAIN,
|
|
36718
|
-
[DOMAINS.LEAD_GEN_PIPELINE]: LEAD_GEN_PIPELINE_DOMAIN,
|
|
36719
|
-
[DOMAINS.SUPPORT]: SUPPORT_DOMAIN,
|
|
36720
|
-
[DOMAINS.CLIENT_SUPPORT]: CLIENT_SUPPORT_DOMAIN,
|
|
36721
|
-
[DOMAINS.DELIVERY]: DELIVERY_DOMAIN,
|
|
36722
|
-
[DOMAINS.OPERATIONS]: OPERATIONS_DOMAIN,
|
|
36723
|
-
[DOMAINS.FINANCE]: FINANCE_DOMAIN,
|
|
36724
|
-
[DOMAINS.EXECUTIVE]: EXECUTIVE_DOMAIN,
|
|
36725
|
-
[DOMAINS.TESTING]: TESTING_DOMAIN,
|
|
36726
|
-
[DOMAINS.INTERNAL]: INTERNAL_DOMAIN,
|
|
36727
|
-
[DOMAINS.INSTANTLY]: INSTANTLY_DOMAIN,
|
|
36728
|
-
[DOMAINS.INTEGRATION]: INTEGRATION_DOMAIN,
|
|
36729
|
-
[DOMAINS.UTILITY]: UTILITY_DOMAIN,
|
|
36730
|
-
[DOMAINS.DIAGNOSTIC]: DIAGNOSTIC_DOMAIN
|
|
36731
|
-
};
|
|
36732
|
-
|
|
36733
36613
|
// ../core/src/platform/registry/reserved.ts
|
|
36734
36614
|
var RESERVED_RESOURCE_IDS = /* @__PURE__ */ new Set(["command-center-assistant"]);
|
|
36735
36615
|
var SYSTEM_RESOURCE_IDS = Array.from(RESERVED_RESOURCE_IDS);
|
|
@@ -39570,16 +39450,6 @@ function serializeAllOrganizations(registry2) {
|
|
|
39570
39450
|
}
|
|
39571
39451
|
return cache;
|
|
39572
39452
|
}
|
|
39573
|
-
function deriveDomainDefinitions(resources) {
|
|
39574
|
-
const domainIds = /* @__PURE__ */ new Set();
|
|
39575
|
-
resources.workflows?.forEach((w) => w.config.domains?.forEach((d) => domainIds.add(d)));
|
|
39576
|
-
resources.agents?.forEach((a) => a.config.domains?.forEach((d) => domainIds.add(d)));
|
|
39577
|
-
resources.triggers?.forEach((t) => t.domains?.forEach((d) => domainIds.add(d)));
|
|
39578
|
-
resources.integrations?.forEach((i) => i.domains?.forEach((d) => domainIds.add(d)));
|
|
39579
|
-
resources.externalResources?.forEach((e) => e.domains?.forEach((d) => domainIds.add(d)));
|
|
39580
|
-
resources.humanCheckpoints?.forEach((h) => h.domains?.forEach((d) => domainIds.add(d)));
|
|
39581
|
-
return Array.from(domainIds).map((id) => DOMAIN_MAP[id]);
|
|
39582
|
-
}
|
|
39583
39453
|
function serializeOrganization(resources) {
|
|
39584
39454
|
const workflowDefinitions = /* @__PURE__ */ new Map();
|
|
39585
39455
|
const workflowResources = [];
|
|
@@ -39594,7 +39464,9 @@ function serializeOrganization(resources) {
|
|
|
39594
39464
|
description: workflow.config.description,
|
|
39595
39465
|
version: workflow.config.version,
|
|
39596
39466
|
type: "workflow",
|
|
39597
|
-
status: workflow.config.status
|
|
39467
|
+
status: workflow.config.status,
|
|
39468
|
+
links: workflow.config.links,
|
|
39469
|
+
category: workflow.config.category
|
|
39598
39470
|
});
|
|
39599
39471
|
commandViewWorkflows.push({
|
|
39600
39472
|
resourceId,
|
|
@@ -39603,7 +39475,8 @@ function serializeOrganization(resources) {
|
|
|
39603
39475
|
version: workflow.config.version,
|
|
39604
39476
|
type: "workflow",
|
|
39605
39477
|
status: workflow.config.status,
|
|
39606
|
-
|
|
39478
|
+
links: workflow.config.links,
|
|
39479
|
+
category: workflow.config.category,
|
|
39607
39480
|
stepCount: Object.keys(workflow.steps).length,
|
|
39608
39481
|
entryPoint: workflow.entryPoint
|
|
39609
39482
|
});
|
|
@@ -39621,7 +39494,9 @@ function serializeOrganization(resources) {
|
|
|
39621
39494
|
description: agent.config.description,
|
|
39622
39495
|
version: agent.config.version,
|
|
39623
39496
|
type: "agent",
|
|
39624
|
-
status: agent.config.status
|
|
39497
|
+
status: agent.config.status,
|
|
39498
|
+
links: agent.config.links,
|
|
39499
|
+
category: agent.config.category
|
|
39625
39500
|
});
|
|
39626
39501
|
commandViewAgents.push({
|
|
39627
39502
|
resourceId,
|
|
@@ -39630,7 +39505,8 @@ function serializeOrganization(resources) {
|
|
|
39630
39505
|
version: agent.config.version,
|
|
39631
39506
|
type: "agent",
|
|
39632
39507
|
status: agent.config.status,
|
|
39633
|
-
|
|
39508
|
+
links: agent.config.links,
|
|
39509
|
+
category: agent.config.category,
|
|
39634
39510
|
modelProvider: agent.modelConfig.provider,
|
|
39635
39511
|
modelId: agent.modelConfig.model,
|
|
39636
39512
|
toolCount: agent.tools.length,
|
|
@@ -39644,7 +39520,6 @@ function serializeOrganization(resources) {
|
|
|
39644
39520
|
const integrations = resources.integrations ?? [];
|
|
39645
39521
|
const externalResources = resources.externalResources ?? [];
|
|
39646
39522
|
const humanCheckpoints = resources.humanCheckpoints ?? [];
|
|
39647
|
-
const domainDefinitions = deriveDomainDefinitions(resources);
|
|
39648
39523
|
return {
|
|
39649
39524
|
version: resources.version,
|
|
39650
39525
|
resources: {
|
|
@@ -39663,8 +39538,7 @@ function serializeOrganization(resources) {
|
|
|
39663
39538
|
integrations,
|
|
39664
39539
|
externalResources,
|
|
39665
39540
|
humanCheckpoints,
|
|
39666
|
-
edges
|
|
39667
|
-
domainDefinitions
|
|
39541
|
+
edges
|
|
39668
39542
|
},
|
|
39669
39543
|
triggers,
|
|
39670
39544
|
integrations,
|
|
@@ -39922,7 +39796,8 @@ var ResourceRegistry = class {
|
|
|
39922
39796
|
version: def.config.version,
|
|
39923
39797
|
type: def.config.type,
|
|
39924
39798
|
status: def.config.status,
|
|
39925
|
-
|
|
39799
|
+
links: def.config.links,
|
|
39800
|
+
category: def.config.category,
|
|
39926
39801
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
39927
39802
|
})).filter((resource) => !environment || resource.status === environment);
|
|
39928
39803
|
const agents = (orgResources.agents || []).map((def) => ({
|
|
@@ -39932,7 +39807,8 @@ var ResourceRegistry = class {
|
|
|
39932
39807
|
version: def.config.version,
|
|
39933
39808
|
type: def.config.type,
|
|
39934
39809
|
status: def.config.status,
|
|
39935
|
-
|
|
39810
|
+
links: def.config.links,
|
|
39811
|
+
category: def.config.category,
|
|
39936
39812
|
sessionCapable: def.config.sessionCapable ?? false,
|
|
39937
39813
|
origin: this.remoteResources.has(`${organizationName}/${def.config.resourceId}`) ? "remote" : "local"
|
|
39938
39814
|
})).filter((resource) => !environment || resource.status === environment);
|
|
@@ -40447,7 +40323,9 @@ function resolveProjectRelative(relOrAbsPath) {
|
|
|
40447
40323
|
return (0, import_path.resolve)(getProjectRoot(), relOrAbsPath);
|
|
40448
40324
|
}
|
|
40449
40325
|
function findEnvFile(_startDir) {
|
|
40450
|
-
const
|
|
40326
|
+
const projectRoot = tryFindProjectRoot(process.cwd());
|
|
40327
|
+
if (projectRoot === null) return void 0;
|
|
40328
|
+
const candidate = (0, import_path.join)(projectRoot, ".env");
|
|
40451
40329
|
return (0, import_fs.existsSync)(candidate) ? candidate : void 0;
|
|
40452
40330
|
}
|
|
40453
40331
|
function findPackageRoot(startDir) {
|
|
@@ -40580,7 +40458,7 @@ function wrapAction(commandName, fn) {
|
|
|
40580
40458
|
// package.json
|
|
40581
40459
|
var package_default = {
|
|
40582
40460
|
name: "@elevasis/sdk",
|
|
40583
|
-
version: "1.
|
|
40461
|
+
version: "1.11.0",
|
|
40584
40462
|
description: "SDK for building Elevasis organization resources",
|
|
40585
40463
|
type: "module",
|
|
40586
40464
|
bin: {
|
|
@@ -40594,6 +40472,10 @@ var package_default = {
|
|
|
40594
40472
|
"./worker": {
|
|
40595
40473
|
types: "./dist/types/worker/index.d.ts",
|
|
40596
40474
|
import: "./dist/worker/index.js"
|
|
40475
|
+
},
|
|
40476
|
+
"./test-utils": {
|
|
40477
|
+
types: "./dist/test-utils/index.d.ts",
|
|
40478
|
+
import: "./dist/test-utils/index.js"
|
|
40597
40479
|
}
|
|
40598
40480
|
},
|
|
40599
40481
|
files: [
|
|
@@ -40603,6 +40485,8 @@ var package_default = {
|
|
|
40603
40485
|
"dist/types/worker/index.d.ts",
|
|
40604
40486
|
"dist/types/worker/platform.d.ts",
|
|
40605
40487
|
"dist/types/worker/adapters/",
|
|
40488
|
+
"dist/test-utils/index.js",
|
|
40489
|
+
"dist/test-utils/index.d.ts",
|
|
40606
40490
|
"dist/cli.cjs",
|
|
40607
40491
|
"reference/"
|
|
40608
40492
|
],
|
|
@@ -40675,7 +40559,8 @@ function extractResourceMetadata(resource, schemaWarnings) {
|
|
|
40675
40559
|
version: resource.config.version,
|
|
40676
40560
|
status: resource.config.status,
|
|
40677
40561
|
description: resource.config.description,
|
|
40678
|
-
|
|
40562
|
+
links: resource.config.links,
|
|
40563
|
+
category: resource.config.category
|
|
40679
40564
|
};
|
|
40680
40565
|
if (resource.contract.inputSchema) {
|
|
40681
40566
|
try {
|
|
@@ -41463,7 +41348,10 @@ function registerDescribeCommand(program3) {
|
|
|
41463
41348
|
if (config3.description) console.log(source_default.gray("Description:"), config3.description);
|
|
41464
41349
|
console.log(source_default.gray("Version:"), config3.version);
|
|
41465
41350
|
console.log(source_default.gray("Status:"), config3.status);
|
|
41466
|
-
if (config3.
|
|
41351
|
+
if (config3.category) console.log(source_default.gray("Category:"), config3.category);
|
|
41352
|
+
if (config3.links?.length) {
|
|
41353
|
+
console.log(source_default.gray("Links:"), config3.links.map((link) => `${link.kind} ${link.nodeId}`).join(", "));
|
|
41354
|
+
}
|
|
41467
41355
|
console.log();
|
|
41468
41356
|
const inputSchema = contract?.inputSchema;
|
|
41469
41357
|
const outputSchema = contract?.outputSchema;
|
|
@@ -42956,9 +42844,151 @@ ${issues}`);
|
|
|
42956
42844
|
);
|
|
42957
42845
|
}
|
|
42958
42846
|
|
|
42959
|
-
// src/cli/commands/
|
|
42960
|
-
var
|
|
42847
|
+
// src/cli/commands/ui/ui-switcher.ts
|
|
42848
|
+
var import_node_child_process = require("node:child_process");
|
|
42849
|
+
var import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
42961
42850
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
42851
|
+
function run(command, args, cwd) {
|
|
42852
|
+
(0, import_node_child_process.execFileSync)(command, args, {
|
|
42853
|
+
cwd,
|
|
42854
|
+
stdio: "inherit",
|
|
42855
|
+
shell: process.platform === "win32"
|
|
42856
|
+
});
|
|
42857
|
+
}
|
|
42858
|
+
function readJson(filePath) {
|
|
42859
|
+
return JSON.parse(import_node_fs3.default.readFileSync(filePath, "utf8"));
|
|
42860
|
+
}
|
|
42861
|
+
function writeJson(filePath, value) {
|
|
42862
|
+
import_node_fs3.default.writeFileSync(filePath, `${JSON.stringify(value, null, 2)}
|
|
42863
|
+
`);
|
|
42864
|
+
}
|
|
42865
|
+
function requireDependencies(packageJson, filePath) {
|
|
42866
|
+
if (!packageJson.dependencies) {
|
|
42867
|
+
throw new Error(`${filePath} does not define dependencies`);
|
|
42868
|
+
}
|
|
42869
|
+
return packageJson.dependencies;
|
|
42870
|
+
}
|
|
42871
|
+
function resolveExistingDir(label, dir) {
|
|
42872
|
+
const resolved = import_node_path3.default.resolve(dir);
|
|
42873
|
+
if (!import_node_fs3.default.existsSync(resolved) || !import_node_fs3.default.statSync(resolved).isDirectory()) {
|
|
42874
|
+
throw new Error(`${label} not found: ${resolved}`);
|
|
42875
|
+
}
|
|
42876
|
+
return resolved;
|
|
42877
|
+
}
|
|
42878
|
+
function findRepoRootFromProject(projectRoot) {
|
|
42879
|
+
let dir = projectRoot;
|
|
42880
|
+
while (true) {
|
|
42881
|
+
if (import_node_fs3.default.existsSync(import_node_path3.default.join(dir, "packages", "ui", "package.json"))) return dir;
|
|
42882
|
+
const parent = import_node_path3.default.dirname(dir);
|
|
42883
|
+
if (parent === dir) return null;
|
|
42884
|
+
dir = parent;
|
|
42885
|
+
}
|
|
42886
|
+
}
|
|
42887
|
+
function resolveUiPackageRoot(projectRoot, explicitRoot) {
|
|
42888
|
+
if (explicitRoot) return resolveExistingDir("UI package root", explicitRoot);
|
|
42889
|
+
const repoRoot = findRepoRootFromProject(projectRoot);
|
|
42890
|
+
if (repoRoot === null) {
|
|
42891
|
+
throw new Error(
|
|
42892
|
+
"Could not find packages/ui from this Elevasis project. Pass --ui-package-root <path> from a monorepo checkout."
|
|
42893
|
+
);
|
|
42894
|
+
}
|
|
42895
|
+
return import_node_path3.default.join(repoRoot, "packages", "ui");
|
|
42896
|
+
}
|
|
42897
|
+
function removeLocalUiTarballs(templateTmpDir) {
|
|
42898
|
+
if (!import_node_fs3.default.existsSync(templateTmpDir)) return;
|
|
42899
|
+
for (const entry of import_node_fs3.default.readdirSync(templateTmpDir)) {
|
|
42900
|
+
if (entry.startsWith("elevasis-ui-") && entry.endsWith(".tgz")) {
|
|
42901
|
+
import_node_fs3.default.rmSync(import_node_path3.default.join(templateTmpDir, entry), { force: true });
|
|
42902
|
+
}
|
|
42903
|
+
}
|
|
42904
|
+
}
|
|
42905
|
+
function prepareUiPackageForPack(uiPackageJson) {
|
|
42906
|
+
const publishConfig = uiPackageJson.publishConfig ?? {};
|
|
42907
|
+
const packedPackageJson = {
|
|
42908
|
+
...uiPackageJson,
|
|
42909
|
+
name: publishConfig.name ?? uiPackageJson.name
|
|
42910
|
+
};
|
|
42911
|
+
if (publishConfig.exports) packedPackageJson.exports = publishConfig.exports;
|
|
42912
|
+
if (publishConfig.peerDependencies) packedPackageJson.peerDependencies = publishConfig.peerDependencies;
|
|
42913
|
+
if (publishConfig.peerDependenciesMeta) packedPackageJson.peerDependenciesMeta = publishConfig.peerDependenciesMeta;
|
|
42914
|
+
delete packedPackageJson.publishConfig;
|
|
42915
|
+
return packedPackageJson;
|
|
42916
|
+
}
|
|
42917
|
+
function useLocalUi(options = {}) {
|
|
42918
|
+
const projectRoot = getProjectRoot();
|
|
42919
|
+
const repoRoot = findRepoRootFromProject(projectRoot);
|
|
42920
|
+
const uiPackageRoot = resolveUiPackageRoot(projectRoot, options.uiPackageRoot);
|
|
42921
|
+
const commandRoot = repoRoot ?? import_node_path3.default.dirname(import_node_path3.default.dirname(uiPackageRoot));
|
|
42922
|
+
const templateUiPackageJsonPath = import_node_path3.default.join(projectRoot, "ui", "package.json");
|
|
42923
|
+
const templateTmpDir = import_node_path3.default.join(projectRoot, "tmp");
|
|
42924
|
+
const uiPackageJsonPath = import_node_path3.default.join(uiPackageRoot, "package.json");
|
|
42925
|
+
const uiPackageBackupPath = import_node_path3.default.join(uiPackageRoot, "package.json.local-pack.bak");
|
|
42926
|
+
if (!import_node_fs3.default.existsSync(templateUiPackageJsonPath)) {
|
|
42927
|
+
throw new Error(`Template UI package.json not found: ${templateUiPackageJsonPath}`);
|
|
42928
|
+
}
|
|
42929
|
+
import_node_fs3.default.mkdirSync(templateTmpDir, { recursive: true });
|
|
42930
|
+
removeLocalUiTarballs(templateTmpDir);
|
|
42931
|
+
run("pnpm", ["--filter", "@repo/ui", "build:publish"], commandRoot);
|
|
42932
|
+
try {
|
|
42933
|
+
const raw = import_node_fs3.default.readFileSync(uiPackageJsonPath, "utf8");
|
|
42934
|
+
import_node_fs3.default.writeFileSync(uiPackageBackupPath, raw);
|
|
42935
|
+
writeJson(uiPackageJsonPath, prepareUiPackageForPack(JSON.parse(raw)));
|
|
42936
|
+
run("pnpm", ["-C", uiPackageRoot, "pack", "--pack-destination", templateTmpDir], commandRoot);
|
|
42937
|
+
} finally {
|
|
42938
|
+
if (import_node_fs3.default.existsSync(uiPackageBackupPath)) {
|
|
42939
|
+
import_node_fs3.default.copyFileSync(uiPackageBackupPath, uiPackageJsonPath);
|
|
42940
|
+
import_node_fs3.default.rmSync(uiPackageBackupPath, { force: true });
|
|
42941
|
+
}
|
|
42942
|
+
}
|
|
42943
|
+
const tarballName = import_node_fs3.default.readdirSync(templateTmpDir).find((entry) => entry.startsWith("elevasis-ui-") && entry.endsWith(".tgz"));
|
|
42944
|
+
if (!tarballName) {
|
|
42945
|
+
throw new Error(`Failed to create local @elevasis/ui tarball in ${templateTmpDir}`);
|
|
42946
|
+
}
|
|
42947
|
+
const templateUiPackageJson = readJson(templateUiPackageJsonPath);
|
|
42948
|
+
requireDependencies(templateUiPackageJson, templateUiPackageJsonPath)["@elevasis/ui"] = `file:../tmp/${tarballName}`;
|
|
42949
|
+
writeJson(templateUiPackageJsonPath, templateUiPackageJson);
|
|
42950
|
+
run("pnpm", ["-C", projectRoot, "install"], commandRoot);
|
|
42951
|
+
console.log(`${import_node_path3.default.basename(projectRoot)}/ui now uses local @elevasis/ui tarball: ${tarballName}`);
|
|
42952
|
+
}
|
|
42953
|
+
function usePublishedUi(options = {}) {
|
|
42954
|
+
const projectRoot = getProjectRoot();
|
|
42955
|
+
const repoRoot = findRepoRootFromProject(projectRoot);
|
|
42956
|
+
const commandRoot = repoRoot ?? projectRoot;
|
|
42957
|
+
const templateUiPackageJsonPath = import_node_path3.default.join(projectRoot, "ui", "package.json");
|
|
42958
|
+
const templateTmpDir = import_node_path3.default.join(projectRoot, "tmp");
|
|
42959
|
+
const uiPackageRoot = options.version ? void 0 : resolveUiPackageRoot(projectRoot, options.uiPackageRoot);
|
|
42960
|
+
const uiVersion = options.version ?? readJson(import_node_path3.default.join(uiPackageRoot, "package.json")).version;
|
|
42961
|
+
if (!uiVersion) {
|
|
42962
|
+
throw new Error("Could not determine @elevasis/ui version. Pass --version <version>.");
|
|
42963
|
+
}
|
|
42964
|
+
if (!import_node_fs3.default.existsSync(templateUiPackageJsonPath)) {
|
|
42965
|
+
throw new Error(`Template UI package.json not found: ${templateUiPackageJsonPath}`);
|
|
42966
|
+
}
|
|
42967
|
+
const templateUiPackageJson = readJson(templateUiPackageJsonPath);
|
|
42968
|
+
requireDependencies(templateUiPackageJson, templateUiPackageJsonPath)["@elevasis/ui"] = `^${uiVersion}`;
|
|
42969
|
+
writeJson(templateUiPackageJsonPath, templateUiPackageJson);
|
|
42970
|
+
removeLocalUiTarballs(templateTmpDir);
|
|
42971
|
+
run("pnpm", ["-C", projectRoot, "install"], commandRoot);
|
|
42972
|
+
console.log(`${import_node_path3.default.basename(projectRoot)}/ui restored to published @elevasis/ui ^${uiVersion}`);
|
|
42973
|
+
}
|
|
42974
|
+
|
|
42975
|
+
// src/cli/commands/ui/ui.ts
|
|
42976
|
+
function registerUiCommands(program3) {
|
|
42977
|
+
program3.command("ui:use-local").description("Switch this Elevasis project to a local @elevasis/ui tarball").option("--ui-package-root <path>", "Path to the local packages/ui checkout").action(
|
|
42978
|
+
wrapAction("ui:use-local", async (options) => {
|
|
42979
|
+
useLocalUi(options);
|
|
42980
|
+
})
|
|
42981
|
+
);
|
|
42982
|
+
program3.command("ui:use-published").description("Restore this Elevasis project to a published @elevasis/ui dependency").option("--ui-package-root <path>", "Path to the local packages/ui checkout used to infer the version").option("--version <version>", "Explicit @elevasis/ui version to restore").action(
|
|
42983
|
+
wrapAction("ui:use-published", async (options) => {
|
|
42984
|
+
usePublishedUi(options);
|
|
42985
|
+
})
|
|
42986
|
+
);
|
|
42987
|
+
}
|
|
42988
|
+
|
|
42989
|
+
// src/cli/commands/doctor.ts
|
|
42990
|
+
var import_node_fs4 = require("node:fs");
|
|
42991
|
+
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
42962
42992
|
function ok(label, detail) {
|
|
42963
42993
|
console.log(`${source_default.green("[OK]")} ${source_default.bold(label)}: ${detail}`);
|
|
42964
42994
|
}
|
|
@@ -42994,8 +43024,8 @@ function registerDoctorCommand(program3) {
|
|
|
42994
43024
|
printSummary(failCount);
|
|
42995
43025
|
process.exit(1);
|
|
42996
43026
|
}
|
|
42997
|
-
const envPath2 =
|
|
42998
|
-
const envExists = (0,
|
|
43027
|
+
const envPath2 = import_node_path4.default.join(projectRoot, ".env");
|
|
43028
|
+
const envExists = (0, import_node_fs4.existsSync)(envPath2);
|
|
42999
43029
|
if (!envExists) {
|
|
43000
43030
|
fail(".env", `Not found at ${envPath2}. Create it from .env.example and fill in ELEVASIS_PLATFORM_KEY.`);
|
|
43001
43031
|
if (isVerbose) verbose(`Checked: ${envPath2}`);
|
|
@@ -43084,11 +43114,15 @@ function printSummary(failCount) {
|
|
|
43084
43114
|
|
|
43085
43115
|
// src/cli/index.ts
|
|
43086
43116
|
var PREFLIGHT_SKIP_FLAGS = /* @__PURE__ */ new Set(["--help", "-h", "--version", "-V"]);
|
|
43117
|
+
var LOCAL_PROJECT_COMMANDS = /* @__PURE__ */ new Set(["ui:use-local", "ui:use-published"]);
|
|
43087
43118
|
function shouldSkipPreflight() {
|
|
43088
43119
|
const args = process.argv.slice(2);
|
|
43089
43120
|
if (args.length === 0) return true;
|
|
43090
43121
|
return args.every((a) => PREFLIGHT_SKIP_FLAGS.has(a));
|
|
43091
43122
|
}
|
|
43123
|
+
function isLocalProjectCommand() {
|
|
43124
|
+
return LOCAL_PROJECT_COMMANDS.has(process.argv[2] ?? "");
|
|
43125
|
+
}
|
|
43092
43126
|
function runPreflight() {
|
|
43093
43127
|
if (shouldSkipPreflight()) return;
|
|
43094
43128
|
const projectRoot = tryFindProjectRoot(process.cwd());
|
|
@@ -43101,6 +43135,7 @@ function runPreflight() {
|
|
|
43101
43135
|
);
|
|
43102
43136
|
process.exit(1);
|
|
43103
43137
|
}
|
|
43138
|
+
if (isLocalProjectCommand()) return;
|
|
43104
43139
|
const envPath2 = (0, import_path3.join)(projectRoot, ".env");
|
|
43105
43140
|
if (!(0, import_fs2.existsSync)(envPath2)) {
|
|
43106
43141
|
process.stderr.write(source_default.red(`No \`.env\` found at \`${envPath2}\`. Set \`ELEVASIS_PLATFORM_KEY\`.
|
|
@@ -43142,6 +43177,8 @@ Commands:
|
|
|
43142
43177
|
elevasis-sdk project:resolve <query> Resolve a project ID from a name or UUID
|
|
43143
43178
|
elevasis-sdk project:work <query> Open a lifecycle-aware project work brief
|
|
43144
43179
|
elevasis-sdk request:submit -f <path> Submit a structured request report
|
|
43180
|
+
elevasis-sdk ui:use-local Use a local @elevasis/ui tarball
|
|
43181
|
+
elevasis-sdk ui:use-published Restore published @elevasis/ui
|
|
43145
43182
|
elevasis-sdk rename <id> --to <newId> [--prod] Rename resource across platform tables
|
|
43146
43183
|
elevasis-sdk doctor [--verbose] Check project environment and API connectivity
|
|
43147
43184
|
|
|
@@ -43163,6 +43200,7 @@ registerErrorCommand(program2);
|
|
|
43163
43200
|
registerRenameCommand(program2);
|
|
43164
43201
|
registerProjectCommands(program2);
|
|
43165
43202
|
registerRequestCommands(program2);
|
|
43203
|
+
registerUiCommands(program2);
|
|
43166
43204
|
registerDoctorCommand(program2);
|
|
43167
43205
|
program2.parse();
|
|
43168
43206
|
// Annotate the CommonJS export names for ESM import in node:
|