From 081134b5ddb66290c21351c6e02bb8af5049a3ae Mon Sep 17 00:00:00 2001 From: Jose de Castro Date: Mon, 20 May 2024 19:18:06 -0700 Subject: [PATCH 1/3] feat: switch to typescript and add many new features --- .gitignore | 4 +- .npmrc | 6 + .prettierrc | 18 + .swcrc | 15 + package.json | 13 +- report.js | 392 ------------------- report.ts | 564 +++++++++++++++++++++++++++ tsconfig.json | 24 ++ yarn.lock | 1016 +++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 1656 insertions(+), 396 deletions(-) create mode 100644 .npmrc create mode 100644 .prettierrc create mode 100644 .swcrc delete mode 100644 report.js create mode 100644 report.ts create mode 100644 tsconfig.json create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 812dbf7..02536ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ data .DS_Store node_modules -package-lock.json jwt -jwt.txt \ No newline at end of file +jwt.txt +out \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..9a148fc --- /dev/null +++ b/.npmrc @@ -0,0 +1,6 @@ +engine-strict=true +save-exact=true +always-auth=true +@mapped:registry=https://npm.pkg.github.com/mapped +//npm.pkg.github.com/mapped/:_authToken=${MAPPED_GPR_TOKEN} +//npm.pkg.github.com/download/:_authToken=${MAPPED_GPR_TOKEN} \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..613e164 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,18 @@ +{ + "arrowParens": "always", + "bracketSpacing": true, + "htmlWhitespaceSensitivity": "css", + "insertPragma": false, + "jsxBracketSameLine": false, + "jsxSingleQuote": false, + "printWidth": 120, + "proseWrap": "preserve", + "quoteProps": "as-needed", + "requirePragma": false, + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "es5", + "useTabs": false, + "vueIndentScriptAndStyle": false +} diff --git a/.swcrc b/.swcrc new file mode 100644 index 0000000..fbf61a4 --- /dev/null +++ b/.swcrc @@ -0,0 +1,15 @@ +{ + "$schema": "https://json.schemastore.org/swcrc", + "jsc": { + "parser": { + "syntax": "typescript", + "decorators": true + }, + "transform": { + "legacyDecorator": true, + "decoratorMetadata": true + }, + "target": "es2016" + }, + "sourceMaps": true +} diff --git a/package.json b/package.json index cf5aa2f..d13f66f 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,14 @@ "name": "point-report", "version": "1.0.0", "description": "The input to this program is the result of running this GraphQL query:", - "main": "report.js", + "main": "report.ts", "repository": { "type": "git", "url": "git+https://github.com/mapped/point-report.git" }, + "scripts": { + "start": "NODE_OPTIONS='--max-old-space-size=8120' ts-node report.ts" + }, "author": "", "license": "MIT", "bugs": { @@ -14,8 +17,14 @@ }, "homepage": "https://github.com/mapped/point-report#readme", "dependencies": { + "@mapped/rivet-proto": "^1.22.64", + "@mapped/schema-graph-react-apollo": "^1.67.4", + "@types/node": "^20.12.7", "commander": "^9.2.0", + "csv-parser": "3.0.0", "graphql": "^16.4.0", - "graphql-request": "^4.2.0" + "graphql-request": "^4.2.0", + "ts-node": "^10.9.2", + "typescript": "^5.4.5" } } diff --git a/report.js b/report.js deleted file mode 100644 index 03d0ed2..0000000 --- a/report.js +++ /dev/null @@ -1,392 +0,0 @@ -const fs = require("fs"); -const { program } = require("commander"); -const { GraphQLClient, gql } = require("graphql-request"); - -// The CSV columns in order -const COLUMNS = [ - "mappedPointId", - "ip", - "network", - "instanceId", - "objectId", - "mappedThingId", - "equipmentName", - "equipmentDescription", - "equipmentType", - "equipmentManufacturer", - "equipmentModel", - "equipmentFirmware", - "equipmentLocation", - "equipmentIsPartOf", - "equipmentMappingKey", - // "equipmentDateCreated", - // "equipmentDateUpdated", - "pointName", - "pointDescription", - "pointType", - "pointUnit", - "pointStateTexts", - "pointConfidence", - "pointConfidenceLevel", - // "pointDateCreated", - // "pointDateUpdated", - // "pointDaysToClassify", -]; - -// BACnet object types map -const objectTypeMap = { - 0: "analog_input", - 1: "analog_output", - 2: "analog_value", - 3: "binary_input", - 4: "binary_output", - 5: "binary_value", - 6: "calendar", - 7: "command", - 8: "device", - 9: "event_enrollment", - 10: "file", - 11: "group", - 12: "loop", - 13: "multi-state_input", - 14: "multi-state_output", - 15: "notification_class", - 16: "program", - 17: "schedule", - 18: "averaging", - 19: "multi-state_value", - 20: "trend_log", - 21: "life_safety_point", - 22: "life_safety_zone", - 23: "accumulator", - 24: "pulse_converter", -}; - -const POINTS_QUERY = gql` - query getPoints($buildingId: String!) { - buildings(filter: { id: { eq: $buildingId } }) { - things { - id - exactType - name - description - firmwareVersion - mappingKey - dateCreated - dateUpdated - hasLocation { - name - } - isPartOf { - id - name - } - model { - name - description - manufacturer { - name - description - } - } - points { - id - name - description - exactType - stateTexts - mappingKey - dateCreated - dateUpdated - unit { - id - } - } - } - } - } -`; - -const THING_POINTS_QUERY = gql` - query getThingPoints($thingIds: [String]!) { - things(filter: { id: { in: $thingIds } }) { - id - exactType - name - description - firmwareVersion - mappingKey - dateCreated - dateUpdated - hasLocation { - name - } - isPartOf { - id - name - } - model { - name - description - manufacturer { - name - description - } - } - points { - id - name - description - exactType - stateTexts - mappingKey - dateCreated - dateUpdated - unit { - id - } - } - } - } -`; - -(async () => { - // Parse command line arguments - program - .option("--file ") - .option("--orgId ") - .option("--buildingId ") - .option("--thingIds ") - .option("--pat ") - .option("--jwt ") - .option("--confidenceFile "); - - program.parse(); - const options = program.opts(); - - let d; - - if (fs.existsSync("./jwt.txt")) { - options.jwt = fs.readFileSync("./jwt.txt", "utf8"); - } - - if (options.file) { - // Input data can come from a file or by making a graphql query - d = getFileData(options).data; - } else if (options.pat || options.jwt) { - d = await getGraphQlData(options); - } else { - console.error("Must specify either --file or --pat or --jwt"); - process.exit(1); - } - - let pointConfidence = {}; - if (options.confidenceFile) { - const rows = fs - .readFileSync(options.confidenceFile, "utf8") - .toString() - .split(/(?:\r\n|\r|\n)/g); - for (let row of rows) { - const [ - id, - _name, - _description, - _type, - _tag_confidence, - type_confidence, - confidence_level, - ] = row.split("\t"); - pointConfidence[id] = { - type_confidence, - confidence_level, - }; - } - } - - // Resolve and open output file - fs.mkdirSync(__dirname + "/data", { recursive: true }); - const outClassifiedFile = - __dirname + `/data/report.${new Date().getTime()}.csv`; - const outUnclassifiedFile = - __dirname + `/data/report.${new Date().getTime()}.pending.csv`; - var outClassified = fs.createWriteStream(outClassifiedFile); - var outUnclassified = fs.createWriteStream(outUnclassifiedFile); - - // Write column header - outClassified.write(COLUMNS.join(",") + "\n"); - outUnclassified.write(COLUMNS.join(",") + "\n"); - - d.things.forEach((thing) => { - thing.points.forEach((point) => { - // Initialize the row with this data - const row = {}; - if (thing.mappingKey.includes("@MAPPED_UG/")) { - const mappingKey = parseThingMappingKey(thing.mappingKey); - row.network = mappingKey.network; - row.instanceId = mappingKey.instanceId; - row.ip = mappingKey.ip; - } - row.mappedThingId = thing.id; - row.equipmentName = thing.name; - row.equipmentDescription = thing.description; - row.equipmentType = thing.exactType; - row.equipmentManufacturer = thing.model?.manufacturer?.name; - row.equipmentModel = thing?.model?.name; - row.equipmentFirmware = thing.firmwareVersion; - row.equipmentDateCreated = thing.dateCreated; - row.equipmentDateUpdated = thing.dateUpdated; - row.equipmentLocation = thing.hasLocation ? thing.hasLocation.name : ""; - row.equipmentIsPartOf = - thing.isPartOf.length > 0 - ? `${thing.isPartOf[0].name} (${thing.isPartOf[0].id})` - : ""; - row.equipmentMappingKey = thing.mappingKey; - - row.mappedPointId = point.id; - row.pointName = point.name; - row.pointDescription = point.description; - row.pointType = point.exactType; - row.pointDateCreated = point.dateCreated; - row.pointDateUpdated = point.dateUpdated; - row.pointDaysToClassify = - (new Date(row.pointDateUpdated).getTime() - - new Date(row.equipmentDateUpdated).getTime()) / - 1000 / - 60 / - 60 / - 24; - row.pointStateTexts = - point.stateTexts != null ? point.stateTexts.join(",") : ""; - - if (point.unit && point.unit.id != "NO_UNIT") { - row.pointUnit = point.unit.id; - } - - row.pointConfidence = pointConfidence[point.id]?.type_confidence || ""; - row.pointConfidenceLevel = - pointConfidence[point.id]?.confidence_level || ""; - - if (point.mappingKey.includes("MAPPED_UG")) { - const parsedMappingKey = parsePointMappingKey(point.mappingKey); - - if (parsedMappingKey) { - // Split the object ID that looks something like 5:65 - const objectIdParts = parsedMappingKey.objectId.split(":"); - - // Set bacnet object type and instance - row.objectId = `${ - objectTypeMap[parseInt(objectIdParts[0])] || "other" - }/${objectIdParts[1]}`; - } - } - - if (row.pointType === "Point") { - outUnclassified.write(rowToCsv(row) + "\n"); - } else { - outClassified.write(rowToCsv(row) + "\n"); - } - }); - }); - - // Example: msrc://CONYEjT9KGC7AAUkR4GisCkYD@MAPPED_UG/GWVK4aP7uRD5NRianS5PjHnt/10.135.40.6:48808/1220417 - function parseThingMappingKey(key) { - const parts = key.split("/"); - const ipAndPort = parts[4]; // 10.135.40.6:48808 - const ip = ipAndPort.split(":")[0]; // 10.135.40.6 - const network = ipAndPort.split(":")[1]; // 48808 - const instanceId = parts[5]; - return { - network, - instanceId, - ip, - }; - } - - // Example: msrc://CONYEjT9KGC7AAUkR4GisCkYD@MAPPED_UG/GWVK4aP7uRD5NRianS5PjHnt/10.135.40.6:48808/1220417?object=3:11 - function parsePointMappingKey(key) { - try { - const parts = key.split("/"); - const objectId = parts[5].split("=")[1]; // 1220417?object=3:11 - return { - objectId, - }; - } catch (e) { - // NOOP - return null; - } - } - - function rowToCsv(row) { - return COLUMNS.map((key) => { - let value = row[key] || ""; - // Replace double quotes with double double quotes - if ( - Object.prototype.toString.call(value) === "[object String]" && - value.includes(`"`) - ) { - value = `"${value.replace(/"/g, '""')}"`; - } - return `"${row[key] || ""}"`; - }).join(","); - } - - function getFileData(options) { - const file = options.file; - console.log("Reading file:", file); - return JSON.parse(fs.readFileSync(file, "utf8")); - } - - async function getGraphQlData(options) { - let jwt = options.jwt; - let pat = options.pat; - - if (jwt) { - console.log("Using JWT"); - } else if (pat) { - console.log("Using PAT"); - } else { - console.error("JWT or PAT is required"); - process.exit(1); - } - - // Building ID is required when making graphql query - const buildingId = options.buildingId; - if (!buildingId && !options.thingIds) { - console.error("Must specify --buildingId or --thingIds"); - process.exit(1); - } - - console.log("Making graphql query"); - - const auth = resolveAuthHeader(options); - const client = new GraphQLClient("https://api.mapped.com/graphql", { - headers: { - Authorization: auth, - "X-Mapped-Org-Id": options.orgId, - }, - }); - - if (options.thingIds) { - return await client.request(THING_POINTS_QUERY, { - thingIds: options.thingIds.split(","), - }); - } else { - return (await client.request(POINTS_QUERY, { - buildingId, - })).buildings[0]; - } - } - - function resolveAuthHeader(options) { - let auth = ""; - if (options.pat) { - auth = `token ${options.pat}`; - } else if (options.jwt) { - auth = `Bearer ${options.jwt}`; - } else { - console.error("JWT or PAT is required"); - process.exit(1); - } - return auth; - } -})(); diff --git a/report.ts b/report.ts new file mode 100644 index 0000000..ad4ce89 --- /dev/null +++ b/report.ts @@ -0,0 +1,564 @@ +import { EntityTypeKey } from '@mapped/proto-node-nice/mapped/ontology/entity_type_key/entity_type_key' +import { Ontology } from '@mapped/rivet-proto/dist/ontology' +import { Thing as GraphQlThing } from '@mapped/schema-graph-react-apollo' +import { program } from 'commander' +import { GraphQLClient, gql } from 'graphql-request' +import * as csv from 'csv-parser' + +import * as fs from 'fs' + +const ROOT_POINT_ENTITY_TYPES = [ + EntityTypeKey.ALARM, + EntityTypeKey.COMMAND, + EntityTypeKey.SENSOR, + EntityTypeKey.PARAMETER, + EntityTypeKey.SETPOINT, + EntityTypeKey.STATUS, + EntityTypeKey.POINT, +] + +const ROOT_THING_ENTITY_TYPES = [ + EntityTypeKey.CAMERA, + EntityTypeKey.ELECTRICAL_EQUIPMENT, + EntityTypeKey.ELEVATOR, + EntityTypeKey.FIRE_SAFETY_EQUIPMENT, + EntityTypeKey.FURNITURE, + EntityTypeKey.GAS_DISTRIBUTION, + EntityTypeKey.HVAC_EQUIPMENT, + EntityTypeKey.LIGHTING_EQUIPMENT, + EntityTypeKey.METER, + EntityTypeKey.MOTOR, + EntityTypeKey.PV_PANEL, + EntityTypeKey.RELAY, + EntityTypeKey.SAFETY_EQUIPMENT, + EntityTypeKey.SECURITY_EQUIPMENT, + EntityTypeKey.SHADING_EQUIPMENT, + EntityTypeKey.SOLAR_THERMAL_COLLECTOR, + EntityTypeKey.STEAM_DISTRIBUTION, + EntityTypeKey.VALVE, + EntityTypeKey.WATER_DISTRIBUTION, + EntityTypeKey.WATER_HEATER, + EntityTypeKey.WEATHER_STATION, + EntityTypeKey.OCCUPANCY_SENSING_DEVICE, + EntityTypeKey.BACNET_DEVICE, + EntityTypeKey.LIGHTING_CONTROLLER, + EntityTypeKey.CONTROLLER, + EntityTypeKey.DEVICE, +] + +// The CSV columns in order +const COLUMNS: string[] = [ + 'mappedPointId', + 'ip', + 'network', + 'instanceId', + 'objectId', + 'mappedThingId', + 'equipmentName', + 'equipmentDescription', + 'equipmentType', + 'equipmentCategory', + 'equipmentManufacturer', + 'equipmentModel', + 'equipmentFirmware', + 'equipmentLocation', + // 'equipmentIsPartOf', + //'equipmentMappingKey', + // "equipmentDateCreated", + // "equipmentDateUpdated", + 'pointName', + 'pointDescription', + 'pointType', + 'pointCategory', + 'pointUnit', + 'pointOriginalUnit', + //'pointValueMap', + 'pointConfidence', + 'pointConfidenceLevel', + //'pointUnused', + // "pointDateCreated", + // "pointDateUpdated", + // "pointDaysToClassify", +] + +// BACnet object types map +const objectTypeMap: { [key: number]: string } = { + 0: 'analog_input', + 1: 'analog_output', + 2: 'analog_value', + 3: 'binary_input', + 4: 'binary_output', + 5: 'binary_value', + 6: 'calendar', + 7: 'command', + 8: 'device', + 9: 'event_enrollment', + 10: 'file', + 11: 'group', + 12: 'loop', + 13: 'multi-state_input', + 14: 'multi-state_output', + 15: 'notification_class', + 16: 'program', + 17: 'schedule', + 18: 'averaging', + 19: 'multi-state_value', + 20: 'trend_log', + 21: 'life_safety_point', + 22: 'life_safety_zone', + 23: 'accumulator', + 24: 'pulse_converter', +} + +const POINTS_QUERY = gql` + query getPoints($buildingId: String!) { + buildings(filter: { id: { eq: $buildingId } }) { + things { + id + exactType + name + description + firmwareVersion + mappingKey + dateCreated + dateUpdated + hasLocation { + name + } + isPartOf { + id + name + } + model { + name + description + manufacturer { + name + description + } + } + points { + id + name + description + exactType + valueMap + mappingKey + dateCreated + dateUpdated + unused + unit { + id + name + } + } + } + } + } +` + +const THING_POINTS_QUERY = gql` + query getThingPoints($thingIds: [String]!) { + things(filter: { id: { in: $thingIds } }) { + id + exactType + name + description + firmwareVersion + mappingKey + dateCreated + dateUpdated + hasLocation { + name + } + isPartOf { + id + name + } + model { + name + description + manufacturer { + name + description + } + } + points { + id + name + description + exactType + valueMap + mappingKey + dateCreated + dateUpdated + unused + unit { + id + name + } + } + } + } +` + +type Report = { + things: { + total: number + byCategory: { [key: string]: number } + } + points: { + total: number + used: number + unused: number + // Map of root entity types to count + usedByCategory: { [key: string]: number } + } +} +;(async () => { + // Parse command line arguments + program + .option('--file ') + .option('--orgId ') + .option('--buildingId ') + .option('--thingIds ') + .option('--pat ') + .option('--jwt ') + .option('--confidenceFile ') + .option('--unitCorrectionsFile ') + + program.parse() + const options = program.opts() + + const pointConfidence = await getConfidenceData(options) + console.log(`Found ${Object.keys(pointConfidence).length} confidence entries`) + + const unitCorrections = await getUnitCorrections(options) + console.log(`Found ${Object.keys(unitCorrections).length} unit corrections`) + + let d: any + + if (fs.existsSync('./jwt.txt')) { + options.jwt = fs.readFileSync('./jwt.txt', 'utf8') + } + + if (options.file) { + // Input data can come from a file or by making a graphql query + d = getFileData(options).data + } else if (options.pat || options.jwt) { + d = await getGraphQlData(options) + } else { + console.error('Must specify either --file or --pat or --jwt') + process.exit(1) + } + + // Resolve and open output file + fs.mkdirSync(__dirname + '/data', { recursive: true }) + const outClassifiedFile = __dirname + `/data/report.${new Date().getTime()}.csv` + const outUnclassifiedFile = __dirname + `/data/report.${new Date().getTime()}.pending.csv` + var outClassified = fs.createWriteStream(outClassifiedFile) + var outUnclassified = fs.createWriteStream(outUnclassifiedFile) + + // Write column header + outClassified.write(COLUMNS.join(',') + '\n') + outUnclassified.write(COLUMNS.join(',') + '\n') + + const report: Report = { + things: { + total: 0, + byCategory: {}, + }, + points: { + total: 0, + used: 0, + unused: 0, + usedByCategory: {}, + }, + } + + console.log(`Found ${d.things.length} things`) + + d.things.forEach((thing: GraphQlThing) => { + report.things.total++ + + let equipmentCategory: string | undefined = undefined + + try { + const thingEntityType = thing.exactType!.toUpperCase() as EntityTypeKey + const parents = [thingEntityType].concat(Ontology.resolveEntity(thingEntityType).getParentEntityTypeKeys()) + + for (const rootThingEntityType of ROOT_THING_ENTITY_TYPES) { + if (parents.includes(rootThingEntityType)) { + equipmentCategory = EntityTypeKey[rootThingEntityType] + report.things.byCategory[equipmentCategory] = (report.things.byCategory[equipmentCategory] || 0) + 1 + break + } + } + } catch (e) { + console.error(`Error resolving entity type for ${thing.exactType}`) + } + + if (!equipmentCategory) { + console.error(`Could not resolve thing type ${thing.exactType}`) + } + + const points = thing.points + if (!points) { + return + } + points + .map((point) => { + // Remap to remove the Maybe + return point! + }) + .forEach((point) => { + report.points.total++ + + // Initialize the row with this data + const row: { [key: string]: string | null | undefined } = {} + if (thing.mappingKey!.includes('@MAPPED_UG/')) { + const mappingKey = parseThingMappingKey(thing.mappingKey!) + row.network = mappingKey.network + row.instanceId = mappingKey.instanceId + row.ip = mappingKey.ip + } + row.mappedThingId = thing.id + row.equipmentName = thing.name + row.equipmentDescription = thing.description + row.equipmentType = thing.exactType + row.equipmentCategory = equipmentCategory + row.equipmentManufacturer = thing.model?.manufacturer?.name + row.equipmentModel = thing?.model?.name + row.equipmentFirmware = thing.firmwareVersion + row.equipmentDateCreated = thing.dateCreated + row.equipmentDateUpdated = thing.dateUpdated + row.equipmentLocation = thing.hasLocation ? thing.hasLocation.name : '' + row.equipmentIsPartOf = + thing.isPartOf!.length > 0 ? `${thing?.isPartOf![0]!.name} (${thing?.isPartOf![0]!.id})` : '' + row.equipmentMappingKey = thing.mappingKey + + row.mappedPointId = point.id + row.pointName = point.name + row.pointDescription = point.description + row.pointType = point.exactType + row.pointUnused = pointConfidence[point.id]?.unused ? 'true' : 'false' + + const unused = row.pointUnused === 'true' + + if (unused) { + report.points.unused++ + } else { + report.points.used++ + try { + const pointEntityType = point.exactType!.toUpperCase() as EntityTypeKey + const parents = [pointEntityType].concat(Ontology.resolveEntity(pointEntityType).getParentEntityTypeKeys()) + + for (const rootPointEntityType of ROOT_POINT_ENTITY_TYPES) { + if (parents.includes(rootPointEntityType)) { + row.pointCategory = EntityTypeKey[rootPointEntityType] + report.points.usedByCategory[row.pointCategory] = + (report.points.usedByCategory[row.pointCategory] || 0) + 1 + break + } + } + } catch (e) { + console.error(`Error resolving entity type for ${point.exactType}`) + } + if (!row.pointCategory) { + console.error(`Could not resolve point type ${point.exactType}`) + } + } + + row.pointDateCreated = point.dateCreated + row.pointDateUpdated = point.dateUpdated + row.pointDaysToClassify = ( + (new Date(row.pointDateUpdated!).getTime() - new Date(row.equipmentDateUpdated!).getTime()) / + 1000 / + 60 / + 60 / + 24 + ).toString() + row.pointValueMap = point.valueMap != null ? encodeURIComponent(JSON.stringify(point.valueMap)) : '' + + if (point.unit && point.unit.id != 'NO_UNIT') { + row.pointUnit = point.unit.id + } + + if (unitCorrections[point.id]) { + row.pointOriginalUnit = unitCorrections[point.id].previousUnit + } + + row.pointConfidence = pointConfidence[point.id]?.type_confidence || '' + row.pointConfidenceLevel = pointConfidence[point.id]?.confidence_level || '' + + if (point.mappingKey!.includes('MAPPED_UG')) { + const parsedMappingKey = parsePointMappingKey(point.mappingKey!) + + if (parsedMappingKey) { + // Split the object ID that looks something like 5:65 + const objectIdParts = parsedMappingKey.objectId.split(':') + + // Set bacnet object type and instance + row.objectId = `${objectTypeMap[parseInt(objectIdParts[0])] || 'other'}/${objectIdParts[1]}` + } + } + + if (unused || row.pointType === 'Point') { + outUnclassified.write(rowToCsv(row) + '\n') + } else { + outClassified.write(rowToCsv(row) + '\n') + } + }) + }) + + console.log(JSON.stringify(report, null, 2)) + + // Example: msrc://CONYEjT9KGC7AAUkR4GisCkYD@MAPPED_UG/GWVK4aP7uRD5NRianS5PjHnt/10.135.40.6:48808/1220417 + function parseThingMappingKey(key: string) { + const parts = key.split('/') + const ipAndPort = parts[4] // 10.135.40.6:48808 + const ip = ipAndPort.split(':')[0] // 10.135.40.6 + const network = ipAndPort.split(':')[1] // 48808 + const instanceId = parts[5] + return { + network, + instanceId, + ip, + } + } + + // Example: msrc://CONYEjT9KGC7AAUkR4GisCkYD@MAPPED_UG/GWVK4aP7uRD5NRianS5PjHnt/10.135.40.6:48808/1220417?object=3:11 + function parsePointMappingKey(key: string) { + try { + const parts = key.split('/') + const objectId = parts[5].split('=')[1] // 1220417?object=3:11 + return { + objectId, + } + } catch (e) { + // NOOP + return null + } + } + + function rowToCsv(row: { [key: string]: string | null | undefined }) { + return COLUMNS.map((key) => { + let value = row[key] || '' + // Replace double quotes with double double quotes + if (Object.prototype.toString.call(value) === '[object String]' && value.includes(`"`)) { + value = `"${value.replace(/"/g, '""')}"` + } + return `"${row[key] || ''}"` + }).join(',') + } + + function getFileData(options: any) { + const file = options.file + console.log('Reading file:', file) + return JSON.parse(fs.readFileSync(file, 'utf8')) + } + + async function getGraphQlData(options: any) { + let jwt = options.jwt + let pat = options.pat + + if (jwt) { + console.log('Using JWT') + } else if (pat) { + console.log('Using PAT') + } else { + console.error('JWT or PAT is required') + process.exit(1) + } + + // Building ID is required when making graphql query + const buildingId = options.buildingId + if (!buildingId && !options.thingIds) { + console.error('Must specify --buildingId or --thingIds') + process.exit(1) + } + + console.log('Making graphql query') + + const auth = resolveAuthHeader(options) + const client = new GraphQLClient('https://api.mapped.com/graphql', { + headers: { + Authorization: auth, + 'X-Mapped-Org-Id': options.orgId, + }, + }) + + if (options.thingIds) { + return await client.request(THING_POINTS_QUERY, { + thingIds: options.thingIds.split(','), + }) + } else { + return ( + await client.request(POINTS_QUERY, { + buildingId, + }) + ).buildings[0] + } + } + + function resolveAuthHeader(options: any) { + let auth = '' + if (options.pat) { + auth = `token ${options.pat}` + } else if (options.jwt) { + auth = `Bearer ${options.jwt}` + } else { + console.error('JWT or PAT is required') + process.exit(1) + } + return auth + } +})() + +type PointConfidenceMap = { + [key: string]: { type_confidence: string; confidence_level: string; unused: boolean } +} + +function getConfidenceData(options: any): Promise { + return new Promise((resolve, reject) => { + let pointConfidence: PointConfidenceMap = {} + + if (options.confidenceFile) { + fs.createReadStream(options.confidenceFile) + .pipe(csv.default()) + .on('data', (data) => { + pointConfidence[data.id] = { + type_confidence: data.type_confidence, + confidence_level: data.confidence_level, + unused: data.unused === 'True', + } + }) + .on('end', () => { + resolve(pointConfidence) + }) + } else { + resolve(pointConfidence) + } + }) +} + +function getUnitCorrections(options: any): Promise<{ [key: string]: { previousUnit: string } }> { + return new Promise((resolve, reject) => { + let unitCorrections: { [key: string]: { previousUnit: string } } = {} + + if (options.unitCorrectionsFile) { + fs.createReadStream(options.unitCorrectionsFile) + .pipe(csv.default()) + .on('data', (data) => { + unitCorrections[data.id] = { + previousUnit: data.prev_unit, + } + }) + .on('end', () => { + resolve(unitCorrections) + }) + } else { + resolve(unitCorrections) + } + }) +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..c6a2680 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "ts-node": { + "ignore": ["(?:^|/)node_modules/"] + }, + "exclude": ["node_modules"], + "compilerOptions": { + "strict": true, + "module": "commonjs", + "target": "es2018", + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "moduleResolution": "node", + "downlevelIteration": true, + "typeRoots": ["node_modules/@types"], + "forceConsistentCasingInFileNames": true, + "types": ["node"], + + "skipLibCheck": true, + "sourceMap": true, + "outDir": "out" + } +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..c7fa791 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,1016 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@cspotcode/source-map-support@^0.8.0": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== + dependencies: + "@jridgewell/trace-mapping" "0.3.9" + +"@grpc/grpc-js@^1.9.2": + version "1.10.6" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.10.6.tgz#1e3eb1af911dc888fbef7452f56a7573b8284d54" + integrity sha512-xP58G7wDQ4TCmN/cMUHh00DS7SRDv/+lC+xFLrTkMIN8h55X5NhZMLYbvy7dSELP15qlI6hPhNCRWVMtZMwqLA== + dependencies: + "@grpc/proto-loader" "^0.7.10" + "@js-sdsl/ordered-map" "^4.4.2" + +"@grpc/grpc-js@~1.9.14": + version "1.9.14" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.9.14.tgz#236378822876cbf7903f9d61a0330410e8dcc5a1" + integrity sha512-nOpuzZ2G3IuMFN+UPPpKrC6NsLmWsTqSsm66IRfnBt1D4pwTqE27lmbpcPM+l2Ua4gE7PfjRHI6uedAy7hoXUw== + dependencies: + "@grpc/proto-loader" "^0.7.8" + "@types/node" ">=12.12.47" + +"@grpc/proto-loader@^0.7.10", "@grpc/proto-loader@^0.7.8": + version "0.7.12" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.12.tgz#787b58e3e3771df30b1567c057b6ab89e3a42911" + integrity sha512-DCVwMxqYzpUCiDMl7hQ384FqP4T3DbNpXU8pt681l3UWCip1WUiD5JrkImUwCB9a7f2cq4CUTmi5r/xIMRPY1Q== + dependencies: + lodash.camelcase "^4.3.0" + long "^5.0.0" + protobufjs "^7.2.4" + yargs "^17.7.2" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@js-sdsl/ordered-map@^4.4.2": + version "4.4.2" + resolved "https://registry.yarnpkg.com/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz#9299f82874bab9e4c7f9c48d865becbfe8d6907c" + integrity sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw== + +"@mapped/proto-node-nice@^1.43.8": + version "1.43.41" + resolved "https://npm.pkg.github.com/download/@mapped/proto-node-nice/1.43.41/5bde526d9e8fccc5edeaf4f204b5fb36d553b1f8#5bde526d9e8fccc5edeaf4f204b5fb36d553b1f8" + integrity sha512-XSUPTN9xj9WehNrx//A0SuU9goCSl/zeo5ue5GJwcvlHuSQLF2Ra+PrPu3XBsIcYZX4DtxtdcMh3KQQexfP3HA== + dependencies: + "@grpc/grpc-js" "^1.9.2" + long "4.0.0" + nice-grpc "^2.1.4" + nice-grpc-common "^2.0.2" + protobufjs "^7.2.4" + ts-proto "^1.146.0" + ts-proto-descriptors "^1.9.0" + +"@mapped/rivet-proto@^1.22.64": + version "1.22.91" + resolved "https://npm.pkg.github.com/download/@mapped/rivet-proto/1.22.91/5d2ff46ea512f191b64405debdcbba53b303d3d3#5d2ff46ea512f191b64405debdcbba53b303d3d3" + integrity sha512-iCDiMe+aQyVvebm/9YNTTcqkD80e/n00wYCkjo4Bi6Vv63+aZzTtUkr1UEio39nJ3kDmVLADtmqTDPdMfZCxeQ== + dependencies: + "@mapped/proto-node-nice" "^1.43.8" + "@types/json-stable-stringify" "1.0.34" + crypto-browserify "3.12.0" + http-browserify "1.7.0" + https-browserify "1.0.0" + json-stable-stringify "1.0.1" + micro-base58 "^0.5.0" + os-browserify "0.3.0" + path-browserify "1.0.1" + stream-browserify "3.0.0" + zlib-browserify "0.0.3" + +"@mapped/schema-graph-react-apollo@^1.67.4": + version "1.67.4" + resolved "https://npm.pkg.github.com/download/@mapped/schema-graph-react-apollo/1.67.4/44a0e9e7b0a1cc682f33306a301d21695ec5ab76#44a0e9e7b0a1cc682f33306a301d21695ec5ab76" + integrity sha512-3VVNjEWJBgLqMJT74Nvjps0nXrwLi9FClyWBCDKshjGQGIsJbfdBXJz8XV5lXm3+b2/QslgoynzbKGU5fT6rfw== + +"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf" + integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ== + +"@protobufjs/base64@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735" + integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg== + +"@protobufjs/codegen@^2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb" + integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg== + +"@protobufjs/eventemitter@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70" + integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q== + +"@protobufjs/fetch@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45" + integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ== + dependencies: + "@protobufjs/aspromise" "^1.1.1" + "@protobufjs/inquire" "^1.1.0" + +"@protobufjs/float@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1" + integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ== + +"@protobufjs/inquire@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089" + integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q== + +"@protobufjs/path@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d" + integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA== + +"@protobufjs/pool@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54" + integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw== + +"@protobufjs/utf8@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" + integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== + +"@tsconfig/node10@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2" + integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw== + +"@tsconfig/node12@^1.0.7": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d" + integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag== + +"@tsconfig/node14@^1.0.0": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1" + integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow== + +"@tsconfig/node16@^1.0.2": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9" + integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA== + +"@types/json-stable-stringify@1.0.34": + version "1.0.34" + resolved "https://registry.yarnpkg.com/@types/json-stable-stringify/-/json-stable-stringify-1.0.34.tgz#c0fb25e4d957e0ee2e497c1f553d7f8bb668fd75" + integrity sha512-s2cfwagOQAS8o06TcwKfr9Wx11dNGbH2E9vJz1cqV+a/LOyhWNLUNd6JSRYNzvB4d29UuJX2M0Dj9vE1T8fRXw== + +"@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@^20.12.7": + version "20.12.7" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.7.tgz#04080362fa3dd6c5822061aa3124f5c152cff384" + integrity sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg== + dependencies: + undici-types "~5.26.4" + +Base64@~0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028" + integrity sha512-reGEWshDmTDQDsCec/HduOO9Wyj6yMOupMfhIf3ugN1TDlK2NQW4DDJSqNNtp380SNcvRfXtO8HSCQot0d0SMw== + +abort-controller-x@^0.4.0: + version "0.4.3" + resolved "https://registry.yarnpkg.com/abort-controller-x/-/abort-controller-x-0.4.3.tgz#ff269788386fabd58a7b6eeaafcb6cf55c2958e0" + integrity sha512-VtUwTNU8fpMwvWGn4xE93ywbogTYsuT+AUxAXOeelbXuQVIwNmC5YLeho9sH4vZ4ITW8414TTAOG1nW6uIVHCA== + +acorn-walk@^8.1.1: + version "8.3.2" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== + +acorn@^8.4.1: + version "8.11.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" + integrity sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg== + +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" + integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== + +ansi-styles@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +asn1.js@^4.10.1: + version "4.10.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" + integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.9: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + +brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== + +browserify-aes@^1.0.4, browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + dependencies: + bn.js "^5.0.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.3.tgz#7afe4c01ec7ee59a89a558a4b75bd85ae62d4208" + integrity sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw== + dependencies: + bn.js "^5.2.1" + browserify-rsa "^4.1.0" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.5" + hash-base "~3.0" + inherits "^2.0.4" + parse-asn1 "^5.1.7" + readable-stream "^2.3.8" + safe-buffer "^5.2.1" + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== + +case-anything@^2.1.13: + version "2.1.13" + resolved "https://registry.yarnpkg.com/case-anything/-/case-anything-2.1.13.tgz#0cdc16278cb29a7fcdeb072400da3f342ba329e9" + integrity sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng== + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.1" + wrap-ansi "^7.0.0" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +commander@^9.2.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== + +core-util-is@~1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85" + integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== + +create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +create-require@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" + integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== + +cross-fetch@^3.1.5: + version "3.1.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" + integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg== + dependencies: + node-fetch "^2.6.12" + +crypto-browserify@3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +csv-parser@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/csv-parser/-/csv-parser-3.0.0.tgz#b88a6256d79e090a97a1b56451f9327b01d710e7" + integrity sha512-s6OYSXAK3IdKqYO33y09jhypG/bSDHPuyCme/IdEHfWpLf/jKcpitVFyOC6UemgGk8v7Q5u2XE0vvwmanxhGlQ== + dependencies: + minimist "^1.2.0" + +deep-equal@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-0.0.0.tgz#99679d3bbd047156fcd450d3d01eeb9068691e83" + integrity sha512-p1bI/kkDPT6auUI0U+WLuIIrzmDIDo80I406J8tT4y6I4ZGtBuMeTudrKDtBdMJFAcxqrQdx27gosqPVyY3IvQ== + +defined@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-0.0.0.tgz#f35eea7d705e933baf13b2f03b3f83d921403b3e" + integrity sha512-zpqiCT8bODLu3QSmLLic8xJnYWBFjOSu/fBCm189oAiTtPq/PSanNACKZDS7kgSyCJY7P+IcODzlIogBK/9RBg== + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +des.js@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.1.0.tgz#1d37f5766f3bbff4ee9638e871a8768c173b81da" + integrity sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +detect-libc@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dprint-node@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/dprint-node/-/dprint-node-1.0.8.tgz#a02470722d8208a7d7eb3704328afda1d6758625" + integrity sha512-iVKnUtYfGrYcW1ZAlfR/F59cUVL8QIhWoBJoSjkkdua/dkWIgjZfiLMeTjiB06X0ZLkQ0M2C1VbUj/CxkIf1zg== + dependencies: + detect-libc "^1.0.3" + +elliptic@^6.5.3, elliptic@^6.5.5: + version "6.5.5" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.5.tgz#c715e09f78b6923977610d4c2346d6ce22e6dded" + integrity sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +escalade@^3.1.1: + version "3.1.2" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +extract-files@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/extract-files/-/extract-files-9.0.0.tgz#8a7744f2437f81f5ed3250ed9f1550de902fe54a" + integrity sha512-CvdFfHkC95B4bBBk36hcEmvdR2awOdhhVUYH6S/zrVj3477zven/fJMYg7121h4T1xHZC+tetUpubpAhxwI7hQ== + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +graphql-request@^4.2.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-4.3.0.tgz#b934e08fcae764aa2cdc697d3c821f046cb5dbf2" + integrity sha512-2v6hQViJvSsifK606AliqiNiijb1uwWp6Re7o0RTyH+uRTv/u7Uqm2g4Fjq/LgZIzARB38RZEvVBFOQOVdlBow== + dependencies: + cross-fetch "^3.1.5" + extract-files "^9.0.0" + form-data "^3.0.0" + +graphql@^16.4.0: + version "16.8.1" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.1.tgz#1930a965bef1170603702acdb68aedd3f3cf6f07" + integrity sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw== + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash-base@~3.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" + integrity sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +hash.js@^1.0.0, hash.js@^1.0.3: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +http-browserify@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/http-browserify/-/http-browserify-1.7.0.tgz#33795ade72df88acfbfd36773cefeda764735b20" + integrity sha512-Irf/LJXmE3cBzU1eaR4+NEX6bmVLqt1wkmDiA7kBwH7zmb0D8kBAXsDmQ88hhj/qv9iEZKlyGx/hrMcFi8sOHw== + dependencies: + Base64 "~0.2.0" + inherits "~2.0.1" + +https-browserify@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" + integrity sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg== + +inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== + +json-stable-stringify@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + integrity sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg== + dependencies: + jsonify "~0.0.0" + +jsonify@~0.0.0: + version "0.0.1" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" + integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== + +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + +long@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== + +long@^5.0.0, long@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +micro-base58@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/micro-base58/-/micro-base58-0.5.1.tgz#008892e621fd0d38caab3288a9dd0e65cb4b6200" + integrity sha512-iwqAmg66VjB2LA3BcUxyrOyqck4HLLtSzKnx2VQSnN5piQji598N15P8RRx2d6lPvJ98B1b0cl2VbvQeFeWdig== + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== + +minimist@^1.2.0: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + +nice-grpc-common@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/nice-grpc-common/-/nice-grpc-common-2.0.2.tgz#e6aeebb2bd19d87114b351e291e30d79dd38acf7" + integrity sha512-7RNWbls5kAL1QVUOXvBsv1uO0wPQK3lHv+cY1gwkTzirnG1Nop4cBJZubpgziNbaVc/bl9QJcyvsf/NQxa3rjQ== + dependencies: + ts-error "^1.0.6" + +nice-grpc@^2.1.4: + version "2.1.8" + resolved "https://registry.yarnpkg.com/nice-grpc/-/nice-grpc-2.1.8.tgz#2d26eae2470573d692c5fdded1b5be7a30d48aac" + integrity sha512-pTugD3cZ1Vb0Q2OjZZh80wpLY6L7jSADnzY7Dq6mL9EGUJJF5mfQjcHF4gqpQtyTq2YsZgPIArfNcq0k3ApgQg== + dependencies: + "@grpc/grpc-js" "~1.9.14" + abort-controller-x "^0.4.0" + nice-grpc-common "^2.0.2" + +node-fetch@^2.6.12: + version "2.7.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +os-browserify@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" + integrity sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A== + +parse-asn1@^5.0.0, parse-asn1@^5.1.7: + version "5.1.7" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.7.tgz#73cdaaa822125f9647165625eb45f8a051d2df06" + integrity sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg== + dependencies: + asn1.js "^4.10.1" + browserify-aes "^1.2.0" + evp_bytestokey "^1.0.3" + hash-base "~3.0" + pbkdf2 "^3.1.2" + safe-buffer "^5.2.1" + +path-browserify@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" + integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== + +pbkdf2@^3.0.3, pbkdf2@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +protobufjs@^7.2.4: + version "7.2.6" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.6.tgz#4a0ccd79eb292717aacf07530a07e0ed20278215" + integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +readable-stream@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" + integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readable-stream@^3.5.0, readable-stream@^3.6.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@^5.2.1, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +stream-browserify@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f" + integrity sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA== + dependencies: + inherits "~2.0.4" + readable-stream "^3.5.0" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +tape@~0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/tape/-/tape-0.2.2.tgz#64ccfa4b7ecf4a0060007e61716d424781671637" + integrity sha512-bfyf/0yv2FZVsf80b7oo50Lyi35sfjE7VM6206du7LtpbdQP8rbLhZy/stuS/Dcq4w6jE1Pz2zFrHtfeOKbaUA== + dependencies: + deep-equal "~0.0.0" + defined "~0.0.0" + jsonify "~0.0.0" + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +ts-error@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/ts-error/-/ts-error-1.0.6.tgz#277496f2a28de6c184cfce8dfd5cdd03a4e6b0fc" + integrity sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA== + +ts-node@^10.9.2: + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== + dependencies: + "@cspotcode/source-map-support" "^0.8.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" + arg "^4.1.0" + create-require "^1.1.0" + diff "^4.0.1" + make-error "^1.1.1" + v8-compile-cache-lib "^3.0.1" + yn "3.1.1" + +ts-poet@^6.7.0: + version "6.9.0" + resolved "https://registry.yarnpkg.com/ts-poet/-/ts-poet-6.9.0.tgz#e63ac8d8a9e91a2e0e5d2bf0755db71346728bd2" + integrity sha512-roe6W6MeZmCjRmppyfOURklO5tQFQ6Sg7swURKkwYJvV7dbGCrK28um5+51iW3twdPRKtwarqFAVMU6G1mvnuQ== + dependencies: + dprint-node "^1.0.8" + +ts-proto-descriptors@1.15.0, ts-proto-descriptors@^1.9.0: + version "1.15.0" + resolved "https://registry.yarnpkg.com/ts-proto-descriptors/-/ts-proto-descriptors-1.15.0.tgz#e859e3a2887da2d954c552524719b80bdb6ee355" + integrity sha512-TYyJ7+H+7Jsqawdv+mfsEpZPTIj9siDHS6EMCzG/z3b/PZiphsX+mWtqFfFVe5/N0Th6V3elK9lQqjnrgTOfrg== + dependencies: + long "^5.2.3" + protobufjs "^7.2.4" + +ts-proto@^1.146.0: + version "1.172.0" + resolved "https://registry.yarnpkg.com/ts-proto/-/ts-proto-1.172.0.tgz#86bc94e452334f951a4ed5a6ded6a0354255dabf" + integrity sha512-+4myxp5H+qD4r3sQUwvewN3zpdKpApeuUI0+lxfdznvkd2TUFVaeOD0q6dHszEYKTzR7DHu96Z1pqpNSOXF8iQ== + dependencies: + case-anything "^2.1.13" + protobufjs "^7.2.4" + ts-poet "^6.7.0" + ts-proto-descriptors "1.15.0" + +typescript@^5.4.5: + version "5.4.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611" + integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + +v8-compile-cache-lib@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== + +yargs@^17.7.2: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +zlib-browserify@0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/zlib-browserify/-/zlib-browserify-0.0.3.tgz#240ccdbfd0203fa842b130deefb1414122c8cc50" + integrity sha512-KW42YGoQKq7+oU46deeWMUsrPyBruEWV1DoObBTMfEC2LnTqQIrwKVKrPoz2mn5DXESW4Ca/lIP2MqGHrt/WFA== + dependencies: + tape "~0.2.2" From e0d42f2655355db260c9a2086ef3e044583b7640 Mon Sep 17 00:00:00 2001 From: Jose de Castro Date: Mon, 20 May 2024 21:45:46 -0700 Subject: [PATCH 2/3] chore: make splitting unused and generic points into separate file optional --- report.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/report.ts b/report.ts index ad4ce89..c703219 100644 --- a/report.ts +++ b/report.ts @@ -75,7 +75,7 @@ const COLUMNS: string[] = [ //'pointValueMap', 'pointConfidence', 'pointConfidenceLevel', - //'pointUnused', + 'pointUnused', // "pointDateCreated", // "pointDateUpdated", // "pointDaysToClassify", @@ -226,6 +226,7 @@ type Report = { .option('--jwt ') .option('--confidenceFile ') .option('--unitCorrectionsFile ') + .option('--splitUnused') program.parse() const options = program.opts() @@ -252,6 +253,8 @@ type Report = { process.exit(1) } + const splitUnused: boolean = options.splitUnused + // Resolve and open output file fs.mkdirSync(__dirname + '/data', { recursive: true }) const outClassifiedFile = __dirname + `/data/report.${new Date().getTime()}.csv` @@ -261,7 +264,10 @@ type Report = { // Write column header outClassified.write(COLUMNS.join(',') + '\n') - outUnclassified.write(COLUMNS.join(',') + '\n') + + if (splitUnused) { + outUnclassified.write(COLUMNS.join(',') + '\n') + } const report: Report = { things: { @@ -403,7 +409,7 @@ type Report = { } } - if (unused || row.pointType === 'Point') { + if (splitUnused && (unused || row.pointType === 'Point')) { outUnclassified.write(rowToCsv(row) + '\n') } else { outClassified.write(rowToCsv(row) + '\n') From 70ba9ef4129af07b9bf94eb6bddc6a0d099ca00a Mon Sep 17 00:00:00 2001 From: Jose de Castro Date: Tue, 28 May 2024 15:25:20 -0700 Subject: [PATCH 3/3] chore: bump rivet-proto --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index d13f66f..613b0fd 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "homepage": "https://github.com/mapped/point-report#readme", "dependencies": { - "@mapped/rivet-proto": "^1.22.64", + "@mapped/rivet-proto": "^1.22.113", "@mapped/schema-graph-react-apollo": "^1.67.4", "@types/node": "^20.12.7", "commander": "^9.2.0", diff --git a/yarn.lock b/yarn.lock index c7fa791..19284cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -58,10 +58,10 @@ resolved "https://registry.yarnpkg.com/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz#9299f82874bab9e4c7f9c48d865becbfe8d6907c" integrity sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw== -"@mapped/proto-node-nice@^1.43.8": - version "1.43.41" - resolved "https://npm.pkg.github.com/download/@mapped/proto-node-nice/1.43.41/5bde526d9e8fccc5edeaf4f204b5fb36d553b1f8#5bde526d9e8fccc5edeaf4f204b5fb36d553b1f8" - integrity sha512-XSUPTN9xj9WehNrx//A0SuU9goCSl/zeo5ue5GJwcvlHuSQLF2Ra+PrPu3XBsIcYZX4DtxtdcMh3KQQexfP3HA== +"@mapped/proto-node-nice@^1.45.6": + version "1.45.7" + resolved "https://npm.pkg.github.com/download/@mapped/proto-node-nice/1.45.7/b1e077c6d49b130a2a20afac9b093cb2372320be#b1e077c6d49b130a2a20afac9b093cb2372320be" + integrity sha512-uGqi5e/+Hx85jLMBY/kMIFrUK5l4Xml5AYnFES9AP6DYYmDHatPxqnLYf767vpG/tOPfqaoLIgR1JJ1G1tVeVg== dependencies: "@grpc/grpc-js" "^1.9.2" long "4.0.0" @@ -71,12 +71,12 @@ ts-proto "^1.146.0" ts-proto-descriptors "^1.9.0" -"@mapped/rivet-proto@^1.22.64": - version "1.22.91" - resolved "https://npm.pkg.github.com/download/@mapped/rivet-proto/1.22.91/5d2ff46ea512f191b64405debdcbba53b303d3d3#5d2ff46ea512f191b64405debdcbba53b303d3d3" - integrity sha512-iCDiMe+aQyVvebm/9YNTTcqkD80e/n00wYCkjo4Bi6Vv63+aZzTtUkr1UEio39nJ3kDmVLADtmqTDPdMfZCxeQ== +"@mapped/rivet-proto@^1.22.113": + version "1.22.113" + resolved "https://npm.pkg.github.com/download/@mapped/rivet-proto/1.22.113/0c33eaf4b280955fb1f60549467352b3cf586366#0c33eaf4b280955fb1f60549467352b3cf586366" + integrity sha512-UCBG56fMT9PYeXyz46EJS9A1rbATmLz6irccLarTVK6YAFpINqY6OwUSbollG1ABIqANszL9cOXEDgvPIYOAdQ== dependencies: - "@mapped/proto-node-nice" "^1.43.8" + "@mapped/proto-node-nice" "^1.45.6" "@types/json-stable-stringify" "1.0.34" crypto-browserify "3.12.0" http-browserify "1.7.0"