Skip to content

pam rotation command implementation. - #250

Open
ukumar-ks wants to merge 5 commits into
pam-rotation-v1from
pam-rotation-int
Open

pam rotation command implementation.#250
ukumar-ks wants to merge 5 commits into
pam-rotation-v1from
pam-rotation-int

Conversation

@ukumar-ks

Copy link
Copy Markdown
Contributor

No description provided.

DeleteRotationScriptResult,
} from './rotationScriptTypes'

export type AuthProvider = () => Auth

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont use require imports, just import at top in es6 format if needed.


dataFields.push(newScriptField)
recordData.fields = dataFields
;(record as any).data = recordData

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: [] }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surprise string On-Demandhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants