perstack 0.0.101 → 0.0.102

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/bin/cli.js CHANGED
@@ -21174,15 +21174,15 @@ async function expertCreateHandler(scopeName, options) {
21174
21174
  console.log(` Name: ${draft.name}`);
21175
21175
  console.log(` ID: ${draft.id}`);
21176
21176
  }
21177
- async function expertDeleteHandler(draftId, options) {
21177
+ async function expertDeleteHandler(draftScopeId, options) {
21178
21178
  const result = await createStudioClient({
21179
21179
  apiKey: resolveApiKey(options.apiKey),
21180
21180
  baseUrl: options.baseUrl
21181
- }).expertDrafts.delete(draftId);
21181
+ }).expertDrafts.delete(draftScopeId);
21182
21182
  if (!result.ok) throw new PerstackError(`Failed to delete draft: ${result.error.message}`);
21183
- console.log(`Draft scope deleted: ${draftId}`);
21183
+ console.log(`Draft scope deleted: ${draftScopeId}`);
21184
21184
  }
21185
- async function expertPushHandler(draftId, options) {
21185
+ async function expertPushHandler(draftScopeId, options) {
21186
21186
  const client = createStudioClient({
21187
21187
  apiKey: resolveApiKey(options.apiKey),
21188
21188
  baseUrl: options.baseUrl
@@ -21190,7 +21190,7 @@ async function expertPushHandler(draftId, options) {
21190
21190
  const perstackConfig = await getPerstackConfig(options.config);
21191
21191
  if (!perstackConfig.experts || Object.keys(perstackConfig.experts).length === 0) throw new PerstackError("No experts defined in perstack.toml");
21192
21192
  const experts = Object.entries(perstackConfig.experts).map(([key, configExpert]) => configExpertToExpert(key, configExpert));
21193
- const result = await client.expertDrafts.refs.create(draftId, { experts });
21193
+ const result = await client.expertDrafts.refs.create(draftScopeId, { experts });
21194
21194
  if (!result.ok) throw new PerstackError(`Failed to push experts: ${result.error.message}`);
21195
21195
  const { draftRef, definition } = result.data.data;
21196
21196
  const expertKeys = Object.keys(definition.experts);
@@ -21198,11 +21198,11 @@ async function expertPushHandler(draftId, options) {
21198
21198
  console.log(` Ref ID: ${draftRef.id}`);
21199
21199
  console.log(` Experts: ${expertKeys.join(", ")}`);
21200
21200
  }
21201
- async function expertRefsHandler(draftId, options) {
21201
+ async function expertRefsHandler(draftScopeId, options) {
21202
21202
  const result = await createStudioClient({
21203
21203
  apiKey: resolveApiKey(options.apiKey),
21204
21204
  baseUrl: options.baseUrl
21205
- }).expertDrafts.refs.list(draftId, {
21205
+ }).expertDrafts.refs.list(draftScopeId, {
21206
21206
  take: options.take,
21207
21207
  skip: options.skip
21208
21208
  });
@@ -21249,14 +21249,14 @@ async function expertYankHandler(key, options) {
21249
21249
 
21250
21250
  //#endregion
21251
21251
  //#region ../../packages/studio/src/version-handlers.ts
21252
- async function expertVersionHandler(draftId, refId, version, options) {
21252
+ async function expertVersionHandler(draftScopeId, refId, version, options) {
21253
21253
  const client = createStudioClient({
21254
21254
  apiKey: resolveApiKey(options.apiKey),
21255
21255
  baseUrl: options.baseUrl
21256
21256
  });
21257
21257
  let readme;
21258
21258
  if (options.readme) readme = await readFile(options.readme, "utf-8");
21259
- const result = await client.expertDrafts.refs.assignVersion(draftId, refId, {
21259
+ const result = await client.expertDrafts.refs.assignVersion(draftScopeId, refId, {
21260
21260
  version,
21261
21261
  tag: options.tag,
21262
21262
  readme
@@ -119756,7 +119756,7 @@ async function startHandler(expertKey, query, options, handlerOptions) {
119756
119756
  //#endregion
119757
119757
  //#region package.json
119758
119758
  var name = "perstack";
119759
- var version = "0.0.101";
119759
+ var version = "0.0.102";
119760
119760
  var description = "PerStack CLI";
119761
119761
 
119762
119762
  //#endregion
@@ -119820,23 +119820,23 @@ expertCmd.command("create").description("Create a new draft scope").argument("<s
119820
119820
  ...options
119821
119821
  });
119822
119822
  });
119823
- expertCmd.command("delete").description("Delete a draft scope").argument("<draftId>", "Draft scope ID").action(async function(draftId) {
119824
- await expertDeleteHandler(draftId, getParentOptions(this));
119823
+ expertCmd.command("delete").description("Delete a draft scope").argument("<draftScopeId>", "Draft scope ID").action(async function(draftScopeId) {
119824
+ await expertDeleteHandler(draftScopeId, getParentOptions(this));
119825
119825
  });
119826
- expertCmd.command("push").description("Push local expert definitions to a draft ref").argument("<draftId>", "Draft scope ID").option("--config <path>", "Path to perstack.toml config file").action(async function(draftId, options) {
119827
- await expertPushHandler(draftId, {
119826
+ expertCmd.command("push").description("Push local expert definitions to a draft ref").argument("<draftScopeId>", "Draft scope ID").option("--config <path>", "Path to perstack.toml config file").action(async function(draftScopeId, options) {
119827
+ await expertPushHandler(draftScopeId, {
119828
119828
  ...getParentOptions(this),
119829
119829
  ...options
119830
119830
  });
119831
119831
  });
119832
- expertCmd.command("refs").description("List draft refs for a draft scope").argument("<draftId>", "Draft scope ID").option("--take <n>", "Limit results", Number.parseInt).option("--skip <n>", "Offset", Number.parseInt).action(async function(draftId, options) {
119833
- await expertRefsHandler(draftId, {
119832
+ expertCmd.command("refs").description("List draft refs for a draft scope").argument("<draftScopeId>", "Draft scope ID").option("--take <n>", "Limit results", Number.parseInt).option("--skip <n>", "Offset", Number.parseInt).action(async function(draftScopeId, options) {
119833
+ await expertRefsHandler(draftScopeId, {
119834
119834
  ...getParentOptions(this),
119835
119835
  ...options
119836
119836
  });
119837
119837
  });
119838
- expertCmd.command("version").description("Assign a version to a draft ref").argument("<draftId>", "Draft scope ID").argument("<refId>", "Draft ref ID").argument("<version>", "Semantic version (e.g., 1.0.0)").option("--tag <tag>", "Version tag (e.g., latest)").option("--readme <path>", "Path to README file").action(async function(draftId, refId, version, options) {
119839
- await expertVersionHandler(draftId, refId, version, {
119838
+ expertCmd.command("version").description("Assign a version to a draft ref").argument("<draftScopeId>", "Draft scope ID").argument("<refId>", "Draft ref ID").argument("<version>", "Semantic version (e.g., 1.0.0)").option("--tag <tag>", "Version tag (e.g., latest)").option("--readme <path>", "Path to README file").action(async function(draftScopeId, refId, version, options) {
119839
+ await expertVersionHandler(draftScopeId, refId, version, {
119840
119840
  ...getParentOptions(this),
119841
119841
  ...options
119842
119842
  });