@palantir/pack.document-schema.type-gen 0.13.0 → 0.14.0

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.
Files changed (85) hide show
  1. package/build/esm/commands/asset/assetUpdateSchemaHandler.js +3 -2
  2. package/build/esm/commands/asset/assetUpdateSchemaHandler.js.map +1 -1
  3. package/build/esm/commands/ir/__tests__/resolveIrInput.test.js +88 -0
  4. package/build/esm/commands/ir/__tests__/resolveIrInput.test.js.map +1 -0
  5. package/build/esm/commands/ir/irDeployHandler.js +4 -3
  6. package/build/esm/commands/ir/irDeployHandler.js.map +1 -1
  7. package/build/esm/commands/ir/irGenAssetHandler.js +2 -31
  8. package/build/esm/commands/ir/irGenAssetHandler.js.map +1 -1
  9. package/build/esm/commands/ir/registerIrCommands.js +1 -1
  10. package/build/esm/commands/ir/registerIrCommands.js.map +1 -1
  11. package/build/esm/commands/ir/resolveIrInput.js +50 -0
  12. package/build/esm/commands/ir/resolveIrInput.js.map +1 -0
  13. package/build/esm/commands/schema/registerSchemaCommands.js +1 -1
  14. package/build/esm/commands/schema/registerSchemaCommands.js.map +1 -1
  15. package/build/esm/commands/schema/schemaIrHandler.js +14 -4
  16. package/build/esm/commands/schema/schemaIrHandler.js.map +1 -1
  17. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/custom-discriminant.js +1 -1
  18. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/custom-discriminant.js.map +1 -1
  19. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/external-refs.js +1 -1
  20. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/external-refs.js.map +1 -1
  21. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/simple-record.js +1 -1
  22. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/simple-record.js.map +1 -1
  23. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/union-types.js +1 -1
  24. package/build/esm/utils/ir/__tests__/__snapshots__/generateModelsFromIr/union-types.js.map +1 -1
  25. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/array-and-map-types.js +1 -1
  26. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/array-and-map-types.js.map +1 -1
  27. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/boolean-fields.js +1 -1
  28. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/boolean-fields.js.map +1 -1
  29. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/custom-discriminant.js +1 -1
  30. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/custom-discriminant.js.map +1 -1
  31. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/datetime-fields.js +1 -1
  32. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/datetime-fields.js.map +1 -1
  33. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/simple-records.js +1 -1
  34. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/simple-records.js.map +1 -1
  35. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/union-before-records.js +1 -1
  36. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/union-before-records.js.map +1 -1
  37. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/union-types.js +1 -1
  38. package/build/esm/utils/ir/__tests__/__snapshots__/generateZodSchemasFromIr/union-types.js.map +1 -1
  39. package/build/esm/utils/schema/__tests__/__snapshots__/generateDocumentTypeFromSchema/with-name-and-description.js +1 -1
  40. package/build/esm/utils/schema/__tests__/__snapshots__/generateDocumentTypeFromSchema/with-name-and-description.js.map +1 -1
  41. package/build/esm/utils/schema/__tests__/__snapshots__/generateVersionsFromSchema/single-version.js.map +1 -1
  42. package/build/esm/utils/schema/__tests__/__snapshots__/generateVersionsFromSchema/three-version-chain.js.map +1 -1
  43. package/build/esm/utils/schema/__tests__/__snapshots__/generateVersionsFromSchema/two-version.js.map +1 -1
  44. package/build/esm/utils/schema/__tests__/fixtures.js +11 -0
  45. package/build/esm/utils/schema/__tests__/fixtures.js.map +1 -1
  46. package/build/esm/utils/schema/__tests__/generateInternalFromSchema.test.js +6 -1
  47. package/build/esm/utils/schema/__tests__/generateInternalFromSchema.test.js.map +1 -1
  48. package/build/esm/utils/schema/__tests__/resolveSchemaChain.test.js +13 -0
  49. package/build/esm/utils/schema/__tests__/resolveSchemaChain.test.js.map +1 -1
  50. package/build/esm/utils/schema/generateInternalFromSchema.js +54 -33
  51. package/build/esm/utils/schema/generateInternalFromSchema.js.map +1 -1
  52. package/build/esm/utils/schema/generateModelMetadataFromSchema.js +12 -10
  53. package/build/esm/utils/schema/generateModelMetadataFromSchema.js.map +1 -1
  54. package/build/esm/utils/schema/generateScopeFromSchema.js +13 -1
  55. package/build/esm/utils/schema/generateScopeFromSchema.js.map +1 -1
  56. package/build/esm/utils/schema/resolveSchemaChain.js +37 -11
  57. package/build/esm/utils/schema/resolveSchemaChain.js.map +1 -1
  58. package/build/esm/utils/steps/__tests__/__snapshots__/types/arrayFields.js.map +1 -1
  59. package/build/esm/utils/steps/__tests__/__snapshots__/types/customDiscriminant.js +1 -1
  60. package/build/esm/utils/steps/__tests__/__snapshots__/types/customDiscriminant.js.map +1 -1
  61. package/build/esm/utils/steps/__tests__/__snapshots__/types/generateTypeScriptInterfaces.js +1 -1
  62. package/build/esm/utils/steps/__tests__/__snapshots__/types/generateTypeScriptInterfaces.js.map +1 -1
  63. package/build/esm/utils/steps/__tests__/__snapshots__/types/refTypes.js.map +1 -1
  64. package/build/esm/utils/steps/__tests__/__snapshots__/types/simpleRecord.js.map +1 -1
  65. package/build/esm/utils/steps/__tests__/__snapshots__/types/simpleSteps.js +1 -1
  66. package/build/esm/utils/steps/__tests__/__snapshots__/types/simpleSteps.js.map +1 -1
  67. package/build/types/commands/asset/assetUpdateSchemaHandler.d.ts.map +1 -1
  68. package/build/types/commands/ir/__tests__/resolveIrInput.test.d.ts +2 -0
  69. package/build/types/commands/ir/__tests__/resolveIrInput.test.d.ts.map +1 -0
  70. package/build/types/commands/ir/irDeployHandler.d.ts.map +1 -1
  71. package/build/types/commands/ir/irGenAssetHandler.d.ts.map +1 -1
  72. package/build/types/commands/ir/registerIrCommands.d.ts.map +1 -1
  73. package/build/types/commands/ir/resolveIrInput.d.ts +8 -0
  74. package/build/types/commands/ir/resolveIrInput.d.ts.map +1 -0
  75. package/build/types/commands/schema/registerSchemaCommands.d.ts.map +1 -1
  76. package/build/types/commands/schema/schemaIrHandler.d.ts +4 -3
  77. package/build/types/commands/schema/schemaIrHandler.d.ts.map +1 -1
  78. package/build/types/utils/schema/__tests__/fixtures.d.ts +1 -0
  79. package/build/types/utils/schema/__tests__/fixtures.d.ts.map +1 -1
  80. package/build/types/utils/schema/generateInternalFromSchema.d.ts.map +1 -1
  81. package/build/types/utils/schema/generateModelMetadataFromSchema.d.ts.map +1 -1
  82. package/build/types/utils/schema/generateScopeFromSchema.d.ts.map +1 -1
  83. package/build/types/utils/schema/resolveSchemaChain.d.ts +13 -5
  84. package/build/types/utils/schema/resolveSchemaChain.d.ts.map +1 -1
  85. package/package.json +3 -3
@@ -121,6 +121,15 @@ export function resolveMinVersion(chain, minSupportedVersion) {
121
121
  minVersion: minSupportedVersion ?? latestVersion
122
122
  };
123
123
  }
