pam rotation command implementation. - #250
Conversation
| DeleteRotationScriptResult, | ||
| } from './rotationScriptTypes' | ||
|
|
||
| export type AuthProvider = () => Auth |
There was a problem hiding this comment.
please check that similar export is not being exported from other modules. else we get runtime conflicts on objects to find.
| const recordData = (record.data as PamRecordData) || { fields: [] } | ||
| const dataFields = recordData.fields || [] | ||
|
|
||
| const fs = require('fs') |
There was a problem hiding this comment.
dont use require imports, just import at top in es6 format if needed.
|
|
||
| dataFields.push(newScriptField) | ||
| recordData.fields = dataFields | ||
| ;(record as any).data = recordData |
There was a problem hiding this comment.
i do not thing type casting to any is right here since almost all records belong to TyperRecord class
| return getRecordTitle(record) || record.uid | ||
| } | ||
|
|
||
| export function getSinglePamRecord(storage: InMemoryStorage, recordName: string): DRecord { |
There was a problem hiding this comment.
this does not return type as DRecord but a subset of it , maybe as DPamRecord.
| const recordType = getRecordType(record) | ||
| const currentRevision = record.revision || 0 | ||
|
|
||
| const recordData = (record.data as PamRecordData) || { fields: [] } |
There was a problem hiding this comment.
this snd any casts like this must be fished out and addressed so that we can have better typing and data consistensy.
| finalResourceUidBytes = normal64Bytes(input.resourceUid) | ||
| } | ||
|
|
||
| let schedule = finalScheduleData ? formatScheduleType(finalScheduleData) : 'On-Demand' |
There was a problem hiding this comment.
surprise string On-Demandhere.
No description provided.