@fern-api/go-dynamic-snippets 0.0.18 → 0.0.19
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/cjs/DynamicSnippetsGenerator.cjs +6 -6
- package/cjs/DynamicSnippetsGenerator.cjs.map +1 -1
- package/cjs/DynamicSnippetsGenerator.d.cts +1 -1
- package/cjs/{DynamicSnippetsGeneratorContext-D8VcLYKk.d.cts → DynamicSnippetsGeneratorContext-X0Mtg6YW.d.cts} +1 -0
- package/cjs/EndpointSnippetGenerator.cjs +4 -4
- package/cjs/EndpointSnippetGenerator.cjs.map +1 -1
- package/cjs/EndpointSnippetGenerator.d.cts +1 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs +8 -8
- package/cjs/context/DynamicSnippetsGeneratorContext.cjs.map +1 -1
- package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +1 -1
- package/cjs/context/DynamicTypeInstantiationMapper.cjs +1 -1
- package/cjs/context/DynamicTypeInstantiationMapper.cjs.map +1 -1
- package/cjs/context/DynamicTypeInstantiationMapper.d.cts +1 -1
- package/cjs/context/DynamicTypeMapper.cjs +4 -4
- package/cjs/context/DynamicTypeMapper.cjs.map +1 -1
- package/cjs/context/DynamicTypeMapper.d.cts +1 -1
- package/cjs/context/FilePropertyMapper.cjs +7 -7
- package/cjs/context/FilePropertyMapper.cjs.map +1 -1
- package/cjs/context/FilePropertyMapper.d.cts +1 -1
- package/cjs/index.cjs +7 -7
- package/cjs/index.cjs.map +1 -1
- package/cjs/index.d.cts +1 -1
- package/esm/DynamicSnippetsGenerator.d.ts +1 -1
- package/esm/DynamicSnippetsGenerator.js +1 -1
- package/esm/{DynamicSnippetsGeneratorContext-D8VcLYKk.d.ts → DynamicSnippetsGeneratorContext-X0Mtg6YW.d.ts} +1 -0
- package/esm/EndpointSnippetGenerator.d.ts +1 -1
- package/esm/EndpointSnippetGenerator.js +1 -1
- package/esm/{chunk-ZNTXZ3YV.js → chunk-5X6DU53C.js} +2 -2
- package/esm/{chunk-3Z2URLHB.js → chunk-EUHLPBOB.js} +2 -2
- package/esm/chunk-FVPD7ODP.js +2 -0
- package/esm/chunk-FVPD7ODP.js.map +1 -0
- package/esm/{chunk-MYN2HZVH.js → chunk-KGXOPYBU.js} +2 -2
- package/esm/chunk-NY6N4HP7.js +2 -0
- package/esm/chunk-NY6N4HP7.js.map +1 -0
- package/esm/{chunk-TXVHHFW3.js → chunk-S5R5YTLQ.js} +2 -2
- package/esm/chunk-T2DJJZPN.js +2 -0
- package/esm/chunk-T2DJJZPN.js.map +1 -0
- package/esm/{chunk-JHIUGKJ4.js → chunk-VY2BNRW5.js} +9 -9
- package/esm/chunk-VY2BNRW5.js.map +1 -0
- package/esm/context/DynamicSnippetsGeneratorContext.d.ts +1 -1
- package/esm/context/DynamicSnippetsGeneratorContext.js +1 -1
- package/esm/context/DynamicTypeInstantiationMapper.d.ts +1 -1
- package/esm/context/DynamicTypeInstantiationMapper.js +1 -1
- package/esm/context/DynamicTypeMapper.d.ts +1 -1
- package/esm/context/DynamicTypeMapper.js +1 -1
- package/esm/context/FilePropertyMapper.d.ts +1 -1
- package/esm/context/FilePropertyMapper.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/package.json +1 -1
- package/esm/chunk-B2A7QNZM.js +0 -2
- package/esm/chunk-B2A7QNZM.js.map +0 -1
- package/esm/chunk-DVDVP26D.js +0 -2
- package/esm/chunk-DVDVP26D.js.map +0 -1
- package/esm/chunk-JHIUGKJ4.js.map +0 -1
- package/esm/chunk-SVPRIX53.js +0 -2
- package/esm/chunk-SVPRIX53.js.map +0 -1
- /package/esm/{chunk-ZNTXZ3YV.js.map → chunk-5X6DU53C.js.map} +0 -0
- /package/esm/{chunk-3Z2URLHB.js.map → chunk-EUHLPBOB.js.map} +0 -0
- /package/esm/{chunk-MYN2HZVH.js.map → chunk-KGXOPYBU.js.map} +0 -0
- /package/esm/{chunk-TXVHHFW3.js.map → chunk-S5R5YTLQ.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@fern-api/browser-compatible-base-generator';
|
|
2
2
|
import '@fern-api/dynamic-ir-sdk';
|
|
3
3
|
import '@fern-api/go-ast';
|
|
4
|
-
export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-
|
|
4
|
+
export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-X0Mtg6YW.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-T2DJJZPN.js";import"../chunk-NY6N4HP7.js";import"../chunk-EUHLPBOB.js";import"../chunk-5X6DU53C.js";import"../chunk-FVPD7ODP.js";import"../chunk-VY2BNRW5.js";export{a as DynamicSnippetsGeneratorContext};
|
|
2
2
|
//# sourceMappingURL=DynamicSnippetsGeneratorContext.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@fern-api/dynamic-ir-sdk';
|
|
2
2
|
import '@fern-api/go-ast';
|
|
3
|
-
export { a as DynamicTypeInstantiationMapper } from '../DynamicSnippetsGeneratorContext-
|
|
3
|
+
export { a as DynamicTypeInstantiationMapper } from '../DynamicSnippetsGeneratorContext-X0Mtg6YW.js';
|
|
4
4
|
import '@fern-api/browser-compatible-base-generator';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-NY6N4HP7.js";import"../chunk-EUHLPBOB.js";import"../chunk-VY2BNRW5.js";export{a as DynamicTypeInstantiationMapper};
|
|
2
2
|
//# sourceMappingURL=DynamicTypeInstantiationMapper.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@fern-api/dynamic-ir-sdk';
|
|
2
2
|
import '@fern-api/go-ast';
|
|
3
|
-
export { b as DynamicTypeMapper } from '../DynamicSnippetsGeneratorContext-
|
|
3
|
+
export { b as DynamicTypeMapper } from '../DynamicSnippetsGeneratorContext-X0Mtg6YW.js';
|
|
4
4
|
import '@fern-api/browser-compatible-base-generator';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-5X6DU53C.js";import"../chunk-VY2BNRW5.js";export{a as DynamicTypeMapper};
|
|
2
2
|
//# sourceMappingURL=DynamicTypeMapper.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '@fern-api/dynamic-ir-sdk';
|
|
2
2
|
import '@fern-api/go-ast';
|
|
3
|
-
export { F as FilePropertyInfo, c as FilePropertyMapper } from '../DynamicSnippetsGeneratorContext-
|
|
3
|
+
export { F as FilePropertyInfo, c as FilePropertyMapper } from '../DynamicSnippetsGeneratorContext-X0Mtg6YW.js';
|
|
4
4
|
import '@fern-api/browser-compatible-base-generator';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-FVPD7ODP.js";import"../chunk-VY2BNRW5.js";export{a as FilePropertyMapper};
|
|
2
2
|
//# sourceMappingURL=FilePropertyMapper.js.map
|
package/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { DynamicSnippetsGenerator } from './DynamicSnippetsGenerator.js';
|
|
2
2
|
import '@fern-api/browser-compatible-base-generator';
|
|
3
3
|
import '@fern-api/dynamic-ir-sdk';
|
|
4
|
-
import './DynamicSnippetsGeneratorContext-
|
|
4
|
+
import './DynamicSnippetsGeneratorContext-X0Mtg6YW.js';
|
|
5
5
|
import '@fern-api/go-ast';
|
|
6
6
|
import './EndpointSnippetGenerator.js';
|
package/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-KGXOPYBU.js";import"./chunk-S5R5YTLQ.js";import"./chunk-T2DJJZPN.js";import"./chunk-NY6N4HP7.js";import"./chunk-EUHLPBOB.js";import"./chunk-5X6DU53C.js";import"./chunk-FVPD7ODP.js";import{f as e,g as r}from"./chunk-VY2BNRW5.js";e();r();export{n as DynamicSnippetsGenerator};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
package/esm/chunk-B2A7QNZM.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as u}from"./chunk-DVDVP26D.js";import{c as p}from"./chunk-3Z2URLHB.js";import{a as l}from"./chunk-ZNTXZ3YV.js";import{a as g}from"./chunk-SVPRIX53.js";import{e as r,f as a,g as s,h as c,j as n,k as m}from"./chunk-JHIUGKJ4.js";a();s();var h=class f extends p{constructor({ir:e,config:t}){super({ir:e,config:t});r(this,"ir");r(this,"customConfig");r(this,"dynamicTypeMapper");r(this,"dynamicTypeInstantiationMapper");r(this,"filePropertyMapper");r(this,"rootImportPath");this.ir=e,this.customConfig=t.customConfig!=null?t.customConfig:void 0,this.dynamicTypeMapper=new l({context:this}),this.dynamicTypeInstantiationMapper=new u({context:this}),this.filePropertyMapper=new g({context:this}),this.rootImportPath=m({config:t,customConfig:this.customConfig})}clone(){return new f({ir:this.ir,config:this.config})}isOptional(e){switch(e.type){case"optional":case"map":return!0;case"nullable":case"list":case"set":return this.isOptional(e.value);case"named":case"literal":case"primitive":case"unknown":return!1;default:c(e)}}getMethodName(e){return e.pascalCase.unsafeName}getTestMethodName(e){return e.declaration.fernFilepath.allParts.map(t=>t.pascalCase.unsafeName).join("")+e.declaration.name.pascalCase.unsafeName}getTypeName(e){return e.pascalCase.unsafeName}getImportPath(e){let t=e.packagePath.map(i=>i.pascalCase.unsafeName.toLowerCase());return[this.rootImportPath,...t].join("/")}getImportPathForRequest(e){var t;return(t=this.customConfig)!=null&&t.exportAllRequestsAtRoot?this.rootImportPath:this.getImportPath(e)}getContextTypeReference(){return n.typeReference({name:"Context",importPath:"context"})}getContextTodoFunctionInvocation(){return n.invokeFunc({func:n.typeReference({name:"TODO",importPath:"context"}),arguments_:[]})}getIoReaderTypeReference(){return n.typeReference({name:"Reader",importPath:"io"})}getTestingTypeReference(){return n.typeReference({name:"T",importPath:"testing"})}getNewStringsReaderFunctionInvocation(e){return n.invokeFunc({func:n.typeReference({name:"NewReader",importPath:"strings"}),arguments_:[n.TypeInstantiation.string(e)]})}getClientConstructorName(){var e,t;return((e=this.customConfig)==null?void 0:e.clientConstructorName)!=null?this.customConfig.clientConstructorName:((t=this.customConfig)==null?void 0:t.exportedClientName)!=null?`New${this.customConfig.exportedClientName}`:`New${this.getClientName()}`}getClientName(){var e;return((e=this.customConfig)==null?void 0:e.clientName)!=null?this.customConfig.clientName:"Client"}getClientImportPath(){return`${this.rootImportPath}/client`}getOptionImportPath(){return`${this.rootImportPath}/option`}getGoTypeReferenceFromDeclaration({declaration:e}){return n.typeReference({name:e.name.pascalCase.unsafeName,importPath:this.getImportPath(e.fernFilepath)})}getEnvironmentTypeReferenceFromID(e){let t=this.resolveEnvironmentName(e);if(t!=null)return this.getEnvironmentTypeReference(t)}getEnvironmentTypeReference(e){return n.typeReference({name:`Environments.${this.getTypeName(e)}`,importPath:this.rootImportPath})}static chainMethods(e,...t){if(t.length===0)throw new Error("Must have methods to chain");let i=e;for(let o of t)i=n.invokeMethod({on:i,method:o.method,arguments_:o.arguments_,multiline:o.multiline});return i}};export{h as a};
|
|
2
|
-
//# sourceMappingURL=chunk-B2A7QNZM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/context/DynamicSnippetsGeneratorContext.ts"],"sourcesContent":["import {\n AbstractDynamicSnippetsGeneratorContext,\n FernGeneratorExec\n} from \"@fern-api/browser-compatible-base-generator\";\nimport { assertNever } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { BaseGoCustomConfigSchema, go, resolveRootImportPath } from \"@fern-api/go-ast\";\n\nimport { DynamicTypeInstantiationMapper } from \"./DynamicTypeInstantiationMapper\";\nimport { DynamicTypeMapper } from \"./DynamicTypeMapper\";\nimport { FilePropertyMapper } from \"./FilePropertyMapper\";\n\nexport class DynamicSnippetsGeneratorContext extends AbstractDynamicSnippetsGeneratorContext {\n public ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n public customConfig: BaseGoCustomConfigSchema | undefined;\n public dynamicTypeMapper: DynamicTypeMapper;\n public dynamicTypeInstantiationMapper: DynamicTypeInstantiationMapper;\n public filePropertyMapper: FilePropertyMapper;\n public rootImportPath: string;\n\n constructor({\n ir,\n config\n }: {\n ir: FernIr.dynamic.DynamicIntermediateRepresentation;\n config: FernGeneratorExec.GeneratorConfig;\n }) {\n super({ ir, config });\n this.ir = ir;\n this.customConfig = config.customConfig != null ? (config.customConfig as BaseGoCustomConfigSchema) : undefined;\n this.dynamicTypeMapper = new DynamicTypeMapper({ context: this });\n this.dynamicTypeInstantiationMapper = new DynamicTypeInstantiationMapper({ context: this });\n this.filePropertyMapper = new FilePropertyMapper({ context: this });\n this.rootImportPath = resolveRootImportPath({ config, customConfig: this.customConfig });\n }\n\n public clone(): DynamicSnippetsGeneratorContext {\n return new DynamicSnippetsGeneratorContext({\n ir: this.ir,\n config: this.config\n });\n }\n\n public isOptional(typeReference: FernIr.dynamic.TypeReference): boolean {\n switch (typeReference.type) {\n case \"optional\":\n case \"map\":\n return true;\n case \"nullable\":\n case \"list\":\n case \"set\":\n return this.isOptional(typeReference.value);\n case \"named\":\n case \"literal\":\n case \"primitive\":\n case \"unknown\":\n return false;\n default:\n assertNever(typeReference);\n }\n }\n\n public getMethodName(name: FernIr.Name): string {\n return name.pascalCase.unsafeName;\n }\n\n public getTestMethodName(endpoint: FernIr.dynamic.Endpoint): string {\n return (\n endpoint.declaration.fernFilepath.allParts.map((name) => name.pascalCase.unsafeName).join(\"\") +\n endpoint.declaration.name.pascalCase.unsafeName\n );\n }\n\n public getTypeName(name: FernIr.Name): string {\n return name.pascalCase.unsafeName;\n }\n\n public getImportPath(fernFilepath: FernIr.dynamic.FernFilepath): string {\n const parts = fernFilepath.packagePath.map((path) => path.pascalCase.unsafeName.toLowerCase());\n return [this.rootImportPath, ...parts].join(\"/\");\n }\n\n public getImportPathForRequest(fernFilepath: FernIr.dynamic.FernFilepath): string {\n if (this.customConfig?.exportAllRequestsAtRoot) {\n return this.rootImportPath;\n }\n return this.getImportPath(fernFilepath);\n }\n\n public getContextTypeReference(): go.TypeReference {\n return go.typeReference({\n name: \"Context\",\n importPath: \"context\"\n });\n }\n\n public getContextTodoFunctionInvocation(): go.FuncInvocation {\n return go.invokeFunc({\n func: go.typeReference({\n name: \"TODO\",\n importPath: \"context\"\n }),\n arguments_: []\n });\n }\n\n public getIoReaderTypeReference(): go.TypeReference {\n return go.typeReference({\n name: \"Reader\",\n importPath: \"io\"\n });\n }\n\n public getTestingTypeReference(): go.TypeReference {\n return go.typeReference({\n name: \"T\",\n importPath: \"testing\"\n });\n }\n\n public getNewStringsReaderFunctionInvocation(s: string): go.FuncInvocation {\n return go.invokeFunc({\n func: go.typeReference({\n name: \"NewReader\",\n importPath: \"strings\"\n }),\n arguments_: [go.TypeInstantiation.string(s)]\n });\n }\n\n public getClientConstructorName(): string {\n if (this.customConfig?.clientConstructorName != null) {\n return this.customConfig.clientConstructorName;\n }\n if (this.customConfig?.exportedClientName != null) {\n return `New${this.customConfig.exportedClientName}`;\n }\n return `New${this.getClientName()}`;\n }\n\n public getClientName(): string {\n if (this.customConfig?.clientName != null) {\n return this.customConfig.clientName;\n }\n return \"Client\";\n }\n\n public getClientImportPath(): string {\n return `${this.rootImportPath}/client`;\n }\n\n public getOptionImportPath(): string {\n return `${this.rootImportPath}/option`;\n }\n\n public getGoTypeReferenceFromDeclaration({\n declaration\n }: {\n declaration: FernIr.dynamic.Declaration;\n }): go.TypeReference {\n return go.typeReference({\n name: declaration.name.pascalCase.unsafeName,\n importPath: this.getImportPath(declaration.fernFilepath)\n });\n }\n\n public getEnvironmentTypeReferenceFromID(environmentID: string): go.TypeReference | undefined {\n const environmentName = this.resolveEnvironmentName(environmentID);\n if (environmentName == null) {\n return undefined;\n }\n return this.getEnvironmentTypeReference(environmentName);\n }\n\n private getEnvironmentTypeReference(name: FernIr.Name): go.TypeReference {\n return go.typeReference({\n name: `Environments.${this.getTypeName(name)}`,\n importPath: this.rootImportPath\n });\n }\n\n public static chainMethods(\n baseFunc: go.FuncInvocation,\n ...methods: Omit<go.MethodInvocation.Args, \"on\">[]\n ): go.MethodInvocation {\n if (methods.length === 0) {\n throw new Error(\"Must have methods to chain\");\n }\n\n let current: go.AstNode = baseFunc;\n for (const method of methods) {\n current = go.invokeMethod({\n on: current,\n method: method.method,\n arguments_: method.arguments_,\n multiline: method.multiline\n });\n }\n return current as go.MethodInvocation;\n }\n}\n"],"mappings":"2OAAAA,IAAAC,IAYO,IAAMC,EAAN,MAAMC,UAAwCC,CAAwC,CAQzF,YAAY,CACR,GAAAC,EACA,OAAAC,CACJ,EAGG,CACC,MAAM,CAAE,GAAAD,EAAI,OAAAC,CAAO,CAAC,EAdxBC,EAAA,KAAO,MACPA,EAAA,KAAO,gBACPA,EAAA,KAAO,qBACPA,EAAA,KAAO,kCACPA,EAAA,KAAO,sBACPA,EAAA,KAAO,kBAUH,KAAK,GAAKF,EACV,KAAK,aAAeC,EAAO,cAAgB,KAAQA,EAAO,aAA4C,OACtG,KAAK,kBAAoB,IAAIE,EAAkB,CAAE,QAAS,IAAK,CAAC,EAChE,KAAK,+BAAiC,IAAIC,EAA+B,CAAE,QAAS,IAAK,CAAC,EAC1F,KAAK,mBAAqB,IAAIC,EAAmB,CAAE,QAAS,IAAK,CAAC,EAClE,KAAK,eAAiBC,EAAsB,CAAE,OAAAL,EAAQ,aAAc,KAAK,YAAa,CAAC,CAC3F,CAEO,OAAyC,CAC5C,OAAO,IAAIH,EAAgC,CACvC,GAAI,KAAK,GACT,OAAQ,KAAK,MACjB,CAAC,CACL,CAEO,WAAWS,EAAsD,CACpE,OAAQA,EAAc,KAAM,CACxB,IAAK,WACL,IAAK,MACD,MAAO,GACX,IAAK,WACL,IAAK,OACL,IA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CACL,CAEO,0BAAmC,CAlI9C,IAAAF,EAAAG,EAmIQ,QAAIH,EAAA,KAAK,eAAL,YAAAA,EAAmB,wBAAyB,KACrC,KAAK,aAAa,wBAEzBG,EAAA,KAAK,eAAL,YAAAA,EAAmB,qBAAsB,KAClC,MAAM,KAAK,aAAa,kBAAkB,GAE9C,MAAM,KAAK,cAAc,CAAC,EACrC,CAEO,eAAwB,CA5InC,IAAAH,EA6IQ,QAAIA,EAAA,KAAK,eAAL,YAAAA,EAAmB,aAAc,KAC1B,KAAK,aAAa,WAEtB,QACX,CAEO,qBAA8B,CACjC,MAAO,GAAG,KAAK,cAAc,SACjC,CAEO,qBAA8B,CACjC,MAAO,GAAG,KAAK,cAAc,SACjC,CAEO,kCAAkC,CACrC,YAAAI,CACJ,EAEqB,CACjB,OAAOH,EAAG,cAAc,CACpB,KAAMG,EAAY,KAAK,WAAW,WAClC,WAAY,KAAK,cAAcA,EAAY,YAAY,CAC3D,CAAC,CACL,CAEO,kCAAkCC,EAAqD,CAC1F,IAAMC,EAAkB,KAAK,uBAAuBD,CAAa,EACjE,GAAIC,GAAmB,KAGvB,OAAO,KAAK,4BAA4BA,CAAe,CAC3D,CAEQ,4BAA4BX,EAAqC,CACrE,OAAOM,EAAG,cAAc,CACpB,KAAM,gBAAgB,KAAK,YAAYN,CAAI,CAAC,GAC5C,WAAY,KAAK,cACrB,CAAC,CACL,CAEA,OAAc,aACVY,KACGC,EACgB,CACnB,GAAIA,EAAQ,SAAW,EACnB,MAAM,IAAI,MAAM,4BAA4B,EAGhD,IAAIC,EAAsBF,EAC1B,QAAWG,KAAUF,EACjBC,EAAUR,EAAG,aAAa,CACtB,GAAIQ,EACJ,OAAQC,EAAO,OACf,WAAYA,EAAO,WACnB,UAAWA,EAAO,SACtB,CAAC,EAEL,OAAOD,CACX,CACJ","names":["init_process","init_buffer","DynamicSnippetsGeneratorContext","_DynamicSnippetsGeneratorContext","AbstractDynamicSnippetsGeneratorContext","ir","config","__publicField","DynamicTypeMapper","DynamicTypeInstantiationMapper","FilePropertyMapper","resolveRootImportPath","typeReference","assertNever","name","endpoint","fernFilepath","parts","path","_a","go_exports","s","_b","declaration","environmentID","environmentName","baseFunc","methods","current","method"]}
|
package/esm/chunk-DVDVP26D.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as p}from"./chunk-3Z2URLHB.js";import{e as u,f as l,g as d,h as c,j as r}from"./chunk-JHIUGKJ4.js";l();d();var y=class{constructor({context:e}){u(this,"context");this.context=e}convert(e){if(e.value===null&&!this.context.isNullable(e.typeReference)&&this.context.errors.add({severity:p.Critical,message:"Expected non-null value, but got null"}),e.value==null)return r.TypeInstantiation.nop();switch(e.typeReference.type){case"list":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return r.TypeInstantiation.nop();case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?r.TypeInstantiation.nop():this.convertNamed({named:t,value:e.value,as:e.as})}case"nullable":{let t=e.typeReference.value;if(t.type==="named"){let n=this.context.resolveNamedType({typeId:t.value});if((n==null?void 0:n.type)==="alias"&&["list","set","map"].includes(n.typeReference.type)){let i=this.convert({typeReference:n.typeReference,value:e.value,as:e.as}),a=this.context.getTypeName(n.declaration.name),o=this.context.getImportPath(n.declaration.fernFilepath);return this.reconstructAliasCollectionLiteral({collectionLiteral:i,aliasName:a,aliasImportPath:o})}}return r.TypeInstantiation.optional(this.convert({typeReference:t,value:e.value,as:e.as}))}case"optional":{let t=e.typeReference.value;if(t.type==="named"){let n=this.context.resolveNamedType({typeId:t.value});if((n==null?void 0:n.type)==="alias"&&["list","set","map"].includes(n.typeReference.type)){let i=this.convert({typeReference:n.typeReference,value:e.value,as:e.as}),a=this.context.getTypeName(n.declaration.name),o=this.context.getImportPath(n.declaration.fernFilepath);return this.reconstructAliasCollectionLiteral({collectionLiteral:i,aliasName:a,aliasImportPath:o})}}return r.TypeInstantiation.optional(this.convert({typeReference:t,value:e.value,as:e.as}))}case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"set":return this.convertList({list:e.typeReference.value,value:e.value});case"unknown":return this.convertUnknown({value:e.value});default:c(e.typeReference)}}convertToPointerIfPossible(e){let t=this.convert(e);switch(e.typeReference.type){case"named":{let n=this.context.resolveNamedType({typeId:e.typeReference.value});return(n==null?void 0:n.type)==="enum"?r.TypeInstantiation.reference(r.invokeMethod({on:t,method:"Ptr",arguments_:[]})):t}default:return t}}convertList({list:e,value:t}){return Array.isArray(t)?r.TypeInstantiation.slice({valueType:this.context.dynamicTypeMapper.convert({typeReference:e}),values:t.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:p.Critical,message:`Expected array but got: ${typeof t}`}),r.TypeInstantiation.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:p.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),r.TypeInstantiation.nop()):r.TypeInstantiation.map({keyType:this.context.dynamicTypeMapper.convert({typeReference:e.key}),valueType:this.context.dynamicTypeMapper.convert({typeReference:e.value}),entries:Object.entries(t).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:t,as:n}){switch(e.type){case"alias":return this.convertAlias({aliasType:e,value:t,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:t});case"enum":return this.convertEnum({enum_:e,value:t});case"object":return this.convertObject({object_:e,value:t});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t});default:c(e)}}convertAlias({aliasType:e,value:t,as:n}){switch(e.typeReference.type){case"literal":return r.TypeInstantiation.reference(r.invokeFunc({func:r.typeReference({name:this.context.getTypeName(e.declaration.name),importPath:this.context.getImportPath(e.declaration.fernFilepath)}),arguments_:[this.convertLiteralValue(e.typeReference.value)]}));default:return this.convert({typeReference:e.typeReference,value:t,as:n})}}reconstructAliasCollectionLiteral({collectionLiteral:e,aliasName:t,aliasImportPath:n}){let i=e.internalType;return i.type==="slice"?r.TypeInstantiation.reference(r.codeblock(a=>{a.write("&"),a.writeNode(r.typeReference({name:t,importPath:n}));let o=i.values;if(o.length===0){a.write("{}");return}a.writeLine("{"),a.indent();for(let s of o)a.writeNode(s),a.writeLine(",");a.dedent(),a.write("}")})):i.type==="map"?r.TypeInstantiation.reference(r.codeblock(a=>{a.write("&"),a.writeNode(r.typeReference({name:t,importPath:n}));let o=i.entries;if(o.length===0){a.write("{}");return}a.writeLine("{"),a.indent();for(let s of o)a.writeNode(s.key),a.write(": "),a.writeNode(s.value),a.writeLine(",");a.dedent(),a.write("}")})):r.TypeInstantiation.reference(r.codeblock(a=>{a.write("&"),a.writeNode(e)}))}convertLiteralValue(e){switch(e.type){case"boolean":return r.TypeInstantiation.bool(e.value);case"string":return r.TypeInstantiation.string(e.value);default:c(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:t}){let n=this.context.getGoTypeReferenceFromDeclaration({declaration:e.declaration}),i=this.context.resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:t});if(i==null)return r.TypeInstantiation.nop();let a=i.singleDiscriminatedUnionType,o=this.getBaseFields({discriminatedUnionTypeInstance:i,singleDiscriminatedUnionType:a});switch(a.type){case"samePropertiesAsObject":{let s=this.context.resolveNamedType({typeId:a.typeId});return s==null?r.TypeInstantiation.nop():r.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(a.discriminantValue.name),value:this.convertNamed({named:s,value:i.value})},...o]})}case"singleProperty":{let s=this.context.getRecord(i.value);if(s==null)return r.TypeInstantiation.nop();try{return this.context.errors.scope(a.discriminantValue.wireValue),r.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(a.discriminantValue.name),value:this.convert({typeReference:a.typeReference,value:s[a.discriminantValue.wireValue]})},...o]})}finally{this.context.errors.unscope()}}case"noProperties":return r.TypeInstantiation.structPointer({typeReference:n,fields:[{name:this.context.getTypeName(i.discriminantValue.name),value:r.TypeInstantiation.string(a.discriminantValue.wireValue)},...o]});default:c(a)}}getBaseFields({discriminatedUnionTypeInstance:e,singleDiscriminatedUnionType:t}){var i,a;return this.context.associateByWireValue({parameters:(i=t.properties)!=null?i:[],values:(a=this.context.getRecord(e.value))!=null?a:{},ignoreMissingParameters:!0}).map(o=>{this.context.errors.scope(o.name.wireValue);try{return{name:this.context.getTypeName(o.name.name),value:this.convert(o)}}finally{this.context.errors.unscope()}})}convertObject({object_:e,value:t}){var i;let n=this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(t))!=null?i:{}});return r.TypeInstantiation.structPointer({typeReference:r.typeReference({name:this.context.getTypeName(e.declaration.name),importPath:this.context.getImportPath(e.declaration.fernFilepath)}),fields:n.map(a=>{this.context.errors.scope(a.name.wireValue);try{return{name:this.context.getTypeName(a.name.name),value:this.convert(a)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:t}){let n=this.getEnumValueName({enum_:e,value:t});return n==null?r.TypeInstantiation.nop():r.TypeInstantiation.enum(r.typeReference({name:n,importPath:this.context.getImportPath(e.declaration.fernFilepath)}))}getEnumValueName({enum_:e,value:t}){if(typeof t!="string"){this.context.errors.add({severity:p.Critical,message:`Expected enum value string, got: ${typeof t}`});return}let n=e.values.find(i=>i.wireValue===t);if(n==null){this.context.errors.add({severity:p.Critical,message:`An enum value named "${t}" does not exist in this context`});return}return`${this.context.getTypeName(e.declaration.name)}${this.context.getTypeName(n.name)}`}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t});if(n==null)return r.TypeInstantiation.nop();let i=this.getUndiscriminatedUnionFieldName({typeReference:n.valueTypeReference});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.structPointer({typeReference:this.context.getGoTypeReferenceFromDeclaration({declaration:e.declaration}),fields:[{name:i,value:n.typeInstantiation}]})}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t}){for(let n of e.types)try{let i=this.convert({typeReference:n,value:t});return{valueTypeReference:n,typeInstantiation:i}}catch(i){continue}this.context.errors.add({severity:p.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof t}" value`})}getUndiscriminatedUnionFieldName({typeReference:e}){switch(e.type){case"list":return this.getUndiscriminatedUnionFieldNameForList({list:e});case"literal":return this.getUndiscriminatedUnionFieldNameForLiteral({literal:e.value});case"map":return this.getUndiscriminatedUnionFieldNameForMap({map:e});case"named":{let t=this.context.resolveNamedType({typeId:e.value});return t==null?void 0:this.context.getTypeName(t.declaration.name)}case"optional":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:e});case"nullable":return this.getUndiscriminatedUnionFieldNameForOptional({typeReference:e});case"primitive":return this.getUndiscriminatedUnionFieldNameForPrimitive({primitive:e.value});case"set":return this.getUndiscriminatedUnionFieldNameForSet({set:e});case"unknown":return"Unknown";default:c(e)}}getUndiscriminatedUnionFieldNameForList({list:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}List`}getUndiscriminatedUnionFieldNameForMap({map:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e.key});if(t==null)return;let n=this.getUndiscriminatedUnionFieldName({typeReference:e.value});if(n!=null)return`${t}${n}Map`}getUndiscriminatedUnionFieldNameForOptional({typeReference:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}Optional`}getUndiscriminatedUnionFieldNameForSet({set:e}){let t=this.getUndiscriminatedUnionFieldName({typeReference:e});if(t!=null)return`${t}Set`}getUndiscriminatedUnionFieldNameForLiteral({literal:e}){switch(e.type){case"boolean":return e.value?"TrueLiteral":"FalseLiteral";case"string":return`${e.value}StringLiteral`;default:c(e)}}getUndiscriminatedUnionFieldNameForPrimitive({primitive:e}){switch(e){case"INTEGER":case"UINT":return"Integer";case"LONG":case"UINT_64":return"Long";case"FLOAT":case"DOUBLE":return"Double";case"BOOLEAN":return"Boolean";case"BIG_INTEGER":case"STRING":return"String";case"UUID":return"Uuid";case"DATE":return"Date";case"DATE_TIME":return"DateTime";case"BASE_64":return"Base64";default:c(e)}}convertUnknown({value:e}){return r.TypeInstantiation.any(e)}convertPrimitive({primitive:e,value:t,as:n}){switch(e){case"INTEGER":case"UINT":{let i=this.getValueAsNumber({value:t,as:n});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.int(i)}case"LONG":case"UINT_64":{let i=this.getValueAsNumber({value:t,as:n});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.int64(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:t,as:n});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.float64(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:t,as:n});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.bool(i)}case"STRING":{let i=this.context.getValueAsString({value:t});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.string(i)}case"DATE":{let i=this.context.getValueAsString({value:t});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.date(i)}case"DATE_TIME":{let i=this.context.getValueAsString({value:t});if(i==null)return r.TypeInstantiation.nop();let a=this.normalizeDateTimeString(i);return r.TypeInstantiation.dateTime(a)}case"UUID":{let i=this.context.getValueAsString({value:t});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.uuid(i)}case"BASE_64":{let i=this.context.getValueAsString({value:t});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.bytes(i)}case"BIG_INTEGER":{let i=this.context.getValueAsString({value:t});return i==null?r.TypeInstantiation.nop():r.TypeInstantiation.string(i)}default:c(e)}}getValueAsNumber({value:e,as:t}){let n=t==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:t}){let n=t==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}normalizeDateTimeString(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?`${e}T00:00:00Z`:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/.test(e)?`${e}Z`:e}};export{y as a};
|
|
2
|
-
//# sourceMappingURL=chunk-DVDVP26D.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/context/DynamicTypeInstantiationMapper.ts"],"sourcesContent":["import { DiscriminatedUnionTypeInstance, Severity } from \"@fern-api/browser-compatible-base-generator\";\nimport { assertNever } from \"@fern-api/core-utils\";\nimport { FernIr } from \"@fern-api/dynamic-ir-sdk\";\nimport { go } from \"@fern-api/go-ast\";\n\nimport { DynamicSnippetsGeneratorContext } from \"./DynamicSnippetsGeneratorContext\";\n\nexport declare namespace DynamicTypeInstantiationMapper {\n interface Args {\n typeReference: FernIr.dynamic.TypeReference;\n value: unknown;\n as?: ConvertedAs;\n }\n\n // Identifies what the type is being converted as, which sometimes influences how\n // the type is instantiated.\n type ConvertedAs = \"key\";\n}\n\nexport class DynamicTypeInstantiationMapper {\n private context: DynamicSnippetsGeneratorContext;\n\n constructor({ context }: { context: DynamicSnippetsGeneratorContext }) {\n this.context = context;\n }\n\n public convert(args: DynamicTypeInstantiationMapper.Args): go.TypeInstantiation {\n // eslint-disable-next-line eqeqeq\n if (args.value === null && !this.context.isNullable(args.typeReference)) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: \"Expected non-null value, but got null\"\n });\n }\n if (args.value == null) {\n return go.TypeInstantiation.nop();\n }\n switch (args.typeReference.type) {\n case \"list\":\n return this.convertList({ list: args.typeReference.value, value: args.value });\n case \"literal\":\n return go.TypeInstantiation.nop();\n case \"map\":\n return this.convertMap({ map: args.typeReference, value: args.value });\n case \"named\": {\n const named = this.context.resolveNamedType({ typeId: args.typeReference.value });\n if (named == null) {\n return go.TypeInstantiation.nop();\n }\n return this.convertNamed({ named, value: args.value, as: args.as });\n }\n case \"nullable\": {\n const inner = args.typeReference.value;\n // Special case: nullable + alias-of-collection\n // For fields like `Services *ServicesUs50` where `type ServicesUs50 = []*ServiceUs50`,\n // we generate `&ServicesUs50{...}` using the alias name in the composite literal.\n // This is more idiomatic and matches the exported API type users see.\n if (inner.type === \"named\") {\n const named = this.context.resolveNamedType({ typeId: inner.value });\n if (named?.type === \"alias\" && [\"list\", \"set\", \"map\"].includes(named.typeReference.type)) {\n // Build the underlying collection literal\n const collectionLiteral = this.convert({\n typeReference: named.typeReference,\n value: args.value,\n as: args.as\n });\n\n // Get the alias type reference\n const aliasName = this.context.getTypeName(named.declaration.name);\n const aliasImportPath = this.context.getImportPath(named.declaration.fernFilepath);\n\n // Reconstruct the composite literal using the alias name\n return this.reconstructAliasCollectionLiteral({\n collectionLiteral,\n aliasName,\n aliasImportPath\n });\n }\n }\n // Default behavior for all other nullables\n return go.TypeInstantiation.optional(\n this.convert({ typeReference: inner, value: args.value, as: args.as })\n );\n }\n case \"optional\": {\n const inner = args.typeReference.value;\n // Special case: optional + alias-of-collection\n // For fields like `Services *ServicesUs50` where `type ServicesUs50 = []*ServiceUs50`,\n // we generate `&ServicesUs50{...}` using the alias name in the composite literal.\n // This is more idiomatic and matches the exported API type users see.\n if (inner.type === \"named\") {\n const named = this.context.resolveNamedType({ typeId: inner.value });\n if (named?.type === \"alias\" && [\"list\", \"set\", \"map\"].includes(named.typeReference.type)) {\n // Build the underlying collection literal\n const collectionLiteral = this.convert({\n typeReference: named.typeReference,\n value: args.value,\n as: args.as\n });\n\n // Get the alias type reference\n const aliasName = this.context.getTypeName(named.declaration.name);\n const aliasImportPath = this.context.getImportPath(named.declaration.fernFilepath);\n\n // Reconstruct the composite literal using the alias name\n return this.reconstructAliasCollectionLiteral({\n collectionLiteral,\n aliasName,\n aliasImportPath\n });\n }\n }\n // Default behavior for all other optionals\n return go.TypeInstantiation.optional(\n this.convert({ typeReference: inner, value: args.value, as: args.as })\n );\n }\n case \"primitive\":\n return this.convertPrimitive({ primitive: args.typeReference.value, value: args.value, as: args.as });\n case \"set\":\n return this.convertList({ list: args.typeReference.value, value: args.value });\n case \"unknown\":\n return this.convertUnknown({ value: args.value });\n default:\n assertNever(args.typeReference);\n }\n }\n\n public convertToPointerIfPossible(args: DynamicTypeInstantiationMapper.Args): go.TypeInstantiation {\n const converted = this.convert(args);\n switch (args.typeReference.type) {\n case \"named\": {\n const named = this.context.resolveNamedType({ typeId: args.typeReference.value });\n if (named?.type === \"enum\") {\n return go.TypeInstantiation.reference(\n go.invokeMethod({\n on: converted,\n method: \"Ptr\",\n arguments_: []\n })\n );\n }\n return converted;\n }\n default:\n return converted;\n }\n }\n\n private convertList({ list, value }: { list: FernIr.dynamic.TypeReference; value: unknown }): go.TypeInstantiation {\n if (!Array.isArray(value)) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `Expected array but got: ${typeof value}`\n });\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.slice({\n valueType: this.context.dynamicTypeMapper.convert({ typeReference: list }),\n values: value.map((v, index) => {\n this.context.errors.scope({ index });\n try {\n return this.convert({ typeReference: list, value: v });\n } finally {\n this.context.errors.unscope();\n }\n })\n });\n }\n\n private convertMap({ map, value }: { map: FernIr.dynamic.MapType; value: unknown }): go.TypeInstantiation {\n if (typeof value !== \"object\" || value == null) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `Expected object but got: ${value == null ? \"null\" : typeof value}`\n });\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.map({\n keyType: this.context.dynamicTypeMapper.convert({ typeReference: map.key }),\n valueType: this.context.dynamicTypeMapper.convert({ typeReference: map.value }),\n entries: Object.entries(value).map(([key, value]) => {\n this.context.errors.scope(key);\n try {\n return {\n key: this.convert({ typeReference: map.key, value: key, as: \"key\" }),\n value: this.convert({ typeReference: map.value, value })\n };\n } finally {\n this.context.errors.unscope();\n }\n })\n });\n }\n\n private convertNamed({\n named,\n value,\n as\n }: {\n named: FernIr.dynamic.NamedType;\n value: unknown;\n as?: DynamicTypeInstantiationMapper.ConvertedAs;\n }): go.TypeInstantiation {\n switch (named.type) {\n case \"alias\":\n return this.convertAlias({\n aliasType: named,\n value,\n as\n });\n case \"discriminatedUnion\":\n return this.convertDiscriminatedUnion({\n discriminatedUnion: named,\n value\n });\n case \"enum\":\n return this.convertEnum({ enum_: named, value });\n case \"object\":\n return this.convertObject({ object_: named, value });\n case \"undiscriminatedUnion\":\n return this.convertUndiscriminatedUnion({ undiscriminatedUnion: named, value });\n default:\n assertNever(named);\n }\n }\n\n private convertAlias({\n aliasType,\n value,\n as\n }: {\n aliasType: FernIr.dynamic.NamedType.Alias;\n value: unknown;\n as?: DynamicTypeInstantiationMapper.ConvertedAs;\n }): go.TypeInstantiation {\n switch (aliasType.typeReference.type) {\n case \"literal\":\n return go.TypeInstantiation.reference(\n go.invokeFunc({\n func: go.typeReference({\n name: this.context.getTypeName(aliasType.declaration.name),\n importPath: this.context.getImportPath(aliasType.declaration.fernFilepath)\n }),\n arguments_: [this.convertLiteralValue(aliasType.typeReference.value)]\n })\n );\n default:\n return this.convert({ typeReference: aliasType.typeReference, value, as });\n }\n }\n\n private reconstructAliasCollectionLiteral({\n collectionLiteral,\n aliasName,\n aliasImportPath\n }: {\n collectionLiteral: go.TypeInstantiation;\n aliasName: string;\n aliasImportPath: string;\n }): go.TypeInstantiation {\n // Reconstruct the composite literal using the alias name\n const internal = collectionLiteral.internalType;\n // Note: sets are converted to slices via convertList, so they're handled by the slice case\n if (internal.type === \"slice\") {\n return go.TypeInstantiation.reference(\n go.codeblock((writer) => {\n writer.write(\"&\");\n writer.writeNode(\n go.typeReference({\n name: aliasName,\n importPath: aliasImportPath\n })\n );\n\n const values = internal.values;\n if (values.length === 0) {\n writer.write(\"{}\");\n return;\n }\n\n writer.writeLine(\"{\");\n writer.indent();\n for (const v of values) {\n writer.writeNode(v);\n writer.writeLine(\",\");\n }\n writer.dedent();\n writer.write(\"}\");\n })\n );\n }\n if (internal.type === \"map\") {\n return go.TypeInstantiation.reference(\n go.codeblock((writer) => {\n writer.write(\"&\");\n writer.writeNode(\n go.typeReference({\n name: aliasName,\n importPath: aliasImportPath\n })\n );\n\n const entries = internal.entries;\n if (entries.length === 0) {\n writer.write(\"{}\");\n return;\n }\n\n writer.writeLine(\"{\");\n writer.indent();\n for (const entry of entries) {\n writer.writeNode(entry.key);\n writer.write(\": \");\n writer.writeNode(entry.value);\n writer.writeLine(\",\");\n }\n writer.dedent();\n writer.write(\"}\");\n })\n );\n }\n // Fallback: if not a slice or map, use the underlying type approach\n return go.TypeInstantiation.reference(\n go.codeblock((writer) => {\n writer.write(\"&\");\n writer.writeNode(collectionLiteral);\n })\n );\n }\n\n private convertLiteralValue(literal: FernIr.dynamic.LiteralType): go.TypeInstantiation {\n switch (literal.type) {\n case \"boolean\":\n return go.TypeInstantiation.bool(literal.value);\n case \"string\":\n return go.TypeInstantiation.string(literal.value);\n default:\n assertNever(literal);\n }\n }\n\n private convertDiscriminatedUnion({\n discriminatedUnion,\n value\n }: {\n discriminatedUnion: FernIr.dynamic.DiscriminatedUnionType;\n value: unknown;\n }): go.TypeInstantiation {\n const structTypeReference = this.context.getGoTypeReferenceFromDeclaration({\n declaration: discriminatedUnion.declaration\n });\n const discriminatedUnionTypeInstance = this.context.resolveDiscriminatedUnionTypeInstance({\n discriminatedUnion,\n value\n });\n if (discriminatedUnionTypeInstance == null) {\n return go.TypeInstantiation.nop();\n }\n const unionVariant = discriminatedUnionTypeInstance.singleDiscriminatedUnionType;\n const baseFields = this.getBaseFields({\n discriminatedUnionTypeInstance,\n singleDiscriminatedUnionType: unionVariant\n });\n switch (unionVariant.type) {\n case \"samePropertiesAsObject\": {\n const named = this.context.resolveNamedType({\n typeId: unionVariant.typeId\n });\n if (named == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.structPointer({\n typeReference: structTypeReference,\n fields: [\n {\n name: this.context.getTypeName(unionVariant.discriminantValue.name),\n value: this.convertNamed({ named, value: discriminatedUnionTypeInstance.value })\n },\n ...baseFields\n ]\n });\n }\n case \"singleProperty\": {\n const record = this.context.getRecord(discriminatedUnionTypeInstance.value);\n if (record == null) {\n return go.TypeInstantiation.nop();\n }\n try {\n this.context.errors.scope(unionVariant.discriminantValue.wireValue);\n return go.TypeInstantiation.structPointer({\n typeReference: structTypeReference,\n fields: [\n {\n name: this.context.getTypeName(unionVariant.discriminantValue.name),\n value: this.convert({\n typeReference: unionVariant.typeReference,\n value: record[unionVariant.discriminantValue.wireValue]\n })\n },\n ...baseFields\n ]\n });\n } finally {\n this.context.errors.unscope();\n }\n }\n case \"noProperties\":\n return go.TypeInstantiation.structPointer({\n typeReference: structTypeReference,\n fields: [\n {\n // Unions with no properties require the discriminant property to be set.\n name: this.context.getTypeName(discriminatedUnionTypeInstance.discriminantValue.name),\n value: go.TypeInstantiation.string(unionVariant.discriminantValue.wireValue)\n },\n ...baseFields\n ]\n });\n default:\n assertNever(unionVariant);\n }\n }\n\n private getBaseFields({\n discriminatedUnionTypeInstance,\n singleDiscriminatedUnionType\n }: {\n discriminatedUnionTypeInstance: DiscriminatedUnionTypeInstance;\n singleDiscriminatedUnionType: FernIr.dynamic.SingleDiscriminatedUnionType;\n }): go.StructField[] {\n const properties = this.context.associateByWireValue({\n parameters: singleDiscriminatedUnionType.properties ?? [],\n values: this.context.getRecord(discriminatedUnionTypeInstance.value) ?? {},\n\n // We're only selecting the base properties here. The rest of the properties\n // are handled by the union variant.\n ignoreMissingParameters: true\n });\n return properties.map((property) => {\n this.context.errors.scope(property.name.wireValue);\n try {\n return {\n name: this.context.getTypeName(property.name.name),\n value: this.convert(property)\n };\n } finally {\n this.context.errors.unscope();\n }\n });\n }\n\n private convertObject({\n object_,\n value\n }: {\n object_: FernIr.dynamic.ObjectType;\n value: unknown;\n }): go.TypeInstantiation {\n const properties = this.context.associateByWireValue({\n parameters: object_.properties,\n values: this.context.getRecord(value) ?? {}\n });\n return go.TypeInstantiation.structPointer({\n typeReference: go.typeReference({\n name: this.context.getTypeName(object_.declaration.name),\n importPath: this.context.getImportPath(object_.declaration.fernFilepath)\n }),\n fields: properties.map((property) => {\n this.context.errors.scope(property.name.wireValue);\n try {\n return {\n name: this.context.getTypeName(property.name.name),\n value: this.convert(property)\n };\n } finally {\n this.context.errors.unscope();\n }\n })\n });\n }\n\n private convertEnum({ enum_, value }: { enum_: FernIr.dynamic.EnumType; value: unknown }): go.TypeInstantiation {\n const name = this.getEnumValueName({ enum_, value });\n if (name == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.enum(\n go.typeReference({\n name,\n importPath: this.context.getImportPath(enum_.declaration.fernFilepath)\n })\n );\n }\n\n private getEnumValueName({ enum_, value }: { enum_: FernIr.dynamic.EnumType; value: unknown }): string | undefined {\n if (typeof value !== \"string\") {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `Expected enum value string, got: ${typeof value}`\n });\n return undefined;\n }\n const enumValue = enum_.values.find((v) => v.wireValue === value);\n if (enumValue == null) {\n this.context.errors.add({\n severity: Severity.Critical,\n message: `An enum value named \"${value}\" does not exist in this context`\n });\n return undefined;\n }\n return `${this.context.getTypeName(enum_.declaration.name)}${this.context.getTypeName(enumValue.name)}`;\n }\n\n private convertUndiscriminatedUnion({\n undiscriminatedUnion,\n value\n }: {\n undiscriminatedUnion: FernIr.dynamic.UndiscriminatedUnionType;\n value: unknown;\n }): go.TypeInstantiation {\n const result = this.findMatchingUndiscriminatedUnionType({\n undiscriminatedUnion,\n value\n });\n if (result == null) {\n return go.TypeInstantiation.nop();\n }\n const fieldName = this.getUndiscriminatedUnionFieldName({ typeReference: result.valueTypeReference });\n if (fieldName == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.structPointer({\n typeReference: this.context.getGoTypeReferenceFromDeclaration({\n declaration: undiscriminatedUnion.declaration\n }),\n fields: [\n {\n name: fieldName,\n value: result.typeInstantiation\n }\n ]\n });\n }\n\n private findMatchingUndiscriminatedUnionType({\n undiscriminatedUnion,\n value\n }: {\n undiscriminatedUnion: FernIr.dynamic.UndiscriminatedUnionType;\n value: unknown;\n }): { valueTypeReference: FernIr.dynamic.TypeReference; typeInstantiation: go.TypeInstantiation } | undefined {\n for (const typeReference of undiscriminatedUnion.types) {\n try {\n const typeInstantiation = this.convert({ typeReference, value });\n return { valueTypeReference: typeReference, typeInstantiation };\n } catch (e) {\n continue;\n }\n }\n this.context.errors.add({\n severity: Severity.Critical,\n message: `None of the types in the undiscriminated union matched the given \"${typeof value}\" value`\n });\n return undefined;\n }\n\n private getUndiscriminatedUnionFieldName({\n typeReference\n }: {\n typeReference: FernIr.dynamic.TypeReference;\n }): string | undefined {\n switch (typeReference.type) {\n case \"list\":\n return this.getUndiscriminatedUnionFieldNameForList({ list: typeReference });\n case \"literal\":\n return this.getUndiscriminatedUnionFieldNameForLiteral({ literal: typeReference.value });\n case \"map\":\n return this.getUndiscriminatedUnionFieldNameForMap({ map: typeReference });\n case \"named\": {\n const named = this.context.resolveNamedType({ typeId: typeReference.value });\n if (named == null) {\n return undefined;\n }\n return this.context.getTypeName(named.declaration.name);\n }\n case \"optional\":\n return this.getUndiscriminatedUnionFieldNameForOptional({ typeReference });\n case \"nullable\":\n return this.getUndiscriminatedUnionFieldNameForOptional({ typeReference });\n case \"primitive\":\n return this.getUndiscriminatedUnionFieldNameForPrimitive({ primitive: typeReference.value });\n case \"set\":\n return this.getUndiscriminatedUnionFieldNameForSet({ set: typeReference });\n case \"unknown\":\n return \"Unknown\";\n default:\n assertNever(typeReference);\n }\n }\n\n private getUndiscriminatedUnionFieldNameForList({\n list\n }: {\n list: FernIr.dynamic.TypeReference.List;\n }): string | undefined {\n const fieldName = this.getUndiscriminatedUnionFieldName({ typeReference: list });\n if (fieldName == null) {\n return undefined;\n }\n return `${fieldName}List`;\n }\n\n private getUndiscriminatedUnionFieldNameForMap({ map }: { map: FernIr.dynamic.MapType }): string | undefined {\n const keyFieldName = this.getUndiscriminatedUnionFieldName({ typeReference: map.key });\n if (keyFieldName == null) {\n return undefined;\n }\n const valueFieldName = this.getUndiscriminatedUnionFieldName({ typeReference: map.value });\n if (valueFieldName == null) {\n return undefined;\n }\n return `${keyFieldName}${valueFieldName}Map`;\n }\n\n private getUndiscriminatedUnionFieldNameForOptional({\n typeReference\n }: {\n typeReference: FernIr.dynamic.TypeReference.Optional | FernIr.dynamic.TypeReference.Nullable;\n }): string | undefined {\n const fieldName = this.getUndiscriminatedUnionFieldName({ typeReference });\n if (fieldName == null) {\n return undefined;\n }\n return `${fieldName}Optional`;\n }\n\n private getUndiscriminatedUnionFieldNameForSet({\n set\n }: {\n set: FernIr.dynamic.TypeReference.Set;\n }): string | undefined {\n const fieldName = this.getUndiscriminatedUnionFieldName({ typeReference: set });\n if (fieldName == null) {\n return undefined;\n }\n return `${fieldName}Set`;\n }\n\n private getUndiscriminatedUnionFieldNameForLiteral({\n literal\n }: {\n literal: FernIr.dynamic.LiteralType;\n }): string | undefined {\n switch (literal.type) {\n case \"boolean\":\n if (literal.value) {\n return \"TrueLiteral\";\n }\n return \"FalseLiteral\";\n case \"string\":\n return `${literal.value}StringLiteral`;\n default:\n assertNever(literal);\n }\n }\n\n private getUndiscriminatedUnionFieldNameForPrimitive({\n primitive\n }: {\n primitive: FernIr.dynamic.PrimitiveTypeV1;\n }): string {\n switch (primitive) {\n case \"INTEGER\":\n case \"UINT\":\n return \"Integer\";\n case \"LONG\":\n case \"UINT_64\":\n return \"Long\";\n case \"FLOAT\":\n case \"DOUBLE\":\n return \"Double\";\n case \"BOOLEAN\":\n return \"Boolean\";\n case \"BIG_INTEGER\":\n case \"STRING\":\n return \"String\";\n case \"UUID\":\n return \"Uuid\";\n case \"DATE\":\n return \"Date\";\n case \"DATE_TIME\":\n return \"DateTime\";\n case \"BASE_64\":\n return \"Base64\";\n default:\n assertNever(primitive);\n }\n }\n\n private convertUnknown({ value }: { value: unknown }): go.TypeInstantiation {\n return go.TypeInstantiation.any(value);\n }\n\n private convertPrimitive({\n primitive,\n value,\n as\n }: {\n primitive: FernIr.dynamic.PrimitiveTypeV1;\n value: unknown;\n as?: DynamicTypeInstantiationMapper.ConvertedAs;\n }): go.TypeInstantiation {\n switch (primitive) {\n case \"INTEGER\":\n case \"UINT\": {\n const num = this.getValueAsNumber({ value, as });\n if (num == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.int(num);\n }\n case \"LONG\":\n case \"UINT_64\": {\n const num = this.getValueAsNumber({ value, as });\n if (num == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.int64(num);\n }\n case \"FLOAT\":\n case \"DOUBLE\": {\n const num = this.getValueAsNumber({ value, as });\n if (num == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.float64(num);\n }\n case \"BOOLEAN\": {\n const bool = this.getValueAsBoolean({ value, as });\n if (bool == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.bool(bool);\n }\n case \"STRING\": {\n const str = this.context.getValueAsString({ value });\n if (str == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.string(str);\n }\n case \"DATE\": {\n const date = this.context.getValueAsString({ value });\n if (date == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.date(date);\n }\n case \"DATE_TIME\": {\n const dateTime = this.context.getValueAsString({ value });\n if (dateTime == null) {\n return go.TypeInstantiation.nop();\n }\n const normalizedDateTime = this.normalizeDateTimeString(dateTime);\n return go.TypeInstantiation.dateTime(normalizedDateTime);\n }\n case \"UUID\": {\n const uuid = this.context.getValueAsString({ value });\n if (uuid == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.uuid(uuid);\n }\n case \"BASE_64\": {\n const base64 = this.context.getValueAsString({ value });\n if (base64 == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.bytes(base64);\n }\n case \"BIG_INTEGER\": {\n const bigInt = this.context.getValueAsString({ value });\n if (bigInt == null) {\n return go.TypeInstantiation.nop();\n }\n return go.TypeInstantiation.string(bigInt);\n }\n default:\n assertNever(primitive);\n }\n }\n\n private getValueAsNumber({\n value,\n as\n }: {\n value: unknown;\n as?: DynamicTypeInstantiationMapper.ConvertedAs;\n }): number | undefined {\n const num = as === \"key\" ? (typeof value === \"string\" ? Number(value) : value) : value;\n return this.context.getValueAsNumber({ value: num });\n }\n\n private getValueAsBoolean({\n value,\n as\n }: {\n value: unknown;\n as?: DynamicTypeInstantiationMapper.ConvertedAs;\n }): boolean | undefined {\n const bool =\n as === \"key\" ? (typeof value === \"string\" ? value === \"true\" : value === \"false\" ? false : value) : value;\n return this.context.getValueAsBoolean({ value: bool });\n }\n\n private normalizeDateTimeString(dateTime: string): string {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateTime)) {\n return `${dateTime}T00:00:00Z`;\n }\n if (/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$/.test(dateTime)) {\n return `${dateTime}Z`;\n }\n return dateTime;\n }\n}\n"],"mappings":"4GAAAA,IAAAC,IAmBO,IAAMC,EAAN,KAAqC,CAGxC,YAAY,CAAE,QAAAC,CAAQ,EAAiD,CAFvEC,EAAA,KAAQ,WAGJ,KAAK,QAAUD,CACnB,CAEO,QAAQE,EAAiE,CAQ5E,GANIA,EAAK,QAAU,MAAQ,CAAC,KAAK,QAAQ,WAAWA,EAAK,aAAa,GAClE,KAAK,QAAQ,OAAO,IAAI,CACpB,SAAUC,EAAS,SACnB,QAAS,uCACb,CAAC,EAEDD,EAAK,OAAS,KACd,OAAOE,EAAG,kBAAkB,IAAI,EAEpC,OAAQF,EAAK,cAAc,KAAM,CAC7B,IAAK,OACD,OAAO,KAAK,YAAY,CAAE,KAAMA,EAAK,cAAc,MAAO,MAAOA,EAAK,KAAM,CAAC,EACjF,IAAK,UACD,OAAOE,EAAG,kBAAkB,IAAI,EACpC,IAAK,MACD,OAAO,KAAK,WAAW,CAAE,IAAKF,EAAK,cAAe,MAAOA,EAAK,KAAM,CAAC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A,IAAU,OAASA,IAAU,QAAU,GAAQA,EAASA,EACxG,OAAO,KAAK,QAAQ,kBAAkB,CAAE,MAAOuC,CAAK,CAAC,CACzD,CAEQ,wBAAwBG,EAA0B,CACtD,MAAI,sBAAsB,KAAKA,CAAQ,EAC5B,GAAGA,CAAQ,aAElB,wCAAwC,KAAKA,CAAQ,EAC9C,GAAGA,CAAQ,IAEfA,CACX,CACJ","names":["init_process","init_buffer","DynamicTypeInstantiationMapper","context","__publicField","args","Severity","go_exports","named","inner","collectionLiteral","aliasName","aliasImportPath","assertNever","converted","list","value","v","index","map","key","as","aliasType","internal","writer","values","entries","entry","literal","discriminatedUnion","structTypeReference","discriminatedUnionTypeInstance","unionVariant","baseFields","record","singleDiscriminatedUnionType","_a","_b","property","object_","properties","enum_","name","enumValue","undiscriminatedUnion","result","fieldName","typeReference","typeInstantiation","e","keyFieldName","valueFieldName","set","primitive","num","bool","str","date","dateTime","normalizedDateTime","uuid","base64","bigInt"]}
|