@osdk/generator 2.1.0-beta.23 → 2.1.0-beta.24
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 +15 -0
- package/build/browser/GenerateContext/EnhanceCommon.js +0 -15
- package/build/browser/GenerateContext/EnhanceCommon.js.map +1 -1
- package/build/browser/GenerateContext/EnhancedAction.js +1 -1
- package/build/browser/GenerateContext/EnhancedAction.js.map +1 -1
- package/build/browser/GenerateContext/EnhancedBase.js +2 -7
- package/build/browser/GenerateContext/EnhancedBase.js.map +1 -1
- package/build/browser/GenerateContext/EnhancedInterfaceType.js +1 -1
- package/build/browser/GenerateContext/EnhancedInterfaceType.js.map +1 -1
- package/build/browser/GenerateContext/EnhancedObjectType.js +1 -1
- package/build/browser/GenerateContext/EnhancedObjectType.js.map +1 -1
- package/build/browser/GenerateContext/EnhancedOntologyDefinition.js +1 -8
- package/build/browser/GenerateContext/EnhancedOntologyDefinition.js.map +1 -1
- package/build/browser/GenerateContext/EnhancedQuery.js +1 -1
- package/build/browser/GenerateContext/EnhancedQuery.js.map +1 -1
- package/build/browser/GenerateContext/EnhancedSharedPropertyType.js +1 -1
- package/build/browser/GenerateContext/EnhancedSharedPropertyType.js.map +1 -1
- package/build/browser/GenerateContext/ForeignType.js +1 -1
- package/build/browser/GenerateContext/ForeignType.js.map +1 -1
- package/build/browser/GenerateContext/GenerateContext.js +0 -15
- package/build/browser/GenerateContext/GenerateContext.js.map +1 -1
- package/build/browser/GenerateContext/enhanceOntology.js +1 -0
- package/build/browser/GenerateContext/enhanceOntology.js.map +1 -1
- package/build/browser/MinimalFs.js +0 -15
- package/build/browser/MinimalFs.js.map +1 -1
- package/build/browser/WireOntologyDefinition.js +0 -15
- package/build/browser/WireOntologyDefinition.js.map +1 -1
- package/build/browser/generateClientSdkPackage.js +2 -0
- package/build/browser/generateClientSdkPackage.js.map +1 -1
- package/build/browser/generateClientSdkPackage.test.js +1 -0
- package/build/browser/generateClientSdkPackage.test.js.map +1 -1
- package/build/browser/index.js +1 -0
- package/build/browser/index.js.map +1 -1
- package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js +1 -0
- package/build/browser/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -1
- package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js +1 -0
- package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -1
- package/build/browser/shared/getObjectImports.js +1 -0
- package/build/browser/shared/getObjectImports.js.map +1 -1
- package/build/browser/shared/getObjectTypeApiNamesFromQuery.js +1 -0
- package/build/browser/shared/getObjectTypeApiNamesFromQuery.js.map +1 -1
- package/build/browser/shared/getObjectTypesFromQueryDataType.js +1 -0
- package/build/browser/shared/getObjectTypesFromQueryDataType.js.map +1 -1
- package/build/browser/shared/propertyJsdoc.js +1 -0
- package/build/browser/shared/propertyJsdoc.js.map +1 -1
- package/build/browser/shared/sanitizeMetadata.js +9 -0
- package/build/browser/shared/sanitizeMetadata.js.map +1 -1
- package/build/browser/shared/sanitizeMetadata.test.js +1 -0
- package/build/browser/shared/sanitizeMetadata.test.js.map +1 -1
- package/build/browser/util/InMemoryFs.js +1 -0
- package/build/browser/util/InMemoryFs.js.map +1 -1
- package/build/browser/util/commaSeparatedIdentifiers.js +1 -0
- package/build/browser/util/commaSeparatedIdentifiers.js.map +1 -1
- package/build/browser/util/commaSeparatedTypeIdentifiers.js +1 -0
- package/build/browser/util/commaSeparatedTypeIdentifiers.js.map +1 -1
- package/build/browser/util/deleteUndefineds.js +1 -0
- package/build/browser/util/deleteUndefineds.js.map +1 -1
- package/build/browser/util/reservedKeywords.js +1 -0
- package/build/browser/util/reservedKeywords.js.map +1 -1
- package/build/browser/util/stringUnionFrom.js +1 -0
- package/build/browser/util/stringUnionFrom.js.map +1 -1
- package/build/browser/util/stringify.js +16 -0
- package/build/browser/util/stringify.js.map +1 -1
- package/build/browser/util/test/TodoWireOntology.js +1 -0
- package/build/browser/util/test/TodoWireOntology.js.map +1 -1
- package/build/browser/util/test/compileThis.js +1 -0
- package/build/browser/util/test/compileThis.js.map +1 -1
- package/build/browser/util/test/createMockMinimalFiles.js +1 -0
- package/build/browser/util/test/createMockMinimalFiles.js.map +1 -1
- package/build/browser/util/test/formatTs.js +1 -0
- package/build/browser/util/test/formatTs.js.map +1 -1
- package/build/browser/util/verifyOutDir.js +1 -0
- package/build/browser/util/verifyOutDir.js.map +1 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +2 -0
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +5 -0
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js +3 -0
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js +11 -0
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/browser/v2.0/generateMetadata.js +3 -0
- package/build/browser/v2.0/generateMetadata.js.map +1 -1
- package/build/browser/v2.0/generatePerActionDataFiles.js +23 -5
- package/build/browser/v2.0/generatePerActionDataFiles.js.map +1 -1
- package/build/browser/v2.0/generatePerActionDataFiles.test.js +1 -0
- package/build/browser/v2.0/generatePerActionDataFiles.test.js.map +1 -1
- package/build/browser/v2.0/generatePerInterfaceDataFiles.js +2 -0
- package/build/browser/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
- package/build/browser/v2.0/generatePerObjectDataFiles.js +1 -0
- package/build/browser/v2.0/generatePerObjectDataFiles.js.map +1 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.js +1 -0
- package/build/browser/v2.0/generatePerQueryDataFiles.js.map +1 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.test.js +2 -0
- package/build/browser/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
- package/build/browser/v2.0/generateRootIndexTsFile.js +1 -0
- package/build/browser/v2.0/generateRootIndexTsFile.js.map +1 -1
- package/build/browser/v2.0/getDescriptionIfPresent.js +1 -0
- package/build/browser/v2.0/getDescriptionIfPresent.js.map +1 -1
- package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +2 -0
- package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
- package/build/browser/validateWireOntologyAssumptions.js +1 -0
- package/build/browser/validateWireOntologyAssumptions.js.map +1 -1
- package/build/cjs/index.cjs +1384 -0
- package/build/cjs/index.cjs.map +1 -0
- package/build/cjs/index.d.cts +31 -0
- package/build/esm/GenerateContext/EnhanceCommon.js +0 -15
- package/build/esm/GenerateContext/EnhanceCommon.js.map +1 -1
- package/build/esm/GenerateContext/EnhancedAction.js +1 -1
- package/build/esm/GenerateContext/EnhancedAction.js.map +1 -1
- package/build/esm/GenerateContext/EnhancedBase.js +2 -7
- package/build/esm/GenerateContext/EnhancedBase.js.map +1 -1
- package/build/esm/GenerateContext/EnhancedInterfaceType.js +1 -1
- package/build/esm/GenerateContext/EnhancedInterfaceType.js.map +1 -1
- package/build/esm/GenerateContext/EnhancedObjectType.js +1 -1
- package/build/esm/GenerateContext/EnhancedObjectType.js.map +1 -1
- package/build/esm/GenerateContext/EnhancedOntologyDefinition.js +1 -8
- package/build/esm/GenerateContext/EnhancedOntologyDefinition.js.map +1 -1
- package/build/esm/GenerateContext/EnhancedQuery.js +1 -1
- package/build/esm/GenerateContext/EnhancedQuery.js.map +1 -1
- package/build/esm/GenerateContext/EnhancedSharedPropertyType.js +1 -1
- package/build/esm/GenerateContext/EnhancedSharedPropertyType.js.map +1 -1
- package/build/esm/GenerateContext/ForeignType.js +1 -1
- package/build/esm/GenerateContext/ForeignType.js.map +1 -1
- package/build/esm/GenerateContext/GenerateContext.js +0 -15
- package/build/esm/GenerateContext/GenerateContext.js.map +1 -1
- package/build/esm/GenerateContext/enhanceOntology.js +1 -0
- package/build/esm/GenerateContext/enhanceOntology.js.map +1 -1
- package/build/esm/MinimalFs.js +0 -15
- package/build/esm/MinimalFs.js.map +1 -1
- package/build/esm/WireOntologyDefinition.js +0 -15
- package/build/esm/WireOntologyDefinition.js.map +1 -1
- package/build/esm/generateClientSdkPackage.js +2 -0
- package/build/esm/generateClientSdkPackage.js.map +1 -1
- package/build/esm/generateClientSdkPackage.test.js +1 -0
- package/build/esm/generateClientSdkPackage.test.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js +1 -0
- package/build/esm/shared/apiNamespaces/startsWithApiNamespace.js.map +1 -1
- package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js +1 -0
- package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.js.map +1 -1
- package/build/esm/shared/getObjectImports.js +1 -0
- package/build/esm/shared/getObjectImports.js.map +1 -1
- package/build/esm/shared/getObjectTypeApiNamesFromQuery.js +1 -0
- package/build/esm/shared/getObjectTypeApiNamesFromQuery.js.map +1 -1
- package/build/esm/shared/getObjectTypesFromQueryDataType.js +1 -0
- package/build/esm/shared/getObjectTypesFromQueryDataType.js.map +1 -1
- package/build/esm/shared/propertyJsdoc.js +1 -0
- package/build/esm/shared/propertyJsdoc.js.map +1 -1
- package/build/esm/shared/sanitizeMetadata.js +9 -0
- package/build/esm/shared/sanitizeMetadata.js.map +1 -1
- package/build/esm/shared/sanitizeMetadata.test.js +1 -0
- package/build/esm/shared/sanitizeMetadata.test.js.map +1 -1
- package/build/esm/util/InMemoryFs.js +1 -0
- package/build/esm/util/InMemoryFs.js.map +1 -1
- package/build/esm/util/commaSeparatedIdentifiers.js +1 -0
- package/build/esm/util/commaSeparatedIdentifiers.js.map +1 -1
- package/build/esm/util/commaSeparatedTypeIdentifiers.js +1 -0
- package/build/esm/util/commaSeparatedTypeIdentifiers.js.map +1 -1
- package/build/esm/util/deleteUndefineds.js +1 -0
- package/build/esm/util/deleteUndefineds.js.map +1 -1
- package/build/esm/util/reservedKeywords.js +1 -0
- package/build/esm/util/reservedKeywords.js.map +1 -1
- package/build/esm/util/stringUnionFrom.js +1 -0
- package/build/esm/util/stringUnionFrom.js.map +1 -1
- package/build/esm/util/stringify.js +16 -0
- package/build/esm/util/stringify.js.map +1 -1
- package/build/esm/util/test/TodoWireOntology.js +1 -0
- package/build/esm/util/test/TodoWireOntology.js.map +1 -1
- package/build/esm/util/test/compileThis.js +1 -0
- package/build/esm/util/test/compileThis.js.map +1 -1
- package/build/esm/util/test/createMockMinimalFiles.js +1 -0
- package/build/esm/util/test/createMockMinimalFiles.js.map +1 -1
- package/build/esm/util/test/formatTs.js +1 -0
- package/build/esm/util/test/formatTs.js.map +1 -1
- package/build/esm/util/verifyOutDir.js +1 -0
- package/build/esm/util/verifyOutDir.js.map +1 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js +2 -0
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.js.map +1 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js +5 -0
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.js.map +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js +3 -0
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.js.map +1 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js +11 -0
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.js.map +1 -1
- package/build/esm/v2.0/generateMetadata.js +3 -0
- package/build/esm/v2.0/generateMetadata.js.map +1 -1
- package/build/esm/v2.0/generatePerActionDataFiles.js +23 -5
- package/build/esm/v2.0/generatePerActionDataFiles.js.map +1 -1
- package/build/esm/v2.0/generatePerActionDataFiles.test.js +1 -0
- package/build/esm/v2.0/generatePerActionDataFiles.test.js.map +1 -1
- package/build/esm/v2.0/generatePerInterfaceDataFiles.js +2 -0
- package/build/esm/v2.0/generatePerInterfaceDataFiles.js.map +1 -1
- package/build/esm/v2.0/generatePerObjectDataFiles.js +1 -0
- package/build/esm/v2.0/generatePerObjectDataFiles.js.map +1 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.js +1 -0
- package/build/esm/v2.0/generatePerQueryDataFiles.js.map +1 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.test.js +2 -0
- package/build/esm/v2.0/generatePerQueryDataFiles.test.js.map +1 -1
- package/build/esm/v2.0/generateRootIndexTsFile.js +1 -0
- package/build/esm/v2.0/generateRootIndexTsFile.js.map +1 -1
- package/build/esm/v2.0/getDescriptionIfPresent.js +1 -0
- package/build/esm/v2.0/getDescriptionIfPresent.js.map +1 -1
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js +2 -0
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.js.map +1 -1
- package/build/esm/validateWireOntologyAssumptions.js +1 -0
- package/build/esm/validateWireOntologyAssumptions.js.map +1 -1
- package/build/types/GenerateContext/EnhanceCommon.d.ts +6 -0
- package/build/types/GenerateContext/EnhancedAction.d.ts +13 -0
- package/build/types/GenerateContext/EnhancedBase.d.ts +20 -0
- package/build/types/GenerateContext/EnhancedInterfaceType.d.ts +12 -0
- package/build/{esm → types}/GenerateContext/EnhancedObjectType.d.ts +5 -6
- package/build/types/GenerateContext/EnhancedOntologyDefinition.d.ts +28 -0
- package/build/types/GenerateContext/EnhancedQuery.d.ts +13 -0
- package/build/{browser → types}/GenerateContext/EnhancedSharedPropertyType.d.ts +2 -3
- package/build/types/GenerateContext/ForeignType.d.ts +8 -0
- package/build/types/GenerateContext/GenerateContext.d.ts +13 -0
- package/build/types/GenerateContext/enhanceOntology.d.ts +9 -0
- package/build/types/MinimalFs.d.ts +7 -0
- package/build/{browser → types}/WireOntologyDefinition.d.ts +1 -3
- package/build/{browser → types}/generateClientSdkPackage.d.ts +23 -26
- package/build/types/generateClientSdkPackage.test.d.ts +1 -0
- package/build/types/index.d.ts +4 -0
- package/build/{browser → types}/shared/apiNamespaces/startsWithApiNamespace.d.ts +0 -1
- package/build/types/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +1 -0
- package/build/{browser → types}/shared/getObjectImports.d.ts +2 -2
- package/build/{browser → types}/shared/getObjectTypeApiNamesFromQuery.d.ts +0 -1
- package/build/{browser → types}/shared/getObjectTypesFromQueryDataType.d.ts +0 -1
- package/build/{browser → types}/shared/propertyJsdoc.d.ts +2 -3
- package/build/types/shared/sanitizeMetadata.d.ts +1 -0
- package/build/types/shared/sanitizeMetadata.test.d.ts +1 -0
- package/build/{browser → types}/util/InMemoryFs.d.ts +2 -3
- package/build/{browser → types}/util/commaSeparatedIdentifiers.d.ts +0 -1
- package/build/{browser → types}/util/commaSeparatedTypeIdentifiers.d.ts +0 -1
- package/build/{browser → types}/util/deleteUndefineds.d.ts +0 -1
- package/build/{browser → types}/util/reservedKeywords.d.ts +0 -1
- package/build/{browser → types}/util/stringUnionFrom.d.ts +0 -1
- package/build/types/util/stringify.d.ts +20 -0
- package/build/{browser → types}/util/test/TodoWireOntology.d.ts +0 -1
- package/build/{browser → types}/util/test/compileThis.d.ts +0 -1
- package/build/types/util/test/createMockMinimalFiles.d.ts +10 -0
- package/build/{browser → types}/util/test/formatTs.d.ts +0 -1
- package/build/types/util/verifyOutDir.d.ts +8 -0
- package/build/types/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +1 -0
- package/build/types/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +1 -0
- package/build/{esm → types}/v2.0/generateClientSdkVersionTwoPointZero.d.ts +0 -1
- package/build/types/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +1 -0
- package/build/{browser → types}/v2.0/generateMetadata.d.ts +0 -1
- package/build/types/v2.0/generatePerActionDataFiles.d.ts +2 -0
- package/build/types/v2.0/generatePerActionDataFiles.test.d.ts +1 -0
- package/build/types/v2.0/generatePerInterfaceDataFiles.d.ts +1 -0
- package/build/{esm → types}/v2.0/generatePerObjectDataFiles.d.ts +0 -1
- package/build/{browser → types}/v2.0/generatePerQueryDataFiles.d.ts +2 -5
- package/build/types/v2.0/generatePerQueryDataFiles.test.d.ts +1 -0
- package/build/{esm → types}/v2.0/generateRootIndexTsFile.d.ts +0 -1
- package/build/{browser → types}/v2.0/getDescriptionIfPresent.d.ts +0 -1
- package/build/{browser → types}/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +4 -6
- package/build/{browser → types}/validateWireOntologyAssumptions.d.ts +0 -1
- package/package.json +22 -9
- package/build/browser/GenerateContext/EnhanceCommon.d.ts +0 -7
- package/build/browser/GenerateContext/EnhanceCommon.d.ts.map +0 -1
- package/build/browser/GenerateContext/EnhancedAction.d.ts +0 -14
- package/build/browser/GenerateContext/EnhancedAction.d.ts.map +0 -1
- package/build/browser/GenerateContext/EnhancedBase.d.ts +0 -21
- package/build/browser/GenerateContext/EnhancedBase.d.ts.map +0 -1
- package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts +0 -13
- package/build/browser/GenerateContext/EnhancedInterfaceType.d.ts.map +0 -1
- package/build/browser/GenerateContext/EnhancedObjectType.d.ts +0 -12
- package/build/browser/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
- package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts +0 -29
- package/build/browser/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -1
- package/build/browser/GenerateContext/EnhancedQuery.d.ts +0 -14
- package/build/browser/GenerateContext/EnhancedQuery.d.ts.map +0 -1
- package/build/browser/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -1
- package/build/browser/GenerateContext/ForeignType.d.ts +0 -9
- package/build/browser/GenerateContext/ForeignType.d.ts.map +0 -1
- package/build/browser/GenerateContext/GenerateContext.d.ts +0 -14
- package/build/browser/GenerateContext/GenerateContext.d.ts.map +0 -1
- package/build/browser/GenerateContext/enhanceOntology.d.ts +0 -10
- package/build/browser/GenerateContext/enhanceOntology.d.ts.map +0 -1
- package/build/browser/MinimalFs.d.ts +0 -10
- package/build/browser/MinimalFs.d.ts.map +0 -1
- package/build/browser/WireOntologyDefinition.d.ts.map +0 -1
- package/build/browser/generateClientSdkPackage.d.ts.map +0 -1
- package/build/browser/generateClientSdkPackage.test.d.ts +0 -2
- package/build/browser/generateClientSdkPackage.test.d.ts.map +0 -1
- package/build/browser/index.d.ts +0 -5
- package/build/browser/index.d.ts.map +0 -1
- package/build/browser/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -1
- package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +0 -2
- package/build/browser/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -1
- package/build/browser/shared/getObjectImports.d.ts.map +0 -1
- package/build/browser/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -1
- package/build/browser/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -1
- package/build/browser/shared/propertyJsdoc.d.ts.map +0 -1
- package/build/browser/shared/sanitizeMetadata.d.ts +0 -2
- package/build/browser/shared/sanitizeMetadata.d.ts.map +0 -1
- package/build/browser/shared/sanitizeMetadata.test.d.ts +0 -2
- package/build/browser/shared/sanitizeMetadata.test.d.ts.map +0 -1
- package/build/browser/util/InMemoryFs.d.ts.map +0 -1
- package/build/browser/util/commaSeparatedIdentifiers.d.ts.map +0 -1
- package/build/browser/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -1
- package/build/browser/util/deleteUndefineds.d.ts.map +0 -1
- package/build/browser/util/reservedKeywords.d.ts.map +0 -1
- package/build/browser/util/stringUnionFrom.d.ts.map +0 -1
- package/build/browser/util/stringify.d.ts +0 -20
- package/build/browser/util/stringify.d.ts.map +0 -1
- package/build/browser/util/test/TodoWireOntology.d.ts.map +0 -1
- package/build/browser/util/test/compileThis.d.ts.map +0 -1
- package/build/browser/util/test/createMockMinimalFiles.d.ts +0 -13
- package/build/browser/util/test/createMockMinimalFiles.d.ts.map +0 -1
- package/build/browser/util/test/formatTs.d.ts.map +0 -1
- package/build/browser/util/verifyOutDir.d.ts +0 -9
- package/build/browser/util/verifyOutDir.d.ts.map +0 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +0 -2
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -1
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +0 -2
- package/build/browser/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts +0 -4
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -1
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +0 -2
- package/build/browser/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -1
- package/build/browser/v2.0/generateMetadata.d.ts.map +0 -1
- package/build/browser/v2.0/generatePerActionDataFiles.d.ts +0 -3
- package/build/browser/v2.0/generatePerActionDataFiles.d.ts.map +0 -1
- package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts +0 -2
- package/build/browser/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -1
- package/build/browser/v2.0/generatePerInterfaceDataFiles.d.ts +0 -2
- package/build/browser/v2.0/generatePerInterfaceDataFiles.d.ts.map +0 -1
- package/build/browser/v2.0/generatePerObjectDataFiles.d.ts +0 -3
- package/build/browser/v2.0/generatePerObjectDataFiles.d.ts.map +0 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.d.ts.map +0 -1
- package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts +0 -2
- package/build/browser/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -1
- package/build/browser/v2.0/generateRootIndexTsFile.d.ts +0 -3
- package/build/browser/v2.0/generateRootIndexTsFile.d.ts.map +0 -1
- package/build/browser/v2.0/getDescriptionIfPresent.d.ts.map +0 -1
- package/build/browser/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +0 -1
- package/build/browser/validateWireOntologyAssumptions.d.ts.map +0 -1
- package/build/esm/GenerateContext/EnhanceCommon.d.ts +0 -7
- package/build/esm/GenerateContext/EnhanceCommon.d.ts.map +0 -1
- package/build/esm/GenerateContext/EnhancedAction.d.ts +0 -14
- package/build/esm/GenerateContext/EnhancedAction.d.ts.map +0 -1
- package/build/esm/GenerateContext/EnhancedBase.d.ts +0 -21
- package/build/esm/GenerateContext/EnhancedBase.d.ts.map +0 -1
- package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts +0 -13
- package/build/esm/GenerateContext/EnhancedInterfaceType.d.ts.map +0 -1
- package/build/esm/GenerateContext/EnhancedObjectType.d.ts.map +0 -1
- package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts +0 -29
- package/build/esm/GenerateContext/EnhancedOntologyDefinition.d.ts.map +0 -1
- package/build/esm/GenerateContext/EnhancedQuery.d.ts +0 -14
- package/build/esm/GenerateContext/EnhancedQuery.d.ts.map +0 -1
- package/build/esm/GenerateContext/EnhancedSharedPropertyType.d.ts +0 -8
- package/build/esm/GenerateContext/EnhancedSharedPropertyType.d.ts.map +0 -1
- package/build/esm/GenerateContext/ForeignType.d.ts +0 -9
- package/build/esm/GenerateContext/ForeignType.d.ts.map +0 -1
- package/build/esm/GenerateContext/GenerateContext.d.ts +0 -14
- package/build/esm/GenerateContext/GenerateContext.d.ts.map +0 -1
- package/build/esm/GenerateContext/enhanceOntology.d.ts +0 -10
- package/build/esm/GenerateContext/enhanceOntology.d.ts.map +0 -1
- package/build/esm/MinimalFs.d.ts +0 -10
- package/build/esm/MinimalFs.d.ts.map +0 -1
- package/build/esm/WireOntologyDefinition.d.ts +0 -4
- package/build/esm/WireOntologyDefinition.d.ts.map +0 -1
- package/build/esm/generateClientSdkPackage.d.ts +0 -34
- package/build/esm/generateClientSdkPackage.d.ts.map +0 -1
- package/build/esm/generateClientSdkPackage.test.d.ts +0 -2
- package/build/esm/generateClientSdkPackage.test.d.ts.map +0 -1
- package/build/esm/index.d.ts +0 -5
- package/build/esm/index.d.ts.map +0 -1
- package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts +0 -2
- package/build/esm/shared/apiNamespaces/startsWithApiNamespace.d.ts.map +0 -1
- package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.d.ts +0 -2
- package/build/esm/shared/apiNamespaces/startsWithApiNamespace.test.d.ts.map +0 -1
- package/build/esm/shared/getObjectImports.d.ts +0 -4
- package/build/esm/shared/getObjectImports.d.ts.map +0 -1
- package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts +0 -4
- package/build/esm/shared/getObjectTypeApiNamesFromQuery.d.ts.map +0 -1
- package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts +0 -3
- package/build/esm/shared/getObjectTypesFromQueryDataType.d.ts.map +0 -1
- package/build/esm/shared/propertyJsdoc.d.ts +0 -6
- package/build/esm/shared/propertyJsdoc.d.ts.map +0 -1
- package/build/esm/shared/sanitizeMetadata.d.ts +0 -2
- package/build/esm/shared/sanitizeMetadata.d.ts.map +0 -1
- package/build/esm/shared/sanitizeMetadata.test.d.ts +0 -2
- package/build/esm/shared/sanitizeMetadata.test.d.ts.map +0 -1
- package/build/esm/util/InMemoryFs.d.ts +0 -7
- package/build/esm/util/InMemoryFs.d.ts.map +0 -1
- package/build/esm/util/commaSeparatedIdentifiers.d.ts +0 -2
- package/build/esm/util/commaSeparatedIdentifiers.d.ts.map +0 -1
- package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts +0 -2
- package/build/esm/util/commaSeparatedTypeIdentifiers.d.ts.map +0 -1
- package/build/esm/util/deleteUndefineds.d.ts +0 -2
- package/build/esm/util/deleteUndefineds.d.ts.map +0 -1
- package/build/esm/util/reservedKeywords.d.ts +0 -2
- package/build/esm/util/reservedKeywords.d.ts.map +0 -1
- package/build/esm/util/stringUnionFrom.d.ts +0 -2
- package/build/esm/util/stringUnionFrom.d.ts.map +0 -1
- package/build/esm/util/stringify.d.ts +0 -20
- package/build/esm/util/stringify.d.ts.map +0 -1
- package/build/esm/util/test/TodoWireOntology.d.ts +0 -3
- package/build/esm/util/test/TodoWireOntology.d.ts.map +0 -1
- package/build/esm/util/test/compileThis.d.ts +0 -3
- package/build/esm/util/test/compileThis.d.ts.map +0 -1
- package/build/esm/util/test/createMockMinimalFiles.d.ts +0 -13
- package/build/esm/util/test/createMockMinimalFiles.d.ts.map +0 -1
- package/build/esm/util/test/formatTs.d.ts +0 -2
- package/build/esm/util/test/formatTs.d.ts.map +0 -1
- package/build/esm/util/verifyOutDir.d.ts +0 -9
- package/build/esm/util/verifyOutDir.d.ts.map +0 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts +0 -2
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.d.ts.map +0 -1
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts +0 -2
- package/build/esm/v2.0/UNSTABLE_wireInterfaceTypeV2ToSdkObjectConst.test.d.ts.map +0 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.d.ts.map +0 -1
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts +0 -2
- package/build/esm/v2.0/generateClientSdkVersionTwoPointZero.test.d.ts.map +0 -1
- package/build/esm/v2.0/generateMetadata.d.ts +0 -3
- package/build/esm/v2.0/generateMetadata.d.ts.map +0 -1
- package/build/esm/v2.0/generatePerActionDataFiles.d.ts +0 -3
- package/build/esm/v2.0/generatePerActionDataFiles.d.ts.map +0 -1
- package/build/esm/v2.0/generatePerActionDataFiles.test.d.ts +0 -2
- package/build/esm/v2.0/generatePerActionDataFiles.test.d.ts.map +0 -1
- package/build/esm/v2.0/generatePerInterfaceDataFiles.d.ts +0 -2
- package/build/esm/v2.0/generatePerInterfaceDataFiles.d.ts.map +0 -1
- package/build/esm/v2.0/generatePerObjectDataFiles.d.ts.map +0 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.d.ts +0 -9
- package/build/esm/v2.0/generatePerQueryDataFiles.d.ts.map +0 -1
- package/build/esm/v2.0/generatePerQueryDataFiles.test.d.ts +0 -2
- package/build/esm/v2.0/generatePerQueryDataFiles.test.d.ts.map +0 -1
- package/build/esm/v2.0/generateRootIndexTsFile.d.ts.map +0 -1
- package/build/esm/v2.0/getDescriptionIfPresent.d.ts +0 -2
- package/build/esm/v2.0/getDescriptionIfPresent.d.ts.map +0 -1
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts +0 -12
- package/build/esm/v2.0/wireObjectTypeV2ToSdkObjectConstV2.d.ts.map +0 -1
- package/build/esm/validateWireOntologyAssumptions.d.ts +0 -3
- package/build/esm/validateWireOntologyAssumptions.d.ts.map +0 -1
package/build/browser/index.js
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
export { generateClientSdkPackage as __UNSTABLE_generateClientSdkPackage, getExpectedDependencies } from "./generateClientSdkPackage.js";
|
|
17
18
|
export { generateClientSdkVersionTwoPointZero } from "./v2.0/generateClientSdkVersionTwoPointZero.js";
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["generateClientSdkPackage","__UNSTABLE_generateClientSdkPackage","getExpectedDependencies","generateClientSdkVersionTwoPointZero"],"sources":["index.
|
|
1
|
+
{"version":3,"file":"index.js","names":["generateClientSdkPackage","__UNSTABLE_generateClientSdkPackage","getExpectedDependencies","generateClientSdkVersionTwoPointZero"],"sources":["index.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\nexport {\n generateClientSdkPackage as __UNSTABLE_generateClientSdkPackage,\n getExpectedDependencies,\n} from \"./generateClientSdkPackage.js\";\nexport type { MinimalFs } from \"./MinimalFs.js\";\nexport { generateClientSdkVersionTwoPointZero } from \"./v2.0/generateClientSdkVersionTwoPointZero.js\";\nexport type { WireOntologyDefinition } from \"./WireOntologyDefinition.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,wBAAwB,IAAIC,mCAAmC,EAC/DC,uBAAuB,QAClB,+BAA+B;AAEtC,SAASC,oCAAoC,QAAQ,gDAAgD","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
export function startsWithApiNamespace(name, ontologyApiNamespace) {
|
|
17
18
|
if (ontologyApiNamespace) {
|
|
18
19
|
return name.startsWith(`${ontologyApiNamespace}.`) && !name.slice(ontologyApiNamespace.length + 1).includes(".");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startsWithApiNamespace.js","names":["startsWithApiNamespace","name","ontologyApiNamespace","startsWith","slice","length","includes"],"sources":["startsWithApiNamespace.
|
|
1
|
+
{"version":3,"file":"startsWithApiNamespace.js","names":["startsWithApiNamespace","name","ontologyApiNamespace","startsWith","slice","length","includes"],"sources":["startsWithApiNamespace.ts"],"sourcesContent":["/*\n * Copyright 2024 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\nexport function startsWithApiNamespace(\n name: string,\n ontologyApiNamespace: string | undefined,\n): boolean {\n if (ontologyApiNamespace) {\n return name.startsWith(`${ontologyApiNamespace}.`)\n && !name.slice(ontologyApiNamespace.length + 1).includes(\".\");\n } else {\n return !name.includes(\".\");\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,sBAAsBA,CACpCC,IAAY,EACZC,oBAAwC,EAC/B;EACT,IAAIA,oBAAoB,EAAE;IACxB,OAAOD,IAAI,CAACE,UAAU,CAAC,GAAGD,oBAAoB,GAAG,CAAC,IAC7C,CAACD,IAAI,CAACG,KAAK,CAACF,oBAAoB,CAACG,MAAM,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,GAAG,CAAC;EACjE,CAAC,MAAM;IACL,OAAO,CAACL,IAAI,CAACK,QAAQ,CAAC,GAAG,CAAC;EAC5B;AACF","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
import { describe, expect, it } from "vitest";
|
|
17
18
|
import { startsWithApiNamespace } from "./startsWithApiNamespace.js";
|
|
18
19
|
describe(startsWithApiNamespace, () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startsWithApiNamespace.test.js","names":["describe","expect","it","startsWithApiNamespace","partialNamespace","fullNamespace","fullApiName","toBe","undefined","apiNameOnly"],"sources":["startsWithApiNamespace.test.
|
|
1
|
+
{"version":3,"file":"startsWithApiNamespace.test.js","names":["describe","expect","it","startsWithApiNamespace","partialNamespace","fullNamespace","fullApiName","toBe","undefined","apiNameOnly"],"sources":["startsWithApiNamespace.test.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { describe, expect, it } from \"vitest\";\nimport { startsWithApiNamespace } from \"./startsWithApiNamespace.js\";\n\ndescribe(startsWithApiNamespace, () => {\n describe(\"a name with periods\", () => {\n const wrongNamespace = \"incorrect.namespace\";\n const partialNamespace = \"a.b\";\n const fullNamespace = `${partialNamespace}.c`;\n const apiNameOnly = \"Foo\";\n const fullApiName = `${fullNamespace}.${apiNameOnly}`;\n\n it(\"returns false if only partial namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, partialNamespace)).toBe(\n false,\n );\n });\n\n it(\"returns true if full namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, fullNamespace)).toBe(true);\n });\n\n it(\"returns false if a wrong namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, wrongNamespace)).toBe(false);\n });\n\n it(\"return false if no namespace is provided\", () => {\n expect(startsWithApiNamespace(fullApiName, undefined)).toBe(false);\n });\n });\n\n describe(\"a name without periods\", () => {\n const wrongNamespace = \"incorrect.namespace\";\n const apiNameOnly = \"Foo\";\n\n it(\"returns false if any namespace is provided\", () => {\n expect(startsWithApiNamespace(apiNameOnly, wrongNamespace)).toBe(\n false,\n );\n });\n\n it(\"returns true if no namespace is provided\", () => {\n expect(startsWithApiNamespace(apiNameOnly, undefined)).toBe(true);\n });\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,sBAAsB,QAAQ,6BAA6B;AAEpEH,QAAQ,CAACG,sBAAsB,EAAE,MAAM;EACrCH,QAAQ,CAAC,qBAAqB,EAAE,MAAM;IAEpC,MAAMI,gBAAgB,GAAG,KAAK;IAC9B,MAAMC,aAAa,GAAG,GAAGD,gBAAgB,IAAI;IAE7C,MAAME,WAAW,GAAG,GAAGD,aAAa,IADhB,KAAK,EAC4B;IAErDH,EAAE,CAAC,qDAAqD,EAAE,MAAM;MAC9DD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAEF,gBAAgB,CAAC,CAAC,CAACG,IAAI,CAChE,KACF,CAAC;IACH,CAAC,CAAC;IAEFL,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACrDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAED,aAAa,CAAC,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;IACvE,CAAC,CAAC;IAEFL,EAAE,CAAC,gDAAgD,EAAE,MAAM;MACzDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAjBpB,qBAiBoC,CAAC,CAAC,CAACC,IAAI,CAAC,KAAK,CAAC;IACzE,CAAC,CAAC;IAEFL,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACnDD,MAAM,CAACE,sBAAsB,CAACG,WAAW,EAAEE,SAAS,CAAC,CAAC,CAACD,IAAI,CAAC,KAAK,CAAC;IACpE,CAAC,CAAC;EACJ,CAAC,CAAC;EAEFP,QAAQ,CAAC,wBAAwB,EAAE,MAAM;IAEvC,MAAMS,WAAW,GAAG,KAAK;IAEzBP,EAAE,CAAC,4CAA4C,EAAE,MAAM;MACrDD,MAAM,CAACE,sBAAsB,CAACM,WAAW,EAJpB,qBAIoC,CAAC,CAAC,CAACF,IAAI,CAC9D,KACF,CAAC;IACH,CAAC,CAAC;IAEFL,EAAE,CAAC,0CAA0C,EAAE,MAAM;MACnDD,MAAM,CAACE,sBAAsB,CAACM,WAAW,EAAED,SAAS,CAAC,CAAC,CAACD,IAAI,CAAC,IAAI,CAAC;IACnE,CAAC,CAAC;EACJ,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
export function getObjectImports(objects, curApiName, currentFilePath, v2) {
|
|
17
18
|
return Array.from(objects).filter(obj => obj.fullApiName !== curApiName).map(obj => {
|
|
18
19
|
const defId = obj.getDefinitionIdentifier(v2);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getObjectImports.js","names":["getObjectImports","objects","curApiName","currentFilePath","v2","Array","from","filter","obj","fullApiName","map","defId","getDefinitionIdentifier","importedId","getImportedDefinitionIdentifier","nameOrAlias","getImportPathRelTo","join"],"sources":["getObjectImports.
|
|
1
|
+
{"version":3,"file":"getObjectImports.js","names":["getObjectImports","objects","curApiName","currentFilePath","v2","Array","from","filter","obj","fullApiName","map","defId","getDefinitionIdentifier","importedId","getImportedDefinitionIdentifier","nameOrAlias","getImportPathRelTo","join"],"sources":["getObjectImports.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { EnhancedInterfaceType } from \"../GenerateContext/EnhancedInterfaceType.js\";\nimport type { EnhancedObjectType } from \"../GenerateContext/EnhancedObjectType.js\";\nimport type { ForeignType } from \"../GenerateContext/ForeignType.js\";\n\nexport function getObjectImports(\n objects: Set<EnhancedObjectType | ForeignType | EnhancedInterfaceType>,\n curApiName: string | undefined,\n currentFilePath: string,\n v2: boolean,\n): string {\n return Array.from(objects).filter(obj => obj.fullApiName !== curApiName)\n .map(obj => {\n const defId = obj.getDefinitionIdentifier(v2);\n const importedId = obj.getImportedDefinitionIdentifier(v2);\n\n const nameOrAlias = defId === importedId\n ? defId\n : `${defId} as ${importedId}`;\n\n return `import type { ${nameOrAlias} } from \"${\n obj.getImportPathRelTo(\"./\" + currentFilePath)\n }\";`;\n }).join(\"\\n\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,OAAO,SAASA,gBAAgBA,CAC9BC,OAAsE,EACtEC,UAA8B,EAC9BC,eAAuB,EACvBC,EAAW,EACH;EACR,OAAOC,KAAK,CAACC,IAAI,CAACL,OAAO,CAAC,CAACM,MAAM,CAACC,GAAG,IAAIA,GAAG,CAACC,WAAW,KAAKP,UAAU,CAAC,CACrEQ,GAAG,CAACF,GAAG,IAAI;IACV,MAAMG,KAAK,GAAGH,GAAG,CAACI,uBAAuB,CAACR,EAAE,CAAC;IAC7C,MAAMS,UAAU,GAAGL,GAAG,CAACM,+BAA+B,CAACV,EAAE,CAAC;IAE1D,MAAMW,WAAW,GAAGJ,KAAK,KAAKE,UAAU,GACpCF,KAAK,GACL,GAAGA,KAAK,OAAOE,UAAU,EAAE;IAE/B,OAAO,iBAAiBE,WAAW,YACjCP,GAAG,CAACQ,kBAAkB,CAAC,IAAI,GAAGb,eAAe,CAAC,IAC5C;EACN,CAAC,CAAC,CAACc,IAAI,CAAC,IAAI,CAAC;AACjB","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
import { getObjectTypesFromQueryDataType } from "./getObjectTypesFromQueryDataType.js";
|
|
17
18
|
export function getObjectTypeApiNamesFromQuery(query) {
|
|
18
19
|
const types = new Set();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getObjectTypeApiNamesFromQuery.js","names":["getObjectTypesFromQueryDataType","getObjectTypeApiNamesFromQuery","query","types","Set","dataType","Object","values","parameters","output","Array","from"],"sources":["getObjectTypeApiNamesFromQuery.
|
|
1
|
+
{"version":3,"file":"getObjectTypeApiNamesFromQuery.js","names":["getObjectTypesFromQueryDataType","getObjectTypeApiNamesFromQuery","query","types","Set","dataType","Object","values","parameters","output","Array","from"],"sources":["getObjectTypeApiNamesFromQuery.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { QueryTypeV2 } from \"@osdk/internal.foundry.core\";\nimport type { EnhancedQuery } from \"../GenerateContext/EnhancedQuery.js\";\nimport { getObjectTypesFromQueryDataType } from \"./getObjectTypesFromQueryDataType.js\";\n\nexport function getObjectTypeApiNamesFromQuery(\n query: QueryTypeV2 | EnhancedQuery,\n): string[] {\n const types = new Set<string>();\n\n for (const { dataType } of Object.values(query.parameters)) {\n getObjectTypesFromQueryDataType(dataType, types);\n }\n getObjectTypesFromQueryDataType(query.output, types);\n\n return Array.from(types);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,SAASA,+BAA+B,QAAQ,sCAAsC;AAEtF,OAAO,SAASC,8BAA8BA,CAC5CC,KAAkC,EACxB;EACV,MAAMC,KAAK,GAAG,IAAIC,GAAG,CAAS,CAAC;EAE/B,KAAK,MAAM;IAAEC;EAAS,CAAC,IAAIC,MAAM,CAACC,MAAM,CAACL,KAAK,CAACM,UAAU,CAAC,EAAE;IAC1DR,+BAA+B,CAACK,QAAQ,EAAEF,KAAK,CAAC;EAClD;EACAH,+BAA+B,CAACE,KAAK,CAACO,MAAM,EAAEN,KAAK,CAAC;EAEpD,OAAOO,KAAK,CAACC,IAAI,CAACR,KAAK,CAAC;AAC1B","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getObjectTypesFromQueryDataType.js","names":["getObjectTypesFromQueryDataType","dataType","types","type","subType","add","objectTypeApiName","prop","Object","values","fields","fieldType","unionTypes","Error"],"sources":["getObjectTypesFromQueryDataType.
|
|
1
|
+
{"version":3,"file":"getObjectTypesFromQueryDataType.js","names":["getObjectTypesFromQueryDataType","dataType","types","type","subType","add","objectTypeApiName","prop","Object","values","fields","fieldType","unionTypes","Error"],"sources":["getObjectTypesFromQueryDataType.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { QueryDataType } from \"@osdk/internal.foundry.core\";\n\nexport function getObjectTypesFromQueryDataType(\n dataType: QueryDataType,\n types: Set<string>,\n): void {\n switch (dataType.type) {\n case \"array\":\n case \"set\":\n getObjectTypesFromQueryDataType(dataType.subType, types);\n return;\n\n case \"object\":\n types.add(dataType.objectTypeApiName);\n return;\n\n case \"objectSet\":\n types.add(dataType.objectTypeApiName!);\n return;\n\n case \"struct\":\n for (const prop of Object.values(dataType.fields)) {\n getObjectTypesFromQueryDataType(prop.fieldType, types);\n }\n return;\n\n case \"union\":\n for (const type of dataType.unionTypes) {\n getObjectTypesFromQueryDataType(type, types);\n }\n return;\n\n case \"attachment\":\n case \"boolean\":\n case \"date\":\n case \"double\":\n case \"float\":\n case \"integer\":\n case \"long\":\n case \"null\":\n case \"string\":\n case \"threeDimensionalAggregation\":\n case \"timestamp\":\n case \"twoDimensionalAggregation\":\n case \"unsupported\":\n /* complete no-op */\n return;\n\n default:\n const _: never = dataType;\n throw new Error(\n `Cannot find object types from unsupported QueryDataType ${\n (dataType as any).type\n }`,\n );\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,+BAA+BA,CAC7CC,QAAuB,EACvBC,KAAkB,EACZ;EACN,QAAQD,QAAQ,CAACE,IAAI;IACnB,KAAK,OAAO;IACZ,KAAK,KAAK;MACRH,+BAA+B,CAACC,QAAQ,CAACG,OAAO,EAAEF,KAAK,CAAC;MACxD;IAEF,KAAK,QAAQ;MACXA,KAAK,CAACG,GAAG,CAACJ,QAAQ,CAACK,iBAAiB,CAAC;MACrC;IAEF,KAAK,WAAW;MACdJ,KAAK,CAACG,GAAG,CAACJ,QAAQ,CAACK,iBAAkB,CAAC;MACtC;IAEF,KAAK,QAAQ;MACX,KAAK,MAAMC,IAAI,IAAIC,MAAM,CAACC,MAAM,CAACR,QAAQ,CAACS,MAAM,CAAC,EAAE;QACjDV,+BAA+B,CAACO,IAAI,CAACI,SAAS,EAAET,KAAK,CAAC;MACxD;MACA;IAEF,KAAK,OAAO;MACV,KAAK,MAAMC,IAAI,IAAIF,QAAQ,CAACW,UAAU,EAAE;QACtCZ,+BAA+B,CAACG,IAAI,EAAED,KAAK,CAAC;MAC9C;MACA;IAEF,KAAK,YAAY;IACjB,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,SAAS;IACd,KAAK,MAAM;IACX,KAAK,MAAM;IACX,KAAK,QAAQ;IACb,KAAK,6BAA6B;IAClC,KAAK,WAAW;IAChB,KAAK,2BAA2B;IAChC,KAAK,aAAa;MAChB;MACA;IAEF;MAEE,MAAM,IAAIW,KAAK,CACb,2DACGZ,QAAQ,CAASE,IAAI,EAE1B,CAAC;EACL;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propertyJsdoc.js","names":["propertyJsdoc","property","isInherited","apiName","ret","renderDisplayName","displayName","description"],"sources":["propertyJsdoc.
|
|
1
|
+
{"version":3,"file":"propertyJsdoc.js","names":["propertyJsdoc","property","isInherited","apiName","ret","renderDisplayName","displayName","description"],"sources":["propertyJsdoc.ts"],"sourcesContent":["/*\n * Copyright 2024 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 { ObjectMetadata } from \"@osdk/api\";\n\nexport function propertyJsdoc(\n property: ObjectMetadata.Property,\n { isInherited, apiName }: { isInherited?: boolean; apiName: string },\n): string {\n let ret = `/**\\n`;\n const renderDisplayName = property.displayName\n && property.displayName !== apiName;\n if (isInherited || renderDisplayName || property.description) {\n if (isInherited) {\n ret += ` * (inherited from parent)\\n`;\n }\n\n if (renderDisplayName) {\n ret += ` * display name: '${property.displayName}'${\n property.description ? \",\" : \"\"\n }\\n`;\n }\n\n if (property.description) {\n ret += ` * description: ${property.description}\\n`;\n }\n } else {\n ret += ` * (no ontology metadata)\\n`;\n }\n\n ret += ` */\\n`;\n return ret;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,aAAaA,CAC3BC,QAAiC,EACjC;EAAEC,WAAW;EAAEC;AAAoD,CAAC,EAC5D;EACR,IAAIC,GAAG,GAAG,OAAO;EACjB,MAAMC,iBAAiB,GAAGJ,QAAQ,CAACK,WAAW,IACzCL,QAAQ,CAACK,WAAW,KAAKH,OAAO;EACrC,IAAID,WAAW,IAAIG,iBAAiB,IAAIJ,QAAQ,CAACM,WAAW,EAAE;IAC5D,IAAIL,WAAW,EAAE;MACfE,GAAG,IAAI,8BAA8B;IACvC;IAEA,IAAIC,iBAAiB,EAAE;MACrBD,GAAG,IAAI,uBAAuBH,QAAQ,CAACK,WAAW,IAChDL,QAAQ,CAACM,WAAW,GAAG,GAAG,GAAG,EAAE,IAC7B;IACN;IAEA,IAAIN,QAAQ,CAACM,WAAW,EAAE;MACxBH,GAAG,IAAI,qBAAqBH,QAAQ,CAACM,WAAW,IAAI;IACtD;EACF,CAAC,MAAM;IACLH,GAAG,IAAI,6BAA6B;EACtC;EAEAA,GAAG,IAAI,OAAO;EACd,OAAOA,GAAG;AACZ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizeMetadata.js","names":["sanitizeMetadata","ontology","actionTypes","Object","fromEntries","values","map","actionType","camelize","apiName","name","replace","segment","toUpperCase"],"sources":["sanitizeMetadata.
|
|
1
|
+
{"version":3,"file":"sanitizeMetadata.js","names":["sanitizeMetadata","ontology","actionTypes","Object","fromEntries","values","map","actionType","camelize","apiName","name","replace","segment","toUpperCase"],"sources":["sanitizeMetadata.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 type { WireOntologyDefinition } from \"../WireOntologyDefinition.js\";\n\n/**\n * @internal\n */\nexport function sanitizeMetadata(\n ontology: WireOntologyDefinition,\n): WireOntologyDefinition;\n/**\n * @internal\n */\nexport function sanitizeMetadata(\n ontology: WireOntologyDefinition,\n): WireOntologyDefinition;\n/**\n * @internal\n */\nexport function sanitizeMetadata<\n T extends WireOntologyDefinition | WireOntologyDefinition,\n>(\n ontology: T,\n): T {\n return {\n ...ontology,\n actionTypes: Object.fromEntries(\n Object.values(ontology.actionTypes).map(actionType => {\n return [camelize(actionType.apiName), {\n ...actionType,\n apiName: camelize(actionType.apiName),\n }];\n }),\n ),\n };\n}\nfunction camelize(name: string) {\n return name.replace(/-./g, segment => segment[1]!.toUpperCase());\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACA,OAAO,SAASA,gBAAgBA,CAG9BC,QAAW,EACR;EACH,OAAO;IACL,GAAGA,QAAQ;IACXC,WAAW,EAAEC,MAAM,CAACC,WAAW,CAC7BD,MAAM,CAACE,MAAM,CAACJ,QAAQ,CAACC,WAAW,CAAC,CAACI,GAAG,CAACC,UAAU,IAAI;MACpD,OAAO,CAACC,QAAQ,CAACD,UAAU,CAACE,OAAO,CAAC,EAAE;QACpC,GAAGF,UAAU;QACbE,OAAO,EAAED,QAAQ,CAACD,UAAU,CAACE,OAAO;MACtC,CAAC,CAAC;IACJ,CAAC,CACH;EACF,CAAC;AACH;AACA,SAASD,QAAQA,CAACE,IAAY,EAAE;EAC9B,OAAOA,IAAI,CAACC,OAAO,CAAC,KAAK,EAAEC,OAAO,IAAIA,OAAO,CAAC,CAAC,CAAC,CAAEC,WAAW,CAAC,CAAC,CAAC;AAClE","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
import { describe, expect, it } from "vitest";
|
|
17
18
|
import { sanitizeMetadata } from "./sanitizeMetadata.js";
|
|
18
19
|
describe(sanitizeMetadata, () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sanitizeMetadata.test.js","names":["describe","expect","it","sanitizeMetadata","sanitizedOntology","objectTypes","actionTypes","apiName","operations","parameters","status","rid","ontology","displayName","description","queryTypes","interfaceTypes","sharedPropertyTypes","toEqual"],"sources":["sanitizeMetadata.test.
|
|
1
|
+
{"version":3,"file":"sanitizeMetadata.test.js","names":["describe","expect","it","sanitizeMetadata","sanitizedOntology","objectTypes","actionTypes","apiName","operations","parameters","status","rid","ontology","displayName","description","queryTypes","interfaceTypes","sharedPropertyTypes","toEqual"],"sources":["sanitizeMetadata.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 { describe, expect, it } from \"vitest\";\nimport { sanitizeMetadata } from \"./sanitizeMetadata.js\";\n\ndescribe(sanitizeMetadata, () => {\n it(\"sanitized action apiNames\", () => {\n const sanitizedOntology = sanitizeMetadata({\n objectTypes: {},\n actionTypes: {\n \"kebab-case\": {\n apiName: \"kebab-case\",\n operations: [],\n parameters: {},\n status: \"ACTIVE\",\n rid: \"ri.a.b.c.d\",\n },\n },\n ontology: {\n rid: \"ri.a.b.c.d\",\n apiName: \"ontology\",\n displayName: \"\",\n description: \"\",\n },\n queryTypes: {},\n interfaceTypes: {},\n sharedPropertyTypes: {},\n });\n expect(sanitizedOntology.actionTypes[\"kebabCase\"].apiName).toEqual(\n \"kebabCase\",\n );\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,gBAAgB,QAAQ,uBAAuB;AAExDH,QAAQ,CAACG,gBAAgB,EAAE,MAAM;EAC/BD,EAAE,CAAC,2BAA2B,EAAE,MAAM;IACpC,MAAME,iBAAiB,GAAGD,gBAAgB,CAAC;MACzCE,WAAW,EAAE,CAAC,CAAC;MACfC,WAAW,EAAE;QACX,YAAY,EAAE;UACZC,OAAO,EAAE,YAAY;UACrBC,UAAU,EAAE,EAAE;UACdC,UAAU,EAAE,CAAC,CAAC;UACdC,MAAM,EAAE,QAAQ;UAChBC,GAAG,EAAE;QACP;MACF,CAAC;MACDC,QAAQ,EAAE;QACRD,GAAG,EAAE,YAAY;QACjBJ,OAAO,EAAE,UAAU;QACnBM,WAAW,EAAE,EAAE;QACfC,WAAW,EAAE;MACf,CAAC;MACDC,UAAU,EAAE,CAAC,CAAC;MACdC,cAAc,EAAE,CAAC,CAAC;MAClBC,mBAAmB,EAAE,CAAC;IACxB,CAAC,CAAC;IACFhB,MAAM,CAACG,iBAAiB,CAACE,WAAW,CAAC,WAAW,CAAC,CAACC,OAAO,CAAC,CAACW,OAAO,CAChE,WACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InMemoryFs.js","names":["createInMemoryFs","files","writeFile","path","contents","mkdir","getFiles","getFile","readdir","Error"],"sources":["InMemoryFs.
|
|
1
|
+
{"version":3,"file":"InMemoryFs.js","names":["createInMemoryFs","files","writeFile","path","contents","mkdir","getFiles","getFile","readdir","Error"],"sources":["InMemoryFs.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 { type MinimalFs } from \"../MinimalFs.js\";\nexport interface InMemoryFs extends MinimalFs {\n getFiles(): Record<string, string>;\n getFile(path: string): string;\n}\n\nexport function createInMemoryFs(): InMemoryFs {\n const files: Record<string, string> = {};\n return {\n writeFile: async (path, contents) => {\n files[path] = contents;\n },\n mkdir: async (path, options) => {\n },\n getFiles: () => files,\n getFile: (path) => files[path],\n readdir: async (path) => {\n throw new Error(\"not implemented\");\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA,OAAO,SAASA,gBAAgBA,CAAA,EAAe;EAC7C,MAAMC,KAA6B,GAAG,CAAC,CAAC;EACxC,OAAO;IACLC,SAAS,EAAE,MAAAA,CAAOC,IAAI,EAAEC,QAAQ,KAAK;MACnCH,KAAK,CAACE,IAAI,CAAC,GAAGC,QAAQ;IACxB,CAAC;IACDC,KAAK,EAAE,MAAAA,CAAA,KAAyB,CAChC,CAAC;IACDC,QAAQ,EAAEA,CAAA,KAAML,KAAK;IACrBM,OAAO,EAAGJ,IAAI,IAAKF,KAAK,CAACE,IAAI,CAAC;IAC9BK,OAAO,EAAE,MAAAA,CAAA,KAAgB;MACvB,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;IACpC;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
export function commaSeparatedIdentifiers(identifiers, alternateNames) {
|
|
17
18
|
return identifiers.map(i => {
|
|
18
19
|
const alt = alternateNames?.get(i);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commaSeparatedIdentifiers.js","names":["commaSeparatedIdentifiers","identifiers","alternateNames","map","i","alt","get","join"],"sources":["commaSeparatedIdentifiers.
|
|
1
|
+
{"version":3,"file":"commaSeparatedIdentifiers.js","names":["commaSeparatedIdentifiers","identifiers","alternateNames","map","i","alt","get","join"],"sources":["commaSeparatedIdentifiers.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\nexport function commaSeparatedIdentifiers(\n identifiers: ReadonlyArray<string>,\n alternateNames?: ReadonlyMap<string, string>,\n): string {\n return identifiers.map(i => {\n const alt = alternateNames?.get(i);\n if (alt) {\n return `${i}: ${alt}`;\n }\n return i;\n }).join(\",\");\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,yBAAyBA,CACvCC,WAAkC,EAClCC,cAA4C,EACpC;EACR,OAAOD,WAAW,CAACE,GAAG,CAACC,CAAC,IAAI;IAC1B,MAAMC,GAAG,GAAGH,cAAc,EAAEI,GAAG,CAACF,CAAC,CAAC;IAClC,IAAIC,GAAG,EAAE;MACP,OAAO,GAAGD,CAAC,KAAKC,GAAG,EAAE;IACvB;IACA,OAAOD,CAAC;EACV,CAAC,CAAC,CAACG,IAAI,CAAC,GAAG,CAAC;AACd","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
export function commaSeparatedTypeIdentifiers(identifiers, altNames) {
|
|
17
18
|
return identifiers.map(i => `${i}: typeof ${altNames?.get(i) ?? i}`).join(",");
|
|
18
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commaSeparatedTypeIdentifiers.js","names":["commaSeparatedTypeIdentifiers","identifiers","altNames","map","i","get","join"],"sources":["commaSeparatedTypeIdentifiers.
|
|
1
|
+
{"version":3,"file":"commaSeparatedTypeIdentifiers.js","names":["commaSeparatedTypeIdentifiers","identifiers","altNames","map","i","get","join"],"sources":["commaSeparatedTypeIdentifiers.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\nexport function commaSeparatedTypeIdentifiers(\n identifiers: ReadonlyArray<string>,\n altNames?: ReadonlyMap<string, string>,\n): string {\n return identifiers.map(i => `${i}: typeof ${altNames?.get(i) ?? i}`).join(\n \",\",\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,6BAA6BA,CAC3CC,WAAkC,EAClCC,QAAsC,EAC9B;EACR,OAAOD,WAAW,CAACE,GAAG,CAACC,CAAC,IAAI,GAAGA,CAAC,YAAYF,QAAQ,EAAEG,GAAG,CAACD,CAAC,CAAC,IAAIA,CAAC,EAAE,CAAC,CAACE,IAAI,CACvE,GACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deleteUndefineds.js","names":["deleteUndefineds","obj","Object","fromEntries","entries","filter","value","undefined"],"sources":["deleteUndefineds.
|
|
1
|
+
{"version":3,"file":"deleteUndefineds.js","names":["deleteUndefineds","obj","Object","fromEntries","entries","filter","value","undefined"],"sources":["deleteUndefineds.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\nexport function deleteUndefineds<T extends Record<string, any>>(obj: T): T {\n return Object.fromEntries(\n Object.entries(obj).filter(([, value]) => value !== undefined),\n ) as T;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,gBAAgBA,CAAgCC,GAAM,EAAK;EACzE,OAAOC,MAAM,CAACC,WAAW,CACvBD,MAAM,CAACE,OAAO,CAACH,GAAG,CAAC,CAACI,MAAM,CAAC,CAAC,GAAGC,KAAK,CAAC,KAAKA,KAAK,KAAKC,SAAS,CAC/D,CAAC;AACH","ignoreList":[]}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
// This must match the reservedKeywords definition in packages/legacy-client
|
|
17
18
|
const reservedKeywords = new Set(["break", "case", "catch", "class", "const", "continue", "debugger", "default", "delete", "do", "else", "enum", "export", "extends", "false", "finally", "for", "function", "if", "import", "in", "instanceof", "new", "null", "return", "super", "switch", "this", "throw", "true", "try", "typeof", "var", "void", "while", "with", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"]);
|
|
18
19
|
export function isReservedKeyword(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reservedKeywords.js","names":["reservedKeywords","Set","isReservedKeyword","name","has"],"sources":["reservedKeywords.
|
|
1
|
+
{"version":3,"file":"reservedKeywords.js","names":["reservedKeywords","Set","isReservedKeyword","name","has"],"sources":["reservedKeywords.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\n// This must match the reservedKeywords definition in packages/legacy-client\nconst reservedKeywords = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"class\",\n \"const\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"delete\",\n \"do\",\n \"else\",\n \"enum\",\n \"export\",\n \"extends\",\n \"false\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"import\",\n \"in\",\n \"instanceof\",\n \"new\",\n \"null\",\n \"return\",\n \"super\",\n \"switch\",\n \"this\",\n \"throw\",\n \"true\",\n \"try\",\n \"typeof\",\n \"var\",\n \"void\",\n \"while\",\n \"with\",\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n]);\n\nexport function isReservedKeyword(name: string): boolean {\n return reservedKeywords.has(name);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMA,gBAAgB,GAAG,IAAIC,GAAG,CAAC,CAC/B,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,OAAO,EACP,SAAS,EACT,KAAK,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,OAAO,EACP,MAAM,EACN,YAAY,EACZ,WAAW,EACX,KAAK,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,OAAO,CACR,CAAC;AAEF,OAAO,SAASC,iBAAiBA,CAACC,IAAY,EAAW;EACvD,OAAOH,gBAAgB,CAACI,GAAG,CAACD,IAAI,CAAC;AACnC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringUnionFrom.js","names":["stringUnionFrom","values","length","map","v","join"],"sources":["stringUnionFrom.
|
|
1
|
+
{"version":3,"file":"stringUnionFrom.js","names":["stringUnionFrom","values","length","map","v","join"],"sources":["stringUnionFrom.ts"],"sourcesContent":["/*\n * Copyright 2024 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\nexport function stringUnionFrom(values: ReadonlyArray<string>): string {\n if (values.length === 0) {\n return \"never\";\n } else {\n return values.map(v => `\"${v}\"`).join(\"|\");\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASA,eAAeA,CAACC,MAA6B,EAAU;EACrE,IAAIA,MAAM,CAACC,MAAM,KAAK,CAAC,EAAE;IACvB,OAAO,OAAO;EAChB,CAAC,MAAM;IACL,OAAOD,MAAM,CAACE,GAAG,CAACC,CAAC,IAAI,IAAIA,CAAC,GAAG,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;EAC5C;AACF","ignoreList":[]}
|
|
@@ -13,6 +13,22 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A function for changing the stringified key/value pairs of an object.
|
|
19
|
+
*
|
|
20
|
+
* @param value The value of the key/value pair.
|
|
21
|
+
* @param defaultValueFormatter The function that would be called if this customizer wasn't used
|
|
22
|
+
* @param key The key of the key/value pair.
|
|
23
|
+
* @param defaultKeyFormatter The function that would be called if this customizer wasn't used
|
|
24
|
+
*
|
|
25
|
+
* @returns A string, a tuple of strings, or undefined.
|
|
26
|
+
* If a string is returned, it will be used as the value of the key/value pair.
|
|
27
|
+
* If a tuple of strings is returned, the first string will be used as the key of the key/value pair
|
|
28
|
+
* and the second string will be used as the value of the key/value pair.
|
|
29
|
+
* If undefined is returned, the pair will be removed
|
|
30
|
+
*/
|
|
31
|
+
|
|
16
32
|
const defaultCustomizer = (value, defaultValueFormatter, key, defaultKeyFormatter) => {
|
|
17
33
|
return [defaultKeyFormatter(key), defaultValueFormatter(value)];
|
|
18
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringify.js","names":["defaultCustomizer","value","defaultValueFormatter","key","defaultKeyFormatter","stringify","obj","customizer","separator","JSON","entries","sortedKeys","Object","keys","sort","a","b","localeCompare","res","push","join"],"sources":["stringify.
|
|
1
|
+
{"version":3,"file":"stringify.js","names":["defaultCustomizer","value","defaultValueFormatter","key","defaultKeyFormatter","stringify","obj","customizer","separator","JSON","entries","sortedKeys","Object","keys","sort","a","b","localeCompare","res","push","join"],"sources":["stringify.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\n/**\n * A function for changing the stringified key/value pairs of an object.\n *\n * @param value The value of the key/value pair.\n * @param defaultValueFormatter The function that would be called if this customizer wasn't used\n * @param key The key of the key/value pair.\n * @param defaultKeyFormatter The function that would be called if this customizer wasn't used\n *\n * @returns A string, a tuple of strings, or undefined.\n * If a string is returned, it will be used as the value of the key/value pair.\n * If a tuple of strings is returned, the first string will be used as the key of the key/value pair\n * and the second string will be used as the value of the key/value pair.\n * If undefined is returned, the pair will be removed\n */\ntype Customizer<K extends string | symbol | number, V extends {}> = (\n value: V,\n defaultValueFormatter: (value: any) => string,\n key: K extends \"*\" ? string : K,\n defaultKeyFormatter: (key: string) => string,\n) => [string, string] | string | undefined;\nconst defaultCustomizer: Customizer<string, any> = (\n value,\n defaultValueFormatter,\n key,\n defaultKeyFormatter,\n) => {\n return [defaultKeyFormatter(key), defaultValueFormatter(value)];\n};\n\nexport function stringify<T extends Record<string, any>>(\n obj: T,\n customizer: {\n [K in keyof T | \"*\"]?: Customizer<K, T[K]>;\n } = {},\n separator = \",\\n\",\n): string {\n const defaultKeyFormatter = (key: string) => `${JSON.stringify(key)}`;\n const entries: Array<string> = [];\n\n const sortedKeys = Object.keys(obj).sort((a, b) => a.localeCompare(b));\n\n for (const key of sortedKeys) {\n const value = obj[key];\n const res =\n (customizer[key as keyof T] ?? customizer[\"*\"] ?? defaultCustomizer)(\n value,\n (value) => JSON.stringify(value, null, 2),\n key as any,\n defaultKeyFormatter,\n );\n\n if (res) {\n if (typeof res === \"string\") {\n entries.push(`${defaultKeyFormatter(key)}: ${res}`);\n } else {\n entries.push(`${res[0]}: ${res[1]}`);\n }\n }\n }\n return entries.join(separator);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,MAAMA,iBAA0C,GAAGA,CACjDC,KAAK,EACLC,qBAAqB,EACrBC,GAAG,EACHC,mBAAmB,KAChB;EACH,OAAO,CAACA,mBAAmB,CAACD,GAAG,CAAC,EAAED,qBAAqB,CAACD,KAAK,CAAC,CAAC;AACjE,CAAC;AAED,OAAO,SAASI,SAASA,CACvBC,GAAM,EACNC,UAEC,GAAG,CAAC,CAAC,EACNC,SAAS,GAAG,KAAK,EACT;EACR,MAAMJ,mBAAmB,GAAID,GAAW,IAAK,GAAGM,IAAI,CAACJ,SAAS,CAACF,GAAG,CAAC,EAAE;EACrE,MAAMO,OAAsB,GAAG,EAAE;EAEjC,MAAMC,UAAU,GAAGC,MAAM,CAACC,IAAI,CAACP,GAAG,CAAC,CAACQ,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,CAACE,aAAa,CAACD,CAAC,CAAC,CAAC;EAEtE,KAAK,MAAMb,GAAG,IAAIQ,UAAU,EAAE;IAC5B,MAAMV,KAAK,GAAGK,GAAG,CAACH,GAAG,CAAC;IACtB,MAAMe,GAAG,GACP,CAACX,UAAU,CAACJ,GAAG,CAAY,IAAII,UAAU,CAAC,GAAG,CAAC,IAAIP,iBAAiB,EACjEC,KAAK,EACJA,KAAK,IAAKQ,IAAI,CAACJ,SAAS,CAACJ,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,EACzCE,GAAG,EACHC,mBACF,CAAC;IAEH,IAAIc,GAAG,EAAE;MACP,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;QAC3BR,OAAO,CAACS,IAAI,CAAC,GAAGf,mBAAmB,CAACD,GAAG,CAAC,KAAKe,GAAG,EAAE,CAAC;MACrD,CAAC,MAAM;QACLR,OAAO,CAACS,IAAI,CAAC,GAAGD,GAAG,CAAC,CAAC,CAAC,KAAKA,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;MACtC;IACF;EACF;EACA,OAAOR,OAAO,CAACU,IAAI,CAACZ,SAAS,CAAC;AAChC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TodoWireOntology.js","names":["TodoWireOntology","ontology","rid","apiName","displayName","description","actionTypes","parameters","object","dataType","type","objectApiName","objectTypeApiName","required","operations","status","objectTypes","Todo","objectType","primaryKey","pluralDisplayName","icon","name","color","titleProperty","properties","id","body","complete","linkTypes","cardinality","foreignKeyPropertyApiName","linkTypeRid","implementsInterfaces","implementsInterfaces2","sharedPropertyTypeMapping","Person","email","queryTypes","output","completed","version","someTodo","interfaceTypes","SomeInterface","extendsInterfaces","links","implementedByObjectTypes","allProperties","allExtendsInterfaces","allLinks","sharedPropertyTypes","SomeProperty"],"sources":["TodoWireOntology.js"],"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 */\nexport const TodoWireOntology = {\n ontology: {\n rid: \"ridHere\",\n apiName: \"OntologyApiName\",\n displayName: \"\",\n description: \"\",\n },\n actionTypes: {\n \"markTodoCompleted\": {\n apiName: \"markTodoCompleted\",\n description: \"An action which takes different types of parameters\",\n parameters: {\n object: {\n description: \"A Todo to mark completed\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"modifyObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n \"deleteTodos\": {\n apiName: \"deleteTodos\",\n description: \"An action which takes in an array of objects\",\n parameters: {\n object: {\n description: \"Todo(s) to be deleted\",\n \"dataType\": {\n \"type\": \"array\",\n \"subType\": {\n \"type\": \"object\",\n \"objectApiName\": \"Todo\",\n \"objectTypeApiName\": \"Todo\",\n },\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"deleteObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n },\n objectTypes: {\n Todo: {\n objectType: {\n apiName: \"Todo\",\n primaryKey: \"id\",\n displayName: \"AwesomeTodoDisplayname\",\n pluralDisplayName: \"AwesomeTodoDisplayNames\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"Its a todo item.\",\n titleProperty: \"body\",\n properties: {\n id: {\n dataType: {\n type: \"integer\",\n },\n rid: \"rid\",\n },\n body: {\n dataType: {\n type: \"string\",\n },\n description: \"The text of the todo\",\n displayName: \"Body\",\n rid: \"rid\",\n },\n complete: {\n dataType: {\n type: \"boolean\",\n },\n rid: \"rid\",\n },\n },\n status: \"ACTIVE\",\n rid: \"ridForTodo\",\n },\n linkTypes: [{\n apiName: \"Assignee\",\n cardinality: \"ONE\",\n displayName: \"Assignee\",\n objectTypeApiName: \"Person\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"email\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [\"SomeInterface\"],\n implementsInterfaces2: {\n \"SomeInterface\": {\n properties: {\n \"SomeProperty\": \"body\",\n },\n },\n },\n sharedPropertyTypeMapping: {},\n },\n Person: {\n objectType: {\n apiName: \"Person\",\n primaryKey: \"email\",\n displayName: \"Person\",\n pluralDisplayName: \"Persons\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"A person\",\n titleProperty: \"email\",\n properties: {\n email: {\n dataType: {\n type: \"string\",\n },\n rid: \"rid\",\n },\n },\n rid: \"ridForPerson\",\n status: \"ACTIVE\",\n },\n linkTypes: [{\n apiName: \"Todos\",\n cardinality: \"MANY\",\n displayName: \"Todos\",\n objectTypeApiName: \"Todo\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"id\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [],\n implementsInterfaces2: {},\n sharedPropertyTypeMapping: {},\n },\n },\n queryTypes: {\n \"getCount\": {\n apiName: \"getCount\",\n output: {\n type: \"integer\",\n },\n parameters: {\n completed: { dataType: { type: \"boolean\" } },\n },\n rid: \"rid.query.1\",\n version: \"0\",\n },\n \"returnsTodo\": {\n apiName: \"returnsTodo\",\n output: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n parameters: {\n someTodo: {\n description: \"Random desc so we test jsdoc\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n },\n },\n rid: \"rid.query.2\",\n version: \"0\",\n },\n },\n interfaceTypes: {\n SomeInterface: {\n apiName: \"SomeInterface\",\n description: \"Some interface\",\n properties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n rid: \"idk\",\n displayName: \"Sum Interface\",\n extendsInterfaces: [],\n links: {},\n implementedByObjectTypes: [],\n allProperties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n allExtendsInterfaces: [],\n allLinks: {},\n },\n },\n sharedPropertyTypes: {\n SomeProperty: {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,gBAAgB,GAAG;EAC5BC,QAAQ,EAAE;IACNC,GAAG,EAAE,SAAS;IACdC,OAAO,EAAE,iBAAiB;IAC1BC,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE;EACjB,CAAC;EACDC,WAAW,EAAE;IACT,mBAAmB,EAAE;MACjBH,OAAO,EAAE,mBAAmB;MAC5BE,WAAW,EAAE,qDAAqD;MAClEE,UAAU,EAAE;QACRC,MAAM,EAAE;UACJH,WAAW,EAAE,0BAA0B;UACvCI,QAAQ,EAAE;YACNC,IAAI,EAAE,QAAQ;YACdC,aAAa,EAAE,MAAM;YACrBC,iBAAiB,EAAE;UACvB,CAAC;UACDC,QAAQ,EAAE;QACd;MACJ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ACX,cAAc,EAAE;UACZ7C,OAAO,EAAE,cAAc;UACvBE,WAAW,EAAE,eAAe;UAC5BD,WAAW,EAAE,cAAc;UAC3BK,QAAQ,EAAE;YACNC,IAAI,EAAE;UACV,CAAC;UACDR,GAAG,EAAE;QACT;MACJ,CAAC;MACD+C,oBAAoB,EAAE,EAAE;MACxBC,QAAQ,EAAE,CAAC;IACf;EACJ,CAAC;EACDC,mBAAmB,EAAE;IACjBC,YAAY,EAAE;MACVjD,OAAO,EAAE,cAAc;MACvBE,WAAW,EAAE,eAAe;MAC5BD,WAAW,EAAE,cAAc;MAC3BK,QAAQ,EAAE;QACNC,IAAI,EAAE;MACV,CAAC;MACDR,GAAG,EAAE;IACT;EACJ;AACJ,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"TodoWireOntology.js","names":["TodoWireOntology","ontology","rid","apiName","displayName","description","actionTypes","parameters","object","dataType","type","objectApiName","objectTypeApiName","required","operations","status","objectTypes","Todo","objectType","primaryKey","pluralDisplayName","icon","name","color","titleProperty","properties","id","body","complete","linkTypes","cardinality","foreignKeyPropertyApiName","linkTypeRid","implementsInterfaces","implementsInterfaces2","sharedPropertyTypeMapping","Person","email","queryTypes","output","completed","version","someTodo","interfaceTypes","SomeInterface","extendsInterfaces","links","implementedByObjectTypes","allProperties","allExtendsInterfaces","allLinks","sharedPropertyTypes","SomeProperty"],"sources":["TodoWireOntology.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 type { WireOntologyDefinition } from \"../../WireOntologyDefinition.js\";\n\nexport const TodoWireOntology: WireOntologyDefinition = {\n ontology: {\n rid: \"ridHere\",\n apiName: \"OntologyApiName\",\n displayName: \"\",\n description: \"\",\n },\n actionTypes: {\n \"markTodoCompleted\": {\n apiName: \"markTodoCompleted\",\n description: \"An action which takes different types of parameters\",\n parameters: {\n object: {\n description: \"A Todo to mark completed\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.9f84017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"modifyObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n \"deleteTodos\": {\n apiName: \"deleteTodos\",\n description: \"An action which takes in an array of objects\",\n parameters: {\n object: {\n description: \"Todo(s) to be deleted\",\n \"dataType\": {\n \"type\": \"array\",\n\n \"subType\": {\n \"type\": \"object\",\n \"objectApiName\": \"Todo\",\n \"objectTypeApiName\": \"Todo\",\n },\n },\n required: false,\n },\n },\n rid: \"ri.ontology.main.action-type.8f94017d-cf17-4fa8-84c3-8e01e5d594f2\",\n operations: [{\n type: \"deleteObject\",\n objectTypeApiName: \"Todo\",\n }],\n status: \"ACTIVE\",\n },\n },\n objectTypes: {\n Todo: {\n objectType: {\n apiName: \"Todo\",\n primaryKey: \"id\",\n displayName: \"AwesomeTodoDisplayname\",\n pluralDisplayName: \"AwesomeTodoDisplayNames\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"Its a todo item.\",\n titleProperty: \"body\",\n properties: {\n id: {\n dataType: {\n type: \"integer\",\n },\n rid: \"rid\",\n },\n body: {\n dataType: {\n type: \"string\",\n },\n description: \"The text of the todo\",\n displayName: \"Body\",\n rid: \"rid\",\n },\n complete: {\n dataType: {\n type: \"boolean\",\n },\n rid: \"rid\",\n },\n },\n status: \"ACTIVE\",\n rid: \"ridForTodo\",\n },\n linkTypes: [{\n apiName: \"Assignee\",\n cardinality: \"ONE\",\n displayName: \"Assignee\",\n objectTypeApiName: \"Person\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"email\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [\"SomeInterface\"],\n implementsInterfaces2: {\n \"SomeInterface\": {\n properties: {\n \"SomeProperty\": \"body\",\n },\n },\n },\n sharedPropertyTypeMapping: {},\n },\n Person: {\n objectType: {\n apiName: \"Person\",\n primaryKey: \"email\",\n displayName: \"Person\",\n pluralDisplayName: \"Persons\",\n icon: { type: \"blueprint\", name: \"document\", color: \"blue\" },\n description: \"A person\",\n titleProperty: \"email\",\n properties: {\n email: {\n dataType: {\n type: \"string\",\n },\n rid: \"rid\",\n },\n },\n\n rid: \"ridForPerson\",\n status: \"ACTIVE\",\n },\n linkTypes: [{\n apiName: \"Todos\",\n cardinality: \"MANY\",\n displayName: \"Todos\",\n objectTypeApiName: \"Todo\",\n status: \"ACTIVE\",\n foreignKeyPropertyApiName: \"id\",\n linkTypeRid: \"\",\n }],\n implementsInterfaces: [],\n implementsInterfaces2: {},\n sharedPropertyTypeMapping: {},\n },\n },\n queryTypes: {\n \"getCount\": {\n apiName: \"getCount\",\n output: {\n type: \"integer\",\n },\n parameters: {\n completed: { dataType: { type: \"boolean\" } },\n },\n rid: \"rid.query.1\",\n version: \"0\",\n },\n \"returnsTodo\": {\n apiName: \"returnsTodo\",\n output: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n parameters: {\n someTodo: {\n description: \"Random desc so we test jsdoc\",\n dataType: {\n type: \"object\",\n objectApiName: \"Todo\",\n objectTypeApiName: \"Todo\",\n },\n },\n },\n rid: \"rid.query.2\",\n version: \"0\",\n },\n },\n interfaceTypes: {\n SomeInterface: {\n apiName: \"SomeInterface\",\n description: \"Some interface\",\n properties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n rid: \"idk\",\n displayName: \"Sum Interface\",\n extendsInterfaces: [],\n links: {},\n implementedByObjectTypes: [],\n allProperties: {\n \"SomeProperty\": {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n allExtendsInterfaces: [],\n allLinks: {},\n },\n },\n sharedPropertyTypes: {\n SomeProperty: {\n apiName: \"SomeProperty\",\n description: \"Some property\",\n displayName: \"Sum Property\",\n dataType: {\n type: \"string\",\n },\n rid: \"idk2\",\n },\n },\n} as const satisfies WireOntologyDefinition;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,gBAAwC,GAAG;EACtDC,QAAQ,EAAE;IACRC,GAAG,EAAE,SAAS;IACdC,OAAO,EAAE,iBAAiB;IAC1BC,WAAW,EAAE,EAAE;IACfC,WAAW,EAAE;EACf,CAAC;EACDC,WAAW,EAAE;IACX,mBAAmB,EAAE;MACnBH,OAAO,EAAE,mBAAmB;MAC5BE,WAAW,EAAE,qDAAqD;MAClEE,UAAU,EAAE;QACVC,MAAM,EAAE;UACNH,WAAW,EAAE,0BAA0B;UACvCI,QAAQ,EAAE;YACRC,IAAI,EAAE,QAAQ;YACdC,aAAa,EAAE,MAAM;YACrBC,iBAAiB,EAAE;UACrB,CAAC;UACDC,QAAQ,EAAE;QACZ;MACF,CAAC;MACDX,GAAG,EAAE,mEAAmE;MACxEY,UAAU,EAAE,CAAC;QACXJ,IAAI,EAAE,cAAc;QACpBE,iBAAiB,EAAE;MACrB,CAAC,CAAC;MACFG,MAAM,EAAE;IACV,CAAC;IACD,aAAa,EAAE;MACbZ,OAAO,EAAE,aAAa;MACtBE,WAAW,EAAE,8CAA8C;MAC3DE,UAAU,EAAE;QACVC,MAAM,EAAE;UACNH,WAAW,EAAE,uBAAuB;UACpC,UAAU,EAAE;YACV,MAAM,EAAE,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D,WAAW,EAAE,cAAc;MAC3BK,QAAQ,EAAE;QACRC,IAAI,EAAE;MACR,CAAC;MACDR,GAAG,EAAE;IACP;EACF;AACF,CAA2C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compileThis.js","names":["ts","compileThis","files","basePath","compilerOptions","noEmit","target","ScriptTarget","ES2020","host","createCompilerHost","originalReadFile","readFile","filename","startsWith","writeFile","Error","program","createProgram","options","rootNames","getPreEmitDiagnostics"],"sources":["compileThis.
|
|
1
|
+
{"version":3,"file":"compileThis.js","names":["ts","compileThis","files","basePath","compilerOptions","noEmit","target","ScriptTarget","ES2020","host","createCompilerHost","originalReadFile","readFile","filename","startsWith","writeFile","Error","program","createProgram","options","rootNames","getPreEmitDiagnostics"],"sources":["compileThis.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\";\n\nexport function compileThis(\n files: Record<string, string>,\n basePath: string,\n): readonly ts.Diagnostic[] {\n const compilerOptions: ts.CompilerOptions = {\n noEmit: true,\n target: ts.ScriptTarget.ES2020,\n };\n\n const host = ts.createCompilerHost(compilerOptions);\n const originalReadFile = host.readFile;\n host.readFile = (filename) => {\n if (filename.startsWith(basePath)) {\n return files[filename];\n } else {\n return originalReadFile(filename);\n }\n };\n host.writeFile = () => {\n throw new Error(\"File writes not allowed\");\n };\n\n const program = ts.createProgram({\n options: compilerOptions,\n host,\n rootNames: [\"/foo/index.ts\"],\n });\n\n return ts.getPreEmitDiagnostics(program);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAKA,EAAE,MAAM,YAAY;AAEhC,OAAO,SAASC,WAAWA,CACzBC,KAA6B,EAC7BC,QAAgB,EACU;EAC1B,MAAMC,eAAmC,GAAG;IAC1CC,MAAM,EAAE,IAAI;IACZC,MAAM,EAAEN,EAAE,CAACO,YAAY,CAACC;EAC1B,CAAC;EAED,MAAMC,IAAI,GAAGT,EAAE,CAACU,kBAAkB,CAACN,eAAe,CAAC;EACnD,MAAMO,gBAAgB,GAAGF,IAAI,CAACG,QAAQ;EACtCH,IAAI,CAACG,QAAQ,GAAIC,QAAQ,IAAK;IAC5B,IAAIA,QAAQ,CAACC,UAAU,CAACX,QAAQ,CAAC,EAAE;MACjC,OAAOD,KAAK,CAACW,QAAQ,CAAC;IACxB,CAAC,MAAM;MACL,OAAOF,gBAAgB,CAACE,QAAQ,CAAC;IACnC;EACF,CAAC;EACDJ,IAAI,CAACM,SAAS,GAAG,MAAM;IACrB,MAAM,IAAIC,KAAK,CAAC,yBAAyB,CAAC;EAC5C,CAAC;EAED,MAAMC,OAAO,GAAGjB,EAAE,CAACkB,aAAa,CAAC;IAC/BC,OAAO,EAAEf,eAAe;IACxBK,IAAI;IACJW,SAAS,EAAE,CAAC,eAAe;EAC7B,CAAC,CAAC;EAEF,OAAOpB,EAAE,CAACqB,qBAAqB,CAACJ,OAAO,CAAC;AAC1C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMockMinimalFiles.js","names":["vi","createMockMinimalFiles","writeFile","fn","Promise","resolve","getFiles","Object","fromEntries","mock","calls","readdir","minimalFiles","mkdir","dumpFilesToConsole","path","contents","entries","console","group","log","groupEnd"],"sources":["createMockMinimalFiles.
|
|
1
|
+
{"version":3,"file":"createMockMinimalFiles.js","names":["vi","createMockMinimalFiles","writeFile","fn","Promise","resolve","getFiles","Object","fromEntries","mock","calls","readdir","minimalFiles","mkdir","dumpFilesToConsole","path","contents","entries","console","group","log","groupEnd"],"sources":["createMockMinimalFiles.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 { vi } from \"vitest\";\nimport type { ReaddirFn, WriteFileFn } from \"../../MinimalFs.js\";\n\nexport function createMockMinimalFiles(): {\n minimalFiles: {\n writeFile: WriteFileFn;\n mkdir: () => Promise<void>;\n readdir: ReaddirFn;\n };\n getFiles: () => {\n [k: string]: string;\n };\n dumpFilesToConsole: () => void;\n} {\n const writeFile = vi.fn<WriteFileFn>(\n () => Promise.resolve(),\n );\n const getFiles = () => Object.fromEntries(writeFile.mock.calls);\n\n const readdir = vi.fn<ReaddirFn>(\n () => Promise.resolve([]),\n );\n\n return {\n minimalFiles: {\n writeFile: writeFile as WriteFileFn,\n mkdir: () => Promise.resolve(),\n readdir: readdir as ReaddirFn,\n },\n getFiles,\n dumpFilesToConsole: () => {\n for (const [path, contents] of Object.entries(getFiles())) {\n console.group(path);\n console.log(contents);\n console.groupEnd();\n }\n },\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,EAAE,QAAQ,QAAQ;AAG3B,OAAO,SAASC,sBAAsBA,CAAA,EAUpC;EACA,MAAMC,SAAS,GAAGF,EAAE,CAACG,EAAE,CACrB,MAAMC,OAAO,CAACC,OAAO,CAAC,CACxB,CAAC;EACD,MAAMC,QAAQ,GAAGA,CAAA,KAAMC,MAAM,CAACC,WAAW,CAACN,SAAS,CAACO,IAAI,CAACC,KAAK,CAAC;EAE/D,MAAMC,OAAO,GAAGX,EAAE,CAACG,EAAE,CACnB,MAAMC,OAAO,CAACC,OAAO,CAAC,EAAE,CAC1B,CAAC;EAED,OAAO;IACLO,YAAY,EAAE;MACZV,SAAS,EAAEA,SAAwB;MACnCW,KAAK,EAAEA,CAAA,KAAMT,OAAO,CAACC,OAAO,CAAC,CAAC;MAC9BM,OAAO,EAAEA;IACX,CAAC;IACDL,QAAQ;IACRQ,kBAAkB,EAAEA,CAAA,KAAM;MACxB,KAAK,MAAM,CAACC,IAAI,EAAEC,QAAQ,CAAC,IAAIT,MAAM,CAACU,OAAO,CAACX,QAAQ,CAAC,CAAC,CAAC,EAAE;QACzDY,OAAO,CAACC,KAAK,CAACJ,IAAI,CAAC;QACnBG,OAAO,CAACE,GAAG,CAACJ,QAAQ,CAAC;QACrBE,OAAO,CAACG,QAAQ,CAAC,CAAC;MACpB;IACF;EACF,CAAC;AACH","ignoreList":[]}
|