type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
async logOut (request:Request, response:Response) {
const { sessionid } = request.headers
await db('UserSessions')
.delete()
.where({ id: sessionid })
response.send('OK')
} | gsbenevides2/agenda | backend/src/controllers/auth.ts | TypeScript |
MethodDeclaration |
async validadeAutenticatedRequest (request:Request, response:Response, next:NextFunction) {
const {
userid,
sessionid
} = request.headers
if (!userid || !sessionid) {
return response.status(401)
.json({
type: 'unsigned_session',
message: 'Session not provided. ... | gsbenevides2/agenda | backend/src/controllers/auth.ts | TypeScript |
MethodDeclaration |
async retriveUserData (request:Request, response:Response) {
const { userid } = request.headers
const [user] = await db('Users')
.select(['name', 'email', 'picture'])
.where({ id: userid })
return response.json(user)
} | gsbenevides2/agenda | backend/src/controllers/auth.ts | TypeScript |
MethodDeclaration |
async deleteUser(request:Request, response:Response){
const {userid} = request.headers
await db('Users')
.delete()
.where({id:userid})
response.send('OK')
} | gsbenevides2/agenda | backend/src/controllers/auth.ts | TypeScript |
ClassDeclaration | // tslint:disable: no-any no-unsafe-any
@injectable()
export abstract class WebController {
public abstract readonly apiVersion: string;
public abstract readonly apiName: string;
public context: Context;
constructor(@inject(Logger) protected readonly logger: Logger) {}
public async invoke(requestC... | devaradhanm/accessibility-insights-service | packages/service-library/src/web-api/web-controller.ts | TypeScript |
MethodDeclaration |
public async invoke(requestContext: Context, ...args: any[]): Promise<unknown> {
this.context = requestContext;
try {
await this.logger.setup(this.getBaseTelemetryProperties());
this.logger.logInfo('[WebController] request started');
let result: unknown;
... | devaradhanm/accessibility-insights-service | packages/service-library/src/web-api/web-controller.ts | TypeScript |
MethodDeclaration |
protected abstract validateRequest(...args: any[]): boolean; | devaradhanm/accessibility-insights-service | packages/service-library/src/web-api/web-controller.ts | TypeScript |
MethodDeclaration |
protected abstract async handleRequest(...args: any[]): Promise<unknown>; | devaradhanm/accessibility-insights-service | packages/service-library/src/web-api/web-controller.ts | TypeScript |
MethodDeclaration |
protected getBaseTelemetryProperties(): { [name: string]: string } {
return {
apiName: this.apiName,
apiVersion: this.apiVersion,
controller: this.constructor.name,
invocationId: this.context.invocationId,
};
} | devaradhanm/accessibility-insights-service | packages/service-library/src/web-api/web-controller.ts | TypeScript |
MethodDeclaration |
private setResponseContentTypeHeader(): void {
if (this.context !== undefined && this.context.res !== undefined) {
const jsonContentType = 'application/json; charset=utf-8';
if (this.context.res.headers === undefined) {
this.context.res.headers = {
'c... | devaradhanm/accessibility-insights-service | packages/service-library/src/web-api/web-controller.ts | TypeScript |
ArrowFunction |
(xOffset) =>
WRAP_Z_OFFSETS.map((zOffset) => new Vector3(xOffset * this.width, 0, zOffset * this.depth)) | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
ArrowFunction |
(zOffset) => new Vector3(xOffset * this.width, 0, zOffset * this.depth) | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
ClassDeclaration |
export class MazeMap extends BinaryEntity {
private readonly relevantPolygons: ReadonlyArray<ConvexPolygonEntity>[][];
readonly width: number;
readonly depth: number;
readonly wrappingOffsets: Vector3[];
constructor(
readonly rowCount: number,
readonly columnCount: number,
... | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
getCell(row: number, column: number): boolean {
return this.map[this.wrapRow(row)][this.wrapColumn(column)];
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
getRelevantPolygons(row: number, column: number): ReadonlyArray<ConvexPolygonEntity> {
return this.relevantPolygons[this.wrapRow(row)][this.wrapColumn(column)];
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
getRow(z: number): number {
return Math.floor((this.wrapZ(z) / this.depth + 0.5) * this.rowCount);
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
getColumn(x: number): number {
return Math.floor((this.wrapX(x) / this.width + 0.5) * this.columnCount);
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
wrapRow(row: number): number {
return row - Math.floor(row / this.rowCount) * this.rowCount;
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
wrapColumn(column: number): number {
return column - Math.floor(column / this.columnCount) * this.columnCount;
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
wrapPosition(position: { x: number; z: number }): void {
position.x = this.wrapX(position.x);
position.z = this.wrapZ(position.z);
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
wrapX(x: number): number {
return x - Math.floor(x / this.width + 0.5) * this.width;
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
wrapZ(z: number): number {
return z - Math.floor(z / this.depth + 0.5) * this.depth;
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
wrapTowards(source: { x: number; z: number }, target: { x: number; z: number }): void {
source.x -= Math.floor((source.x - target.x) / this.width + 0.5) * this.width;
source.z -= Math.floor((source.z - target.z) / this.depth + 0.5) * this.depth;
} | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
wrapTransformTowards(source: Ammo.btTransform, target: { x: number; z: number }): void {
const origin = source.getOrigin();
origin.setX(Math.floor((origin.x() - target.x) / this.width + 0.5) * this.width);
origin.setZ(Math.floor((origin.z() - target.z) / this.depth + 0.5) * this.depth);
... | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
appendToBinaryOutput(writer: SignedBinaryWriter): void {
writer.writeInt(this.rowCount);
writer.writeInt(this.columnCount);
writer.writeDouble(this.cellSize);
for (let i = 0; i < this.rowCount; i++) {
for (let j = 0; j < this.columnCount; j++) {
writer.writeB... | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
MethodDeclaration |
static decodeFromBinary(reader: SignedBinaryReader): MazeMap {
const rowCount = reader.readInt();
const columnCount = reader.readInt();
const cellSize = reader.readDouble();
const map: boolean[][] = Array.from({ length: rowCount }, () => []);
for (let i = 0; i < rowCount; i++) {... | mewore/rabbit | frontend/src/game/entities/world/maze-map.ts | TypeScript |
ArrowFunction |
(artworkModule, index) => {
rowData.push({
type: "artwork",
data: artworkModule,
})
const alternateRow = (index + 1) % 2 === 0
if (alternateRow) {
const artistModule = artistModules.shift()
if (artistModule) {
rowData.push({
type: "artist"... | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
ArrowFunction |
async () => {
this.setState({ isRefreshing: true })
try {
await Promise.all(this.railModules.map(railModule => railModule && railModule.refreshData()))
setTimeout(() => {
this.setState({
isRefreshing: false,
})
}, 1000) // For consistent pull-to-refresh UI experien... | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
ArrowFunction |
railModule => railModule && railModule.refreshData() | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
ArrowFunction |
() => {
this.setState({
isRefreshing: false,
})
} | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
ClassDeclaration |
export class ForYou extends React.Component<Props, State> {
currentScrollOffset?: number = 0
railModules: RailModule[] = []
state = {
isRefreshing: false,
rowData: [],
}
componentDidMount() {
const { forYou } = this.props
const rowData = []
const artworkModules = forYou.artwork_modules ... | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
InterfaceDeclaration |
interface Props extends ViewProperties {
forYou: ForYou_forYou
} | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
InterfaceDeclaration |
interface State {
rowData: Array<{
type: "artwork" | "artist" | "fairs"
data: any
}>
error?: string // TODO: Wire up to UI handler
isRefreshing: boolean
} | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
TypeAliasDeclaration |
type RailModule = ArtistRailType | FairsRailType | ArtworkCarouselType | null | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
MethodDeclaration |
componentDidMount() {
const { forYou } = this.props
const rowData = []
const artworkModules = forYou.artwork_modules || []
const artistModules = forYou.artist_modules && forYou.artist_modules.concat()
const fairsModule = forYou.fairs_module
rowData.push({
type: "fairs",
data: fairs... | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
MethodDeclaration | /**
* Can be used to register a mounting module or de-register an unmounting module by setting the index to `null`.
*/
registerRailModule(index: number, railModule: RailModule) {
this.railModules[index] = railModule
} | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
MethodDeclaration |
render() {
return (
<FlatList
data={this.state.rowData}
renderScrollComponent={props => {
return (
<ScrollView
{...props}
removeClippedSubviews={true}
automaticallyAdjustContentInsets={false}
refreshControl={
... | koenpunt/emission | src/lib/Scenes/Home/Components/ForYou/index.tsx | TypeScript |
ClassDeclaration |
export class KeyboardManager {
public currentKeyboard: any;
public currentKeyboardType!: string;
public static userOptions: UserOptions = {};
public static configure(userOptions) {
KeyboardManager.userOptions = userOptions;
console.log('合并用户传入的参数,然后规范化这些参数'); // 还需要规范化这些参数
}
public ... | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
InterfaceDeclaration |
interface UserOptions {
[propName: string]: any;
} | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
MethodDeclaration |
public static configure(userOptions) {
KeyboardManager.userOptions = userOptions;
console.log('合并用户传入的参数,然后规范化这些参数'); // 还需要规范化这些参数
} | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
MethodDeclaration |
public async showScreenKeyboardAsync(currentInputElement: any, keyboardConfig: any, screenRegion: any, keyboardOptions: any): Promise<void> {
this.currentKeyboardType = keyboardConfig.type;
let keyboardAllOptions = this._getOption(keyboardConfig, keyboardOptions);
console.log('keyboardAllOptions', key... | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
MethodDeclaration |
public closeScreenKeyboardAsync(): void {
console.log('关闭键盘');
if (this.currentKeyboard != null) {
this.currentKeyboard.close();
}
} | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
MethodDeclaration | //此函数需要优化,更换一种实现思路,类似于状态管理
private async _createKeyboard(currentInputElement: any, keyboardOption: any, screenRegion: any): Promise<void> {
//设置键盘的位置??为什么会写成静态的??
// KeyPosManager.getKeyInfo(keyboardOption.style.keyOptions);
//模拟发送键盘事件时,需要获得当前的input元素,此处并不需要
// EmulateKeyboardEvent.setCurrentEleme... | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
MethodDeclaration |
private _isMultiLayoutKeyboard(keyboardOption: any): boolean {
let layoutList = keyboardOption.layout.supplyKeyboardType.layoutList;
return Array.isArray(layoutList) && layoutList.length > 1 ? true : false;
} | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
MethodDeclaration | //合并配置项应该全部提取出来,函数职责要单一
private _getOption(keyboardConfig, keyboardOptions): any {
const keyboardMergedOption = Options.getOptions(KeyboardManager.userOptions);
if (!KeyboardType[<string>keyboardConfig.type] && (keyboardMergedOption.layout.supplyKeyboardType && Object.keys(keyboardMergedOption.layout.supply... | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
MethodDeclaration | //这个函数应该提取出来放到options文件中,此函数还需要更改
private _mergeAllOptions(keyboardMergedOption: object, keyboardConfig: any, currentLayout: any): object {
let mergeAllOptions = JSON.parse(JSON.stringify(keyboardMergedOption));
keyboardConfig.startupLayoutName && (currentLayout.startupLayoutName = keyboardConfig.startupLay... | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
MethodDeclaration | //对于选项的提取,应该放在合并的函数中
private _getCurrentLayout(keyboardMergedOption: any, keyboardConfigType: string): any {
let layoutInfo = keyboardMergedOption.layout.supplyKeyboardType[keyboardConfigType] ? keyboardMergedOption.layout.supplyKeyboardType[keyboardConfigType] : DefaultLayout.getDefaultLayout()[keyboardConfigType... | DoctorChenGuang/keyboard | keyboard/keyboard-manager/keyboard-manager.ts | TypeScript |
FunctionDeclaration |
function isValidName(name: string): boolean {
return typeof name === 'string' && /^[.\w\-\:\_\$]+$/.test(name)
} | twitterdev/twitter-streaming-framework | src/database/ObjectStore.ts | TypeScript |
FunctionDeclaration |
export function isValidBucketName(bucketName: string): boolean {
return isValidName(bucketName)
} | twitterdev/twitter-streaming-framework | src/database/ObjectStore.ts | TypeScript |
FunctionDeclaration |
export function isValidObjectName(objectName: string): boolean {
return isValidName(objectName)
} | twitterdev/twitter-streaming-framework | src/database/ObjectStore.ts | TypeScript |
InterfaceDeclaration | // Copyright 2021 Twitter, Inc.
// SPDX-License-Identifier: Apache-2.0
export interface ObjectListing {
bucketName: string
objectName: string
size: number
timeCreated: number
timeModified: number
} | twitterdev/twitter-streaming-framework | src/database/ObjectStore.ts | TypeScript |
InterfaceDeclaration |
export interface ObjectStore {
doesObjectExist(bucketName: string, objectName: string): Promise<boolean>
getObjectInfo(bucketName: string, objectName: string): Promise<ObjectListing | undefined>
getObject(bucketName: string, objectName: string): Promise<Buffer | undefined>
listObjects(bucketName: string, optio... | twitterdev/twitter-streaming-framework | src/database/ObjectStore.ts | TypeScript |
FunctionDeclaration |
function NoTabsOpenedMessage() {
return (
<NoTabsOpenedMessageContainer>
<span>Tip: Open the Global Prompt with 'Ctrl+P'</span>
</NoTabsOpenedMessageContainer>
);
} | jeff-hykin/Graviton-App | web/src/components/TabsView.tsx | TypeScript |
FunctionDeclaration | /*
* Container that displays all the opened tabs
*/
function TabsView() {
const [tabsPanels, setTabsPanels] = useRecoilState(openedTabsState);
function closeTab(row: number, column: number, index: number) {
tabsPanels[row][column].splice(index, 1);
setTabsPanels([...tabsPanels]);
}
return (
<Tab... | jeff-hykin/Graviton-App | web/src/components/TabsView.tsx | TypeScript |
FunctionDeclaration |
function closeTab(row: number, column: number, index: number) {
tabsPanels[row][column].splice(index, 1);
setTabsPanels([...tabsPanels]);
} | jeff-hykin/Graviton-App | web/src/components/TabsView.tsx | TypeScript |
ArrowFunction |
({ theme }) => theme.elements.tab.text.unfocused.color | jeff-hykin/Graviton-App | web/src/components/TabsView.tsx | TypeScript |
ArrowFunction |
({ theme }) => theme.elements.tab.container.background | jeff-hykin/Graviton-App | web/src/components/TabsView.tsx | TypeScript |
ArrowFunction |
(columns, r) => {
return (
<SplitPane
split="vertical"
minSize={20}
className="colunmn"
key={`${r}_row`} | jeff-hykin/Graviton-App | web/src/components/TabsView.tsx | TypeScript |
ArrowFunction |
(tabs, c) => {
return (
<TabsPanel
key={`${r}${c}_tabs_panel`} | jeff-hykin/Graviton-App | web/src/components/TabsView.tsx | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-detalhes',
templateUrl: './detalhes.component.html',
styleUrls: ['./detalhes.component.css']
})
export class DetalhesComponent {
id: number;
constructor(aRoute: ActivatedRoute) {
this.id = aRoute.snapshot.params['id'];
}
} | natanaelfonseca/angular2-dashboard | src/app/dashboard/detalhes/detalhes.component.ts | TypeScript |
FunctionDeclaration |
export async function k8sGetContainerBuildStatus(params: GetBuildStatusParams<ContainerModule>): Promise<BuildStatus> {
const { ctx, module } = params
const provider = <KubernetesProvider>ctx.provider
const hasDockerfile = containerHelpers.hasDockerfile(module, module.version)
if (!hasDockerfile) {
// No... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
FunctionDeclaration |
export async function k8sBuildContainer(params: BuildModuleParams<ContainerModule>): Promise<BuildResult> {
const { ctx } = params
const provider = <KubernetesProvider>ctx.provider
const handler = buildHandlers[provider.config.buildMode]
return handler(params)
} | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
FunctionDeclaration |
export async function getDockerDaemonPodRunner({
api,
systemNamespace,
ctx,
provider,
}: {
api: KubeApi
systemNamespace: string
ctx: PluginContext
provider: KubernetesProvider
}) {
const pod = await getDeploymentPod({ api, deploymentName: dockerDaemonDeploymentName, namespace: systemNamespace })
r... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
FunctionDeclaration |
export async function getUtilDaemonPodRunner({
api,
systemNamespace,
ctx,
provider,
}: {
api: KubeApi
systemNamespace: string
ctx: PluginContext
provider: KubernetesProvider
}) {
const pod = await getDeploymentPod({
api,
deploymentName: gardenUtilDaemonDeploymentName,
namespace: systemNam... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
FunctionDeclaration |
export function kanikoBuildFailed(buildRes: RunResult) {
return (
!buildRes.success &&
!(
buildRes.log.includes("error pushing image: ") &&
buildRes.log.includes("cannot be overwritten because the repository is immutable.")
)
)
} | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
FunctionDeclaration |
async function runKaniko({
ctx,
provider,
namespace,
log,
module,
args,
outputStream,
}: RunKanikoParams): Promise<RunResult> {
const api = await KubeApi.factory(log, ctx, provider)
const podName = makePodName("kaniko", namespace, module.name)
const registryHostname = getRegistryHostname(provider.... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
FunctionDeclaration |
async function getManifestInspectArgs(module: ContainerModule, deploymentRegistry: ContainerRegistryConfig) {
const remoteId = containerHelpers.getDeploymentImageId(module, module.version, deploymentRegistry)
const dockerArgs = ["manifest", "inspect", remoteId]
if (isLocalHostname(deploymentRegistry.hostname)) ... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
FunctionDeclaration |
function isLocalHostname(hostname: string) {
return hostname === "localhost" || hostname.startsWith("127.")
} | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
FunctionDeclaration |
function getSocatContainer(registryHostname: string) {
return {
name: "proxy",
image: "gardendev/socat:0.1.0",
command: ["/bin/sh", "-c", `socat TCP-LISTEN:5000,fork TCP:${registryHostname}:5000 || exit 0`],
ports: [
{
name: "proxy",
containerPort: registryPort,
protocol... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
async (params) => {
const { ctx, module, log } = params
const k8sCtx = ctx as KubernetesPluginContext
const deploymentRegistry = k8sCtx.provider.config.deploymentRegistry
if (deploymentRegistry) {
const args = await getManifestInspectArgs(module, deploymentRegistry)
const res = await conta... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
async (params) => {
const { ctx, module, log } = params
const k8sCtx = ctx as KubernetesPluginContext
const provider = k8sCtx.provider
const deploymentRegistry = provider.config.deploymentRegistry
const api = await KubeApi.factory(log, ctx, provider)
if (!deploymentRegistry) {
// This is... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
async (params) => {
const { ctx, module, log } = params
const k8sCtx = ctx as KubernetesPluginContext
const provider = k8sCtx.provider
const deploymentRegistry = provider.config.deploymentRegistry
if (!deploymentRegistry) {
// This is validated in the provider configure handler, so this is a... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
async (params) => {
const { ctx, module, log } = params
const provider = ctx.provider as KubernetesProvider
const containerProvider = provider.dependencies.container as ContainerProvider
const buildResult = await buildContainerModule({ ...params, ctx: { ...ctx, provider: containerProvider } })
if (!provider... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
async (params) => {
const { ctx, module, log } = params
const provider = <KubernetesProvider>ctx.provider
const systemNamespace = await getSystemNamespace(ctx, provider, log)
const api = await KubeApi.factory(log, ctx, provider)
if (!containerHelpers.hasDockerfile(module, module.version)) {
return {}
... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
() => exec("rsync", syncArgs) | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
(line: Buffer) => {
statusLine.setState(renderOutputStream(line.toString()))
} | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
(flags?: string[], topLevelFlags?: string[]): string[] => {
if (!flags && !topLevelFlags) {
return DEFAULT_KANIKO_FLAGS
}
const flagToKey = (flag: string) => {
const found = flag.match(/--([a-zA-Z]*)/)
if (found === null) {
throw new ConfigurationError(`Invalid format for a kaniko flag`, { flag... | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
(flag: string) => {
const found = flag.match(/--([a-zA-Z]*)/)
if (found === null) {
throw new ConfigurationError(`Invalid format for a kaniko flag`, { flag })
}
return found[0]
} | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
ArrowFunction |
(arg) => JSON.stringify(arg) | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
InterfaceDeclaration |
interface RunKanikoParams {
ctx: PluginContext
provider: KubernetesProvider
namespace: string
log: LogEntry
module: ContainerModule
args: string[]
outputStream: Writable
} | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
TypeAliasDeclaration |
type BuildStatusHandler = (params: GetBuildStatusParams<ContainerModule>) => Promise<BuildStatus> | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
TypeAliasDeclaration |
type BuildHandler = (params: BuildModuleParams<ContainerModule>) => Promise<BuildResult> | ivanbabenko/garden | core/src/plugins/kubernetes/container/build.ts | TypeScript |
InterfaceDeclaration | // ====================================================
// GraphQL mutation operation: createPatient
// ====================================================
export interface createPatient_createPatient_userErrors {
__typename: "UserError";
message: string;
field: string;
} | KittyMcMitty/spiritumDuoDocker | frontend/src/pages/__generated__/createPatient.ts | TypeScript |
InterfaceDeclaration |
export interface createPatient_createPatient_patient {
__typename: "Patient";
id: string;
} | KittyMcMitty/spiritumDuoDocker | frontend/src/pages/__generated__/createPatient.ts | TypeScript |
InterfaceDeclaration |
export interface createPatient_createPatient {
__typename: "AddPatientPayload";
userErrors: createPatient_createPatient_userErrors[] | null;
patient: createPatient_createPatient_patient | null;
} | KittyMcMitty/spiritumDuoDocker | frontend/src/pages/__generated__/createPatient.ts | TypeScript |
InterfaceDeclaration |
export interface createPatient {
createPatient: createPatient_createPatient;
} | KittyMcMitty/spiritumDuoDocker | frontend/src/pages/__generated__/createPatient.ts | TypeScript |
InterfaceDeclaration |
export interface createPatientVariables {
patient: PatientInput;
} | KittyMcMitty/spiritumDuoDocker | frontend/src/pages/__generated__/createPatient.ts | TypeScript |
ArrowFunction |
key => {
form.append(key, body[key]);
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
release(data: PipelineModel, isCreate = false) {
if (isCreate) {
return axios.post<ItoaResponse<any>>(`${url}/${data.pipelineName}`, data);
}
return axios.put<ItoaResponse<any>>(`${url}/${data.pipelineName}`, data);
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
save(data: PipelineModel, isCreate = false) {
if (isCreate) {
return axios.post<ItoaResponse<any>>(`${url}/${data.pipelineName}/stage`, data);
}
return axios.put<ItoaResponse<any>>(`${url}/${data.pipelineName}/stage`, data);
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
getAll(params: PipelineSearchParams) {
return axios.get<ItoaResponse<PipelineModel[]>>(url, { params });
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
getItem(name: string) {
return axios.get<ItoaResponse<PipelineModel>>(`${url}/${name}`);
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
updateStatus(name: string, status: 'start' | 'stop', body = {}) {
return axios.put<ItoaResponse<any>>(`${url}/${name}/${status}`, null, { params: body });
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
delete(name: string) {
return axios.delete<ItoaResponse<any>>(`${url}/${name}`);
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
getLog(name: string) {
return axios.get<ItoaResponse<PipelineLogModel[]>>(`${url}/${name}/log`);
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
getConsole(params) {
return axios.get<ItoaResponse<PipelineConsoleModel[]>>(`${url}/${params.pipelineName}/console`, { params });
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
export(body) {
downloadFile(`${url}-export`, body, 'post');
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
MethodDeclaration |
import(body) {
const form = new FormData();
Object.keys(body).forEach(key => {
form.append(key, body[key]);
});
return axios.post<ItoaResponse<PipelineImport[]>>(`${url}-import`, form);
} | EOITek/jax | jax-ui/src/apis/pipeline.ts | TypeScript |
FunctionDeclaration |
function uuidv4() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
// tslint:disable-next-line
let r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
} | chemistry/crystallography-online | packages/containers/maintenance/src/app.ts | TypeScript |
ArrowFunction |
(c) => {
// tslint:disable-next-line
let r = Math.random() * 16 | 0, v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
} | chemistry/crystallography-online | packages/containers/maintenance/src/app.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.