@tailor-platform/sdk 1.4.1 → 1.4.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.
package/dist/cli/lib.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import "../chunk-CIV_ash9.mjs";
2
2
  import "../config-CBpYlVa-.mjs";
3
- import { D as getOAuth2Client, H as loadWorkspaceId, I as generateUserTypes, L as loadConfig, M as generate, O as getMachineUserToken, P as apply, R as apiCall, S as remove, T as listOAuth2Clients, V as loadAccessToken, _ as listWorkflowExecutions, b as show, c as resumeWorkflow, f as listWorkflows, g as getWorkflowExecution, i as deleteWorkspace, j as listMachineUsers, m as getWorkflow, n as listWorkspaces, o as createWorkspace, u as startWorkflow, v as truncate } from "../list-CafRw3ao.mjs";
3
+ import { D as getOAuth2Client, H as loadWorkspaceId, I as generateUserTypes, L as loadConfig, M as generate, O as getMachineUserToken, P as apply, R as apiCall, S as remove, T as listOAuth2Clients, V as loadAccessToken, _ as listWorkflowExecutions, b as show, c as resumeWorkflow, f as listWorkflows, g as getWorkflowExecution, i as deleteWorkspace, j as listMachineUsers, m as getWorkflow, n as listWorkspaces, o as createWorkspace, u as startWorkflow, v as truncate } from "../list-QT92XcP3.mjs";
4
4
  import { register } from "node:module";
5
5
 
6
6
  //#region src/cli/lib.ts
@@ -107380,6 +107380,15 @@ const createCommand = defineCommand({
107380
107380
  type: "string",
107381
107381
  description: "Folder ID to workspace associate with",
107382
107382
  alias: "f"
107383
+ },
107384
+ "profile-name": {
107385
+ type: "string",
107386
+ description: "Profile name to create",
107387
+ alias: "p"
107388
+ },
107389
+ "profile-user": {
107390
+ type: "string",
107391
+ description: "User email for the profile (defaults to current user)"
107383
107392
  }
107384
107393
  },
107385
107394
  run: withCommonArgs(async (args) => {
@@ -107390,8 +107399,39 @@ const createCommand = defineCommand({
107390
107399
  organizationId: args["organization-id"],
107391
107400
  folderId: args["folder-id"]
107392
107401
  });
107402
+ let profileInfo;
107403
+ const profileName = args["profile-name"];
107404
+ if (profileName) {
107405
+ const config = readPlatformConfig();
107406
+ if (config.profiles[profileName]) throw new Error(`Profile "${profileName}" already exists.`);
107407
+ const profileUser = args["profile-user"] || config.current_user;
107408
+ if (!profileUser) throw new Error("Current user not found. Please login or specify --profile-user to create a profile.");
107409
+ if (!config.users[profileUser]) throw new Error(`User "${profileUser}" not found.\nPlease verify your user name and login using 'tailor-sdk login' command.`);
107410
+ config.profiles[profileName] = {
107411
+ user: profileUser,
107412
+ workspace_id: workspace.id
107413
+ };
107414
+ writePlatformConfig(config);
107415
+ profileInfo = {
107416
+ name: profileName,
107417
+ user: profileUser,
107418
+ workspaceId: workspace.id
107419
+ };
107420
+ if (!args.json) logger.success(`Profile "${profileName}" created successfully.`);
107421
+ }
107393
107422
  if (!args.json) logger.success(`Workspace "${args.name}" created successfully.`);
107423
+ if (args.json && profileInfo) {
107424
+ logger.out({
107425
+ ...workspace,
107426
+ profile: profileInfo
107427
+ });
107428
+ return;
107429
+ }
107394
107430
  logger.out(workspace);
107431
+ if (profileInfo) {
107432
+ logger.out("Profile:");
107433
+ logger.out(profileInfo);
107434
+ }
107395
107435
  })
107396
107436
  });
107397
107437
 
@@ -107516,4 +107556,4 @@ const listCommand = defineCommand({
107516
107556
 
107517
107557
  //#endregion
107518
107558
  export { deploymentArgs as $, listCommand$3 as A, fetchLatestToken as B, removeCommand as C, getOAuth2Client as D, getCommand$1 as E, applyCommand as F, fetchAll as G, loadWorkspaceId as H, generateUserTypes as I, initOperatorClient as J, fetchUserInfo as K, loadConfig as L, generate as M, generateCommand as N, getMachineUserToken as O, apply as P, confirmationArgs as Q, apiCall as R, remove as S, listOAuth2Clients as T, readPlatformConfig as U, loadAccessToken as V, writePlatformConfig as W, PATScope as X, readPackageJson as Y, commonArgs as Z, listWorkflowExecutions as _, createCommand as a, show as b, resumeWorkflow as c, listCommand$1 as d, jsonArgs as et, listWorkflows as f, getWorkflowExecution as g, executionsCommand as h, deleteWorkspace as i, listMachineUsers as j, tokenCommand as k, startCommand as l, getWorkflow as m, listWorkspaces as n, workspaceArgs as nt, createWorkspace as o, getCommand as p, initOAuth2Client as q, deleteCommand as r, logger as rt, resumeCommand as s, listCommand as t, withCommonArgs as tt, startWorkflow as u, truncate as v, listCommand$2 as w, showCommand as x, truncateCommand as y, apiCommand as z };
107519
- //# sourceMappingURL=list-CafRw3ao.mjs.map
107559
+ //# sourceMappingURL=list-QT92XcP3.mjs.map