neatlogs-cli 0.2.0-team-test.1 → 0.2.0-team-test.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/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to `neatlogs-cli` are documented in this file.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 0.2.0-team-test.2
8
+
9
+ - Return input and resource-state exit codes for validated classifier errors,
10
+ while retaining server/contract exits for response limits, malformed problems,
11
+ and errors containing credential material.
12
+ - Include the merged Dev lifecycle, classifier, and bounded job contracts for
13
+ acceptance against the deployed Public API.
14
+
7
15
  ## 0.2.0-team-test.1
8
16
 
9
17
  - Add project archive, restore, soft deletion, and existing-member access commands.
package/dist/bin.js CHANGED
@@ -48208,6 +48208,7 @@ var public_openapi_default = {
48208
48208
  type: "string",
48209
48209
  enum: [
48210
48210
  "trace",
48211
+ "session",
48211
48212
  "span_type",
48212
48213
  "span_name"
48213
48214
  ]
@@ -48402,6 +48403,7 @@ var public_openapi_default = {
48402
48403
  type: "string",
48403
48404
  enum: [
48404
48405
  "trace",
48406
+ "session",
48405
48407
  "span_type",
48406
48408
  "span_name"
48407
48409
  ]
@@ -48625,6 +48627,7 @@ var public_openapi_default = {
48625
48627
  type: "string",
48626
48628
  enum: [
48627
48629
  "trace",
48630
+ "session",
48628
48631
  "span_type",
48629
48632
  "span_name"
48630
48633
  ]
@@ -49526,6 +49529,7 @@ var public_openapi_default = {
49526
49529
  type: "string",
49527
49530
  enum: [
49528
49531
  "trace",
49532
+ "session",
49529
49533
  "span_type",
49530
49534
  "span_name"
49531
49535
  ]
@@ -49726,6 +49730,7 @@ var public_openapi_default = {
49726
49730
  type: "string",
49727
49731
  enum: [
49728
49732
  "trace",
49733
+ "session",
49729
49734
  "span_type",
49730
49735
  "span_name"
49731
49736
  ]
@@ -49957,6 +49962,7 @@ var public_openapi_default = {
49957
49962
  type: "string",
49958
49963
  enum: [
49959
49964
  "trace",
49965
+ "session",
49960
49966
  "span_type",
49961
49967
  "span_name"
49962
49968
  ]
@@ -50030,7 +50036,8 @@ var public_openapi_default = {
50030
50036
  type: "string",
50031
50037
  enum: [
50032
50038
  "span",
50033
- "trace"
50039
+ "trace",
50040
+ "session"
50034
50041
  ]
50035
50042
  }
50036
50043
  },
@@ -50179,6 +50186,7 @@ var public_openapi_default = {
50179
50186
  type: "string",
50180
50187
  enum: [
50181
50188
  "trace",
50189
+ "session",
50182
50190
  "span_type",
50183
50191
  "span_name"
50184
50192
  ]
@@ -191886,7 +191894,7 @@ import { Command, CommanderError, Option } from "commander";
191886
191894
  // package.json
191887
191895
  var package_default = {
191888
191896
  name: "neatlogs-cli",
191889
- version: "0.2.0-team-test.1",
191897
+ version: "0.2.0-team-test.2",
191890
191898
  description: "Non-interactive CLI for the NeatLogs public API",
191891
191899
  homepage: "https://github.com/neatlogs/neatlogs-app#readme",
191892
191900
  license: "MIT",
@@ -201295,6 +201303,34 @@ async function parseGuestSubmissionRequest(stream) {
201295
201303
 
201296
201304
  // src/http.ts
201297
201305
  import { z as z40 } from "zod";
201306
+
201307
+ // src/http-errors.ts
201308
+ var STATUS_ERRORS = {
201309
+ 400: { code: "INVALID_REQUEST", exitCode: ExitCode.Usage },
201310
+ 401: { code: "AUTHENTICATION_FAILED", exitCode: ExitCode.Authentication },
201311
+ 403: { code: "FORBIDDEN", exitCode: ExitCode.Authorization },
201312
+ 404: { code: "NOT_FOUND", exitCode: ExitCode.NotFound },
201313
+ 409: { code: "CONFLICT", exitCode: ExitCode.Conflict },
201314
+ 413: { code: "PAYLOAD_TOO_LARGE", exitCode: ExitCode.Usage },
201315
+ 415: { code: "UNSUPPORTED_MEDIA_TYPE", exitCode: ExitCode.Usage },
201316
+ 422: { code: "UNPROCESSABLE_ENTITY", exitCode: ExitCode.ServerOrContract },
201317
+ 429: { code: "RATE_LIMITED", exitCode: ExitCode.RateLimitedOrUnavailable },
201318
+ 503: { code: "SERVICE_UNAVAILABLE", exitCode: ExitCode.RateLimitedOrUnavailable }
201319
+ };
201320
+ var CLASSIFIER_422_EXITS = {
201321
+ PUBLIC_CLASSIFIER_BUDGET_TOO_SMALL: ExitCode.Usage,
201322
+ PUBLIC_CLASSIFIER_DATASET_LABELS_INVALID: ExitCode.Usage,
201323
+ PUBLIC_CLASSIFIER_DATASET_NOT_READY: ExitCode.Conflict,
201324
+ PUBLIC_CLASSIFIER_LABEL_LIMIT: ExitCode.Usage,
201325
+ PUBLIC_CLASSIFIER_LABEL_REFERENCE_INVALID: ExitCode.Usage,
201326
+ PUBLIC_CLASSIFIER_NOT_READY: ExitCode.Conflict
201327
+ };
201328
+ function publicProblemExitCode(status2, validatedCode, fallback) {
201329
+ if (status2 !== 422 || !validatedCode) return fallback;
201330
+ return CLASSIFIER_422_EXITS[validatedCode] ?? fallback;
201331
+ }
201332
+
201333
+ // src/http.ts
201298
201334
  var ERROR_BODY_LIMIT_BYTES = 16 * 1024;
201299
201335
  var GUEST_TIMEOUT_MS = 1e4;
201300
201336
  var MAX_ATTEMPTS = 3;
@@ -201336,27 +201372,6 @@ var DEFAULT_RETRY_DEPENDENCIES = {
201336
201372
  await new Promise((resolve) => setTimeout(resolve, delayMs));
201337
201373
  }
201338
201374
  };
201339
- var STATUS_ERRORS = {
201340
- 400: { code: "INVALID_REQUEST", exitCode: ExitCode.Usage },
201341
- 401: { code: "AUTHENTICATION_FAILED", exitCode: ExitCode.Authentication },
201342
- 403: { code: "FORBIDDEN", exitCode: ExitCode.Authorization },
201343
- 404: { code: "NOT_FOUND", exitCode: ExitCode.NotFound },
201344
- 409: { code: "CONFLICT", exitCode: ExitCode.Conflict },
201345
- 413: { code: "PAYLOAD_TOO_LARGE", exitCode: ExitCode.Usage },
201346
- 415: { code: "UNSUPPORTED_MEDIA_TYPE", exitCode: ExitCode.Usage },
201347
- 422: {
201348
- code: "UNPROCESSABLE_ENTITY",
201349
- exitCode: ExitCode.ServerOrContract
201350
- },
201351
- 429: {
201352
- code: "RATE_LIMITED",
201353
- exitCode: ExitCode.RateLimitedOrUnavailable
201354
- },
201355
- 503: {
201356
- code: "SERVICE_UNAVAILABLE",
201357
- exitCode: ExitCode.RateLimitedOrUnavailable
201358
- }
201359
- };
201360
201375
  async function readBoundedText(response, limit2) {
201361
201376
  const declaredLength = Number(response.headers.get("content-length"));
201362
201377
  if (Number.isFinite(declaredLength) && declaredLength > limit2) {
@@ -201453,7 +201468,11 @@ async function errorFromResponse(response, forbiddenSecret, discardServerDiagnos
201453
201468
  const requestId3 = containsForbiddenSecret ? void 0 : bodyRequestId ?? safeString(headerRequestId, SAFE_REQUEST_ID);
201454
201469
  return new CliError({
201455
201470
  code: containsForbiddenSecret || gatedNotFound ? fallback.code : bodyCode ?? fallback.code,
201456
- exitCode: fallback.exitCode,
201471
+ exitCode: publicProblemExitCode(
201472
+ response.status,
201473
+ containsForbiddenSecret ? void 0 : trustedProblem?.code,
201474
+ fallback.exitCode
201475
+ ),
201457
201476
  ...containsForbiddenSecret || gatedNotFound || !trustedProblem ? {} : {
201458
201477
  detail: trustedProblem.detail,
201459
201478
  errors: trustedProblem.errors,
@@ -201660,6 +201679,7 @@ function preparePublicRequest(host, credential, projectId, handler2, input) {
201660
201679
  applyPublicSecretReplay(headers, handler2, input.secretReplayKey);
201661
201680
  return {
201662
201681
  body,
201682
+ credentialSecret: credential.value,
201663
201683
  generatedIdempotencyKey,
201664
201684
  headers,
201665
201685
  operationGate: operationGateFor(handler2.operationId),
@@ -201786,7 +201806,7 @@ async function decodePublicResponse(response, handler2, input, prepared) {
201786
201806
  throw errorWithGeneratedIdempotencyKey(
201787
201807
  await errorFromResponse(
201788
201808
  response,
201789
- input.secretReplayKey,
201809
+ input.secretReplayKey ?? prepared.credentialSecret,
201790
201810
  input.secretReplayKey !== void 0,
201791
201811
  prepared.operationGate
201792
201812
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neatlogs-cli",
3
- "version": "0.2.0-team-test.1",
3
+ "version": "0.2.0-team-test.2",
4
4
  "description": "Non-interactive CLI for the NeatLogs public API",
5
5
  "homepage": "https://github.com/neatlogs/neatlogs-app#readme",
6
6
  "license": "MIT",