@docyrus/docyrus 0.0.57 → 0.0.59

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/main.js CHANGED
@@ -139349,7 +139349,7 @@ function buildInputSchema(args2, env2, options2) {
139349
139349
  // package.json
139350
139350
  var package_default = {
139351
139351
  name: "@docyrus/docyrus",
139352
- version: "0.0.57",
139352
+ version: "0.0.59",
139353
139353
  private: false,
139354
139354
  description: "Docyrus API CLI",
139355
139355
  main: "./main.js",
@@ -140733,6 +140733,31 @@ function createAuthCli(dependencies) {
140733
140733
  });
140734
140734
  }
140735
140735
  });
140736
+ authCli.command("sandbox", {
140737
+ description: "Refresh and inject fresh authentication tokens into the active sandbox",
140738
+ options: external_exports.object({
140739
+ appId: external_exports.string().optional().describe("App ID; defaults to DOCYRUS_SANDBOX_APP_ID env var")
140740
+ }),
140741
+ run: async (context) => {
140742
+ const appId = context.options.appId?.trim() || getOptionalEnvValue(context.env, "DOCYRUS_SANDBOX_APP_ID");
140743
+ if (!appId) {
140744
+ throw new UserInputError(
140745
+ "App ID is required. Pass --appId or set the DOCYRUS_SANDBOX_APP_ID environment variable."
140746
+ );
140747
+ }
140748
+ const apiBaseUrl = await dependencies.environmentConfigService.getActiveApiBaseUrl();
140749
+ const apiClient = dependencies.createApiClient(apiBaseUrl);
140750
+ const response = await apiClient.request({
140751
+ method: "POST",
140752
+ path: `/ai/sandbox/app/${appId}/refreshAuth`
140753
+ });
140754
+ return await injectContext({
140755
+ apiBaseUrl,
140756
+ authStore: dependencies.authStore,
140757
+ payload: response.data
140758
+ });
140759
+ }
140760
+ });
140736
140761
  return authCli;
140737
140762
  }
140738
140763
 
@@ -151085,10 +151110,12 @@ function createReleaseCli(dependencies) {
151085
151110
  options: external_exports.object({
151086
151111
  bump: external_exports.enum(BUMP_TYPES).optional().describe("SemVer bump type (auto-detect if omitted)"),
151087
151112
  version: external_exports.string().optional().describe("Explicit target version (e.g., 1.0.0)"),
151113
+ appId: external_exports.string().optional().describe("App ID for creating a release record; defaults to DOCYRUS_SANDBOX_APP_ID env var"),
151088
151114
  dryRun: external_exports.boolean().optional().describe("Preview changes without committing"),
151089
151115
  skipChangelog: external_exports.boolean().optional().describe("Skip changelog generation"),
151090
151116
  skipTag: external_exports.boolean().optional().describe("Skip git tag creation"),
151091
- skipGithubRelease: external_exports.boolean().optional().describe("Skip GitHub release creation")
151117
+ skipGithubRelease: external_exports.boolean().optional().describe("Skip GitHub release creation"),
151118
+ skipDbRelease: external_exports.boolean().optional().describe("Skip creating a release record in the database")
151092
151119
  }),
151093
151120
  run: async (context) => {
151094
151121
  const result = await executeRelease({
@@ -151114,6 +151141,23 @@ function createReleaseCli(dependencies) {
151114
151141
  ` Previous: ${result.previousVersion}`,
151115
151142
  ` Commits: ${result.commitCount}`
151116
151143
  ].join("\n"));
151144
+ if (!context.options.skipDbRelease) {
151145
+ const appId = context.options.appId?.trim() || getOptionalEnvValue(context.env, "DOCYRUS_SANDBOX_APP_ID");
151146
+ if (appId) {
151147
+ const apiBaseUrl = await dependencies.environmentConfigService.getActiveApiBaseUrl();
151148
+ const apiClient = dependencies.createApiClient(apiBaseUrl);
151149
+ const releaseRecord = await apiClient.request({
151150
+ method: "POST",
151151
+ path: `/dev/apps/${appId}/releases`,
151152
+ body: {
151153
+ version: result.nextVersion,
151154
+ tagName: `v${result.nextVersion}`,
151155
+ changelog: result.changelogEntry || null
151156
+ }
151157
+ });
151158
+ maybePrintHuman3(context, ` Release record created: ${releaseRecord.data.id}`);
151159
+ }
151160
+ }
151117
151161
  }
151118
151162
  return await wrapPayload2(dependencies, result);
151119
151163
  }
@@ -154676,6 +154720,7 @@ function createDocyrusCli(params) {
154676
154720
  settingsPaths
154677
154721
  }));
154678
154722
  cli2.command(createReleaseCli({
154723
+ createApiClient,
154679
154724
  environmentConfigService,
154680
154725
  authStore,
154681
154726
  settingsPaths