@osdk/generator 2.4.0-rc.19 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/build/browser/shared/sanitizeMetadata.test.js +2 -1
- package/build/browser/shared/sanitizeMetadata.test.js.map +1 -1
- package/build/browser/util/test/TodoWireOntology.js +2 -1
- package/build/browser/util/test/TodoWireOntology.js.map +1 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +2 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +8 -4
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/browser/v2.0/generateMetadata.js +1 -1
- package/build/browser/v2.0/generateMetadata.js.map +1 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.test.js +2 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
- package/build/cjs/index.cjs +1 -1
- package/build/cjs/index.cjs.map +1 -1
- package/build/esm/shared/sanitizeMetadata.test.js +2 -1
- package/build/esm/shared/sanitizeMetadata.test.js.map +1 -1
- package/build/esm/util/test/TodoWireOntology.js +2 -1
- package/build/esm/util/test/TodoWireOntology.js.map +1 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +2 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +8 -4
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/esm/v2.0/generateMetadata.js +1 -1
- package/build/esm/v2.0/generateMetadata.js.map +1 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.test.js +2 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
- package/package.json +6 -6
|
@@ -18,7 +18,7 @@ import path from "path";
|
|
|
18
18
|
import { formatTs } from "../util/test/formatTs.js";
|
|
19
19
|
|
|
20
20
|
// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.
|
|
21
|
-
const ExpectedOsdkVersion = "2.4.
|
|
21
|
+
const ExpectedOsdkVersion = "2.4.1";
|
|
22
22
|
// END: THIS IS GENERATED CODE. DO NOT EDIT.
|
|
23
23
|
|
|
24
24
|
export async function generateOntologyMetadataFile({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateMetadata.js","names":["path","formatTs","ExpectedOsdkVersion","generateOntologyMetadataFile","fs","outDir","ontology","ontologyApiNamespace","userAgent","writeFile","join","rid"],"sources":["generateMetadata.ts"],"sourcesContent":["/*\n * Copyright 2023 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 path from \"path\";\nimport type { GenerateContext } from \"../GenerateContext/GenerateContext.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"2.4.
|
|
1
|
+
{"version":3,"file":"generateMetadata.js","names":["path","formatTs","ExpectedOsdkVersion","generateOntologyMetadataFile","fs","outDir","ontology","ontologyApiNamespace","userAgent","writeFile","join","rid"],"sources":["generateMetadata.ts"],"sourcesContent":["/*\n * Copyright 2023 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 path from \"path\";\nimport type { GenerateContext } from \"../GenerateContext/GenerateContext.js\";\nimport { formatTs } from \"../util/test/formatTs.js\";\n\n// BEGIN: THIS IS GENERATED CODE. DO NOT EDIT.\nconst ExpectedOsdkVersion = \"2.4.1\";\n// END: THIS IS GENERATED CODE. DO NOT EDIT.\n\nexport async function generateOntologyMetadataFile(\n { fs, outDir, ontology, ontologyApiNamespace }: GenerateContext,\n userAgent: string,\n): Promise<void> {\n await fs.writeFile(\n path.join(outDir, \"OntologyMetadata.ts\"),\n await formatTs(\n `\n export type $ExpectedClientVersion = \"${ExpectedOsdkVersion}\";\n export const $osdkMetadata = { extraUserAgent: \"${userAgent}\" };\n ${\n ontologyApiNamespace == null\n ? `\n export const $ontologyRid = \"${ontology.ontology.rid}\";\n `\n : \"\"\n }\n `,\n ),\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;AAEvB,SAASC,QAAQ,QAAQ,0BAA0B;;AAEnD;AACA,MAAMC,mBAAmB,GAAG,OAAO;AACnC;;AAEA,OAAO,eAAeC,4BAA4BA,CAChD;EAAEC,EAAE;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,EAC/DC,SAAiB,EACF;EACf,MAAMJ,EAAE,CAACK,SAAS,CAChBT,IAAI,CAACU,IAAI,CAACL,MAAM,EAAE,qBAAqB,CAAC,EACxC,MAAMJ,QAAQ,CACZ;AACN,8CAA8CC,mBAAmB;AACjE,wDAAwDM,SAAS;AACjE,QACQD,oBAAoB,IAAI,IAAI,GACxB;AACZ,uCAAuCD,QAAQ,CAACA,QAAQ,CAACK,GAAG;AAC5D,SAAS,GACG,EAAE;AACd,OAEI,CACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatePerQueryDataFiles.test.js","names":["ts","describe","expect","it","enhanceOntology","createMockMinimalFiles","TodoWireOntology","generatePerQueryDataFilesV2","helper","fs","minimalFiles","ontology","sanitized","importExt","externalObjects","Map","externalInterfaces","externalSpts","outDir","forInternalUse","fixedVersionQueryTypes","getFiles","toMatchInlineSnapshot","writeFile","rootFileNames","Object","keys","console","log","files","forEach","fileName","version","servicesHost","getScriptFileNames","getScriptVersion","toString","getScriptSnapshot","undefined","ScriptSnapshot","fromString","getCurrentDirectory","getCompilationSettings","getDefaultLibFileName","options","getDefaultLibFilePath","fileExists","path","readFile","readDirectory","extensions","exclude","include","depth","sys","directoryExists","getDirectories","langServices","createLanguageService","q","getDocCommentTemplateAtPosition","createDocumentRegistry","actionTypes","interfaceTypes","objectTypes","apiName","description","displayName","rid","queryTypes","doThing","parameters","foo","dataType","type","paramStruct","fields","name","fieldType","output","sharedPropertyTypes"],"sources":["generatePerQueryDataFiles.test.ts"],"sourcesContent":["/*\n * Copyright 2023 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 * as ts from \"typescript\";\nimport { describe, expect, it } from \"vitest\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { createMockMinimalFiles } from \"../util/test/createMockMinimalFiles.js\";\nimport { TodoWireOntology } from \"../util/test/TodoWireOntology.js\";\nimport { generatePerQueryDataFilesV2 } from \"./generatePerQueryDataFiles.js\";\n\ndescribe(\"generatePerQueryDataFiles\", () => {\n it(\"is stable v2\", async () => {\n const helper = createMockMinimalFiles();\n const BASE_PATH = \"/foo\";\n\n await generatePerQueryDataFilesV2(\n {\n fs: helper.minimalFiles,\n ontology: enhanceOntology({\n sanitized: TodoWireOntology,\n importExt: \".js\",\n externalObjects: new Map(),\n externalInterfaces: new Map(),\n externalSpts: new Map(),\n }),\n outDir: BASE_PATH,\n importExt: \".js\",\n forInternalUse: true,\n fixedVersionQueryTypes: [],\n },\n true,\n );\n\n expect(helper.getFiles()).toMatchInlineSnapshot(`\n {\n \"/foo/ontology/queries.ts\": \"export { getCount } from './queries/getCount.js';\n export { returnsTodo } from './queries/returnsTodo.js';\n \",\n \"/foo/ontology/queries/getCount.ts\": \"import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n export namespace getCount {\n export interface Signature {\n (query: getCount.Parameters): Promise<getCount.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly completed: QueryParam.PrimitiveType<'boolean'>;\n }\n\n export type ReturnType = QueryResult.PrimitiveType<'integer'>;\n }\n\n export interface getCount extends QueryDefinition<getCount.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'getCount';\n rid: 'rid.query.1';\n type: 'query';\n version: '1.1.0';\n isFixedVersion: false;\n parameters: {\n /**\n * (no ontology metadata)\n */\n completed: {\n nullable: false;\n type: 'boolean';\n };\n };\n output: {\n nullable: false;\n type: 'integer';\n };\n signature: getCount.Signature;\n };\n apiName: 'getCount';\n type: 'query';\n version: '1.1.0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getCount: getCount = {\n apiName: 'getCount',\n type: 'query',\n version: '1.1.0',\n isFixedVersion: false,\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries/returnsTodo.ts\": \"import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace returnsTodo {\n export interface Signature {\n (query: returnsTodo.Parameters): Promise<returnsTodo.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * description: Random desc so we test jsdoc\n */\n readonly someTodo: QueryParam.ObjectType<Todo>;\n }\n\n export type ReturnType = QueryResult.ObjectType<Todo>;\n }\n\n export interface returnsTodo extends QueryDefinition<returnsTodo.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'returnsTodo';\n rid: 'rid.query.2';\n type: 'query';\n version: '3.2.0';\n isFixedVersion: false;\n parameters: {\n /**\n * description: Random desc so we test jsdoc\n */\n someTodo: {\n description: 'Random desc so we test jsdoc';\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n };\n output: {\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n signature: returnsTodo.Signature;\n };\n apiName: 'returnsTodo';\n type: 'query';\n version: '3.2.0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const returnsTodo: returnsTodo = {\n apiName: 'returnsTodo',\n type: 'query',\n version: '3.2.0',\n isFixedVersion: false,\n osdkMetadata: $osdkMetadata,\n };\n \",\n }\n `);\n\n await helper.minimalFiles.writeFile(\n \"/bar/test.ts\",\n `\n import {returnsTodo} from \"/foo/ontology/queries/returnsTodo.ts\";\n\n returnsTodo({someTodo:/*marker*/})\n `,\n );\n\n const rootFileNames = Object.keys(helper.getFiles());\n console.log(rootFileNames);\n\n const files: ts.MapLike<{ version: number }> = {};\n\n // initialize the list of files\n rootFileNames.forEach(fileName => {\n files[fileName] = { version: 0 };\n });\n\n const servicesHost: ts.LanguageServiceHost = {\n getScriptFileNames: () => Object.keys(helper.getFiles()),\n getScriptVersion: fileName =>\n files[fileName] && files[fileName].version.toString(),\n getScriptSnapshot: fileName => {\n if (!helper.getFiles()[fileName]) {\n return undefined;\n }\n\n return ts.ScriptSnapshot.fromString(\n helper.getFiles()[fileName],\n );\n },\n getCurrentDirectory: () => \"/bar\",\n getCompilationSettings: () => ({}),\n getDefaultLibFileName: options => ts.getDefaultLibFilePath(options),\n fileExists: (path: string) => {\n console.log(path);\n return helper.getFiles()[path] !== undefined;\n },\n readFile: (path: string) => {\n console.log(\"readFile: \", path);\n return helper.getFiles()[path];\n },\n readDirectory: (path, extensions, exclude, include, depth) => {\n console.log(\"readDirectory\", path);\n return ts.sys.readDirectory(path, extensions, exclude, include, depth);\n },\n directoryExists: ts.sys.directoryExists,\n getDirectories: ts.sys.getDirectories,\n };\n\n const langServices = ts.createLanguageService(servicesHost);\n\n const q = langServices.getDocCommentTemplateAtPosition(\"/bar/test.ts\", 1);\n console.log(q);\n ts.createDocumentRegistry();\n });\n\n it(\"generates structs for queries\", async () => {\n const helper = createMockMinimalFiles();\n const BASE_PATH = \"/foo\";\n\n await generatePerQueryDataFilesV2(\n {\n fs: helper.minimalFiles,\n ontology: enhanceOntology({\n sanitized: {\n actionTypes: {},\n interfaceTypes: {},\n objectTypes: {},\n ontology: {\n apiName: \"foo\",\n description: \"foo\",\n displayName: \"foo\",\n rid: \"ri.foo\",\n },\n queryTypes: {\n doThing: {\n rid: \"rid.query.1\",\n version: \"0\",\n apiName: \"doThing\",\n parameters: {\n foo: {\n dataType: { type: \"string\" },\n },\n paramStruct: {\n dataType: {\n type: \"struct\",\n fields: [\n {\n name: \"aDate\",\n fieldType: { type: \"date\" },\n },\n {\n name: \"nestedStruct\",\n fieldType: {\n type: \"struct\",\n fields: [\n {\n name: \"nestedString\",\n fieldType: { type: \"string\" },\n },\n {\n name: \"nestedInteger\",\n fieldType: { type: \"integer\" },\n },\n ],\n },\n },\n ],\n },\n },\n },\n output: {\n type: \"struct\",\n fields: [\n {\n name: \"aString\",\n fieldType: { type: \"string\" },\n },\n {\n name: \"anInteger\",\n fieldType: { type: \"integer\" },\n },\n {\n name: \"aLong\",\n fieldType: { type: \"long\" },\n },\n {\n name: \"aDate\",\n fieldType: { type: \"date\" },\n },\n {\n name: \"nestedStruct\",\n fieldType: {\n type: \"struct\",\n fields: [\n {\n name: \"nestedString\",\n fieldType: { type: \"string\" },\n },\n {\n name: \"nestedInteger\",\n fieldType: { type: \"integer\" },\n },\n ],\n },\n },\n ],\n },\n },\n },\n sharedPropertyTypes: {},\n },\n importExt: \".js\",\n externalObjects: new Map(),\n externalInterfaces: new Map(),\n externalSpts: new Map(),\n }),\n outDir: BASE_PATH,\n importExt: \".js\",\n forInternalUse: true,\n fixedVersionQueryTypes: [],\n },\n true,\n );\n expect(helper.getFiles()[\"/foo/ontology/queries/doThing.ts\"])\n .toMatchInlineSnapshot(`\n \"import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n export namespace doThing {\n export interface Signature {\n (query: doThing.Parameters): Promise<doThing.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly foo: QueryParam.PrimitiveType<'string'>;\n\n /**\n * (no ontology metadata)\n */\n readonly paramStruct: {\n readonly aDate: QueryParam.PrimitiveType<'datetime'>;\n\n readonly nestedStruct: {\n readonly nestedInteger: QueryParam.PrimitiveType<'integer'>;\n\n readonly nestedString: QueryParam.PrimitiveType<'string'>;\n };\n };\n }\n\n export interface ReturnType {\n aDate: QueryResult.PrimitiveType<'datetime'>;\n\n aLong: QueryResult.PrimitiveType<'long'>;\n\n anInteger: QueryResult.PrimitiveType<'integer'>;\n\n aString: QueryResult.PrimitiveType<'string'>;\n\n nestedStruct: {\n nestedInteger: QueryResult.PrimitiveType<'integer'>;\n\n nestedString: QueryResult.PrimitiveType<'string'>;\n };\n }\n }\n\n export interface doThing extends QueryDefinition<doThing.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'doThing';\n rid: 'rid.query.1';\n type: 'query';\n version: '0';\n isFixedVersion: false;\n parameters: {\n /**\n * (no ontology metadata)\n */\n foo: {\n nullable: false;\n type: 'string';\n };\n /**\n * (no ontology metadata)\n */\n paramStruct: {\n nullable: false;\n struct: {\n aDate: {\n type: 'date';\n nullable: false;\n };\n nestedStruct: {\n type: 'struct';\n struct: {\n nestedString: {\n type: 'string';\n nullable: false;\n };\n nestedInteger: {\n type: 'integer';\n nullable: false;\n };\n };\n nullable: false;\n };\n };\n type: 'struct';\n };\n };\n output: {\n nullable: false;\n struct: {\n aString: {\n type: 'string';\n nullable: false;\n };\n anInteger: {\n type: 'integer';\n nullable: false;\n };\n aLong: {\n type: 'long';\n nullable: false;\n };\n aDate: {\n type: 'date';\n nullable: false;\n };\n nestedStruct: {\n type: 'struct';\n struct: {\n nestedString: {\n type: 'string';\n nullable: false;\n };\n nestedInteger: {\n type: 'integer';\n nullable: false;\n };\n };\n nullable: false;\n };\n };\n type: 'struct';\n };\n signature: doThing.Signature;\n };\n apiName: 'doThing';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const doThing: doThing = {\n apiName: 'doThing',\n type: 'query',\n version: '0',\n isFixedVersion: false,\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,YAAY;AAChC,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,eAAe,QAAQ,uCAAuC;AACvE,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SAASC,gBAAgB,QAAQ,kCAAkC;AACnE,SAASC,2BAA2B,QAAQ,gCAAgC;AAE5EN,QAAQ,CAAC,2BAA2B,EAAE,MAAM;EAC1CE,EAAE,CAAC,cAAc,EAAE,YAAY;IAC7B,MAAMK,MAAM,GAAGH,sBAAsB,CAAC,CAAC;IAGvC,MAAME,2BAA2B,CAC/B;MACEE,EAAE,EAAED,MAAM,CAACE,YAAY;MACvBC,QAAQ,EAAEP,eAAe,CAAC;QACxBQ,SAAS,EAAEN,gBAAgB;QAC3BO,SAAS,EAAE,KAAK;QAChBC,eAAe,EAAE,IAAIC,GAAG,CAAC,CAAC;QAC1BC,kBAAkB,EAAE,IAAID,GAAG,CAAC,CAAC;QAC7BE,YAAY,EAAE,IAAIF,GAAG,CAAC;MACxB,CAAC,CAAC;MACFG,MAAM,EAZQ,MAYG;MACjBL,SAAS,EAAE,KAAK;MAChBM,cAAc,EAAE,IAAI;MACpBC,sBAAsB,EAAE;IAC1B,CAAC,EACD,IACF,CAAC;IAEDlB,MAAM,CAACM,MAAM,CAACa,QAAQ,CAAC,CAAC,CAAC,CAACC,qBAAqB,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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BACEG,IAAI,EAAE,cAAc;kBACpBC,SAAS,EAAE;oBACTJ,IAAI,EAAE,QAAQ;oBACdE,MAAM,EAAE,CACN;sBACEC,IAAI,EAAE,cAAc;sBACpBC,SAAS,EAAE;wBAAEJ,IAAI,EAAE;sBAAS;oBAC9B,CAAC,EACD;sBACEG,IAAI,EAAE,eAAe;sBACrBC,SAAS,EAAE;wBAAEJ,IAAI,EAAE;sBAAU;oBAC/B,CAAC;kBAEL;gBACF,CAAC;cAEL;YACF;UACF,CAAC;UACDM,mBAAmB,EAAE,CAAC;QACxB,CAAC;QACDnE,SAAS,EAAE,KAAK;QAChBC,eAAe,EAAE,IAAIC,GAAG,CAAC,CAAC;QAC1BC,kBAAkB,EAAE,IAAID,GAAG,CAAC,CAAC;QAC7BE,YAAY,EAAE,IAAIF,GAAG,CAAC;MACxB,CAAC,CAAC;MACFG,MAAM,EAnGQ,MAmGG;MACjBL,SAAS,EAAE,KAAK;MAChBM,cAAc,EAAE,IAAI;MACpBC,sBAAsB,EAAE;IAC1B,CAAC,EACD,IACF,CAAC;IACDlB,MAAM,CAACM,MAAM,CAACa,QAAQ,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAC1DC,qBAAqB,CAAC;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACN,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"generatePerQueryDataFiles.test.js","names":["ts","describe","expect","it","enhanceOntology","createMockMinimalFiles","TodoWireOntology","generatePerQueryDataFilesV2","helper","fs","minimalFiles","ontology","sanitized","importExt","externalObjects","Map","externalInterfaces","externalSpts","outDir","forInternalUse","fixedVersionQueryTypes","getFiles","toMatchInlineSnapshot","writeFile","rootFileNames","Object","keys","console","log","files","forEach","fileName","version","servicesHost","getScriptFileNames","getScriptVersion","toString","getScriptSnapshot","undefined","ScriptSnapshot","fromString","getCurrentDirectory","getCompilationSettings","getDefaultLibFileName","options","getDefaultLibFilePath","fileExists","path","readFile","readDirectory","extensions","exclude","include","depth","sys","directoryExists","getDirectories","langServices","createLanguageService","q","getDocCommentTemplateAtPosition","createDocumentRegistry","actionTypes","interfaceTypes","objectTypes","apiName","description","displayName","rid","queryTypes","doThing","parameters","foo","dataType","type","paramStruct","fields","name","fieldType","output","sharedPropertyTypes","valueTypes"],"sources":["generatePerQueryDataFiles.test.ts"],"sourcesContent":["/*\n * Copyright 2023 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 * as ts from \"typescript\";\nimport { describe, expect, it } from \"vitest\";\nimport { enhanceOntology } from \"../GenerateContext/enhanceOntology.js\";\nimport { createMockMinimalFiles } from \"../util/test/createMockMinimalFiles.js\";\nimport { TodoWireOntology } from \"../util/test/TodoWireOntology.js\";\nimport { generatePerQueryDataFilesV2 } from \"./generatePerQueryDataFiles.js\";\n\ndescribe(\"generatePerQueryDataFiles\", () => {\n it(\"is stable v2\", async () => {\n const helper = createMockMinimalFiles();\n const BASE_PATH = \"/foo\";\n\n await generatePerQueryDataFilesV2(\n {\n fs: helper.minimalFiles,\n ontology: enhanceOntology({\n sanitized: TodoWireOntology,\n importExt: \".js\",\n externalObjects: new Map(),\n externalInterfaces: new Map(),\n externalSpts: new Map(),\n }),\n outDir: BASE_PATH,\n importExt: \".js\",\n forInternalUse: true,\n fixedVersionQueryTypes: [],\n },\n true,\n );\n\n expect(helper.getFiles()).toMatchInlineSnapshot(`\n {\n \"/foo/ontology/queries.ts\": \"export { getCount } from './queries/getCount.js';\n export { returnsTodo } from './queries/returnsTodo.js';\n \",\n \"/foo/ontology/queries/getCount.ts\": \"import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n export namespace getCount {\n export interface Signature {\n (query: getCount.Parameters): Promise<getCount.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly completed: QueryParam.PrimitiveType<'boolean'>;\n }\n\n export type ReturnType = QueryResult.PrimitiveType<'integer'>;\n }\n\n export interface getCount extends QueryDefinition<getCount.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'getCount';\n rid: 'rid.query.1';\n type: 'query';\n version: '1.1.0';\n isFixedVersion: false;\n parameters: {\n /**\n * (no ontology metadata)\n */\n completed: {\n nullable: false;\n type: 'boolean';\n };\n };\n output: {\n nullable: false;\n type: 'integer';\n };\n signature: getCount.Signature;\n };\n apiName: 'getCount';\n type: 'query';\n version: '1.1.0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const getCount: getCount = {\n apiName: 'getCount',\n type: 'query',\n version: '1.1.0',\n isFixedVersion: false,\n osdkMetadata: $osdkMetadata,\n };\n \",\n \"/foo/ontology/queries/returnsTodo.ts\": \"import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n import type { Todo } from '../objects/Todo.js';\n\n export namespace returnsTodo {\n export interface Signature {\n (query: returnsTodo.Parameters): Promise<returnsTodo.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * description: Random desc so we test jsdoc\n */\n readonly someTodo: QueryParam.ObjectType<Todo>;\n }\n\n export type ReturnType = QueryResult.ObjectType<Todo>;\n }\n\n export interface returnsTodo extends QueryDefinition<returnsTodo.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'returnsTodo';\n rid: 'rid.query.2';\n type: 'query';\n version: '3.2.0';\n isFixedVersion: false;\n parameters: {\n /**\n * description: Random desc so we test jsdoc\n */\n someTodo: {\n description: 'Random desc so we test jsdoc';\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n };\n output: {\n nullable: false;\n object: 'Todo';\n type: 'object';\n __OsdkTargetType?: Todo;\n };\n signature: returnsTodo.Signature;\n };\n apiName: 'returnsTodo';\n type: 'query';\n version: '3.2.0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const returnsTodo: returnsTodo = {\n apiName: 'returnsTodo',\n type: 'query',\n version: '3.2.0',\n isFixedVersion: false,\n osdkMetadata: $osdkMetadata,\n };\n \",\n }\n `);\n\n await helper.minimalFiles.writeFile(\n \"/bar/test.ts\",\n `\n import {returnsTodo} from \"/foo/ontology/queries/returnsTodo.ts\";\n\n returnsTodo({someTodo:/*marker*/})\n `,\n );\n\n const rootFileNames = Object.keys(helper.getFiles());\n console.log(rootFileNames);\n\n const files: ts.MapLike<{ version: number }> = {};\n\n // initialize the list of files\n rootFileNames.forEach(fileName => {\n files[fileName] = { version: 0 };\n });\n\n const servicesHost: ts.LanguageServiceHost = {\n getScriptFileNames: () => Object.keys(helper.getFiles()),\n getScriptVersion: fileName =>\n files[fileName] && files[fileName].version.toString(),\n getScriptSnapshot: fileName => {\n if (!helper.getFiles()[fileName]) {\n return undefined;\n }\n\n return ts.ScriptSnapshot.fromString(\n helper.getFiles()[fileName],\n );\n },\n getCurrentDirectory: () => \"/bar\",\n getCompilationSettings: () => ({}),\n getDefaultLibFileName: options => ts.getDefaultLibFilePath(options),\n fileExists: (path: string) => {\n console.log(path);\n return helper.getFiles()[path] !== undefined;\n },\n readFile: (path: string) => {\n console.log(\"readFile: \", path);\n return helper.getFiles()[path];\n },\n readDirectory: (path, extensions, exclude, include, depth) => {\n console.log(\"readDirectory\", path);\n return ts.sys.readDirectory(path, extensions, exclude, include, depth);\n },\n directoryExists: ts.sys.directoryExists,\n getDirectories: ts.sys.getDirectories,\n };\n\n const langServices = ts.createLanguageService(servicesHost);\n\n const q = langServices.getDocCommentTemplateAtPosition(\"/bar/test.ts\", 1);\n console.log(q);\n ts.createDocumentRegistry();\n });\n\n it(\"generates structs for queries\", async () => {\n const helper = createMockMinimalFiles();\n const BASE_PATH = \"/foo\";\n\n await generatePerQueryDataFilesV2(\n {\n fs: helper.minimalFiles,\n ontology: enhanceOntology({\n sanitized: {\n actionTypes: {},\n interfaceTypes: {},\n objectTypes: {},\n ontology: {\n apiName: \"foo\",\n description: \"foo\",\n displayName: \"foo\",\n rid: \"ri.foo\",\n },\n queryTypes: {\n doThing: {\n rid: \"rid.query.1\",\n version: \"0\",\n apiName: \"doThing\",\n parameters: {\n foo: {\n dataType: { type: \"string\" },\n },\n paramStruct: {\n dataType: {\n type: \"struct\",\n fields: [\n {\n name: \"aDate\",\n fieldType: { type: \"date\" },\n },\n {\n name: \"nestedStruct\",\n fieldType: {\n type: \"struct\",\n fields: [\n {\n name: \"nestedString\",\n fieldType: { type: \"string\" },\n },\n {\n name: \"nestedInteger\",\n fieldType: { type: \"integer\" },\n },\n ],\n },\n },\n ],\n },\n },\n },\n output: {\n type: \"struct\",\n fields: [\n {\n name: \"aString\",\n fieldType: { type: \"string\" },\n },\n {\n name: \"anInteger\",\n fieldType: { type: \"integer\" },\n },\n {\n name: \"aLong\",\n fieldType: { type: \"long\" },\n },\n {\n name: \"aDate\",\n fieldType: { type: \"date\" },\n },\n {\n name: \"nestedStruct\",\n fieldType: {\n type: \"struct\",\n fields: [\n {\n name: \"nestedString\",\n fieldType: { type: \"string\" },\n },\n {\n name: \"nestedInteger\",\n fieldType: { type: \"integer\" },\n },\n ],\n },\n },\n ],\n },\n },\n },\n sharedPropertyTypes: {},\n valueTypes: {},\n },\n importExt: \".js\",\n externalObjects: new Map(),\n externalInterfaces: new Map(),\n externalSpts: new Map(),\n }),\n outDir: BASE_PATH,\n importExt: \".js\",\n forInternalUse: true,\n fixedVersionQueryTypes: [],\n },\n true,\n );\n expect(helper.getFiles()[\"/foo/ontology/queries/doThing.ts\"])\n .toMatchInlineSnapshot(`\n \"import type { ObjectSpecifier, QueryDefinition, QueryParam, QueryResult, VersionBound } from '@osdk/api';\n import type { $ExpectedClientVersion } from '../../OntologyMetadata.js';\n import { $osdkMetadata } from '../../OntologyMetadata.js';\n\n export namespace doThing {\n export interface Signature {\n (query: doThing.Parameters): Promise<doThing.ReturnType>;\n }\n\n export interface Parameters {\n /**\n * (no ontology metadata)\n */\n readonly foo: QueryParam.PrimitiveType<'string'>;\n\n /**\n * (no ontology metadata)\n */\n readonly paramStruct: {\n readonly aDate: QueryParam.PrimitiveType<'datetime'>;\n\n readonly nestedStruct: {\n readonly nestedInteger: QueryParam.PrimitiveType<'integer'>;\n\n readonly nestedString: QueryParam.PrimitiveType<'string'>;\n };\n };\n }\n\n export interface ReturnType {\n aDate: QueryResult.PrimitiveType<'datetime'>;\n\n aLong: QueryResult.PrimitiveType<'long'>;\n\n anInteger: QueryResult.PrimitiveType<'integer'>;\n\n aString: QueryResult.PrimitiveType<'string'>;\n\n nestedStruct: {\n nestedInteger: QueryResult.PrimitiveType<'integer'>;\n\n nestedString: QueryResult.PrimitiveType<'string'>;\n };\n }\n }\n\n export interface doThing extends QueryDefinition<doThing.Signature>, VersionBound<$ExpectedClientVersion> {\n __DefinitionMetadata?: {\n apiName: 'doThing';\n rid: 'rid.query.1';\n type: 'query';\n version: '0';\n isFixedVersion: false;\n parameters: {\n /**\n * (no ontology metadata)\n */\n foo: {\n nullable: false;\n type: 'string';\n };\n /**\n * (no ontology metadata)\n */\n paramStruct: {\n nullable: false;\n struct: {\n aDate: {\n type: 'date';\n nullable: false;\n };\n nestedStruct: {\n type: 'struct';\n struct: {\n nestedString: {\n type: 'string';\n nullable: false;\n };\n nestedInteger: {\n type: 'integer';\n nullable: false;\n };\n };\n nullable: false;\n };\n };\n type: 'struct';\n };\n };\n output: {\n nullable: false;\n struct: {\n aString: {\n type: 'string';\n nullable: false;\n };\n anInteger: {\n type: 'integer';\n nullable: false;\n };\n aLong: {\n type: 'long';\n nullable: false;\n };\n aDate: {\n type: 'date';\n nullable: false;\n };\n nestedStruct: {\n type: 'struct';\n struct: {\n nestedString: {\n type: 'string';\n nullable: false;\n };\n nestedInteger: {\n type: 'integer';\n nullable: false;\n };\n };\n nullable: false;\n };\n };\n type: 'struct';\n };\n signature: doThing.Signature;\n };\n apiName: 'doThing';\n type: 'query';\n version: '0';\n osdkMetadata: typeof $osdkMetadata;\n }\n\n export const doThing: doThing = {\n apiName: 'doThing',\n type: 'query',\n version: '0',\n isFixedVersion: false,\n osdkMetadata: $osdkMetadata,\n };\n \"\n `);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,YAAY;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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,CAAC;EACN,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
package/build/cjs/index.cjs
CHANGED