@takeshape/schema 12.16.1 → 12.17.3

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.
@@ -64,6 +64,9 @@ class ToolExecutionGraphQLImpl {
64
64
  this.#execution = execution;
65
65
  this.type = 'graphql';
66
66
  }
67
+ get path() {
68
+ return this.#execution.path;
69
+ }
67
70
  get optimizeResponse() {
68
71
  return this.#execution.optimizeResponse;
69
72
  }
@@ -76,6 +76,7 @@ type QueryGeneratorParams = {
76
76
  export type QueryGenerator = (schema: ProjectSchema, params: QueryGeneratorParams) => string;
77
77
  export interface ToolExecutionGraphQL {
78
78
  type: 'graphql';
79
+ path?: string;
79
80
  optimizeResponse?: {
80
81
  compactPagination?: boolean;
81
82
  };
@@ -1,4 +1,5 @@
1
1
  import type { ProjectSchemaMigrationContext } from '../migration/index.ts';
2
2
  import type { AnyProjectSchemaJSON, ProjectSchemaJSON } from './index.ts';
3
3
  export declare function migrateToLatestProjectSchema(context: ProjectSchemaMigrationContext, projectSchema: AnyProjectSchemaJSON): Promise<ProjectSchemaJSON>;
4
- export declare function ensureLatest(context: ProjectSchemaMigrationContext, schema?: AnyProjectSchemaJSON): Promise<ProjectSchemaJSON | undefined>;
4
+ export declare function ensureLatest(context: ProjectSchemaMigrationContext, schema: AnyProjectSchemaJSON): Promise<ProjectSchemaJSON>;
5
+ export declare function ensureLatest(context: ProjectSchemaMigrationContext, schema: undefined): Promise<undefined>;
@@ -235,7 +235,10 @@ export async function migrateToLatestProjectSchema(context, projectSchema) {
235
235
  return projectSchema;
236
236
  }
237
237
  export async function ensureLatest(context, schema) {
238
- if (!schema || isLatestProjectSchemaJSON(schema)) {
238
+ if (!schema) {
239
+ return schema;
240
+ }
241
+ if (isLatestProjectSchemaJSON(schema)) {
239
242
  return schema;
240
243
  }
241
244
  return migrateToLatestProjectSchema(context, schema);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/schema",
3
- "version": "12.16.1",
3
+ "version": "12.17.3",
4
4
  "description": "TakeShape Schema",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -57,9 +57,9 @@
57
57
  "p-reduce": "3.0.0",
58
58
  "semver": "7.7.2",
59
59
  "tiny-invariant": "1.3.3",
60
- "@takeshape/errors": "12.16.1",
61
- "@takeshape/json-schema": "12.16.1",
62
- "@takeshape/util": "12.16.1"
60
+ "@takeshape/json-schema": "12.17.3",
61
+ "@takeshape/util": "12.17.3",
62
+ "@takeshape/errors": "12.17.3"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@aws-sdk/client-s3": "3.848.0",
@@ -77,8 +77,8 @@
77
77
  "glob": "11.0.1",
78
78
  "json-schema-to-ts": "3.1.1",
79
79
  "shortid": "2.2.16",
80
- "@takeshape/infra": "12.16.1",
81
- "@takeshape/logger": "12.16.1"
80
+ "@takeshape/infra": "12.17.3",
81
+ "@takeshape/logger": "12.17.3"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=24"