repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
17621368758/vue3-admin
src/views/home/Menus.ts
export const Menus = [ { id: 1, firstTitle: '商户', child: [{ icon: 'el-icon-office-building', secondTitle: '商户管理', child: [{ thirdTitle: '商户列表', url: '/merchantList' }] }] }, { id: 2, ...
17621368758/vue3-admin
src/router/merchant.ts
const merchantList = () => import(/* webpackChunkName: "merchant" */ '@/views/merchant/merchantList/index.vue') export default [ { path: "/merchantList", name: 'merchantList', component: merchantList // 商户列表 }, { path: "/merchantList/merchantDetail", name: 'merchant...
17621368758/vue3-admin
src/utils/page.ts
<gh_stars>1-10 import {reactive} from "vue"; export function usePage() { const pageData = reactive({ pageNum: 1, pageSize: 10, total: 0 }) const handlePageChange = (num: number) => { pageData.pageNum = num } const handleTotalChange = (total: number) => { pag...
17621368758/vue3-admin
src/router/report.ts
<filename>src/router/report.ts const reportList = () => import(/* webpackChunkName: "report" */ '@/views/report/reportList/index.vue') export default [ { path: "/reportList", name: 'reportList', component: reportList // 报告列表 }, ]
17621368758/vue3-admin
src/router/customer.ts
const customerList = () => import(/* webpackChunkName: "customer" */ '@/views/customer/customerList/index.vue') export default [ { path: "/customerList", name: 'customerList', component: customerList // 客户列表 }, ]
17621368758/vue3-admin
src/utils/upload.ts
import {goLogin} from "@/utils/Request"; export const HEADERS: any = {} const BASE_URL = import.meta.env.VITE_APP_BASE_URL as any // 上传文件url export const UPLOAD_URL = BASE_URL + '/sales-admin/base/upload' HEADERS['APP-CLIENT-SECURT'] = 'Y2xpZW50OjEyMzQ1Ng==' HEADERS['APP-CLIENT-ORGIN'] = 'CA' HEADERS['deviceId'] =...
17621368758/vue3-admin
src/views/order/orderList/components/addAddress/index.ts
<filename>src/views/order/orderList/components/addAddress/index.ts import {defineComponent, onMounted, ref} from "vue"; import { EluiChinaAreaDht } from 'elui-china-area-dht' import {ElMessage} from "element-plus"; import api from "@/views/order/api"; import {OrderInfoType} from "@/views/order/orderList/interface"; imp...
17621368758/vue3-admin
src/router/system.ts
const systemList = () => import(/* webpackChunkName: "system" */ '@/views/system/systemList/index.vue') export default [ { path: "/systemList", name: 'systemList', component: systemList // 系统列表 }, ]
17621368758/vue3-admin
src/router/index.ts
<filename>src/router/index.ts import { createRouter, createWebHistory } from 'vue-router' import routes from './entry' import NProgress from 'nprogress'; import 'nprogress/nprogress.css'; import {Menus} from "@/views/home/Menus"; const router = createRouter({ history: createWebHistory(), routes, }) // 路由加载前 router...
17621368758/vue3-admin
src/api/index.ts
<gh_stars>1-10 import Request from '@/utils/Request' import qs from "qs" export default { //我收到的 login(data: any) { return Request.getJson('/auto', data).then(res => { return res }) }, //我收到的 getSignUrl(data: any) { return Request.postFormData('/base/getSignUrl',...
17621368758/vue3-admin
src/router/finance.ts
<reponame>17621368758/vue3-admin<filename>src/router/finance.ts const financeList = () => import(/* webpackChunkName: "finance" */ '@/views/finance/financeList/index.vue') export default [ { path: "/financeList", name: 'financeList', component: financeList // 财务列表 }, ]
17621368758/vue3-admin
src/store/interface/index.ts
<reponame>17621368758/vue3-admin<filename>src/store/interface/index.ts // 接口类型声明 // 布局配置 export interface ThemeConfigState { globalTitle: string; currentMenu: CurrentMenu; } export interface CurrentMenu { firstTitle?: string; secondTitle?: string; thirdTitle?: string; thirdPath?: string; } // 用户信息 export interf...
17621368758/vue3-admin
src/views/order/orderList/components/addAddress/form.ts
import {reactive} from "vue"; import {AddressForm} from "@/views/order/orderList/components/addAddress/interface"; export function useForm() { const formData = reactive({ form: {} as AddressForm }) const handleFormChange = (data: any) => { Object.assign(formData.form, data) } retu...
17621368758/vue3-admin
src/views/order/orderList/components/addAddress/interface.ts
export interface AddressForm { addressName: string, // 联系人 addressMobile: string, // 联系手机 addressProvince: string, // 省 addressCity: string, // 市 addressCountry: string, // 区 addressDetailed: string, // 详细地址 customerName?: string, // 公司名称 || 客户名称 isDefault: number, // 是否默认 0否1是 custo...
17621368758/vue3-admin
src/views/order/orderList/interface.ts
<reponame>17621368758/vue3-admin export type CustomerTypeValue = 0 | 1 export interface CustomerType { label: string value: CustomerTypeValue } /** *搜索参数 */ export interface SearchParams { orderNo?: string, customerName?: string,// 客户名称 phone?: string,// 联系手机 customerType?: number,// 客户类型 ...
17621368758/vue3-admin
src/router/entry.ts
const Login = () => import(/* webpackChunkName: "entry" */ '@/views/home/login.vue') const Home = () => import(/* webpackChunkName: "entry" */ '@/views/home/index.vue') import merchant from './merchant' import order from './order' import report from './report' import customer from './customer' import marketing from './...
17621368758/vue3-admin
src/store/modules/themeConfig.ts
import {Module} from 'vuex'; import {ThemeConfigState, RootStateTypes} from '../interface/index'; const themeConfigModule: Module<ThemeConfigState, RootStateTypes> = { namespaced: true, state: { // 网站主标题(菜单导航、浏览器当前网页标题) globalTitle: '百检运营管理系统', currentMenu: {}, }, mutations: { ...
17621368758/vue3-admin
src/router/order.ts
<reponame>17621368758/vue3-admin const orderList = () => import(/* webpackChunkName: "order" */ '@/views/order/orderList/index.vue') export default [ { path: "/orderList", name: 'orderList', component: orderList // 订单列表 }, ]
17621368758/vue3-admin
src/utils/common.ts
<gh_stars>1-10 const fmt = (v:any) => v < 10 ? `0${v}` : v export const getNow = () => { const now = new Date() return ` ${now.getFullYear()}年${fmt(now.getMonth() + 1)}月${fmt(now.getDate())}日 ${fmt(now.getHours())}:${fmt(now.getMinutes())}:${fmt(now.getSeconds())} ` }
17621368758/vue3-admin
src/views/order/api.ts
import Request from '@/utils/Request' import {AddressInfo} from "@/views/order/orderList/interface"; import {ElMessage} from "element-plus"; export default { //订单列表 getOrderByPage(params: any) { return Request.postJson('/admin/order/getOrderByPage',params) }, // 根据报价单号查询报价单 getQuotationById...
17621368758/vue3-admin
src/store/index.ts
import { InjectionKey } from 'vue'; import { createStore, useStore as baseUseStore, Store } from 'vuex'; import { RootStateTypes } from './interface/index'; import themeConfig from './modules/themeConfig'; export const key: InjectionKey<Store<RootStateTypes>> = Symbol(); export const store = createStore<RootStateType...
17621368758/vue3-admin
src/router/marketing.ts
<reponame>17621368758/vue3-admin<filename>src/router/marketing.ts<gh_stars>1-10 const marketingList = () => import(/* webpackChunkName: "marketing" */ '@/views/marketing/marketingList/index.vue') export default [ { path: "/marketingList", name: 'marketingList', component: marketingList // ...
17621368758/vue3-admin
src/utils/Request.ts
/* eslint-disable */ import axios from "axios"; import {ElMessage, ElLoading} from "element-plus"; import qs from "qs" import {HEADERS} from "@/utils/upload"; const BASE_URL = import.meta.env.VITE_APP_BASE_URL as any // 登录跳转 export function goLogin () { // @ts-ignore window.location.href = import.meta.env.VIT...
17621368758/vue3-admin
src/main.ts
<reponame>17621368758/vue3-admin<filename>src/main.ts import { createApp } from 'vue' import App from './App.vue' import router from './router' import { store, key } from './store'; import ElementPlus from 'element-plus' import 'element-plus/lib/theme-chalk/index.css' import './assets/scss/app.scss' import 'dayjs/local...
17621368758/vue3-admin
src/router/reportForm.ts
const reportFormList = () => import(/* webpackChunkName: "reportForm" */ '@/views/reportForm/reportFormList/index.vue') export default [ { path: "/reportFormList", name: 'reportFormList', component: reportFormList // 报表列表 }, ]
17621368758/vue3-admin
src/views/order/orderList/services.ts
import {CustomerType, CustomerTypeValue} from "@/views/order/orderList/interface"; import {ValueLabel} from "@/views/service"; import http from "@/api"; // 客户类型 export const customerTypes: CustomerType[] = [ {label: '个人', value: 0}, {label: '企业', value: 1}, ] // 报价状态 export const quotationStatus: CustomerType...
Yuze0101/xiang-ha-management
src/apis/cookMenu.ts
<reponame>Yuze0101/xiang-ha-management import request from '../utils/request'; type pageType = { pageSize?: string; currentPage?: string; }; type searchType = { pageSize?: string; currentPage?: string; val?: string; }; type idType = { _id: string; }; enum NorY { Y = 'Y', N = 'N', } ...
Yuze0101/xiang-ha-management
.umirc.ts
import { defineConfig } from 'umi'; export default defineConfig({ nodeModulesTransform: { type: 'none', }, routes: [ { path: '/login', component: '@/pages/Login' }, { path: '/', component: '@/pages/index', routes: [ { path: '/', co...
Yuze0101/xiang-ha-management
src/components/Broadcast/Broadcast.tsx
<filename>src/components/Broadcast/Broadcast.tsx<gh_stars>1-10 import React, { ReactElement } from 'react'; import { Form, Input, InputNumber, Button, message } from 'antd'; import { getAllSwiper } from '@/apis/broadcast'; interface Props { addSwiper: any; handleCancel: any; getAllSwiper: any; } const layo...
Yuze0101/xiang-ha-management
src/pages/Login/index.tsx
<gh_stars>1-10 import React, { ReactElement } from 'react'; import { Layout, Form, Input, Button, Card, message } from 'antd'; import { history } from 'umi'; import styles from './index.less'; import { login } from '@/apis/admin'; // 封装的表格模态框 import FormModal from '@/components/FormModal/FormModal'; const { Header, F...
Yuze0101/xiang-ha-management
src/pages/Vip/index.tsx
<filename>src/pages/Vip/index.tsx import React, { ReactElement, useState, useEffect, useRef } from 'react'; import { Card, Table, Button, message, Space, Popconfirm, Image } from 'antd'; import { CheckCircleOutlined, CloseCircleOutlined } from '@ant-design/icons'; import { delMember, cancleMember, getAllMe...
Yuze0101/xiang-ha-management
src/pages/Admin/index.tsx
import React, { ReactElement, useState, useEffect, useRef } from 'react'; import { Card, Table, Button, message, Space, Popconfirm } from 'antd'; import FormModal from '@/components/FormModal/FormModal'; import { getAllAdmins, addAdmins, delAdmins } from '@/apis/admin'; interface Props {} type Admin = { _id: strin...
Yuze0101/xiang-ha-management
src/pages/Broadcast/index.tsx
<gh_stars>1-10 import React, { ReactElement, useState, useEffect } from 'react'; import { Modal, Card, Table, message, Image, Button, Space, Popconfirm, } from 'antd'; import { getAllSwiper, addSwiper, deleteSwiper, updateSwiper, } from '@/apis/broadcast'; import Broadcas...
Yuze0101/xiang-ha-management
src/apis/admin.ts
<gh_stars>1-10 import request from '../utils/request'; type loginType = { account: string; password: string; }; /** * @param {loginType} data * @returns {string} token * @description 登录接口 */ export const login = (data: loginType) => { return request.post('/admin/login', { data }); }; export const getA...
Yuze0101/xiang-ha-management
src/pages/CookMenu/index.tsx
import React, { ReactElement, useState, useEffect, useRef } from 'react'; import { Card, Table, Button, message, Space, Switch, Image, Pagination, Input, } from 'antd'; import FormModal from '@/components/FormModal/FormModal'; import { getAllMenu, searchMenu, menuDetail, ...
Yuze0101/xiang-ha-management
src/apis/vip.ts
import request from '../utils/request'; export const getAllMembers = () => { return request.get('/member/getAllMembers'); }; export const delMember = (data: { _id: string }) => { return request.post('/member/delMember', { data }); }; export const updateMemberToVip = (data: { _id: string; date: string }) => { ...
Yuze0101/xiang-ha-management
src/pages/index.tsx
import React, { ReactElement } from 'react'; import { Layout, Menu } from 'antd'; import { Link, history } from 'umi'; import styles from './index.less'; // import BreadCrumb from '@/components/BreadCrumb/BreadCrumb'; const { SubMenu, Item } = Menu; const { Header, Footer, Sider, Content } = Layout; interface Props {} ...
Yuze0101/xiang-ha-management
src/apis/broadcast.ts
import request from '../utils/request'; /** * @description 获取所有轮播图 */ export const getAllSwiper = () => { return request.get('/admin/getAllSwiper'); }; type SwiperType = { goods_id: string; image_src: string; navigator_url: string; open_type: string; }; /** * @param {SwiperType} data * @param {s...
Yuze0101/xiang-ha-management
src/components/Loading/Loading.tsx
import React, { ReactElement } from 'react'; import { Spin } from 'antd'; interface Props {} export default function Loading({}: Props): ReactElement { return <Spin size="default" tip="加载中..."></Spin>; }
Yuze0101/xiang-ha-management
src/pages/Home/index.tsx
import React, { ReactElement, useEffect, useRef } from 'react'; import { Card, Statistic, Descriptions } from 'antd'; import { LikeOutlined } from '@ant-design/icons'; import styles from './index.less'; import * as echarts from 'echarts'; const lineChartOption = { xAxis: { type: 'category', data: [...
Yuze0101/xiang-ha-management
src/components/FormModal/FormModal.tsx
import React, { ReactElement, useState, useRef, forwardRef, useImperativeHandle, } from 'react'; import { Modal, Form, Input, Spin, message } from 'antd'; type ruleType = {}[]; type formItemType = { label: string; name: string; rules: ruleType; }; interface Props { title: string; ...
Yuze0101/xiang-ha-management
src/components/BreadCrumb/BreadCrumb.tsx
<filename>src/components/BreadCrumb/BreadCrumb.tsx import React, { ReactElement } from 'react'; import { Breadcrumb } from 'antd'; import { useLocation, Link } from 'umi'; interface Props {} enum BreadCrumbType { home = '主页', product = '商品', addproduct = '添加商品', users = '用户', order = '订单', } type it...
Yuze0101/xiang-ha-management
src/apis/example.ts
import request from '../utils/request'; export const foo1 = () => { return request.post('/url/xxx'); }; export const foo2 = (data: {}) => { return request.post('/url/yyyy', { data }); }; export const foo3 = (params: {}) => { return request.get('/url/zzzz', { params }); };
Yuze0101/xiang-ha-management
src/components/Broadcast/Broadcast1.tsx
<gh_stars>1-10 import React, { ReactElement, useEffect } from 'react'; import { Form, Input, Button, message } from 'antd'; interface Props { updateSwiper: any; handleCancel1: any; user: object; getAll: any; } const layout = { labelCol: { span: 6 }, wrapperCol: { span: 16 }, }; const validateMe...
Yuze0101/xiang-ha-management
src/apis/menu.ts
<filename>src/apis/menu.ts import request from '../utils/request'; type searchType = { pageSize: string; currentPage: string; val: string; }; export const searchMenu = (data?: searchType) => { return request.post('/admin/searchMenu', { data }); }; export const menuDetail = (data: { _id: string }) => {...
Yuze0101/xiang-ha-management
src/utils/request.ts
import { extend } from 'umi-request'; const token = localStorage.getItem('token'); const request = extend({ // 在请求路径拼接内容 prefix: 'http://web.woniulab.com:8005', // 请求超时时间 timeout: 5000, headers: { Authorization: token as string, 'Content-Type': 'application/json', }, params:...
WhiteFeather27/tensorflow
alchemy-web3-master/src/web3-adapter/eth_feeHistory.ts
import { formatters } from "web3-core-helpers"; import { toNumber } from "web3-utils"; export function patchEthFeeHistoryMethod(web3: any): void { web3.eth.customRPC({ name: "getFeeHistory", call: "eth_feeHistory", params: 3, inputFormatter: [ toNumber, formatters.inputBlockNumberFormatte...
WhiteFeather27/tensorflow
alchemy-web3-master/test/testUtils.ts
<gh_stars>100-1000 export type Mocked<T> = { // tslint:disable-next-line: ban-types [K in keyof T]: T[K] extends Function ? T[K] & jest.Mock : T[K]; };
WhiteFeather27/tensorflow
alchemy-web3-master/src/util/hex.ts
export function toHex(n: number): string { return `0x${n.toString(16)}`; } export function fromHex(hexString: string): number { return Number.parseInt(hexString, 16); } export function formatBlock(block: string | number): string { if (typeof block === "string") { return block; } else if (typeof block === ...
WhiteFeather27/tensorflow
alchemy-web3-master/src/types/web3-eth-abi.d.ts
<filename>alchemy-web3-master/src/types/web3-eth-abi.d.ts import { AbiCoder } from "web3-eth-abi"; declare class SpecificAbiCoder extends AbiCoder { public decodeParameter(type: "uint256", hex: string): string; public decodeParameter(type: any, hex: string): unknown; } declare module "web3-eth-abi" { const code...
WhiteFeather27/tensorflow
alchemy-web3-master/src/web3-adapter/alchemySendWebSocket.ts
<reponame>WhiteFeather27/tensorflow<filename>alchemy-web3-master/src/web3-adapter/alchemySendWebSocket.ts import SturdyWebSocket from "sturdy-websocket"; import { isResponse, JsonRpcId, JsonRpcRequest, SingleOrBatchRequest, SingleOrBatchResponse, WebSocketMessage, } from "../types"; import { AlchemySendFunc...
WhiteFeather27/tensorflow
alchemy-web3-master/test/subscriptionBackfill.test.ts
<filename>alchemy-web3-master/test/subscriptionBackfill.test.ts import { Backfiller, BlockHead, makeBackfiller, } from "../src/subscriptions/subscriptionBackfill"; import { JsonRpcRequest } from "../src/types"; import { fromHex, toHex } from "../src/util/hex"; import { JsonRpcSenders } from "../src/util/jsonRpc";...
WhiteFeather27/tensorflow
alchemy-web3-master/src/web3-adapter/eth_maxPriorityFeePerGas.ts
<gh_stars>100-1000 export function patchEthMaxPriorityFeePerGasMethod(web3: any): void { web3.eth.customRPC({ name: "getMaxPriorityFeePerGas", call: "eth_maxPriorityFeePerGas", params: 0, }); }
jyand/dbmgmt
select.ts
<reponame>jyand/dbmgmt import * as d from './doc.js' ; var sel: HTMLElement = d.Id("select") ; var m: HTMLElement = d.Id("main") ; function OperatorOptions(): string { const ops: string[] = ["(search)", "=", "!=", "<", ">", "<=", ">="] ; let s: string = '<select id="ops">' ; for (let i: number...
jyand/dbmgmt
doc.ts
<filename>doc.ts const FORMID: string = "container" ; // These are effectively aliases for DOM Methods but with strict typing export function Id(s: string): HTMLElement | null { return document.getElementById(s) ; } export function Listen (s: string, e, func: EventListener): void { document.getElement...
jyand/dbmgmt
insert.ts
import * as d from './doc.js' ; var m: HTMLElement = d.Id("main") ; var ins: HTMLElement = d.Id("insert") ; function FixInput(): void { let n: number = document.forms["inputs"]["numinputs"].value ; if (n < 1) { n = 1 ; document.forms["inputs"]["numinputs"].value = n ; ...
sparebytes/get-range
index.d.ts
export interface Range { /** Start of the range. @default 0 */ readonly start?: number; /** End of the range. */ readonly end: number; /** Distance between numbers. Minimum: `1`. @default 1 */ readonly step?: number; } /** Lazy number range generator. @example ``` import getRange from 'get-range';...
sparebytes/get-range
index.test-d.ts
import {expectType} from 'tsd'; import getRange from './index.js'; expectType<IterableIterator<number>>(getRange({end: -5})); expectType<IterableIterator<number>>(getRange({start: 0, end: -5})); expectType<IterableIterator<number>>(getRange({start: 0, end: -5, step: -1})); for (const index of getRange({end: 4})) { c...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/process/process.model.ts
import { Process } from "./process.interface"; import { CmdLineOptionDefinition } from "../../cmdline/cmdline.optiondefinition"; import { Container } from "inversify"; import TYPES from "../../configuration/types"; export class ProcessModel { private _processCode: string; private _processContainer: () => Conta...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/configuration/app.configuration.ts
import { CmdLineOptionDefinition } from "../cmdline/cmdline.optiondefinition"; import { injectable } from "inversify"; /** * Interface - Application Config */ export interface AppConfiguration { getConfig(): any; } /** * Implementation - Application Config */ @injectable() export class AppConfigurationImpl im...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/process/process.controller.ts
import { injectable, inject } from "inversify"; import TYPES from "../../configuration/types"; import { Process } from "./process.interface"; import { CommandLineOptions } from "command-line-args"; import { ProcessConfiguration } from "../../configuration/process.configuration"; import { ProcessModel } from "./process....
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/container/container-container.ts
<gh_stars>0 import { Container } from "inversify"; import "reflect-metadata"; import { CmdLineManager, CmdLineManagerImpl } from "../../cmdline/cmdline.manager"; import { AppConfigurationImpl, AppConfiguration } from "../../configuration/app.configuration"; import { ProcessController, ProcessControllerImpl } from "../p...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/parsers/text/field-to-line-substr.model.ts
<gh_stars>0 /** * A class that holds the start-end indexes and name of a field in a line of text */ export class FieldToLineSubstringModel { constructor(public fieldName: string, public fieldStartLocAtIndex: number, public fieldEndLocAtIndex: number) { } }
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/configuration/types.ts
<filename>typescript/internal/configuration/types.ts let TYPES = { CmdLineManager: Symbol("CmdLineManager"), ProcessConfiguration: Symbol("ProcessConfiguration"), AppConfiguration: Symbol("AppConfiguration"), Process: Symbol("Process"), Processes: Symbol("Processes"), ProcessController: Symbol("...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/cmdline/cmdline.optiondefinition.ts
<reponame>ksangabriel/turreta-data-transformer-nodejs<filename>typescript/internal/cmdline/cmdline.optiondefinition.ts<gh_stars>0 import commandLineArgs = require('command-line-args'); /** * A class that abstracts commandLineArgs.OptionDefinition to use a mandatory field to * indicate whether or not a command-line a...
ksangabriel/turreta-data-transformer-nodejs
typescript/custom/process/xml-to-xml-proc10001.process.ts
<filename>typescript/custom/process/xml-to-xml-proc10001.process.ts import { Process } from "../../internal/common/process/process.interface"; import { injectable, inject } from "inversify"; import { AppConfiguration } from "../../internal/configuration/app.configuration"; import { CommandLineOptions } from "command-li...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/process/process.interface.ts
<reponame>ksangabriel/turreta-data-transformer-nodejs import { CommandLineOptions } from "command-line-args"; export interface Process { getName(): string; execute(options: CommandLineOptions): void; }
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/services/logger.service.ts
<gh_stars>0 import {Logger} from "ts-log-debug"; import { injectable } from "inversify"; /** * Interface - Application Config */ export interface LoggerService { debug(msg: String): void; info(msg: String): void; trace(msg: String): void; error(msg: String): void; fatal(msg: String): void; w...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/parsers/text/field-to-line-substr-extracted-val.model.ts
import { FieldToLineSubstringModel } from "./field-to-line-substr.model"; /** * A class that holds the field-to-value extracted from a line of text and information * about the field about its start-end indexes and name. */ export class FieldToLineExtractedValue { private fieldToLineModel: FieldToLineSubstring...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/instance.loader.ts
<gh_stars>0 export class InstanceLoader { static getInstance<T>(context: any, name: string, ...args: any[]) : T { var instance = Object.create(context[name].prototype); instance.constructor.apply(instance, args); return <T> instance; } } export interface ParameterlessConstructor<T> { ...
ksangabriel/turreta-data-transformer-nodejs
typescript/custom/processes.ts
<gh_stars>0 import { injectable, inject } from "inversify"; import { ProcessConfiguration } from "../internal/configuration/process.configuration"; import TYPES from "../internal/configuration/types"; import { ProcessModel } from "../internal/common/process/process.model"; import { CSVToCSVToUpperTextProcess } from "./...
ksangabriel/turreta-data-transformer-nodejs
typescript/app.ts
<reponame>ksangabriel/turreta-data-transformer-nodejs import { Container } from "inversify"; import TYPES from "./internal/configuration/types"; import { CmdLineManager } from "./internal/cmdline/cmdline.manager"; import { ProcessController } from "./internal/common/process/process.controller"; import { ContainerContai...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/parsers/text/field-to-line.manager.ts
<gh_stars>0 import { FieldToLineExtractedValue } from "./field-to-line-substr-extracted-val.model"; import { FieldToLineSubstringModel } from "./field-to-line-substr.model"; export class FieldToLineManager { extractFields(line: string, fieldToLineSubstringModels: FieldToLineSubstringModel[]): FieldToLineExtracted...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/common/parsers/xml/xmlparser.ts
//import * as xml2js from 'xml2js'; export class XmlParser { public parseAsJSON(xmlDoc: string): JSON { let result: any = {}; // xml2js.parseString(xmlDoc, function (err, fnResult) { // result = fnResult; // }); return <JSON>result; } }
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/cmdline/cmdline.manager.ts
import { CmdLineOptionDefinition } from "./cmdline.optiondefinition"; import commandLineArgs = require('command-line-args'); import { injectable, inject } from "inversify"; import { AppConfiguration } from "../configuration/app.configuration"; import { ProcessConfiguration } from "../configuration/process.configuration...
ksangabriel/turreta-data-transformer-nodejs
typescript/internal/configuration/process.configuration.ts
import { ProcessModel } from "../common/process/process.model"; import { injectable } from "inversify"; /** * Contract - Configuration of all process models */ export interface ProcessConfiguration { /** * Adds each process to the configuration * @param processModel */ addProcess(processModel...
zengguirong/formily
docs/site/Contributors.tsx
import React, { useEffect, useState } from 'react' import './Contributors.less' export const Contributors: React.FC = () => { const [contributors, setContributors] = useState([]) useEffect(() => { fetch('//v2.formilyjs.org/.netlify/functions/contributors') .then((res) => res.json()) .then(({ data }...
zengguirong/formily
scripts/translate.ts
<filename>scripts/translate.ts<gh_stars>1000+ import glob from 'glob' import path from 'path' import execa from 'execa' import { v2 } from '@google-cloud/translate' import { readFileSync, writeFileSync, existsSync } from 'fs-extra' //const sleep = (d: number) => new Promise((resolve) => setTimeout(resolve, d)) const ...
DamirsCorner/20220401-ionic-date-picker-customize
src/app/home/home.page.ts
import { Component, ViewChild } from '@angular/core'; import { IonDatetime } from '@ionic/angular'; @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage { @ViewChild(IonDatetime, { static: true }) datePicker: IonDatetime; date: Date; co...
younho9/ts-indexify
index.test-d.ts
import {expectAssignable, expectNotAssignable} from 'tsd'; import {indexify} from './index.js'; interface SomeInterface { foo: number; bar?: string; baz: number | undefined; } type SomeType = { foo: number; bar?: string; baz: number | undefined; }; class SomeClass { foo!: number; bar?: string; baz...
younho9/ts-indexify
index.d.ts
<gh_stars>0 /** Add index signature to interface */ export declare type Indexify<O extends object> = { [P in keyof O]: O[P]; }; /** Constructs a index signature to interface */ export declare const indexify: <O extends object>(object: O) => Indexify<O>;
dirkwall/github-service
src/services/CredentialsService.ts
import { CredentialsModel } from '../types/CredentialsModel'; import { CredentialsSecret } from '../types/CredentialsSecret'; import { KeptnCloudEvent } from '../types/KeptnCloudEvent'; import { KeptnConfigSecretFactory } from '../lib/KeptnConfigSecretFactory'; import { K8sClientFactory } from '../lib/K8sClientFact...
dirkwall/github-service
src/types/ShipyardModel.ts
import { ApiModel, ApiModelProperty, SwaggerDefinitionConstant } from 'swagger-express-ts'; @ApiModel({ description: '', name: 'ShipyardModel', }) export class ShipyardModel { project: string; registry: string; stages: Stage[]; } export class Stage { name: string; deployment_strategy: stri...
dirkwall/github-service
src/types/TreeModel.ts
export interface TreeModel { sha: string; url: string; tree: TreeItem[]; } export interface TreeItem { path: string; type: string; sha: string; url: string; }
dirkwall/github-service
src/types/ConfigurationModel.ts
<filename>src/types/ConfigurationModel.ts export interface ConfigurationModel { githuborg: string; project: string; teststrategy: string; deploymentstrategy: string; stage: string; service: string; image: string; tag: string; }
dirkwall/github-service
src/types/CredentialsModel.ts
export class CredentialsModel { org: string; user: string; token: string; }
dirkwall/github-service
src/types/WebSocketChannelInfo.ts
<filename>src/types/WebSocketChannelInfo.ts export interface WebSocketChannelInfo { channelId: string; token: string; }
dirkwall/github-service
src/types/CredentialsSecret.ts
import { CredentialsModel } from './CredentialsModel'; export interface CredentialsSecret { apiVersion: string; kind: string; metadata: Metadata; type: string; data: CredentialsModel; } interface Metadata { name: string; namespace: string; }
dirkwall/github-service
src/controls/GitHubController.ts
import 'reflect-metadata'; import * as express from 'express'; import { controller, httpGet, httpPost, httpDelete, interfaces, } from 'inversify-express-utils'; import { ApiOperationGet, ApiOperationPost, ApiOperationDelete, ApiPath, SwaggerDefinitionConstant, } from 'swagger-express-ts'; import { ...
dirkwall/github-service
src/types/K8sServiceInfo.ts
<gh_stars>0 export interface K8sServiceInfo { statusCode: number; body: Body; } interface Body { kind: string; apiVersion: string; metadata: Metadata; spec: Spec; status: Status; } interface Status { loadBalancer: LoadBalancer; } interface LoadBalancer { ingress: Ingress[]; } interface Ingress { ...
dirkwall/github-service
src/lib/K8sClientFactory.ts
import * as Api from 'kubernetes-client'; export class K8sClientFactory { constructor() {} createK8sClient(): Api.ApiRoot { const Client = Api.Client1_10; const config = Api.config; let k8sClient; if (process.env.NODE_ENV === 'production') { k8sClient = new Client({ config: con...
dirkwall/github-service
src/services/GitHubService.ts
<reponame>dirkwall/github-service<filename>src/services/GitHubService.ts import { CredentialsService } from './CredentialsService'; import { ServiceModel } from '../types/ServiceModel'; import { Stage, ShipyardModel } from '../types/ShipyardModel'; import { CredentialsModel } from '../types/CredentialsModel'; imp...
dirkwall/github-service
src/types/ServiceModel.ts
export interface ServiceModel { project: string; values: any; templates: any; manifest: any; }
dirkwall/github-service
src/lib/KeptnConfigSecretFactory.ts
import { CredentialsModel } from '../types/CredentialsModel'; import { CredentialsSecret } from '../types/CredentialsSecret'; import { base64encode } from 'nodejs-base64'; export class KeptnConfigSecretFactory { constructor() { } createKeptnConfigSecret(creds: CredentialsModel): CredentialsSecret { ...
dirkwall/github-service
src/types/KeptnRequestModel.ts
<gh_stars>0 import moment from 'moment'; export class KeptnRequestModel { static EVENT_TYPES = { NEW_ARTEFACT: 'sh.keptn.events.new-artefact', CONFIGURATION_CHANGED: 'sh.keptn.events.configuration-changed', DEPLOYMENT_FINISHED: 'sh.keptn.events.deployment-finished', TESTS_FINISHED: 'sh.keptn...
dirkwall/github-service
src/services/CredentialsService.spec.ts
<reponame>dirkwall/github-service<filename>src/services/CredentialsService.spec.ts import 'reflect-metadata'; import * as express from 'express'; import { expect } from 'chai'; import 'mocha'; import * as sinon from 'sinon'; import { cleanUpMetadata } from 'inversify-express-utils'; import { CredentialsService } from '...
dirkwall/github-service
src/server.ts
<reponame>dirkwall/github-service import * as bodyParser from 'body-parser'; import * as express from 'express'; import 'reflect-metadata'; import { Container } from 'inversify'; import { interfaces, InversifyExpressServer, TYPE, } from 'inversify-express-utils'; import * as swagger from 'swagger-express...
dirkwall/github-service
src/services/WebSocketLogger.ts
<filename>src/services/WebSocketLogger.ts import { WebSocketChannelInfo } from '../types/WebSocketChannelInfo'; import { KeptnRequestModel } from '../types/KeptnRequestModel'; const WebSocket = require('ws'); export class WebSocketLogger { private webSocket: any; constructor() { } connect(webSocketChannelI...
dirkwall/github-service
src/types/KeptnCloudEvent.ts
export interface KeptnCloudEvent { shkeptncontext: string; data: any; }
dirkwall/github-service
src/lib/Utils.ts
import { K8sClientFactory } from './K8sClientFactory'; import { K8sServiceInfo } from '../types/K8sServiceInfo'; import { WebSocketLogger } from '../services/WebSocketLogger'; const fs = require('fs'); class Utils { private static instance; private wsLogger: WebSocketLogger; private constructor() {...