124
+ function capVersionedIrChain(chain, maxVersion) {
125
+ if (maxVersion == null) {
126
+ return chain;
127
+ }
128
+ if (!chain.some(c => c.version === maxVersion)) {
129
+ throw new Error(`maxVersion ${maxVersion} is not in the schema chain ` + `(available versions: ${chain.map(c => c.version).join(", ")})`);
130
+ }
131
+ return chain.filter(c => c.version <= maxVersion);
132
+ }
124
133
 
125
134
  /**
126
135
  * Collect the version chain and resolve min/latest versions.
@@ -130,8 +139,8 @@ export function resolveMinVersion(chain, minSupportedVersion) {
130
139
  * defaults.
131
140
  * Throws on empty chain or invalid minSupportedVersion.
132
141
  */
133
- export function resolveSchemaChain(schema, minSupportedVersion, identity = {}) {
134
- const chain = collectVersionedIrChain(schema, identity);
142
+ export function resolveSchemaChain(schema, minSupportedVersion, identity = {}, maxVersion) {
143
+ const chain = capVersionedIrChain(collectVersionedIrChain(schema, identity), maxVersion);
135
144
  const {
136
145
  latestVersion,
137
146
  minVersion
@@ -182,16 +191,33 @@ export function stripDeprecatedFieldsForSdk(chain) {
182
191
  }
183
192
 
184
193
  /**
185
- * True if any migration in the chain declares a non-empty `derivedFrom`. Drives
186
- * whether the generated SDK emits `DocumentModel` as a factory (requires the
187
- * app to supply typed upgrade functions) or as a const (no upgrade functions needed).
194
+ * True if the chain has any field that requires a runtime upgrade function.
195
+ * Drives whether the generated SDK emits `DocumentModel` as a factory
196
+ * (requires the app to supply typed upgrade functions) or as a const.
197
+ *
198
+ * Two cases trigger this:
199
+ * - A field declares `derivedFrom` with one or more source fields — the app
200
+ * must supply a forward function.
201
+ * - A required field is added in a version past v1 (no `derivedFrom`) — the
202
+ * app must supply a zero-arg thunk; `undefined` is not a legal value.
203
+ *
204
+ * Optional additive fields don't trigger it; the lens leaves them alone.
188
205
  */
189
- export function chainHasDerivedFields(chain) {
190
- for (const entry of chain) {
191
- if (entry.migrations == null) continue;
192
- for (const recordMigrations of Object.values(entry.migrations)) {
193
- for (const fieldMigration of Object.values(recordMigrations)) {
194
- if (fieldMigration.derivedFrom.length > 0) return true;
206
+ export function chainNeedsUpgradeFns(chain) {
207
+ for (let i = 1; i < chain.length; i++) {
208
+ const prevEntry = chain[i - 1];
209
+ const currEntry = chain[i];
210
+ for (const [modelKey, currModelDef] of Object.entries(currEntry.ir.models)) {
211
+ if (currModelDef.type !== "record") continue;
212
+ const prevModelDef = prevEntry.ir.models[modelKey];
213
+ if (prevModelDef == null || prevModelDef.type !== "record") continue;
214
+ const prevFields = new Set(prevModelDef.record.fields.map(f => f.key));
215
+ const recordMigrations = currEntry.migrations?.[modelKey];
216
+ for (const field of currModelDef.record.fields) {
217
+ if (prevFields.has(field.key)) continue;
218
+ const derivedFrom = recordMigrations?.[field.key]?.derivedFrom ?? [];
219
+ if (derivedFrom.length > 0) return true;
220
+ if (field.isOptional !== true) return true;
195
221
  }
196
222
  }
197
223
  }
@@ -1 +1 @@
1
- {"version":3,"file":"resolveSchemaChain.js","names":["IModelDef","IModelDefCtor","convertSchemaToIr","collectVersionedIrChain","input","identity","schemas","collectSchemaDefinitions","provenances","deriveProvenance","map","schema","index","version","ir","models","name","description","type","migrations","serializeMigrations","current","unshift","previous","firstModelVersions","Map","firstFieldVersions","modelVersions","fieldVersions","modelKey","modelDef","Object","entries","has","set","get","fieldVersionsForModel","fields","fieldKey","keys","length","deprecations","undefined","result","fieldEntries","fieldName","migration","derivedFrom","resolveMinVersion","chain","minSupportedVersion","Error","latestVersion","some","c","join","minVersion","resolveSchemaChain","stripDeprecatedFieldsForSdk","entry","record","filter","field","dep","metadata","deprecatedFromVersion","chainHasDerivedFields","recordMigrations","values","fieldMigration"],"sources":["resolveSchemaChain.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SchemaDefinition, VersionMigrations } from \"@palantir/pack.schema\";\nimport type {\n IModelDef,\n IRealTimeDocumentSchema,\n} from \"../../lib/pack-docschema-api/pack-docschema-ir/index.js\";\nimport { IModelDef as IModelDefCtor } from \"../../lib/pack-docschema-api/pack-docschema-ir/index.js\";\nimport type { SchemaProvenance } from \"../steps/convertStepsToIr.js\";\nimport { convertSchemaToIr } from \"../steps/convertStepsToIr.js\";\n\n/** JSON-serializable form of a single field migration. */\nexport interface SerializedFieldMigration {\n readonly derivedFrom: readonly string[];\n}\n\n/** Serialized migrations keyed by `[recordModelName][fieldName]`. */\nexport type SerializedVersionMigrations = Record<\n string,\n Record<string, SerializedFieldMigration>\n>;\n\nexport interface VersionedIrEntry {\n version: number;\n ir: IRealTimeDocumentSchema;\n migrations?: SerializedVersionMigrations;\n}\n\nexport interface ResolvedIrChain {\n chain: VersionedIrEntry[];\n latestVersion: number;\n minVersion: number;\n}\n\nexport interface IrChainPayload {\n __comment?: string;\n latestVersion: number;\n minSupportedVersion?: number;\n chain: VersionedIrEntry[];\n}\n\nexport interface SchemaIdentity {\n readonly name?: string;\n readonly description?: string;\n}\n\nfunction collectVersionedIrChain(\n input: SchemaDefinition,\n identity: SchemaIdentity,\n): VersionedIrEntry[] {\n const schemas = collectSchemaDefinitions(input);\n const provenances = deriveProvenance(schemas);\n\n return schemas.map((schema, index): VersionedIrEntry => ({\n version: schema.version,\n ir: convertSchemaToIr(\n schema.models,\n { version: schema.version, name: identity.name, description: identity.description },\n provenances[index]!,\n ),\n ...(schema.type === \"versioned\" ? { migrations: serializeMigrations(schema.migrations) } : {}),\n }));\n}\n\nfunction collectSchemaDefinitions(input: SchemaDefinition): SchemaDefinition[] {\n const schemas: SchemaDefinition[] = [];\n let current: SchemaDefinition = input;\n\n while (current.type === \"versioned\") {\n schemas.unshift(current);\n current = current.previous;\n }\n schemas.unshift(current);\n\n return schemas;\n}\n\n/**\n * Build field/model provenance by walking the version chain from oldest to\n * newest. The first version where a model key or record field appears is the\n * version stamped into IR metadata.\n */\nfunction deriveProvenance(schemas: readonly SchemaDefinition[]): SchemaProvenance[] {\n const firstModelVersions = new Map<string, number>();\n const firstFieldVersions = new Map<string, Map<string, number>>();\n\n return schemas.map(schema => {\n const modelVersions: Record<string, number> = {};\n const fieldVersions: Record<string, Record<string, number>> = {};\n\n for (const [modelKey, modelDef] of Object.entries(schema.models)) {\n if (!firstModelVersions.has(modelKey)) {\n firstModelVersions.set(modelKey, schema.version);\n }\n modelVersions[modelKey] = firstModelVersions.get(modelKey)!;\n\n if (modelDef.type !== \"record\") continue;\n\n let fieldVersionsForModel = firstFieldVersions.get(modelKey);\n if (fieldVersionsForModel == null) {\n fieldVersionsForModel = new Map<string, number>();\n firstFieldVersions.set(modelKey, fieldVersionsForModel);\n }\n\n const fields: Record<string, number> = {};\n for (const fieldKey of Object.keys(modelDef.fields)) {\n if (!fieldVersionsForModel.has(fieldKey)) {\n fieldVersionsForModel.set(fieldKey, schema.version);\n }\n fields[fieldKey] = fieldVersionsForModel.get(fieldKey)!;\n }\n\n if (Object.keys(fields).length > 0) {\n fieldVersions[modelKey] = fields;\n }\n }\n\n return {\n fieldVersions,\n modelVersions,\n deprecations: \"deprecations\" in schema ? schema.deprecations : undefined,\n };\n });\n}\n\n/** Convert schema-builder migrations to their JSON-serializable form. */\nfunction serializeMigrations(\n migrations: VersionMigrations | undefined,\n): SerializedVersionMigrations | undefined {\n if (migrations == null) return undefined;\n const result: SerializedVersionMigrations = {};\n for (const [modelKey, fields] of Object.entries(migrations)) {\n const fieldEntries: Record<string, SerializedFieldMigration> = {};\n for (const [fieldName, migration] of Object.entries(fields)) {\n fieldEntries[fieldName] = {\n derivedFrom: [...migration.derivedFrom],\n };\n }\n result[modelKey] = fieldEntries;\n }\n return result;\n}\n\n/**\n * Validate `minSupportedVersion` against an already-resolved chain and return\n * the effective `minVersion`. Throws on invalid input.\n */\nexport function resolveMinVersion(\n chain: VersionedIrEntry[],\n minSupportedVersion: number | undefined,\n): { latestVersion: number; minVersion: number } {\n if (chain.length === 0) {\n throw new Error(\"Schema version chain is empty\");\n }\n\n const latestVersion = chain[chain.length - 1]!.version;\n\n if (minSupportedVersion != null && !chain.some(c => c.version === minSupportedVersion)) {\n throw new Error(\n `minSupportedVersion ${minSupportedVersion} is not in the schema chain `\n + `(available versions: ${chain.map(c => c.version).join(\", \")})`,\n );\n }\n\n return {\n latestVersion,\n minVersion: minSupportedVersion ?? latestVersion,\n };\n}\n\n/**\n * Collect the version chain and resolve min/latest versions.\n * Each version's models are converted to IR (IRealTimeDocumentSchema).\n * `identity.name` / `identity.description` are embedded into each chain entry's\n * IR; when omitted (e.g. test callers), `convertSchemaToIr` falls back to its\n * defaults.\n * Throws on empty chain or invalid minSupportedVersion.\n */\nexport function resolveSchemaChain(\n schema: SchemaDefinition,\n minSupportedVersion?: number,\n identity: SchemaIdentity = {},\n): ResolvedIrChain {\n const chain = collectVersionedIrChain(schema, identity);\n const { latestVersion, minVersion } = resolveMinVersion(chain, minSupportedVersion);\n return { chain, latestVersion, minVersion };\n}\n\n/**\n * Return a copy of the chain with deprecated fields removed from every version\n * at or after the version in which they were deprecated.\n *\n * The SDK type generators (`writeAllSdkFiles` and friends) must treat a\n * deprecated field exactly as a removed field: it disappears from that version's\n * public read/write types and per-version internal types, and the prev/curr diff\n * records it as a `removedField` (driving the upgrade lens). The field is still\n * collected into the all-versions `__Internal` type from earlier versions, which\n * are left untouched.\n */\nexport function stripDeprecatedFieldsForSdk(chain: VersionedIrEntry[]): VersionedIrEntry[] {\n return chain.map((entry): VersionedIrEntry => {\n const models: Record<string, IModelDef> = {};\n for (const [modelKey, modelDef] of Object.entries(entry.ir.models)) {\n if (modelDef.type === \"record\") {\n const fields = modelDef.record.fields.filter(field => {\n const dep = field.metadata.deprecatedFromVersion;\n return dep == null || entry.version < dep;\n });\n models[modelKey] = IModelDefCtor.record({ ...modelDef.record, fields });\n } else {\n models[modelKey] = modelDef;\n }\n }\n return { ...entry, ir: { ...entry.ir, models } };\n });\n}\n\n/**\n * True if any migration in the chain declares a non-empty `derivedFrom`. Drives\n * whether the generated SDK emits `DocumentModel` as a factory (requires the\n * app to supply typed upgrade functions) or as a const (no upgrade functions needed).\n */\nexport function chainHasDerivedFields(chain: VersionedIrEntry[]): boolean {\n for (const entry of chain) {\n if (entry.migrations == null) continue;\n for (const recordMigrations of Object.values(entry.migrations)) {\n for (const fieldMigration of Object.values(recordMigrations)) {\n if (fieldMigration.derivedFrom.length > 0) return true;\n }\n }\n }\n return false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,SAAS,IAAIC,aAAa,QAAQ,yDAAyD;AAEpG,SAASC,iBAAiB,QAAQ,8BAA8B;;AAEhE;;AAKA;;AA8BA,SAASC,uBAAuBA,CAC9BC,KAAuB,EACvBC,QAAwB,EACJ;EACpB,MAAMC,OAAO,GAAGC,wBAAwB,CAACH,KAAK,CAAC;EAC/C,MAAMI,WAAW,GAAGC,gBAAgB,CAACH,OAAO,CAAC;EAE7C,OAAOA,OAAO,CAACI,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,MAAwB;IACvDC,OAAO,EAAEF,MAAM,CAACE,OAAO;IACvBC,EAAE,EAAEZ,iBAAiB,CACnBS,MAAM,CAACI,MAAM,EACb;MAAEF,OAAO,EAAEF,MAAM,CAACE,OAAO;MAAEG,IAAI,EAAEX,QAAQ,CAACW,IAAI;MAAEC,WAAW,EAAEZ,QAAQ,CAACY;IAAY,CAAC,EACnFT,WAAW,CAACI,KAAK,CACnB,CAAC;IACD,IAAID,MAAM,CAACO,IAAI,KAAK,WAAW,GAAG;MAAEC,UAAU,EAAEC,mBAAmB,CAACT,MAAM,CAACQ,UAAU;IAAE,CAAC,GAAG,CAAC,CAAC;EAC/F,CAAC,CAAC,CAAC;AACL;AAEA,SAASZ,wBAAwBA,CAACH,KAAuB,EAAsB;EAC7E,MAAME,OAA2B,GAAG,EAAE;EACtC,IAAIe,OAAyB,GAAGjB,KAAK;EAErC,OAAOiB,OAAO,CAACH,IAAI,KAAK,WAAW,EAAE;IACnCZ,OAAO,CAACgB,OAAO,CAACD,OAAO,CAAC;IACxBA,OAAO,GAAGA,OAAO,CAACE,QAAQ;EAC5B;EACAjB,OAAO,CAACgB,OAAO,CAACD,OAAO,C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AG,GAAGD,KAAK,CAACE,QAAQ,CAACC,qBAAqB;UAChD,OAAOF,GAAG,IAAI,IAAI,IAAIJ,KAAK,CAAC9C,OAAO,GAAGkD,GAAG;QAC3C,CAAC,CAAC;QACFhD,MAAM,CAACc,QAAQ,CAAC,GAAG5B,aAAa,CAAC2D,MAAM,CAAC;UAAE,GAAG9B,QAAQ,CAAC8B,MAAM;UAAEvB;QAAO,CAAC,CAAC;MACzE,CAAC,MAAM;QACLtB,MAAM,CAACc,QAAQ,CAAC,GAAGC,QAAQ;MAC7B;IACF;IACA,OAAO;MAAE,GAAG6B,KAAK;MAAE7C,EAAE,EAAE;QAAE,GAAG6C,KAAK,CAAC7C,EAAE;QAAEC;MAAO;IAAE,CAAC;EAClD,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASmD,qBAAqBA,CAACjB,KAAyB,EAAW;EACxE,KAAK,MAAMU,KAAK,IAAIV,KAAK,EAAE;IACzB,IAAIU,KAAK,CAACxC,UAAU,IAAI,IAAI,EAAE;IAC9B,KAAK,MAAMgD,gBAAgB,IAAIpC,MAAM,CAACqC,MAAM,CAACT,KAAK,CAACxC,UAAU,CAAC,EAAE;MAC9D,KAAK,MAAMkD,cAAc,IAAItC,MAAM,CAACqC,MAAM,CAACD,gBAAgB,CAAC,EAAE;QAC5D,IAAIE,cAAc,CAACtB,WAAW,CAACP,MAAM,GAAG,CAAC,EAAE,OAAO,IAAI;MACxD;IACF;EACF;EACA,OAAO,KAAK;AACd","ignoreList":[]}
1
+ {"version":3,"file":"resolveSchemaChain.js","names":["IModelDef","IModelDefCtor","convertSchemaToIr","collectVersionedIrChain","input","identity","schemas","collectSchemaDefinitions","provenances","deriveProvenance","map","schema","index","version","ir","models","name","description","type","migrations","serializeMigrations","current","unshift","previous","firstModelVersions","Map","firstFieldVersions","modelVersions","fieldVersions","modelKey","modelDef","Object","entries","has","set","get","fieldVersionsForModel","fields","fieldKey","keys","length","deprecations","undefined","result","fieldEntries","fieldName","migration","derivedFrom","resolveMinVersion","chain","minSupportedVersion","Error","latestVersion","some","c","join","minVersion","capVersionedIrChain","maxVersion","filter","resolveSchemaChain","stripDeprecatedFieldsForSdk","entry","record","field","dep","metadata","deprecatedFromVersion","chainNeedsUpgradeFns","i","prevEntry","currEntry","currModelDef","prevModelDef","prevFields","Set","f","key","recordMigrations","isOptional"],"sources":["resolveSchemaChain.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { SchemaDefinition, VersionMigrations } from \"@palantir/pack.schema\";\nimport type {\n IModelDef,\n IRealTimeDocumentSchema,\n} from \"../../lib/pack-docschema-api/pack-docschema-ir/index.js\";\nimport { IModelDef as IModelDefCtor } from \"../../lib/pack-docschema-api/pack-docschema-ir/index.js\";\nimport type { SchemaProvenance } from \"../steps/convertStepsToIr.js\";\nimport { convertSchemaToIr } from \"../steps/convertStepsToIr.js\";\n\n/** JSON-serializable form of a single field migration. */\nexport interface SerializedFieldMigration {\n readonly derivedFrom: readonly string[];\n}\n\n/** Serialized migrations keyed by `[recordModelName][fieldName]`. */\nexport type SerializedVersionMigrations = Record<\n string,\n Record<string, SerializedFieldMigration>\n>;\n\nexport interface VersionedIrEntry {\n version: number;\n ir: IRealTimeDocumentSchema;\n migrations?: SerializedVersionMigrations;\n}\n\nexport interface ResolvedIrChain {\n chain: VersionedIrEntry[];\n latestVersion: number;\n minVersion: number;\n}\n\nexport interface IrChainPayload {\n __comment?: string;\n latestVersion: number;\n minSupportedVersion?: number;\n chain: VersionedIrEntry[];\n}\n\nexport interface SchemaIdentity {\n readonly name?: string;\n readonly description?: string;\n}\n\nfunction collectVersionedIrChain(\n input: SchemaDefinition,\n identity: SchemaIdentity,\n): VersionedIrEntry[] {\n const schemas = collectSchemaDefinitions(input);\n const provenances = deriveProvenance(schemas);\n\n return schemas.map((schema, index): VersionedIrEntry => ({\n version: schema.version,\n ir: convertSchemaToIr(\n schema.models,\n { version: schema.version, name: identity.name, description: identity.description },\n provenances[index]!,\n ),\n ...(schema.type === \"versioned\" ? { migrations: serializeMigrations(schema.migrations) } : {}),\n }));\n}\n\nfunction collectSchemaDefinitions(input: SchemaDefinition): SchemaDefinition[] {\n const schemas: SchemaDefinition[] = [];\n let current: SchemaDefinition = input;\n\n while (current.type === \"versioned\") {\n schemas.unshift(current);\n current = current.previous;\n }\n schemas.unshift(current);\n\n return schemas;\n}\n\n/**\n * Build field/model provenance by walking the version chain from oldest to\n * newest. The first version where a model key or record field appears is the\n * version stamped into IR metadata.\n */\nfunction deriveProvenance(schemas: readonly SchemaDefinition[]): SchemaProvenance[] {\n const firstModelVersions = new Map<string, number>();\n const firstFieldVersions = new Map<string, Map<string, number>>();\n\n return schemas.map(schema => {\n const modelVersions: Record<string, number> = {};\n const fieldVersions: Record<string, Record<string, number>> = {};\n\n for (const [modelKey, modelDef] of Object.entries(schema.models)) {\n if (!firstModelVersions.has(modelKey)) {\n firstModelVersions.set(modelKey, schema.version);\n }\n modelVersions[modelKey] = firstModelVersions.get(modelKey)!;\n\n if (modelDef.type !== \"record\") continue;\n\n let fieldVersionsForModel = firstFieldVersions.get(modelKey);\n if (fieldVersionsForModel == null) {\n fieldVersionsForModel = new Map<string, number>();\n firstFieldVersions.set(modelKey, fieldVersionsForModel);\n }\n\n const fields: Record<string, number> = {};\n for (const fieldKey of Object.keys(modelDef.fields)) {\n if (!fieldVersionsForModel.has(fieldKey)) {\n fieldVersionsForModel.set(fieldKey, schema.version);\n }\n fields[fieldKey] = fieldVersionsForModel.get(fieldKey)!;\n }\n\n if (Object.keys(fields).length > 0) {\n fieldVersions[modelKey] = fields;\n }\n }\n\n return {\n fieldVersions,\n modelVersions,\n deprecations: \"deprecations\" in schema ? schema.deprecations : undefined,\n };\n });\n}\n\n/** Convert schema-builder migrations to their JSON-serializable form. */\nfunction serializeMigrations(\n migrations: VersionMigrations | undefined,\n): SerializedVersionMigrations | undefined {\n if (migrations == null) return undefined;\n const result: SerializedVersionMigrations = {};\n for (const [modelKey, fields] of Object.entries(migrations)) {\n const fieldEntries: Record<string, SerializedFieldMigration> = {};\n for (const [fieldName, migration] of Object.entries(fields)) {\n fieldEntries[fieldName] = {\n derivedFrom: [...migration.derivedFrom],\n };\n }\n result[modelKey] = fieldEntries;\n }\n return result;\n}\n\n/**\n * Validate `minSupportedVersion` against an already-resolved chain and return\n * the effective `minVersion`. Throws on invalid input.\n */\nexport function resolveMinVersion(\n chain: VersionedIrEntry[],\n minSupportedVersion: number | undefined,\n): { latestVersion: number; minVersion: number } {\n if (chain.length === 0) {\n throw new Error(\"Schema version chain is empty\");\n }\n\n const latestVersion = chain[chain.length - 1]!.version;\n\n if (minSupportedVersion != null && !chain.some(c => c.version === minSupportedVersion)) {\n throw new Error(\n `minSupportedVersion ${minSupportedVersion} is not in the schema chain `\n + `(available versions: ${chain.map(c => c.version).join(\", \")})`,\n );\n }\n\n return {\n latestVersion,\n minVersion: minSupportedVersion ?? latestVersion,\n };\n}\n\nfunction capVersionedIrChain(\n chain: VersionedIrEntry[],\n maxVersion: number | undefined,\n): VersionedIrEntry[] {\n if (maxVersion == null) {\n return chain;\n }\n\n if (!chain.some(c => c.version === maxVersion)) {\n throw new Error(\n `maxVersion ${maxVersion} is not in the schema chain `\n + `(available versions: ${chain.map(c => c.version).join(\", \")})`,\n );\n }\n\n return chain.filter(c => c.version <= maxVersion);\n}\n\n/**\n * Collect the version chain and resolve min/latest versions.\n * Each version's models are converted to IR (IRealTimeDocumentSchema).\n * `identity.name` / `identity.description` are embedded into each chain entry's\n * IR; when omitted (e.g. test callers), `convertSchemaToIr` falls back to its\n * defaults.\n * Throws on empty chain or invalid minSupportedVersion.\n */\nexport function resolveSchemaChain(\n schema: SchemaDefinition,\n minSupportedVersion?: number,\n identity: SchemaIdentity = {},\n maxVersion?: number,\n): ResolvedIrChain {\n const chain = capVersionedIrChain(collectVersionedIrChain(schema, identity), maxVersion);\n const { latestVersion, minVersion } = resolveMinVersion(chain, minSupportedVersion);\n return { chain, latestVersion, minVersion };\n}\n\n/**\n * Return a copy of the chain with deprecated fields removed from every version\n * at or after the version in which they were deprecated.\n *\n * The SDK type generators (`writeAllSdkFiles` and friends) must treat a\n * deprecated field exactly as a removed field: it disappears from that version's\n * public read/write types and per-version internal types, and the prev/curr diff\n * records it as a `removedField` (driving the upgrade lens). The field is still\n * collected into the all-versions `__Internal` type from earlier versions, which\n * are left untouched.\n */\nexport function stripDeprecatedFieldsForSdk(chain: VersionedIrEntry[]): VersionedIrEntry[] {\n return chain.map((entry): VersionedIrEntry => {\n const models: Record<string, IModelDef> = {};\n for (const [modelKey, modelDef] of Object.entries(entry.ir.models)) {\n if (modelDef.type === \"record\") {\n const fields = modelDef.record.fields.filter(field => {\n const dep = field.metadata.deprecatedFromVersion;\n return dep == null || entry.version < dep;\n });\n models[modelKey] = IModelDefCtor.record({ ...modelDef.record, fields });\n } else {\n models[modelKey] = modelDef;\n }\n }\n return { ...entry, ir: { ...entry.ir, models } };\n });\n}\n\n/**\n * True if the chain has any field that requires a runtime upgrade function.\n * Drives whether the generated SDK emits `DocumentModel` as a factory\n * (requires the app to supply typed upgrade functions) or as a const.\n *\n * Two cases trigger this:\n * - A field declares `derivedFrom` with one or more source fields — the app\n * must supply a forward function.\n * - A required field is added in a version past v1 (no `derivedFrom`) — the\n * app must supply a zero-arg thunk; `undefined` is not a legal value.\n *\n * Optional additive fields don't trigger it; the lens leaves them alone.\n */\nexport function chainNeedsUpgradeFns(chain: VersionedIrEntry[]): boolean {\n for (let i = 1; i < chain.length; i++) {\n const prevEntry = chain[i - 1]!;\n const currEntry = chain[i]!;\n for (const [modelKey, currModelDef] of Object.entries(currEntry.ir.models)) {\n if (currModelDef.type !== \"record\") continue;\n const prevModelDef = prevEntry.ir.models[modelKey];\n if (prevModelDef == null || prevModelDef.type !== \"record\") continue;\n const prevFields = new Set(prevModelDef.record.fields.map(f => f.key));\n const recordMigrations = currEntry.migrations?.[modelKey];\n for (const field of currModelDef.record.fields) {\n if (prevFields.has(field.key)) continue;\n const derivedFrom = recordMigrations?.[field.key]?.derivedFrom ?? [];\n if (derivedFrom.length > 0) return true;\n if (field.isOptional !== true) return true;\n }\n }\n }\n return false;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASA,SAAS,IAAIC,aAAa,QAAQ,yDAAyD;AAEpG,SAASC,iBAAiB,QAAQ,8BAA8B;;AAEhE;;AAKA;;AA8BA,SAASC,uBAAuBA,CAC9BC,KAAuB,EACvBC,QAAwB,EACJ;EACpB,MAAMC,OAAO,GAAGC,wBAAwB,CAACH,KAAK,CAAC;EAC/C,MAAMI,WAAW,GAAGC,gBAAgB,CAACH,OAAO,CAAC;EAE7C,OAAOA,OAAO,CAACI,GAAG,CAAC,CAACC,MAAM,EAAEC,KAAK,MAAwB;IACvDC,OAAO,EAAEF,MAAM,CAACE,OAAO;IACvBC,EAAE,EAAEZ,iBAAiB,CACnBS,MAAM,CAACI,MAAM,EACb;MAAEF,OAAO,EAAEF,MAAM,CAACE,OAAO;MAAEG,IAAI,EAAEX,QAAQ,CAACW,IAAI;MAAEC,WAAW,EAAEZ,QAAQ,CAACY;IAAY,CAAC,EACnFT,WAAW,CAACI,KAAK,CACnB,CAAC;IACD,IAAID,MAAM,CAACO,IAAI,KAAK,WAAW,GAAG;MAAEC,UAAU,EAAEC,mBAAmB,CAACT,MAAM,CAACQ,UAAU;IAAE,CAAC,GAAG,CAAC,CAAC;EAC/F,CAAC,CAAC,CAAC;AACL;AAE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W,CAACP,MAAM,GAAG,CAAC,EAAE,OAAO,IAAI;QACvC,IAAIwB,KAAK,CAACe,UAAU,KAAK,IAAI,EAAE,OAAO,IAAI;MAC5C;IACF;EACF;EACA,OAAO,KAAK;AACd","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"arrayFields.js","names":[],"sources":["arrayFields.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */\n\n\nexport interface Container {\n readonly items: readonly string[];\n readonly numbers: readonly number[];\n}\n\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"arrayFields.js","names":[],"sources":["arrayFields.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */\n\n\nexport interface Container {\n readonly items: readonly string[];\n readonly numbers: readonly number[];\n}\n\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */
2
2
 
3
3
  /**
4
4
  * A cat
@@ -1 +1 @@
1
- {"version":3,"file":"customDiscriminant.js","names":["isAnimalCat","value","kind","isAnimalDog"],"sources":["customDiscriminant.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */\n\n\n/**\n * A cat\n */\nexport interface Cat {\n readonly meow: string;\n readonly whiskers: number;\n}\n\n/**\n * A dog\n */\nexport interface Dog {\n readonly bark: string;\n readonly tailWags: number;\n}\n\nexport interface AnimalCat extends Cat {\n readonly kind: \"cat\";\n}\n\nexport interface AnimalDog extends Dog {\n readonly kind: \"dog\";\n}\n\nexport type Animal = AnimalCat | AnimalDog;\n\nexport function isAnimalCat(value: Animal): value is AnimalCat {\n return value.kind === \"cat\";\n}\n\nexport function isAnimalDog(value: Animal): value is AnimalDog {\n return value.kind === \"dog\";\n}\n\n"],"mappings":"AAAA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAgBA,OAAO,SAASA,WAAWA,CAACC,KAAa,EAAsB;EAC7D,OAAOA,KAAK,CAACC,IAAI,KAAK,KAAK;AAC7B;AAEA,OAAO,SAASC,WAAWA,CAACF,KAAa,EAAsB;EAC7D,OAAOA,KAAK,CAACC,IAAI,KAAK,KAAK;AAC7B","ignoreList":[]}
1
+ {"version":3,"file":"customDiscriminant.js","names":["isAnimalCat","value","kind","isAnimalDog"],"sources":["customDiscriminant.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */\n\n\n/**\n * A cat\n */\nexport interface Cat {\n readonly meow: string;\n readonly whiskers: number;\n}\n\n/**\n * A dog\n */\nexport interface Dog {\n readonly bark: string;\n readonly tailWags: number;\n}\n\nexport interface AnimalCat extends Cat {\n readonly kind: \"cat\";\n}\n\nexport interface AnimalDog extends Dog {\n readonly kind: \"dog\";\n}\n\nexport type Animal = AnimalCat | AnimalDog;\n\nexport function isAnimalCat(value: Animal): value is AnimalCat {\n return value.kind === \"cat\";\n}\n\nexport function isAnimalDog(value: Animal): value is AnimalDog {\n return value.kind === \"dog\";\n}\n\n"],"mappings":"AAAA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAgBA,OAAO,SAASA,WAAWA,CAACC,KAAa,EAAsB;EAC7D,OAAOA,KAAK,CAACC,IAAI,KAAK,KAAK;AAC7B;AAEA,OAAO,SAASC,WAAWA,CAACF,KAAa,EAAsB;EAC7D,OAAOA,KAAK,CAACC,IAAI,KAAK,KAAK;AAC7B","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */
2
2
 
3
3
  /**
4
4
  * Represents an edge in a graph
@@ -1 +1 @@
1
- {"version":3,"file":"generateTypeScriptInterfaces.js","names":["isNodeObject","value","type","isNodeTextBox"],"sources":["generateTypeScriptInterfaces.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */\n\n\n/**\n * Represents an edge in a graph\n */\nexport interface Edge {\n readonly source: ObjectNode;\n readonly target: ObjectNode;\n}\n\nexport interface ObjectNode {\n readonly x: number;\n readonly y: number;\n readonly label?: string;\n readonly color?: string;\n}\n\n/**\n * Represents a text box in a graph\n */\nexport interface TextBox {\n readonly x: number;\n readonly y: number;\n readonly text: string;\n}\n\nexport interface NodeObject extends ObjectNode {\n readonly type: \"object\";\n}\n\nexport interface NodeTextBox extends TextBox {\n readonly type: \"text-box\";\n}\n\nexport type Node = NodeObject | NodeTextBox;\n\nexport function isNodeObject(value: Node): value is NodeObject {\n return value.type === \"object\";\n}\n\nexport function isNodeTextBox(value: Node): value is NodeTextBox {\n return value.type === \"text-box\";\n}\n\n"],"mappings":"AAAA;;AAGA;AACA;AACA;;AAaA;AACA;AACA;;AAiBA,OAAO,SAASA,YAAYA,CAACC,KAAW,EAAuB;EAC7D,OAAOA,KAAK,CAACC,IAAI,KAAK,QAAQ;AAChC;AAEA,OAAO,SAASC,aAAaA,CAACF,KAAW,EAAwB;EAC/D,OAAOA,KAAK,CAACC,IAAI,KAAK,UAAU;AAClC","ignoreList":[]}
1
+ {"version":3,"file":"generateTypeScriptInterfaces.js","names":["isNodeObject","value","type","isNodeTextBox"],"sources":["generateTypeScriptInterfaces.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */\n\n\n/**\n * Represents an edge in a graph\n */\nexport interface Edge {\n readonly source: ObjectNode;\n readonly target: ObjectNode;\n}\n\nexport interface ObjectNode {\n readonly x: number;\n readonly y: number;\n readonly label?: string;\n readonly color?: string;\n}\n\n/**\n * Represents a text box in a graph\n */\nexport interface TextBox {\n readonly x: number;\n readonly y: number;\n readonly text: string;\n}\n\nexport interface NodeObject extends ObjectNode {\n readonly type: \"object\";\n}\n\nexport interface NodeTextBox extends TextBox {\n readonly type: \"text-box\";\n}\n\nexport type Node = NodeObject | NodeTextBox;\n\nexport function isNodeObject(value: Node): value is NodeObject {\n return value.type === \"object\";\n}\n\nexport function isNodeTextBox(value: Node): value is NodeTextBox {\n return value.type === \"text-box\";\n}\n\n"],"mappings":"AAAA;;AAGA;AACA;AACA;;AAaA;AACA;AACA;;AAiBA,OAAO,SAASA,YAAYA,CAACC,KAAW,EAAuB;EAC7D,OAAOA,KAAK,CAACC,IAAI,KAAK,QAAQ;AAChC;AAEA,OAAO,SAASC,aAAaA,CAACF,KAAW,EAAwB;EAC/D,OAAOA,KAAK,CAACC,IAAI,KAAK,UAAU;AAClC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"refTypes.js","names":[],"sources":["refTypes.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */\n\nimport type { DocumentRef, MediaRef, ObjectRef, UserRef } from \"@palantir/pack.document-schema.model-types\";\n\n/**\n * A record containing all reference types\n */\nexport interface Document {\n readonly id: string;\n readonly docRef: DocumentRef;\n readonly userRef: UserRef;\n readonly objectRef: ObjectRef;\n readonly mediaRef: MediaRef;\n readonly optionalDocRef?: DocumentRef;\n readonly docRefArray: readonly DocumentRef[];\n readonly userRefArray: readonly UserRef[];\n}\n\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"refTypes.js","names":[],"sources":["refTypes.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */\n\nimport type { DocumentRef, MediaRef, ObjectRef, UserRef } from \"@palantir/pack.document-schema.model-types\";\n\n/**\n * A record containing all reference types\n */\nexport interface Document {\n readonly id: string;\n readonly docRef: DocumentRef;\n readonly userRef: UserRef;\n readonly objectRef: ObjectRef;\n readonly mediaRef: MediaRef;\n readonly optionalDocRef?: DocumentRef;\n readonly docRefArray: readonly DocumentRef[];\n readonly userRefArray: readonly UserRef[];\n}\n\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"simpleRecord.js","names":[],"sources":["simpleRecord.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */\n\n\n/**\n * A person record\n */\nexport interface Person {\n readonly name: string;\n readonly age: number;\n readonly email?: string;\n}\n\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"simpleRecord.js","names":[],"sources":["simpleRecord.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */\n\n\n/**\n * A person record\n */\nexport interface Person {\n readonly name: string;\n readonly age: number;\n readonly email?: string;\n}\n\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- /* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */
1
+ /* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */
2
2
 
3
3
  /**
4
4
  * A node in the graph
@@ -1 +1 @@
1
- {"version":3,"file":"simpleSteps.js","names":["isNodeObject","value","type","isNodeTextBox"],"sources":["simpleSteps.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.13.0 */\n\n\n/**\n * A node in the graph\n */\nexport interface ObjectNode {\n readonly x: number;\n readonly y: number;\n readonly object: string;\n readonly label?: string;\n readonly edges: readonly Edge[];\n}\n\n/**\n * A text box in the graph\n */\nexport interface TextBox {\n readonly x: number;\n readonly y: number;\n readonly text: string;\n}\n\n/**\n * An edge in the graph\n */\nexport interface Edge {\n readonly source: ObjectNode;\n readonly target: ObjectNode;\n}\n\nexport interface NodeObject extends ObjectNode {\n readonly type: \"object\";\n}\n\nexport interface NodeTextBox extends TextBox {\n readonly type: \"textBox\";\n}\n\nexport type Node = NodeObject | NodeTextBox;\n\nexport function isNodeObject(value: Node): value is NodeObject {\n return value.type === \"object\";\n}\n\nexport function isNodeTextBox(value: Node): value is NodeTextBox {\n return value.type === \"textBox\";\n}\n\n"],"mappings":"AAAA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAOA;AACA;AACA;;AAgBA,OAAO,SAASA,YAAYA,CAACC,KAAW,EAAuB;EAC7D,OAAOA,KAAK,CAACC,IAAI,KAAK,QAAQ;AAChC;AAEA,OAAO,SAASC,aAAaA,CAACF,KAAW,EAAwB;EAC/D,OAAOA,KAAK,CAACC,IAAI,KAAK,SAAS;AACjC","ignoreList":[]}
1
+ {"version":3,"file":"simpleSteps.js","names":["isNodeObject","value","type","isNodeTextBox"],"sources":["simpleSteps.ts"],"sourcesContent":["/* Generated by @palantir/pack.document-schema.type-gen@0.14.0 */\n\n\n/**\n * A node in the graph\n */\nexport interface ObjectNode {\n readonly x: number;\n readonly y: number;\n readonly object: string;\n readonly label?: string;\n readonly edges: readonly Edge[];\n}\n\n/**\n * A text box in the graph\n */\nexport interface TextBox {\n readonly x: number;\n readonly y: number;\n readonly text: string;\n}\n\n/**\n * An edge in the graph\n */\nexport interface Edge {\n readonly source: ObjectNode;\n readonly target: ObjectNode;\n}\n\nexport interface NodeObject extends ObjectNode {\n readonly type: \"object\";\n}\n\nexport interface NodeTextBox extends TextBox {\n readonly type: \"textBox\";\n}\n\nexport type Node = NodeObject | NodeTextBox;\n\nexport function isNodeObject(value: Node): value is NodeObject {\n return value.type === \"object\";\n}\n\nexport function isNodeTextBox(value: Node): value is NodeTextBox {\n return value.type === \"textBox\";\n}\n\n"],"mappings":"AAAA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAOA;AACA;AACA;;AAgBA,OAAO,SAASA,YAAYA,CAACC,KAAW,EAAuB;EAC7D,OAAOA,KAAK,CAACC,IAAI,KAAK,QAAQ;AAChC;AAEA,OAAO,SAASC,aAAaA,CAACF,KAAW,EAAwB;EAC/D,OAAOA,KAAK,CAACC,IAAI,KAAK,SAAS;AACjC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"assetUpdateSchemaHandler.d.ts","sourceRoot":"","sources":["../../../../src/commands/asset/assetUpdateSchemaHandler.ts"],"names":[],"mappings":"AA0BA,UAAU,wBAAwB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAID,yFAAyF;AACzF,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,CAyEf"}
1
+ {"version":3,"file":"assetUpdateSchemaHandler.d.ts","sourceRoot":"","sources":["../../../../src/commands/asset/assetUpdateSchemaHandler.ts"],"names":[],"mappings":"AA0BA,UAAU,wBAAwB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAID,yFAAyF;AACzF,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,CA0Ef"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=resolveIrInput.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveIrInput.test.d.ts","sourceRoot":"","sources":["../../../../../src/commands/ir/__tests__/resolveIrInput.test.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"irDeployHandler.d.ts","sourceRoot":"","sources":["../../../../src/commands/ir/irDeployHandler.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACzC;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAmC3E"}
1
+ {"version":3,"file":"irDeployHandler.d.ts","sourceRoot":"","sources":["../../../../src/commands/ir/irDeployHandler.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlD,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;CACzC;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAkC3E"}
@@ -1 +1 @@
1
- {"version":3,"file":"irGenAssetHandler.d.ts","sourceRoot":"","sources":["../../../../src/commands/ir/irGenAssetHandler.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,aAAa,CAAC;AAErE,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CAC5C;AAwDD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAmFlE"}
1
+ {"version":3,"file":"irGenAssetHandler.d.ts","sourceRoot":"","sources":["../../../../src/commands/ir/irGenAssetHandler.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,aAAa,CAAC;AAGrE,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CAC5C;AAYD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAiFlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"registerIrCommands.d.ts","sourceRoot":"","sources":["../../../../src/commands/ir/registerIrCommands.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2EzD"}
1
+ {"version":3,"file":"registerIrCommands.d.ts","sourceRoot":"","sources":["../../../../src/commands/ir/registerIrCommands.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8EzD"}
@@ -0,0 +1,8 @@
1
+ import type { IRealTimeDocumentSchema } from "../../lib/pack-docschema-api/pack-docschema-ir/index.js";
2
+ export interface ResolvedIrInput {
3
+ readonly ir: IRealTimeDocumentSchema;
4
+ readonly latestVersion: number;
5
+ readonly minSupportedVersion: number;
6
+ }
7
+ export declare function resolveIrInput(parsed: unknown, irPath: string): ResolvedIrInput;
8
+ //# sourceMappingURL=resolveIrInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveIrInput.d.ts","sourceRoot":"","sources":["../../../../src/commands/ir/resolveIrInput.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAGvG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,uBAAuB,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAuCD,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe,CAI/E"}
@@ -1 +1 @@
1
- {"version":3,"file":"registerSchemaCommands.d.ts","sourceRoot":"","sources":["../../../../src/commands/schema/registerSchemaCommands.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsB7D"}
1
+ {"version":3,"file":"registerSchemaCommands.d.ts","sourceRoot":"","sources":["../../../../src/commands/schema/registerSchemaCommands.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0B7D"}
@@ -2,6 +2,7 @@ interface SchemaIrOptions {
2
2
  input: string;
3
3
  output: string;
4
4
  config: string;
5
+ maxVersion?: string;
5
6
  }
6
7
  interface PackConfigValues {
7
8
  readonly documentTypeName: string;
@@ -32,9 +33,9 @@ export declare function readPackConfig(configPath: string): Promise<PackConfigVa
32
33
  * downstream tools default to supporting only the latest schema version.
33
34
  *
34
35
  * Note: this is distinct from the legacy single-version IR JSON consumed by
35
- * `ir deploy` / `ir zod`, which is a bare `IRealTimeDocumentSchema` (no chain,
36
- * no migrations). Tools that previously read that format should pick the
37
- * entry matching `latestVersion` from `chain` and use its `ir` field.
36
+ * `ir zod`, which is a bare `IRealTimeDocumentSchema` (no chain, no migrations).
37
+ * Tools that previously read that format should pick the entry matching
38
+ * `latestVersion` from `chain` and use its `ir` field.
38
39
  */
39
40
  export declare function schemaIrHandler(options: SchemaIrOptions): Promise<void>;
40
41
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"schemaIrHandler.d.ts","sourceRoot":"","sources":["../../../../src/commands/schema/schemaIrHandler.ts"],"names":[],"mappings":"AAuBA,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAQD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC;AAwBD,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiClF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAuC7E"}
1
+ {"version":3,"file":"schemaIrHandler.d.ts","sourceRoot":"","sources":["../../../../src/commands/schema/schemaIrHandler.ts"],"names":[],"mappings":"AAuBA,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAQD,UAAU,gBAAgB;IACxB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC;AAwBD,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiClF;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA6C7E"}
@@ -3,6 +3,7 @@ export declare const singleVersionSchema: SchemaDefinition;
3
3
  /** Two-version schema with field removal (color removed, fillColor + strokeColor + opacity added) */
4
4
  export declare const twoVersionFieldRemovalSchema: SchemaDefinition;
5
5
  export declare const twoVersionAdditiveSchema: SchemaDefinition;
6
+ export declare const twoVersionRequiredAdditiveSchema: SchemaDefinition;
6
7
  export declare const refFieldsSchema: SchemaDefinition;
7
8
  export declare const unionTypesSchema: SchemaDefinition;
8
9
  /** Schema with nested optionals: tests that optional inside array structures is preserved */
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../../src/utils/schema/__tests__/fixtures.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAyB7E,eAAO,MAAM,mBAAmB,EAAE,gBAA4C,CAAC;AAE/E,qGAAqG;AACrG,eAAO,MAAM,4BAA4B,EAAE,gBAkB1C,CAAC;AAYF,eAAO,MAAM,wBAAwB,EAAE,gBAE7B,CAAC;AAaX,eAAO,MAAM,eAAe,EAAE,gBAY5B,CAAC;AAWH,eAAO,MAAM,gBAAgB,EAAE,gBAU7B,CAAC;AAEH,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB,EAAE,gBASlC,CAAC;AAEH,wFAAwF;AACxF,eAAO,MAAM,6BAA6B,EAAE,gBA4B3C,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,sBAAsB,EAAE,gBAOnC,CAAC;AAqBH,eAAO,MAAM,iBAAiB,EAAE,gBAU9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,gBAwBxC,CAAC;AAEL,wFAAwF;AACxF,eAAO,MAAM,uBAAuB,EAAE,gBAwClC,CAAC"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../../src/utils/schema/__tests__/fixtures.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAyB7E,eAAO,MAAM,mBAAmB,EAAE,gBAA4C,CAAC;AAE/E,qGAAqG;AACrG,eAAO,MAAM,4BAA4B,EAAE,gBAkB1C,CAAC;AAYF,eAAO,MAAM,wBAAwB,EAAE,gBAE7B,CAAC;AAiBX,eAAO,MAAM,gCAAgC,EAAE,gBAEI,CAAC;AAapD,eAAO,MAAM,eAAe,EAAE,gBAY5B,CAAC;AAWH,eAAO,MAAM,gBAAgB,EAAE,gBAU7B,CAAC;AAEH,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB,EAAE,gBASlC,CAAC;AAEH,wFAAwF;AACxF,eAAO,MAAM,6BAA6B,EAAE,gBA4B3C,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,sBAAsB,EAAE,gBAOnC,CAAC;AAqBH,eAAO,MAAM,iBAAiB,EAAE,gBAU9B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,gBAwBxC,CAAC;AAEL,wFAAwF;AACxF,eAAO,MAAM,uBAAuB,EAAE,gBAwClC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateInternalFromSchema.d.ts","sourceRoot":"","sources":["../../../../src/utils/schema/generateInternalFromSchema.ts"],"names":[],"mappings":"AA2BA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AA2bD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,eAAe,GACxB,mBAAmB,CAarB"}
1
+ {"version":3,"file":"generateInternalFromSchema.d.ts","sourceRoot":"","sources":["../../../../src/utils/schema/generateInternalFromSchema.ts"],"names":[],"mappings":"AA2BA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,sCAAsC;IACtC,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAgdD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,eAAe,GACxB,mBAAmB,CAarB"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateModelMetadataFromSchema.d.ts","sourceRoot":"","sources":["../../../../src/utils/schema/generateModelMetadataFromSchema.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAW/D,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,UAAU,EAAE,MAAM,CAAC;CACpB;AAeD;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,eAAe,EACzB,mBAAmB,CAAC,EAAE,MAAM,GAC3B,mBAAmB,CAsLrB"}
1
+ {"version":3,"file":"generateModelMetadataFromSchema.d.ts","sourceRoot":"","sources":["../../../../src/utils/schema/generateModelMetadataFromSchema.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAW/D,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,UAAU,EAAE,MAAM,CAAC;CACpB;AAeD;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,eAAe,EACzB,mBAAmB,CAAC,EAAE,MAAM,GAC3B,mBAAmB,CAwLrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"generateScopeFromSchema.d.ts","sourceRoot":"","sources":["../../../../src/utils/schema/generateScopeFromSchema.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAW/D;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,mBAAmB,CAAC,EAAE,MAAM,GAC3B,MAAM,CA8HR"}
1
+ {"version":3,"file":"generateScopeFromSchema.d.ts","sourceRoot":"","sources":["../../../../src/utils/schema/generateScopeFromSchema.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAW/D;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,eAAe,EACzB,mBAAmB,CAAC,EAAE,MAAM,GAC3B,MAAM,CA8IR"}
@@ -42,7 +42,7 @@ export declare function resolveMinVersion(chain: VersionedIrEntry[], minSupporte
42
42
  * defaults.
43
43
  * Throws on empty chain or invalid minSupportedVersion.
44
44
  */
45
- export declare function resolveSchemaChain(schema: SchemaDefinition, minSupportedVersion?: number, identity?: SchemaIdentity): ResolvedIrChain;
45
+ export declare function resolveSchemaChain(schema: SchemaDefinition, minSupportedVersion?: number, identity?: SchemaIdentity, maxVersion?: number): ResolvedIrChain;
46
46
  /**
47
47
  * Return a copy of the chain with deprecated fields removed from every version
48
48
  * at or after the version in which they were deprecated.
@@ -56,9 +56,17 @@ export declare function resolveSchemaChain(schema: SchemaDefinition, minSupporte
56
56
  */
57
57
  export declare function stripDeprecatedFieldsForSdk(chain: VersionedIrEntry[]): VersionedIrEntry[];
58
58
  /**
59
- * True if any migration in the chain declares a non-empty `derivedFrom`. Drives
60
- * whether the generated SDK emits `DocumentModel` as a factory (requires the
61
- * app to supply typed upgrade functions) or as a const (no upgrade functions needed).
59
+ * True if the chain has any field that requires a runtime upgrade function.
60
+ * Drives whether the generated SDK emits `DocumentModel` as a factory
61
+ * (requires the app to supply typed upgrade functions) or as a const.
62
+ *
63
+ * Two cases trigger this:
64
+ * - A field declares `derivedFrom` with one or more source fields — the app
65
+ * must supply a forward function.
66
+ * - A required field is added in a version past v1 (no `derivedFrom`) — the
67
+ * app must supply a zero-arg thunk; `undefined` is not a legal value.
68
+ *
69
+ * Optional additive fields don't trigger it; the lens leaves them alone.
62
70
  */
63
- export declare function chainHasDerivedFields(chain: VersionedIrEntry[]): boolean;
71
+ export declare function chainNeedsUpgradeFns(chain: VersionedIrEntry[]): boolean;
64
72
  //# sourceMappingURL=resolveSchemaChain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolveSchemaChain.d.ts","sourceRoot":"","sources":["../../../../src/utils/schema/resolveSchemaChain.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,gBAAgB,EAAqB,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAK,EAEV,uBAAuB,EACxB,MAAM,yDAAyD,CAAC;AAKjE,0DAA0D;AAC1D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED,qEAAqE;AACrE,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAC9C,MAAM,EACN,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CACzC,CAAC;AAEF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,EAAE,uBAAuB,CAAC;IAC5B,UAAU,CAAC,EAAE,2BAA2B,CAAC;CAC1C;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7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C;IAC5B,UAAU,CAAC,EAAE,2BAA2B,CAAC;CAC1C;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAmGD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,gBAAgB,EAAE,EACzB,mBAAmB,EAAE,MAAM,GAAG,SAAS,GACtC;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAkB/C;AAoBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,EACxB,mBAAmB,CAAC,EAAE,MAAM,EAC5B,QAAQ,GAAE,cAAmB,EAC7B,UAAU,CAAC,EAAE,MAAM,GAClB,eAAe,CAIjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,gBAAgB,EAAE,CAgBzF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAmBvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palantir/pack.document-schema.type-gen",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "TypeScript type generation from document schema",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -27,8 +27,8 @@
27
27
  "tiny-invariant": "^1.3.3",
28
28
  "yaml": "^2.8.2",
29
29
  "zod": "^4.1.13",
30
- "@palantir/pack.document-schema.model-types": "~0.12.0",
31
- "@palantir/pack.schema": "0.8.0"
30
+ "@palantir/pack.document-schema.model-types": "~0.13.0",
31
+ "@palantir/pack.schema": "0.9.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/fs-extra": "^11.0.4",