This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('node:fs'); | |
const insomniaFilePath = './insomnia.json'; | |
const outputFilePath = './hoppscotch.json'; | |
const insomniaGraphqlExport = require(insomniaFilePath); | |
const folders = []; | |
const insomniaFolders = insomniaGraphqlExport.resources.filter( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Typesense { | |
Client: TypesenseClientCtor; | |
} | |
export interface TypesenseDocument { | |
id: string; | |
} | |
export type TypesenseClientCtor = new (options: TypesenseClientOptions) => TypesenseClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {MigrationInterface, QueryRunner} from "typeorm"; | |
import { addToDefaultChannel, migratePaymentMethods } from '../migration-utils'; | |
export class v100Beta11614933697219 implements MigrationInterface { | |
public async up(queryRunner: QueryRunner): Promise<any> { | |
await queryRunner.query("CREATE TABLE `tag` (`createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), `updatedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), `value` varchar(255) NOT NULL, `id` int NOT NULL AUTO_INCREMENT, PRIMARY KEY (`id`)) ENGINE=InnoDB", undefined); | |
await queryRunner.query("CREATE TABLE `asset_tags_tag` (`assetId` int NOT NULL, `tagId` int NOT NULL, INDEX `IDX_9e412b00d4c6cee1a4b3d92071` (`assetId`), INDEX `IDX_fb5e800171ffbe9823f2cc727f` (`tagId`), PRIMARY KEY (`assetId`, `tagId`)) ENGINE=InnoDB", undefined); | |
await queryRunner.query("CREATE TABLE `asset_channels_channel` (`assetId` int NOT NULL, `channelId` int NOT NULL, INDEX `IDX_dc4e7435f9f5e9e6436bebd33 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {MigrationInterface, QueryRunner} from "typeorm"; | |
import { addProductVariantsToProductChannels, | |
migrateDefaultShippingCalculatorArgs, | |
migrateOrderAdjustmentsToSurcharges, | |
migrateOrderItemPromotionsAndTaxes, migrateOrderShippingToShippingLines } from '../migration-utils'; | |
export class v18011609156046047 implements MigrationInterface { | |
public async up(queryRunner: QueryRunner): Promise<any> { | |
await queryRunner.query("ALTER TABLE `order_item` DROP FOREIGN KEY `FK_eed51be48640c21e1c76d3e9fbe`", undefined); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { MigrationInterface, QueryRunner } from 'typeorm'; | |
export class v01401594033611805 implements MigrationInterface { | |
public async up(queryRunner: QueryRunner): Promise<any> { | |
await queryRunner.query( | |
'CREATE TABLE `authentication_method` (`createdAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), `updatedAt` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), `identifier` varchar(255) NULL, `passwordHash` varchar(255) NULL, `verificationToken` varchar(255) NULL, `passwordResetToken` varchar(255) NULL, `identifierChangeToken` varchar(255) NULL, `pendingIdentifier` varchar(255) NULL, `strategy` varchar(255) NULL, `externalIdentifier` varchar(255) NULL, `metadata` text NULL, `id` int NOT NULL AUTO_INCREMENT, `type` varchar(255) NOT NULL, `userId` int NULL, INDEX `IDX_a23445b2c942d8dfcae15b8de2` (`type`), PRIMARY KEY (`id`)) ENGINE=InnoDB', | |
undefined, | |
); | |
await queryRunner.query( | |
`INSERT INTO authentication_method (identifier, passwordHash, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Display Webcam Stream</title> | |
<style> | |
</style> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
moduleFileExtensions: ['js', 'json', 'ts'], | |
rootDir: __dirname, | |
testRegex: '.spec.ts$', | |
transform: { | |
'^.+\\.ts$': 'ts-jest', | |
}, | |
testEnvironment: 'node', | |
globals: { | |
'ts-jest': { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Entity, PrimaryColumn } from "../../../../src"; | |
@Entity() | |
export class Asset { | |
@PrimaryColumn() | |
id: number; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Typing partial application in TypeScript! | |
* | |
* Here's a "pick" function which takes some property names and returns a function which will pick those | |
* from an object passed to it. | |
*/ | |
export function pick<T extends string>(props: T[]): <U>(input: U) => { [K in T]: K extends keyof U ? U[K]: never } { | |
return {} as any; // implementation not important for now | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is a build step which would be run whenever component messages are modified. | |
// It scans the project for co-located *.messages.json files, extracts the tokens | |
// and prepends them with the components' selector as a scoping mechanism. | |
// pseudo-code | |
var componentMessages = getComponentMessageFiles("**/*.messages.json"); | |
var componentTokens = {}; | |
foreach (messageFile in componentMessages) { |
NewerOlder