@osdk/maker-experimental 0.6.0-beta.4 → 0.6.0-beta.6
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 +33 -0
- package/build/browser/api/defineOntologyV2.js +9 -3
- package/build/browser/api/defineOntologyV2.js.map +1 -1
- package/build/browser/cli/generateBackingDataset.js +250 -0
- package/build/browser/cli/generateBackingDataset.js.map +1 -0
- package/build/browser/cli/main.js +60 -7
- package/build/browser/cli/main.js.map +1 -1
- package/build/browser/cli/marketplaceSerialization/BlockGeneratorResult.js.map +1 -1
- package/build/browser/conversion/toMarketplace/convertLink.js +9 -4
- package/build/browser/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/browser/util/generateRid.js +10 -4
- package/build/browser/util/generateRid.js.map +1 -1
- package/build/cjs/{ActionTypeShapeExtractor-5IVLHAPH.cjs → ActionTypeShapeExtractor-UWC4CVHX.cjs} +4 -4
- package/build/cjs/{ActionTypeShapeExtractor-5IVLHAPH.cjs.map → ActionTypeShapeExtractor-UWC4CVHX.cjs.map} +1 -1
- package/build/cjs/{chunk-AWYOBJ25.cjs → chunk-JC573VYW.cjs} +13 -6
- package/build/cjs/chunk-JC573VYW.cjs.map +1 -0
- package/build/cjs/index.cjs +278 -41
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +6 -1
- package/build/esm/api/defineOntologyV2.js +9 -3
- package/build/esm/api/defineOntologyV2.js.map +1 -1
- package/build/esm/cli/generateBackingDataset.js +250 -0
- package/build/esm/cli/generateBackingDataset.js.map +1 -0
- package/build/esm/cli/main.js +60 -7
- package/build/esm/cli/main.js.map +1 -1
- package/build/esm/cli/marketplaceSerialization/BlockGeneratorResult.js.map +1 -1
- package/build/esm/conversion/toMarketplace/convertLink.js +9 -4
- package/build/esm/conversion/toMarketplace/convertLink.js.map +1 -1
- package/build/esm/util/generateRid.js +10 -4
- package/build/esm/util/generateRid.js.map +1 -1
- package/build/types/api/defineOntologyV2.d.ts +6 -1
- package/build/types/api/defineOntologyV2.d.ts.map +1 -1
- package/build/types/cli/generateBackingDataset.d.ts +16 -0
- package/build/types/cli/generateBackingDataset.d.ts.map +1 -0
- package/build/types/cli/main.d.ts.map +1 -1
- package/build/types/cli/marketplaceSerialization/BlockGeneratorResult.d.ts +2 -2
- package/build/types/cli/marketplaceSerialization/BlockGeneratorResult.d.ts.map +1 -1
- package/build/types/conversion/toMarketplace/convertLink.d.ts.map +1 -1
- package/build/types/util/generateRid.d.ts +4 -2
- package/build/types/util/generateRid.d.ts.map +1 -1
- package/package.json +4 -4
- package/build/browser/api/overall.test.js +0 -713
- package/build/browser/api/overall.test.js.map +0 -1
- package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js +0 -562
- package/build/browser/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js.map +0 -1
- package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js +0 -677
- package/build/browser/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js.map +0 -1
- package/build/cjs/chunk-AWYOBJ25.cjs.map +0 -1
- package/build/esm/api/overall.test.js +0 -713
- package/build/esm/api/overall.test.js.map +0 -1
- package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js +0 -562
- package/build/esm/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.js.map +0 -1
- package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js +0 -677
- package/build/esm/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.js.map +0 -1
- package/build/types/api/overall.test.d.ts +0 -1
- package/build/types/api/overall.test.d.ts.map +0 -1
- package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.d.ts +0 -1
- package/build/types/conversion/toMarketplace/shapeExtractors/ActionTypeShapeExtractor.test.d.ts.map +0 -1
- package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.d.ts +0 -1
- package/build/types/conversion/toMarketplace/shapeExtractors/ObjectTypeShapeExtractor.test.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/cli/marketplaceSerialization/CodeBlockSpec.ts","../../src/util/generateRid.ts"],"names":["crypto","createHash"],"mappings":";;;;;;;;;AAgCA,SAAS,oBAAoB,KAAO,EAAA;AAClC,EAAM,MAAA,QAAA,GAAWA,wBAAO,UAAW,CAAA,KAAK,EAAE,MAAO,CAAA,KAAK,EAAE,MAAO,EAAA;AAC/D,EAAA,QAAA,CAAS,CAAC,CAAK,IAAA,EAAA;AACf,EAAA,QAAA,CAAS,CAAC,CAAK,IAAA,EAAA;AACf,EAAA,QAAA,CAAS,CAAC,CAAK,IAAA,EAAA;AACf,EAAA,QAAA,CAAS,CAAC,CAAK,IAAA,GAAA;AACf,EAAM,MAAA,GAAA,GAAM,QAAS,CAAA,QAAA,CAAS,KAAK,CAAA;AACnC,EAAA,MAAM,IAAO,GAAA,GAAA,CAAI,OAAQ,CAAA,sCAAA,EAAwC,gBAAgB,CAAA;AACjF,EAAO,OAAA,IAAA;AACT;AACO,SAAS,cAAA,CAAe,YAAY,IAAM,EAAA;AAC/C,EAAA,IAAI,MAAS,GAAA,UAAA;AACb,EAAA,IAAI,IAAM,EAAA;AACR,IAAA,MAAA,GAAS,UAAa,GAAA,IAAA;AAAA;AAExB,EAAM,MAAA,MAAA,GAASC,kBAAW,QAAQ,CAAA;AAClC,EAAO,MAAA,CAAA,MAAA,CAAO,QAAQ,MAAM,CAAA;AAC5B,EAAM,MAAA,WAAA,GAAc,OAAO,MAAO,EAAA;AAClC,EAAA,OAAO,oBAAoB,WAAW,CAAA;AACxC;;;ACXO,IAAM,sBAAN,MAA0B;AAAA,EAC/B,OAAO,GAAI,CAAA,IAAA,EAAM,IAAM,EAAA;AACrB,IAAA,IAAI,SAAS,MAAW,EAAA;AAEtB,MAAO,O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,MACA;AAAA,KACF;AAAA;AACF,EACA,kBAAkB,UAAY,EAAA;AAC5B,IAAA,MAAM,EAAK,GAAA,cAAA,CAAe,UAAY,EAAA,IAAA,CAAK,cAAc,CAAA;AACzD,IAAO,OAAA,EAAA;AAAA;AACT,EACA,gBAAmB,GAAA;AACjB,IAAA,OAAO,IAAK,CAAA,aAAA;AAAA;AACd,EACA,qBAAqB,iBAAmB,EAAA;AACtC,IAAM,MAAA,UAAA,GAAa,mBAAoB,CAAA,gBAAA,CAAiB,iBAAiB,CAAA;AACzE,IAAA,MAAM,WAAc,GAAA,IAAA,CAAK,aAAc,CAAA,GAAA,CAAI,UAAU,CAAA;AACrD,IAAA,IAAI,WAAa,EAAA;AACf,MAAO,OAAA,WAAA;AAAA;AAIT,IAAA,MAAM,eAAe,iBAAkB,CAAA,OAAA,CAAQ,KAAO,EAAA,GAAG,EAAE,WAAY,EAAA;AACvE,IAAK,IAAA,CAAA,aAAA,CAAc,GAAI,CAAA,UAAA,EAAY,YAAY,CAAA;AAC/C,IAAO,OAAA,YAAA;AAAA;AAEX","file":"chunk-JC573VYW.cjs","sourcesContent":["/*\n * Copyright 2025 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 crypto, { createHash } from \"crypto\";\n\n/**\n * The spec for a code block. This is transported as a marketplace product artifact.\n *\n * This TypeScript interface mirrors the Java CodeBlockSpec class and is designed\n * to be JSON serialization-compatible.\n */\n\nexport function getBlockVersionId(blockSpec, blockSetVersion, randomnessKey) {\n let mergedString = `${blockSpec.blockMavenCoordinate}_${blockSetVersion}`;\n if (randomnessKey) {\n mergedString = `${blockSpec.blockMavenCoordinate}_${blockSetVersion}_${randomnessKey}`;\n }\n return generateUUIDFromStr(mergedString);\n}\nfunction generateUUIDFromStr(input) {\n const md5Bytes = crypto.createHash(\"md5\").update(input).digest();\n md5Bytes[6] &= 0x0f; /* clear version */\n md5Bytes[6] |= 0x30; /* set to version 3 */\n md5Bytes[8] &= 0x3f; /* clear variant */\n md5Bytes[8] |= 0x80; /* set to IETF variant */\n const hex = md5Bytes.toString(\"hex\");\n const uuid = hex.replace(/(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})/, \"$1-$2-$3-$4-$5\");\n return uuid;\n}\nexport function toBlockShapeId(readableId, salt) {\n let toHash = readableId;\n if (salt) {\n toHash = readableId + salt;\n }\n const digest = createHash(\"sha256\");\n digest.update(toHash, \"utf8\");\n const encodedHash = digest.digest();\n return generateUUIDFromStr(encodedHash);\n}","/*\n * Copyright 2025 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// ParameterRid is defined in ontology-metadata but may not be re-exported through the main API\n\nimport { createHash } from \"crypto\";\nimport { toBlockShapeId } from \"../cli/marketplaceSerialization/CodeBlockSpec.js\";\n\n// Given a unique key generates a rid deterministically (from a lock file eventually)\n\n/**\n * Placeholder interface for OntologyRidGenerator\n * This should be filled in with actual implementation\n */\n// Types for datasource locators\n\n/**\n * Simple BiMap interface (placeholder)\n */\n\n/**\n * BlockShapes container for input and output shapes\n */\n\n/**\n * ReadableId generator functions matching Java's ReadableIdGenerator\n */\nexport class ReadableIdGenerator {\n static get(arg1, arg2) {\n if (arg2 !== undefined) {\n // Interface link type\n return `interface-link-type-${arg1}-${arg2}`;\n }\n // Single argument - check context to determine type\n // This will be called from specific methods\n return arg1;\n }\n static getForInterface(interfaceTypeApiName) {\n return `interface-${interfaceTypeApiName}`;\n }\n static getForObjectType(objectTypeApiName) {\n return `object-type-${objectTypeApiName}`;\n }\n static getForStream(streamName) {\n return `stream-datasource-${streamName}`;\n }\n static getForStreamColumn(streamName, columnName) {\n return `stream-datasource-column-${streamName}-${columnName}`;\n }\n static getForTimeSeriesSync(timeSeriesSyncName) {\n return `time-series-sync-${timeSeriesSyncName}`;\n }\n static getForDataset(dataSetName) {\n return `dataset-datasource-${dataSetName}`;\n }\n static getForDatasetOutput(dataSetName) {\n return `dataset-datasource-output-${dataSetName}`;\n }\n static getForDatasetColumn(dataSetName, columnName) {\n return `dataset-datasource-column-${dataSetName}-${columnName}`;\n }\n static getForDatasetColumnOutput(dataSetName, columnName) {\n return `dataset-datasource-column-output-${dataSetName}-${columnName}`;\n }\n static getForMediaSetView(mediaSetViewName) {\n return `media-set-view-${mediaSetViewName}`;\n }\n static getForRestrictedView(restrictedViewName) {\n return `restricted-view-datasource-${restrictedViewName}`;\n }\n static getForRestrictedViewColumn(restrictedViewName, columnName) {\n return `restricted-view-datasource-column-${restrictedViewName}-${columnName}`;\n }\n static getForLinkType(linkTypeId) {\n return `link-type-${linkTypeId}`;\n }\n static getForGeotimeSeriesIntegration(name) {\n return `geotime-series-integration-${name}`;\n }\n static getForActionType(actionTypeApiName) {\n return `action-type-${actionTypeApiName}`;\n }\n static getForParameter(actionName, parameterId) {\n return `action-${actionName}-parameter-${parameterId}`;\n }\n static getForGroup(groupId) {\n return `group-${groupId}`;\n }\n static getForProducedValueType(valueTypeApiName, version) {\n return `produced-value-type-${valueTypeApiName}-${version}`;\n }\n static getForConsumedValueType(valueTypeApiName, version) {\n return `consumed-value-type-${valueTypeApiName}-${version}`;\n }\n static getForSpt(fieldApiName) {\n return `shared-property-type-${fieldApiName}`;\n }\n static getForObjectProperty(objectTypeApiName, fieldApiName) {\n return `${objectTypeApiName}-property-type-${fieldApiName}`;\n }\n static getForInterfaceProperty(interfaceTypeApiName, interfacePropertyTypeApiName) {\n return `interface-property-type-${interfaceTypeApiName}-${interfacePropertyTypeApiName}`;\n }\n static getForInterfaceLinkType(interfaceApiName, interfaceLinkTypeApiName) {\n return `interface-link-type-${interfaceApiName}-${interfaceLinkTypeApiName}`;\n }\n static getForMarking(markingId, supportedMarkingsType) {\n return `marking-${markingId}-${supportedMarkingsType}`;\n }\n}\nexport class BiMapImpl {\n static create() {\n return new BiMapImpl(new Map(), new Map());\n }\n constructor(forward, backward) {\n this.forward = forward;\n this.backward = backward;\n }\n asMap() {\n return this.forward;\n }\n get(key) {\n return this.forward.get(key);\n }\n put(key, value) {\n this.forward.set(key, value);\n this.backward.set(value, key);\n }\n inverse() {\n return new BiMapImpl(this.backward, this.forward);\n }\n entries() {\n return this.forward.entries();\n }\n}\nexport class OntologyRidGeneratorImpl {\n constructor(randomnessUuid) {\n this.randomnessUuid = randomnessUuid;\n this.geotimeSeriesIntegrationRids = BiMapImpl.create();\n this.interfaceLinkTypeRids = BiMapImpl.create();\n this.interfacePropertyTypeRids = BiMapImpl.create();\n this.interfaceRids = BiMapImpl.create();\n this.actionTypeRids = BiMapImpl.create();\n this.parameterRids = new Map();\n this.sharedPropertyTypeRids = BiMapImpl.create();\n this.consumedValueTypeReferences = BiMapImpl.create();\n this.producedValueTypeReferences = new Map();\n this.objectTypeRids = BiMapImpl.create();\n this.datasourceLocators = BiMapImpl.create();\n this.filesDatasourceLocators = BiMapImpl.create();\n this.columnShapes = BiMapImpl.create();\n this.propertyTypeRids = BiMapImpl.create();\n this.timeSeriesSyncs = BiMapImpl.create();\n this.linkTypeRids = BiMapImpl.create();\n this.groupIds = BiMapImpl.create();\n this.objectTypeIds = BiMapImpl.create();\n }\n hashString(input) {\n const stringToHash = this.randomnessUuid ? `${input}-${this.randomnessUuid}` : input;\n return createHash(\"sha256\").update(stringToHash, \"utf8\").digest(\"hex\");\n }\n\n // Generic RID generation for types without specific generators\n generateRid(key) {\n return `ri.ontology-metadata.temp.${this.hashString(key)}`;\n }\n\n // Datasource RID matching Java's RidUtils.getDatasourceRidFromName format\n generateDatasourceRid(datasourceName) {\n return `ri.ontology.main.datasource.${toBlockShapeId(datasourceName, this.randomnessUuid)}`;\n }\n\n // Validation rule RID matching Java's format\n generateValidationRuleRid(actionTypeApiName, index) {\n return `ri.ontology-metadata.temp.validation-rule.${this.hashString(`${actionTypeApiName}.${index}`)}`;\n }\n\n // Section RID matching Java's format: ri.ontology-metadata.temp.section.{hash(sectionId)}\n generateSectionRid(sectionId) {\n return `ri.ontology-metadata.temp.section.${this.hashString(sectionId)}`;\n }\n\n // Property security group RID matching Java's format\n generatePropertySecurityGroupRid(groupName) {\n return `ri.ontology-metadata.temp.property-security-group.${this.hashString(groupName)}`;\n }\n getActionTypeRids() {\n return this.actionTypeRids;\n }\n getParameterRidAndIds() {\n return this.parameterRids;\n }\n getInterfaceRids() {\n return this.interfaceRids;\n }\n getSharedPropertyTypeRids() {\n return this.sharedPropertyTypeRids;\n }\n getInterfaceLinkTypeRids() {\n return this.interfaceLinkTypeRids;\n }\n getInterfacePropertyTypeRids() {\n return this.interfacePropertyTypeRids;\n }\n getPropertyTypeRids() {\n return this.propertyTypeRids;\n }\n getDatasourceLocators() {\n return this.datasourceLocators;\n }\n getFilesDatasourceLocators() {\n return this.filesDatasourceLocators;\n }\n getGeotimeSeriesIntegrationRids() {\n return this.geotimeSeriesIntegrationRids;\n }\n getTimeSeriesSyncs() {\n return this.timeSeriesSyncs;\n }\n getColumnShapes() {\n return this.columnShapes;\n }\n getObjectTypeRids() {\n return this.objectTypeRids;\n }\n getLinkTypeRids() {\n return this.linkTypeRids;\n }\n getGroupIds() {\n return this.groupIds;\n }\n getConsumedValueTypeReferences() {\n return this.consumedValueTypeReferences;\n }\n getProducedValueTypeReferences() {\n return this.producedValueTypeReferences;\n }\n valueTypeMappingForReference(valueTypeReference) {\n const input = this.consumedValueTypeReferences.inverse().get(valueTypeReference);\n const output = this.producedValueTypeReferences.get(valueTypeReference);\n if (!input || !output) {\n throw new Error(`Missing readable ID for value type reference`);\n }\n return {\n input,\n output\n };\n }\n\n // Interface types\n generateRidForInterface(apiName) {\n const rid = `ri.ontology-metadata.temp.interface-type.${this.hashString(apiName)}`;\n this.interfaceRids.put(ReadableIdGenerator.getForInterface(apiName), rid);\n return rid;\n }\n\n // Interface Link Types\n generateRidForInterfaceLinkType(apiName, interfaceTypeApiName) {\n const readableId = ReadableIdGenerator.getForInterfaceLinkType(interfaceTypeApiName, apiName);\n const rid = `ri.ontology-metadata.temp.interface-link-type.${this.hashString(readableId)}`;\n this.interfaceLinkTypeRids.put(readableId, rid);\n return rid;\n }\n\n // Object Types\n generateRidForObjectType(apiName) {\n const rid = `ri.ontology-metadata.temp.object-type.${this.hashString(apiName)}`;\n this.objectTypeRids.put(ReadableIdGenerator.getForObjectType(apiName), rid);\n return rid;\n }\n\n // Value Types\n generateRidForValueType(apiName, version) {\n const rid = `ri.ontology-metadata.temp.value-type.${this.hashString(apiName)}`;\n // Generate UUID from version string (matching Java's UUID.nameUUIDFromBytes)\n const versionHash = createHash(\"md5\").update(version, \"utf8\").digest(\"hex\");\n const versionAsUuid = `${versionHash.slice(0, 8)}-${versionHash.slice(8, 12)}-${versionHash.slice(12, 16)}-${versionHash.slice(16, 20)}-${versionHash.slice(20, 32)}`;\n const valueTypeReference = {\n rid,\n versionId: versionAsUuid\n };\n this.consumedValueTypeReferences.put(ReadableIdGenerator.getForConsumedValueType(apiName, version), valueTypeReference);\n this.producedValueTypeReferences.set(valueTypeReference, ReadableIdGenerator.getForProducedValueType(apiName, version));\n return valueTypeReference;\n }\n generateRidForTimeSeriesSync(name) {\n const rid = `ri.ontology-metadata.temp.time-series-sync.${this.hashString(name)}`;\n this.timeSeriesSyncs.put(ReadableIdGenerator.getForTimeSeriesSync(name), rid);\n return rid;\n }\n generateRidForLinkType(linkTypeId) {\n const rid = `ri.ontology-metadata.temp.link-type.${this.hashString(linkTypeId)}`;\n this.linkTypeRids.put(ReadableIdGenerator.getForLinkType(linkTypeId), rid);\n return rid;\n }\n generateRidForGeotimeSeriesIntegration(name) {\n const rid = `ri.ontology-metadata.temp.geotime-series-integration.${this.hashString(name)}`;\n this.geotimeSeriesIntegrationRids.put(ReadableIdGenerator.getForGeotimeSeriesIntegration(name), rid);\n return rid;\n }\n generateRidForActionType(apiName) {\n const rid = `ri.ontology-metadata.temp.action-type.${this.hashString(apiName)}`;\n this.actionTypeRids.put(ReadableIdGenerator.getForActionType(apiName), rid);\n return rid;\n }\n generateRidForParameter(actionTypeApiName, parameterId) {\n const rid = `ri.ontology-metadata.temp.parameter.${this.hashString(actionTypeApiName + \".\" + parameterId)}`;\n let innerMap = this.parameterRids.get(actionTypeApiName);\n if (!innerMap) {\n innerMap = BiMapImpl.create();\n this.parameterRids.set(actionTypeApiName, innerMap);\n }\n innerMap.put(ReadableIdGenerator.getForParameter(actionTypeApiName, parameterId), {\n rid,\n id: parameterId\n });\n return rid;\n }\n\n // Shared Property Types\n generateSptRid(apiName) {\n const rid = `ri.ontology-metadata.temp.shared-property-type.${this.hashString(apiName)}`;\n this.sharedPropertyTypeRids.put(ReadableIdGenerator.getForSpt(apiName), rid);\n return rid;\n }\n generatePropertyRid(apiName, objectTypeApiName) {\n const rid = `ri.ontology-metadata.temp.property-type.${this.hashString(objectTypeApiName + \".\" + apiName)}`;\n this.propertyTypeRids.put(ReadableIdGenerator.getForObjectProperty(objectTypeApiName, apiName), rid);\n return rid;\n }\n\n // Interface Property Types\n generateInterfacePropertyTypeRid(apiName, interfaceTypeApiName) {\n const rid = `ri.ontology-metadata.temp.interface-property-type.${this.hashString(interfaceTypeApiName + \".\" + apiName)}`;\n this.interfacePropertyTypeRids.put(ReadableIdGenerator.getForInterfaceProperty(interfaceTypeApiName, apiName), rid);\n return rid;\n }\n\n // Struct Field RIDs\n generateStructFieldRid(propertyApiName, apiName) {\n const rid = `ri.ontology-metadata.temp.struct-field.${this.hashString(propertyApiName + \".\" + apiName)}`;\n return rid;\n }\n\n // Datasource locator methods\n generateLocator(dataSetName, columnNames) {\n const datasetRid = `ri.ontology-metadata.temp.dataset.${this.hashString(dataSetName)}`;\n const branchId = \"main\";\n\n // Register column shapes\n columnNames.forEach(name => {\n this.columnShapes.put(ReadableIdGenerator.getForDatasetColumn(dataSetName, name), {\n datasource: {\n type: \"dataset\",\n dataset: {\n rid: datasetRid,\n branch: branchId\n }\n },\n name: name\n });\n });\n\n // Register datasource locator\n this.datasourceLocators.put(ReadableIdGenerator.getForDataset(dataSetName), {\n type: \"dataset\",\n dataset: {\n rid: datasetRid,\n branch: branchId\n }\n });\n return {\n rid: datasetRid,\n branchId\n };\n }\n generateStreamLocator(streamName, columnNames) {\n const streamLocatorRid = `ri.ontology-metadata.temp.stream-datasource.${this.hashString(streamName)}`;\n const branchId = \"main\";\n const locator = {\n streamLocatorRid,\n branchId\n };\n const marketplaceLocator = {\n type: \"stream\",\n stream: {\n rid: streamLocatorRid,\n branch: branchId\n }\n };\n\n // Register column shapes\n columnNames.forEach(name => {\n this.columnShapes.put(ReadableIdGenerator.getForStreamColumn(streamName, name), {\n datasource: marketplaceLocator,\n name: name\n });\n });\n\n // Register datasource locator\n this.datasourceLocators.put(ReadableIdGenerator.getForStream(streamName), marketplaceLocator);\n return locator;\n }\n generateRestrictedViewLocator(restrictedViewName, columnNames) {\n const restrictedViewRid = `ri.ontology-metadata.temp.restricted-view.${this.hashString(restrictedViewName)}`;\n\n // Register column shapes\n columnNames.forEach(name => {\n this.columnShapes.put(ReadableIdGenerator.getForRestrictedViewColumn(restrictedViewName, name), {\n datasource: {\n type: \"restrictedView\",\n restrictedView: {\n rid: restrictedViewRid\n }\n },\n name: name\n });\n });\n\n // Register datasource locator\n this.datasourceLocators.put(ReadableIdGenerator.getForRestrictedView(restrictedViewName), {\n type: \"restrictedView\",\n restrictedView: {\n rid: restrictedViewRid\n }\n });\n return {\n rid: restrictedViewRid\n };\n }\n generateMediaSetViewLocator(mediaSetViewName) {\n const mediaSetRid = `ri.ontology-metadata.temp.media-set.${this.hashString(mediaSetViewName)}`;\n const mediaSetBranchRid = `ri.ontology-metadata.temp.media-set-branch.${this.hashString(mediaSetViewName)}`;\n const mediaSetViewRid = `ri.ontology-metadata.temp.media-set-view.${this.hashString(mediaSetViewName)}`;\n\n // Register files datasource locator\n this.filesDatasourceLocators.put(ReadableIdGenerator.getForMediaSetView(mediaSetViewName), {\n type: \"mediaSet\",\n mediaSet: {\n rid: mediaSetRid,\n branch: \"master\" // matches OntologyMetadataConstants.ONTOLOGY_DATASET_BRANCH_ID\n }\n });\n return {\n mediaSetRid,\n mediaSetViewRid,\n mediaSetBranchRid\n };\n }\n toBlockInternalId(readableId) {\n const id = toBlockShapeId(readableId, this.randomnessUuid);\n return id;\n }\n getObjectTypeIds() {\n return this.objectTypeIds;\n }\n generateObjectTypeId(objectTypeApiName) {\n const readableId = ReadableIdGenerator.getForObjectType(objectTypeApiName);\n const maybeLastId = this.objectTypeIds.get(readableId);\n if (maybeLastId) {\n return maybeLastId;\n }\n\n // Match Java: apiName.replace(\".\", \"-\").toLowerCase()\n const objectTypeId = objectTypeApiName.replace(/\\./g, \"-\").toLowerCase();\n this.objectTypeIds.put(readableId, objectTypeId);\n return objectTypeId;\n }\n}"]}
|
package/build/cjs/index.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var chunkJC573VYW_cjs = require('./chunk-JC573VYW.cjs');
|
|
6
6
|
var consola = require('consola');
|
|
7
7
|
var jiti = require('jiti');
|
|
8
8
|
var fs = require('fs');
|
|
9
|
-
var
|
|
9
|
+
var path2 = require('path');
|
|
10
10
|
var invariant5 = require('tiny-invariant');
|
|
11
11
|
var yargs = require('yargs');
|
|
12
12
|
var helpers = require('yargs/helpers');
|
|
@@ -34,7 +34,7 @@ function _interopNamespace(e) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
37
|
-
var
|
|
37
|
+
var path2__namespace = /*#__PURE__*/_interopNamespace(path2);
|
|
38
38
|
var invariant5__default = /*#__PURE__*/_interopDefault(invariant5);
|
|
39
39
|
var yargs__default = /*#__PURE__*/_interopDefault(yargs);
|
|
40
40
|
|
|
@@ -328,7 +328,7 @@ function registerGroupsFromCondition(condition, ridGenerator) {
|
|
|
328
328
|
switch (condition.type) {
|
|
329
329
|
case "group":
|
|
330
330
|
if (condition.name) {
|
|
331
|
-
ridGenerator.getGroupIds().put(
|
|
331
|
+
ridGenerator.getGroupIds().put(chunkJC573VYW_cjs.ReadableIdGenerator.getForGroup(condition.name), condition.name);
|
|
332
332
|
}
|
|
333
333
|
break;
|
|
334
334
|
case "comparison":
|
|
@@ -336,7 +336,7 @@ function registerGroupsFromCondition(condition, ridGenerator) {
|
|
|
336
336
|
const strings = condition.comparison?.right?.staticValue?.stringList?.strings;
|
|
337
337
|
if (Array.isArray(strings)) {
|
|
338
338
|
strings.forEach((groupName) => {
|
|
339
|
-
ridGenerator.getGroupIds().put(
|
|
339
|
+
ridGenerator.getGroupIds().put(chunkJC573VYW_cjs.ReadableIdGenerator.getForGroup(groupName), groupName);
|
|
340
340
|
});
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -558,7 +558,7 @@ function convertPropertySecurityGroups(ds, properties, primaryKeyPropertyApiName
|
|
|
558
558
|
switch (condition.type) {
|
|
559
559
|
case "group":
|
|
560
560
|
const groupId = condition.name;
|
|
561
|
-
ridGenerator.getGroupIds().put(
|
|
561
|
+
ridGenerator.getGroupIds().put(chunkJC573VYW_cjs.ReadableIdGenerator.getForGroup(groupId), groupId);
|
|
562
562
|
break;
|
|
563
563
|
case "and":
|
|
564
564
|
case "or":
|
|
@@ -1334,7 +1334,7 @@ function convertAction(action, ridGenerator) {
|
|
|
1334
1334
|
const parameterOrdering = action.parameterOrdering ?? (action.parameters ?? []).map((p) => p.id);
|
|
1335
1335
|
const parameterIds = {};
|
|
1336
1336
|
(action.parameters ?? []).forEach((p) => {
|
|
1337
|
-
const readableId =
|
|
1337
|
+
const readableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForParameter(action.apiName, p.id);
|
|
1338
1338
|
const uuid = ridGenerator.toBlockInternalId(readableId);
|
|
1339
1339
|
parameterIds[uuid] = p.id;
|
|
1340
1340
|
});
|
|
@@ -1605,7 +1605,7 @@ function extractAllowedValues(allowedValues, ridGenerator) {
|
|
|
1605
1605
|
user: {
|
|
1606
1606
|
filter: (allowedValues.fromGroups ?? []).map((group) => {
|
|
1607
1607
|
if (group.type === "static") {
|
|
1608
|
-
ridGenerator.getGroupIds().put(
|
|
1608
|
+
ridGenerator.getGroupIds().put(chunkJC573VYW_cjs.ReadableIdGenerator.getForGroup(group.name), group.name);
|
|
1609
1609
|
}
|
|
1610
1610
|
return {
|
|
1611
1611
|
type: "groupFilter",
|
|
@@ -2081,6 +2081,11 @@ function convertLink(linkType, ridGenerator) {
|
|
|
2081
2081
|
const manyObjectRidB = ridGenerator.generateRidForObjectType(toManyObjectApiName);
|
|
2082
2082
|
const manyPkRidA = ridGenerator.generatePropertyRid(manyObject.primaryKeyPropertyApiName, manyObjectApiName);
|
|
2083
2083
|
const manyPkRidB = ridGenerator.generatePropertyRid(toManyObject.primaryKeyPropertyApiName, toManyObjectApiName);
|
|
2084
|
+
const columnA = manyObject.primaryKeyPropertyApiName;
|
|
2085
|
+
const columnB = toManyObject.primaryKeyPropertyApiName;
|
|
2086
|
+
const hasCollision = columnA === columnB;
|
|
2087
|
+
const resolvedColumnA = hasCollision ? `${columnA}_from` : columnA;
|
|
2088
|
+
const resolvedColumnB = hasCollision ? `${columnB}_to` : columnB;
|
|
2084
2089
|
definition = {
|
|
2085
2090
|
type: "manyToMany",
|
|
2086
2091
|
manyToMany: {
|
|
@@ -2109,10 +2114,10 @@ function convertLink(linkType, ridGenerator) {
|
|
|
2109
2114
|
writebackDatasetRid: void 0,
|
|
2110
2115
|
// TODO: Convert property mappings to use property RIDs as keys
|
|
2111
2116
|
objectTypeAPrimaryKeyMapping: {
|
|
2112
|
-
[manyPkRidA]:
|
|
2117
|
+
[manyPkRidA]: resolvedColumnA
|
|
2113
2118
|
},
|
|
2114
2119
|
objectTypeBPrimaryKeyMapping: {
|
|
2115
|
-
[manyPkRidB]:
|
|
2120
|
+
[manyPkRidB]: resolvedColumnB
|
|
2116
2121
|
}
|
|
2117
2122
|
}
|
|
2118
2123
|
},
|
|
@@ -2190,7 +2195,7 @@ function validateLink(linkDefinition) {
|
|
|
2190
2195
|
}
|
|
2191
2196
|
function getObject(object) {
|
|
2192
2197
|
const objectApiName = typeof object === "string" ? object : object.apiName;
|
|
2193
|
-
const fullObject = maker.getOntologyDefinition()[maker.OntologyEntityTypeEnum.OBJECT_TYPE][objectApiName];
|
|
2198
|
+
const fullObject = maker.getOntologyDefinition()[maker.OntologyEntityTypeEnum.OBJECT_TYPE][objectApiName] ?? maker.getImportedTypes()[maker.OntologyEntityTypeEnum.OBJECT_TYPE][objectApiName];
|
|
2194
2199
|
!(fullObject !== void 0) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, `Object ${objectApiName} is not defined`) : invariant5__default.default(false) : void 0;
|
|
2195
2200
|
return {
|
|
2196
2201
|
apiName: objectApiName,
|
|
@@ -3476,7 +3481,7 @@ async function getShapes(ontologyBlockDataV2, ridGenerator, randomnessKey) {
|
|
|
3476
3481
|
}
|
|
3477
3482
|
const {
|
|
3478
3483
|
ActionTypeShapeExtractor
|
|
3479
|
-
} = await import('./ActionTypeShapeExtractor-
|
|
3484
|
+
} = await import('./ActionTypeShapeExtractor-UWC4CVHX.cjs');
|
|
3480
3485
|
for (const [_rid, actionType] of Object.entries(ontologyBlockDataV2.actionTypes || {})) {
|
|
3481
3486
|
const actionExtractor = new ActionTypeShapeExtractor();
|
|
3482
3487
|
const actionShapes = actionExtractor.extract(actionType, ridGenerator, ontologyBlockDataV2.knownIdentifiers);
|
|
@@ -3687,7 +3692,7 @@ function getMarkingShapes(ontologyBlockDataV2, ridGenerator) {
|
|
|
3687
3692
|
const markingType = markingData?.markingType;
|
|
3688
3693
|
const propertyApiName = propertyType.apiName ?? propertyType.displayMetadata?.displayName;
|
|
3689
3694
|
if (propertyApiName) {
|
|
3690
|
-
const readableId =
|
|
3695
|
+
const readableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForObjectProperty(objectApiName, propertyApiName);
|
|
3691
3696
|
if (markingType === "CBAC") {
|
|
3692
3697
|
cbacReadableIdsByRid.set(propertyRid, readableId);
|
|
3693
3698
|
} else if (markingType === "MANDATORY") {
|
|
@@ -3753,7 +3758,7 @@ function getMarkingShapes(ontologyBlockDataV2, ridGenerator) {
|
|
|
3753
3758
|
if (propType) {
|
|
3754
3759
|
const propApiName = propType.apiName ?? propType.displayMetadata?.displayName;
|
|
3755
3760
|
if (propApiName) {
|
|
3756
|
-
existing.add(
|
|
3761
|
+
existing.add(chunkJC573VYW_cjs.ReadableIdGenerator.getForObjectProperty(objectApiName, propApiName));
|
|
3757
3762
|
}
|
|
3758
3763
|
}
|
|
3759
3764
|
}
|
|
@@ -3764,7 +3769,7 @@ function getMarkingShapes(ontologyBlockDataV2, ridGenerator) {
|
|
|
3764
3769
|
}
|
|
3765
3770
|
const inputShapes = /* @__PURE__ */ new Map();
|
|
3766
3771
|
for (const [markingId, props] of cbacMarkingsAndAffectedProps) {
|
|
3767
|
-
const readableId =
|
|
3772
|
+
const readableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForMarking(markingId, "CBAC");
|
|
3768
3773
|
const shape = {
|
|
3769
3774
|
about: createLocalizedAbout3(`Max Classification ${markingId}`, MAX_CLASS_DESC),
|
|
3770
3775
|
operation: "USE",
|
|
@@ -3778,7 +3783,7 @@ function getMarkingShapes(ontologyBlockDataV2, ridGenerator) {
|
|
|
3778
3783
|
});
|
|
3779
3784
|
}
|
|
3780
3785
|
for (const [markingId, props] of additionalCbacMarkingsAndAffectedProps) {
|
|
3781
|
-
const readableId =
|
|
3786
|
+
const readableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForMarking(markingId, "CBAC");
|
|
3782
3787
|
const shape = {
|
|
3783
3788
|
about: createLocalizedAbout3(`Marking ${markingId}`, "Marking"),
|
|
3784
3789
|
operation: "USE",
|
|
@@ -3792,7 +3797,7 @@ function getMarkingShapes(ontologyBlockDataV2, ridGenerator) {
|
|
|
3792
3797
|
});
|
|
3793
3798
|
}
|
|
3794
3799
|
for (const [markingId, props] of mandatoryMarkingsAndAffectedProps) {
|
|
3795
|
-
const readableId =
|
|
3800
|
+
const readableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForMarking(markingId, "MANDATORY");
|
|
3796
3801
|
const shape = {
|
|
3797
3802
|
about: createLocalizedAbout3(`Max Marking ${markingId}`, "Max Marking"),
|
|
3798
3803
|
operation: "USE",
|
|
@@ -3823,13 +3828,13 @@ function consumeBlockShapes(target, source) {
|
|
|
3823
3828
|
}
|
|
3824
3829
|
}
|
|
3825
3830
|
function getReadableIdForSpt(apiName) {
|
|
3826
|
-
return
|
|
3831
|
+
return chunkJC573VYW_cjs.ReadableIdGenerator.getForSpt(apiName);
|
|
3827
3832
|
}
|
|
3828
3833
|
function getReadableIdForInterface(apiName) {
|
|
3829
|
-
return
|
|
3834
|
+
return chunkJC573VYW_cjs.ReadableIdGenerator.getForInterface(apiName);
|
|
3830
3835
|
}
|
|
3831
3836
|
function getReadableIdForInterfaceLink(interfaceApiName, linkApiName) {
|
|
3832
|
-
return
|
|
3837
|
+
return chunkJC573VYW_cjs.ReadableIdGenerator.getForInterfaceLinkType(interfaceApiName, linkApiName);
|
|
3833
3838
|
}
|
|
3834
3839
|
|
|
3835
3840
|
// src/conversion/toMarketplace/convertOntologyDefinitionToWireBlockData.ts
|
|
@@ -3883,21 +3888,21 @@ function buildKnownIdentifiers(ontology, ridGenerator) {
|
|
|
3883
3888
|
const backingDatasourceMappings = Object.fromEntries(Array.from(ridGenerator.getDatasourceLocators().entries()).map(([readableId, locator]) => [ridGenerator.toBlockInternalId(readableId), locator]));
|
|
3884
3889
|
const filesDatasourceMappings = Object.fromEntries(Array.from(ridGenerator.getFilesDatasourceLocators().entries()).map(([readableId, locator]) => [ridGenerator.toBlockInternalId(readableId), locator]));
|
|
3885
3890
|
const objectTypeRids = Object.fromEntries(Array.from(ridGenerator.getObjectTypeRids().inverse().entries()).map(([rid, readableId]) => [rid, ridGenerator.toBlockInternalId(readableId)]));
|
|
3886
|
-
const objectTypeIds = Object.fromEntries(Object.entries(ontology[maker.OntologyEntityTypeEnum.OBJECT_TYPE]).map(([objectTypeApiName, objectType]) => [ridGenerator.getObjectTypeIds().get(
|
|
3891
|
+
const objectTypeIds = Object.fromEntries(Object.entries(ontology[maker.OntologyEntityTypeEnum.OBJECT_TYPE]).map(([objectTypeApiName, objectType]) => [ridGenerator.getObjectTypeIds().get(chunkJC573VYW_cjs.ReadableIdGenerator.getForObjectType(objectTypeApiName)), ridGenerator.toBlockInternalId(chunkJC573VYW_cjs.ReadableIdGenerator.getForObjectType(objectTypeApiName))]));
|
|
3887
3892
|
const propertyTypeIds = {};
|
|
3888
3893
|
Object.entries(ontology[maker.OntologyEntityTypeEnum.OBJECT_TYPE]).forEach(([objectTypeApiName, objectType]) => {
|
|
3889
3894
|
const propMap = {};
|
|
3890
3895
|
(objectType.properties ?? []).forEach((property) => {
|
|
3891
|
-
propMap[property.apiName] = ridGenerator.toBlockInternalId(
|
|
3896
|
+
propMap[property.apiName] = ridGenerator.toBlockInternalId(chunkJC573VYW_cjs.ReadableIdGenerator.getForObjectProperty(objectTypeApiName, property.apiName));
|
|
3892
3897
|
});
|
|
3893
|
-
const objTypeId = ridGenerator.getObjectTypeIds().get(
|
|
3898
|
+
const objTypeId = ridGenerator.getObjectTypeIds().get(chunkJC573VYW_cjs.ReadableIdGenerator.getForObjectType(objectTypeApiName));
|
|
3894
3899
|
propertyTypeIds[objTypeId] = propMap;
|
|
3895
3900
|
});
|
|
3896
3901
|
const propertyRids = Object.fromEntries(Array.from(ridGenerator.getPropertyTypeRids().inverse().entries()).map(([rid, readableId]) => [rid, ridGenerator.toBlockInternalId(readableId)]));
|
|
3897
3902
|
const datasourceColumns = Object.fromEntries(Array.from(ridGenerator.getColumnShapes().entries()).map(([readableId, shape]) => [ridGenerator.toBlockInternalId(readableId), shape]));
|
|
3898
3903
|
const timeSeriesSyncs = Object.fromEntries(Array.from(ridGenerator.getTimeSeriesSyncs().inverse().entries()).map(([rid, readableId]) => [rid, ridGenerator.toBlockInternalId(readableId)]));
|
|
3899
3904
|
const geotimeSeriesSyncs = Object.fromEntries(Array.from(ridGenerator.getGeotimeSeriesIntegrationRids().inverse().entries()).map(([rid, readableId]) => [rid, ridGenerator.toBlockInternalId(readableId)]));
|
|
3900
|
-
const linkTypeIds = Object.fromEntries(Object.keys(ontology[maker.OntologyEntityTypeEnum.LINK_TYPE]).map((linkTypeId, link) => [maker.cleanAndValidateLinkTypeId(linkTypeId), ridGenerator.toBlockInternalId(
|
|
3905
|
+
const linkTypeIds = Object.fromEntries(Object.keys(ontology[maker.OntologyEntityTypeEnum.LINK_TYPE]).map((linkTypeId, link) => [maker.cleanAndValidateLinkTypeId(linkTypeId), ridGenerator.toBlockInternalId(chunkJC573VYW_cjs.ReadableIdGenerator.getForLinkType(maker.cleanAndValidateLinkTypeId(linkTypeId)))]));
|
|
3901
3906
|
const linkTypeRids = Object.fromEntries(Array.from(ridGenerator.getLinkTypeRids().inverse().entries()).map(([rid, readableId]) => [rid, ridGenerator.toBlockInternalId(readableId)]));
|
|
3902
3907
|
const actionTypeMappings = Object.fromEntries(Array.from(ridGenerator.getActionTypeRids().inverse().entries()).map(([rid, readableId]) => [rid, ridGenerator.toBlockInternalId(readableId)]));
|
|
3903
3908
|
const actionParameterMappings = {};
|
|
@@ -3961,7 +3966,7 @@ function buildKnownIdentifiers(ontology, ridGenerator) {
|
|
|
3961
3966
|
const key = `${markingId}-${markingType}`;
|
|
3962
3967
|
if (seenMarkings.has(key)) return;
|
|
3963
3968
|
seenMarkings.add(key);
|
|
3964
|
-
const readableId =
|
|
3969
|
+
const readableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForMarking(markingId, markingType);
|
|
3965
3970
|
const blockInternalId = ridGenerator.toBlockInternalId(readableId);
|
|
3966
3971
|
markingsMappings[blockInternalId] = [markingId];
|
|
3967
3972
|
});
|
|
@@ -4041,10 +4046,203 @@ async function defineOntologyV2(ns, body, randomnessKey) {
|
|
|
4041
4046
|
console.error("Unexpected error while processing the body of the ontology", e);
|
|
4042
4047
|
throw e;
|
|
4043
4048
|
}
|
|
4044
|
-
const
|
|
4045
|
-
const
|
|
4049
|
+
const ontologyDefinition = maker.getOntologyDefinition();
|
|
4050
|
+
const ridGenerator = new chunkJC573VYW_cjs.OntologyRidGeneratorImpl();
|
|
4051
|
+
const ontDef = convertOntologyDefinition(ontologyDefinition, ridGenerator, randomnessKey);
|
|
4046
4052
|
const shapes = await getShapes(ontDef.ontology, ridGenerator, randomnessKey);
|
|
4047
|
-
|
|
4053
|
+
const backingDatasourceApiNames = Object.entries(ontologyDefinition[maker.OntologyEntityTypeEnum.OBJECT_TYPE]).filter(([_, obj]) => obj.includeEmptyBackingDatasource === true).map(([apiName]) => apiName);
|
|
4054
|
+
return {
|
|
4055
|
+
ontologyIr: ontDef,
|
|
4056
|
+
shapes,
|
|
4057
|
+
backingDatasourceApiNames
|
|
4058
|
+
};
|
|
4059
|
+
}
|
|
4060
|
+
function propertyTypeToSchemaType(propType) {
|
|
4061
|
+
const typeStr = typeof propType === "string" ? propType : propType.type;
|
|
4062
|
+
switch (typeStr) {
|
|
4063
|
+
case "string":
|
|
4064
|
+
return "STRING";
|
|
4065
|
+
case "boolean":
|
|
4066
|
+
return "BOOLEAN";
|
|
4067
|
+
case "integer":
|
|
4068
|
+
return "INTEGER";
|
|
4069
|
+
case "long":
|
|
4070
|
+
return "LONG";
|
|
4071
|
+
case "double":
|
|
4072
|
+
return "DOUBLE";
|
|
4073
|
+
case "float":
|
|
4074
|
+
return "FLOAT";
|
|
4075
|
+
case "byte":
|
|
4076
|
+
return "BYTE";
|
|
4077
|
+
case "short":
|
|
4078
|
+
return "SHORT";
|
|
4079
|
+
case "date":
|
|
4080
|
+
return "DATE";
|
|
4081
|
+
case "timestamp":
|
|
4082
|
+
return "TIMESTAMP";
|
|
4083
|
+
default:
|
|
4084
|
+
throw new Error(`Unsupported property type "${typeStr}" for empty backing datasource. If using a property type that doesn't support empty backing datasources please make the property an edit only property.`);
|
|
4085
|
+
}
|
|
4086
|
+
}
|
|
4087
|
+
function getEditOnlyPropertyRids(datasources) {
|
|
4088
|
+
const editOnlyRids = /* @__PURE__ */ new Set();
|
|
4089
|
+
for (const ds of datasources) {
|
|
4090
|
+
const def = ds.datasource;
|
|
4091
|
+
let propertyMapping;
|
|
4092
|
+
if (def.type === "datasetV2") {
|
|
4093
|
+
propertyMapping = def.datasetV2.propertyMapping;
|
|
4094
|
+
} else if (def.type === "datasetV3") {
|
|
4095
|
+
propertyMapping = def.datasetV3.propertyMapping;
|
|
4096
|
+
}
|
|
4097
|
+
if (propertyMapping) {
|
|
4098
|
+
for (const [rid, mapping] of Object.entries(propertyMapping)) {
|
|
4099
|
+
if (mapping.type === "editOnly") {
|
|
4100
|
+
editOnlyRids.add(rid);
|
|
4101
|
+
}
|
|
4102
|
+
}
|
|
4103
|
+
}
|
|
4104
|
+
}
|
|
4105
|
+
return editOnlyRids;
|
|
4106
|
+
}
|
|
4107
|
+
function getNonEditOnlyProperties(objectTypeBlockData) {
|
|
4108
|
+
const editOnlyRids = getEditOnlyPropertyRids(objectTypeBlockData.datasources);
|
|
4109
|
+
return Object.entries(objectTypeBlockData.objectType.propertyTypes).filter(([rid]) => !editOnlyRids.has(rid)).map(([_, prop]) => prop);
|
|
4110
|
+
}
|
|
4111
|
+
async function generateBackingDatasetBlockResult(objectTypeBlockData, buildDir, randomnessKey) {
|
|
4112
|
+
const apiName = objectTypeBlockData.objectType.apiName;
|
|
4113
|
+
const nonEditOnlyProps = getNonEditOnlyProperties(objectTypeBlockData);
|
|
4114
|
+
const dsName = `${apiName}-backing-ds`;
|
|
4115
|
+
const outputs = {};
|
|
4116
|
+
const datasourceReadableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForDatasetOutput(apiName);
|
|
4117
|
+
const columnReadableIds = [];
|
|
4118
|
+
for (const prop of nonEditOnlyProps) {
|
|
4119
|
+
const colReadableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForDatasetColumnOutput(apiName, prop.apiName);
|
|
4120
|
+
columnReadableIds.push(colReadableId);
|
|
4121
|
+
}
|
|
4122
|
+
const datasourceBlockInternalId = chunkJC573VYW_cjs.toBlockShapeId(datasourceReadableId, randomnessKey);
|
|
4123
|
+
outputs[datasourceReadableId] = {
|
|
4124
|
+
type: "tabularDatasource",
|
|
4125
|
+
tabularDatasource: {
|
|
4126
|
+
about: {
|
|
4127
|
+
fallbackTitle: dsName,
|
|
4128
|
+
fallbackDescription: "",
|
|
4129
|
+
localizedTitle: {},
|
|
4130
|
+
localizedDescription: {}
|
|
4131
|
+
},
|
|
4132
|
+
schema: columnReadableIds.map((id) => chunkJC573VYW_cjs.toBlockShapeId(id, randomnessKey)),
|
|
4133
|
+
type: "DATASET",
|
|
4134
|
+
buildRequirements: {
|
|
4135
|
+
isBuildable: false
|
|
4136
|
+
}
|
|
4137
|
+
}
|
|
4138
|
+
};
|
|
4139
|
+
for (let i = 0; i < nonEditOnlyProps.length; i++) {
|
|
4140
|
+
const prop = nonEditOnlyProps[i];
|
|
4141
|
+
const colReadableId = columnReadableIds[i];
|
|
4142
|
+
outputs[colReadableId] = {
|
|
4143
|
+
type: "datasourceColumn",
|
|
4144
|
+
datasourceColumn: {
|
|
4145
|
+
about: {
|
|
4146
|
+
fallbackTitle: prop.apiName,
|
|
4147
|
+
fallbackDescription: "",
|
|
4148
|
+
localizedTitle: {},
|
|
4149
|
+
localizedDescription: {}
|
|
4150
|
+
},
|
|
4151
|
+
type: {
|
|
4152
|
+
type: "concrete",
|
|
4153
|
+
concrete: typeToConcreteDataType(prop.type)
|
|
4154
|
+
},
|
|
4155
|
+
datasource: datasourceBlockInternalId,
|
|
4156
|
+
typeclasses: []
|
|
4157
|
+
}
|
|
4158
|
+
};
|
|
4159
|
+
}
|
|
4160
|
+
const columnInternalIds = nonEditOnlyProps.map((prop) => chunkJC573VYW_cjs.toBlockShapeId(`column-internal-${apiName}-${prop.apiName}`, randomnessKey));
|
|
4161
|
+
const compassReadableId = `${dsName}-compass-resource`;
|
|
4162
|
+
const compassBlockShapeId = chunkJC573VYW_cjs.toBlockShapeId(compassReadableId, randomnessKey);
|
|
4163
|
+
const datasourceInternalId = chunkJC573VYW_cjs.toBlockShapeId(`datasource-internal-${apiName}`, randomnessKey);
|
|
4164
|
+
const locationInternalId = chunkJC573VYW_cjs.toBlockShapeId(`location-internal-${apiName}`, randomnessKey);
|
|
4165
|
+
const addOnOverride = {
|
|
4166
|
+
idToBlockShapeId: {
|
|
4167
|
+
"dataset-internal-shape-id": datasourceBlockInternalId,
|
|
4168
|
+
[datasourceInternalId]: datasourceBlockInternalId,
|
|
4169
|
+
[locationInternalId]: compassBlockShapeId,
|
|
4170
|
+
...Object.fromEntries(columnInternalIds.map((internalId, i) => [internalId, chunkJC573VYW_cjs.toBlockShapeId(columnReadableIds[i], randomnessKey)]))
|
|
4171
|
+
},
|
|
4172
|
+
idToInputGroupId: {},
|
|
4173
|
+
outputToLocationInput: {
|
|
4174
|
+
[datasourceBlockInternalId]: compassBlockShapeId
|
|
4175
|
+
}
|
|
4176
|
+
};
|
|
4177
|
+
const dsBlockDataDir = path2__namespace.join(buildDir, `temp_block_data_${apiName}_backing_ds`);
|
|
4178
|
+
await fs__namespace.promises.mkdir(dsBlockDataDir, {
|
|
4179
|
+
recursive: true
|
|
4180
|
+
});
|
|
4181
|
+
const schemaJson = {
|
|
4182
|
+
fieldSchemaList: nonEditOnlyProps.map((prop) => ({
|
|
4183
|
+
type: propertyTypeToSchemaType(prop.type),
|
|
4184
|
+
name: prop.apiName,
|
|
4185
|
+
nullable: null,
|
|
4186
|
+
userDefinedTypeClass: null,
|
|
4187
|
+
customMetadata: {},
|
|
4188
|
+
arraySubtype: null,
|
|
4189
|
+
precision: null,
|
|
4190
|
+
scale: null,
|
|
4191
|
+
mapKeyType: null,
|
|
4192
|
+
mapValueType: null,
|
|
4193
|
+
subSchemas: null
|
|
4194
|
+
})),
|
|
4195
|
+
primaryKey: null,
|
|
4196
|
+
dataFrameReaderClass: "com.palantir.foundry.spark.input.ParquetDataFrameReader",
|
|
4197
|
+
customMetadata: {
|
|
4198
|
+
format: "parquet",
|
|
4199
|
+
options: {}
|
|
4200
|
+
}
|
|
4201
|
+
};
|
|
4202
|
+
await fs__namespace.promises.writeFile(path2__namespace.join(dsBlockDataDir, "schema.json"), JSON.stringify(schemaJson, null, 2));
|
|
4203
|
+
const blockDataJson = {
|
|
4204
|
+
type: "v1",
|
|
4205
|
+
v1: {
|
|
4206
|
+
columns: Object.fromEntries(nonEditOnlyProps.map((prop, i) => [columnInternalIds[i], prop.apiName])),
|
|
4207
|
+
hasSchema: true
|
|
4208
|
+
}
|
|
4209
|
+
};
|
|
4210
|
+
await fs__namespace.promises.writeFile(path2__namespace.join(dsBlockDataDir, "block-data.json"), JSON.stringify(blockDataJson, null, 2));
|
|
4211
|
+
await fs__namespace.promises.writeFile(path2__namespace.join(dsBlockDataDir, "VERSION"), '"1"');
|
|
4212
|
+
const emptyZip = Buffer.from([80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
|
|
4213
|
+
await fs__namespace.promises.writeFile(path2__namespace.join(dsBlockDataDir, "files.zip"), emptyZip);
|
|
4214
|
+
const inputs = {};
|
|
4215
|
+
inputs[compassReadableId] = {
|
|
4216
|
+
type: "compassResource",
|
|
4217
|
+
compassResource: {
|
|
4218
|
+
about: {
|
|
4219
|
+
fallbackTitle: dsName,
|
|
4220
|
+
fallbackDescription: "",
|
|
4221
|
+
localizedTitle: {},
|
|
4222
|
+
localizedDescription: {}
|
|
4223
|
+
},
|
|
4224
|
+
allowedTypes: [],
|
|
4225
|
+
typeConstraints: [{
|
|
4226
|
+
type: "compassFolderTypeConstraints",
|
|
4227
|
+
compassFolderTypeConstraints: {
|
|
4228
|
+
constraints: ["INSTALL_LOCATION"]
|
|
4229
|
+
}
|
|
4230
|
+
}]
|
|
4231
|
+
}
|
|
4232
|
+
};
|
|
4233
|
+
return {
|
|
4234
|
+
block_identifier: dsName,
|
|
4235
|
+
block_data_directory: dsBlockDataDir,
|
|
4236
|
+
oci_block_data_metadata: void 0,
|
|
4237
|
+
maven_block_data_metadata: void 0,
|
|
4238
|
+
inputs,
|
|
4239
|
+
outputs,
|
|
4240
|
+
input_mapping_entries: [],
|
|
4241
|
+
external_recommendations: [],
|
|
4242
|
+
add_on_override: addOnOverride,
|
|
4243
|
+
input_shape_metadata: {},
|
|
4244
|
+
block_type: "STATIC_DATASET"
|
|
4245
|
+
};
|
|
4048
4246
|
}
|
|
4049
4247
|
|
|
4050
4248
|
// src/cli/main.ts
|
|
@@ -4052,20 +4250,20 @@ var apiNamespaceRegex = /^[a-z0-9-]+(\.[a-z0-9-]+)*\.$/;
|
|
|
4052
4250
|
var uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;
|
|
4053
4251
|
async function main(args = process.argv) {
|
|
4054
4252
|
consola.consola.log("Generating BlockGeneratorResult for ontology...");
|
|
4055
|
-
const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.6.0-beta.
|
|
4253
|
+
const commandLineOpts = await yargs__default.default(helpers.hideBin(args)).version("0.6.0-beta.6").wrap(Math.min(150, yargs__default.default().terminalWidth())).strict().help().options({
|
|
4056
4254
|
input: {
|
|
4057
4255
|
alias: "i",
|
|
4058
4256
|
describe: "Input file",
|
|
4059
4257
|
type: "string",
|
|
4060
4258
|
default: ".ontology/ontology.ts",
|
|
4061
|
-
coerce:
|
|
4259
|
+
coerce: path2__namespace.resolve
|
|
4062
4260
|
},
|
|
4063
4261
|
output: {
|
|
4064
4262
|
alias: "o",
|
|
4065
4263
|
describe: "Output file for BlockGeneratorResult JSON",
|
|
4066
4264
|
type: "string",
|
|
4067
4265
|
default: "build/block_generator_result.json",
|
|
4068
|
-
coerce:
|
|
4266
|
+
coerce: path2__namespace.resolve
|
|
4069
4267
|
},
|
|
4070
4268
|
apiNamespace: {
|
|
4071
4269
|
describe: "Api name prefix for namespaced ontology types",
|
|
@@ -4077,12 +4275,12 @@ async function main(args = process.argv) {
|
|
|
4077
4275
|
describe: "Directory for build files",
|
|
4078
4276
|
type: "string",
|
|
4079
4277
|
default: "build/",
|
|
4080
|
-
coerce:
|
|
4278
|
+
coerce: path2__namespace.resolve
|
|
4081
4279
|
},
|
|
4082
4280
|
randomnessKey: {
|
|
4083
4281
|
describe: "Value used to assure uniqueness of entities",
|
|
4084
4282
|
type: "string",
|
|
4085
|
-
coerce:
|
|
4283
|
+
coerce: path2__namespace.resolve
|
|
4086
4284
|
}
|
|
4087
4285
|
}).parseAsync();
|
|
4088
4286
|
let apiNamespace = "";
|
|
@@ -4095,17 +4293,53 @@ async function main(args = process.argv) {
|
|
|
4095
4293
|
if (commandLineOpts.randomnessKey !== void 0) {
|
|
4096
4294
|
!uuidRegex.test(commandLineOpts.randomnessKey) ? process.env.NODE_ENV !== "production" ? invariant5__default.default(false, "Supplied randomness key is not a uuid and shouldn't be used as a uniqueness guarantee") : invariant5__default.default(false) : void 0;
|
|
4097
4295
|
}
|
|
4098
|
-
const
|
|
4099
|
-
|
|
4296
|
+
const {
|
|
4297
|
+
ontologyIr,
|
|
4298
|
+
shapes,
|
|
4299
|
+
backingDatasourceApiNames
|
|
4300
|
+
} = await loadOntology(commandLineOpts.input, apiNamespace, commandLineOpts.randomnessKey);
|
|
4301
|
+
const blockDataDir = path2__namespace.join(commandLineOpts.buildDir, "temp_block_data");
|
|
4100
4302
|
if (!fs__namespace.existsSync(blockDataDir)) {
|
|
4101
4303
|
await fs__namespace.promises.mkdir(blockDataDir, {
|
|
4102
4304
|
recursive: true
|
|
4103
4305
|
});
|
|
4104
4306
|
}
|
|
4105
|
-
const ontologyJsonPath =
|
|
4106
|
-
const ontologyJson = JSON.stringify(
|
|
4307
|
+
const ontologyJsonPath = path2__namespace.join(blockDataDir, "ontology.json");
|
|
4308
|
+
const ontologyJson = JSON.stringify(ontologyIr.ontology, null, 2);
|
|
4107
4309
|
await fs__namespace.promises.writeFile(ontologyJsonPath, ontologyJson);
|
|
4108
4310
|
consola.consola.info(`Wrote ontology.json to ${ontologyJsonPath}`);
|
|
4311
|
+
const ontologyInputMappingEntries = [];
|
|
4312
|
+
for (const apiName of backingDatasourceApiNames) {
|
|
4313
|
+
const objectTypeBlockData = findObjectTypeByApiName(ontologyIr.ontology.objectTypes, apiName);
|
|
4314
|
+
if (!objectTypeBlockData) continue;
|
|
4315
|
+
const nonEditOnlyProps = getNonEditOnlyProperties(objectTypeBlockData);
|
|
4316
|
+
const inputDatasetReadableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForDataset(apiName);
|
|
4317
|
+
const outputDatasetReadableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForDatasetOutput(apiName);
|
|
4318
|
+
if (shapes.inputShapes.has(inputDatasetReadableId)) {
|
|
4319
|
+
ontologyInputMappingEntries.push({
|
|
4320
|
+
input: inputDatasetReadableId,
|
|
4321
|
+
output: outputDatasetReadableId
|
|
4322
|
+
});
|
|
4323
|
+
}
|
|
4324
|
+
for (const prop of nonEditOnlyProps) {
|
|
4325
|
+
const colInputReadableId = chunkJC573VYW_cjs.ReadableIdGenerator.getForDatasetColumn(apiName, prop.apiName);
|
|
4326
|
+
const getForDatasetColumnOutput = chunkJC573VYW_cjs.ReadableIdGenerator.getForDatasetColumnOutput(apiName, prop.apiName);
|
|
4327
|
+
if (shapes.inputShapes.has(colInputReadableId)) {
|
|
4328
|
+
ontologyInputMappingEntries.push({
|
|
4329
|
+
input: colInputReadableId,
|
|
4330
|
+
output: getForDatasetColumnOutput
|
|
4331
|
+
});
|
|
4332
|
+
}
|
|
4333
|
+
}
|
|
4334
|
+
}
|
|
4335
|
+
const backingDsGeneratorResults = await Promise.all(backingDatasourceApiNames.filter((apiName) => {
|
|
4336
|
+
const objectTypeBlockData = findObjectTypeByApiName(ontologyIr.ontology.objectTypes, apiName);
|
|
4337
|
+
return objectTypeBlockData !== void 0;
|
|
4338
|
+
}).map(async (apiName) => {
|
|
4339
|
+
const objectTypeBlockData = findObjectTypeByApiName(ontologyIr.ontology.objectTypes, apiName);
|
|
4340
|
+
consola.consola.info(`Generating backing datasource BlockGeneratorResult for ${apiName}...`);
|
|
4341
|
+
return await generateBackingDatasetBlockResult(objectTypeBlockData, commandLineOpts.buildDir, commandLineOpts.randomnessKey);
|
|
4342
|
+
}));
|
|
4109
4343
|
const blockGeneratorResult = {
|
|
4110
4344
|
block_identifier: "ontology",
|
|
4111
4345
|
block_data_directory: blockDataDir,
|
|
@@ -4113,19 +4347,19 @@ async function main(args = process.argv) {
|
|
|
4113
4347
|
maven_block_data_metadata: void 0,
|
|
4114
4348
|
inputs: Object.fromEntries(shapes.inputShapes),
|
|
4115
4349
|
outputs: Object.fromEntries(shapes.outputShapes),
|
|
4116
|
-
input_mapping_entries:
|
|
4350
|
+
input_mapping_entries: ontologyInputMappingEntries,
|
|
4117
4351
|
external_recommendations: [],
|
|
4118
4352
|
add_on_override: void 0,
|
|
4119
4353
|
input_shape_metadata: Object.fromEntries(shapes.inputShapeMetadata),
|
|
4120
4354
|
block_type: "ONTOLOGY"
|
|
4121
4355
|
};
|
|
4122
|
-
const blockGeneratorResultJson = JSON.stringify(blockGeneratorResult, null, 2);
|
|
4356
|
+
const blockGeneratorResultJson = JSON.stringify([blockGeneratorResult, ...backingDsGeneratorResults], null, 2);
|
|
4123
4357
|
await fs__namespace.promises.writeFile(commandLineOpts.output, blockGeneratorResultJson);
|
|
4124
4358
|
consola.consola.success(`BlockGeneratorResult written to ${commandLineOpts.output}`);
|
|
4125
4359
|
consola.consola.info(`Block data directory: ${blockDataDir}`);
|
|
4126
4360
|
}
|
|
4127
4361
|
async function loadOntology(input, apiNamespace, randomnessKey) {
|
|
4128
|
-
const
|
|
4362
|
+
const result = await defineOntologyV2(apiNamespace, async () => {
|
|
4129
4363
|
const jiti$1 = jiti.createJiti(undefined, {
|
|
4130
4364
|
moduleCache: true,
|
|
4131
4365
|
debug: false,
|
|
@@ -4133,7 +4367,10 @@ async function loadOntology(input, apiNamespace, randomnessKey) {
|
|
|
4133
4367
|
});
|
|
4134
4368
|
const module = await jiti$1.import(input);
|
|
4135
4369
|
}, randomnessKey);
|
|
4136
|
-
return
|
|
4370
|
+
return result;
|
|
4371
|
+
}
|
|
4372
|
+
function findObjectTypeByApiName(objectTypes, apiName) {
|
|
4373
|
+
return Object.values(objectTypes).find((objectTypeBlockData) => objectTypeBlockData.objectType.apiName === apiName);
|
|
4137
4374
|
}
|
|
4138
4375
|
function defineImportObject(objectDef) {
|
|
4139
4376
|
const properties = Object.entries(objectDef.properties ?? {}).map(([apiName, type]) => ({
|