Some notes and techniques for reverse engineering Webpack (and a little bit about React/Vue/Angular) apps.
This file contains hidden or 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 * as T from "@effect/core/io/Effect" | |
import type * as EX from "@effect/core/io/Exit" | |
import * as FID from "@effect/core/io/FiberId" | |
import * as HUB from "@effect/core/io/Hub" | |
import type * as RU from "@effect/core/io/Runtime" | |
import * as S from "@effect/core/stream/Stream" | |
import * as C from "@effect-ts/core/Case" | |
import { pipe } from "@tsplus/stdlib/data/Function" | |
import * as O from "@tsplus/stdlib/data/Maybe" | |
import * as ENV from "@tsplus/stdlib/service/Env" |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
This file contains hidden or 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
type QueryResult<TTransformedData> = | |
| { type: "success"; data: TTransformedData } | |
| { type: "error"; errors: readonly GraphQLError[] }; | |
type ParentEvents<TData, TId extends string = "dataLoader"> = | |
| { type: "dataStream.NEW_DATA"; data: TData; id: TId } | |
| { type: "dataStream.ERROR"; id: TId }; | |
export function createDataStream< | |
TObservableFactory extends (...args: $YesReallyAny[]) => Observable<QueryResult<$YesReallyAny>>, |
This file contains hidden or 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
#!/bin/bash | |
# Modified by Chris Richardson (https://github.com/christr and https://twitter.com/christr77) on 09/20/2020 | |
# Previous versions of this script don't work because they hadn't been updated since 2012. There are now more steps involved to set this up. | |
# This script update is based on information found here: https://developers.linode.com/api/v4/domains-domain-id-records-record-id/#put | |
# You first must find out the domain ID and resource ID numbers. In order to do this follow the steps below. | |
# 1. Create a Linode API Key through your account profile at https://cloud.linode.com/dashboard. Give it rights to read/write to domains only. | |
# 2. From a shell run the following command: LINODE_API_KEY=[insert API key from step 1 here] | |
# 3. Run the following command to get the domain ID number for the domain you want to manage: curl -H "Authorization: Bearer $LINODE_API_KEY" https://api.linode.com/v4/domains/ |
This file contains hidden or 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
// NOTE: code now moved to https://github.com/tycho01/typical | |
// older revision left here, but it no longer runs well in TS Playground | |
export type Obj<T> = { [k: string]: T }; | |
export type NumObj<T> = { [k: number]: T }; | |
// export type List = ArrayLike; // no unapplied generic types :( | |
export type List<T> = ArrayLike<T>; | |
// progress: https://github.com/Microsoft/TypeScript/issues/16392 | |
export function force<T, V extends T>() {} |
type StringBool = "true"|"false";
interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };
type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];
This file contains hidden or 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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
#InstallKeybdHook | |
<!<^Up:: | |
send, #{Tab} | |
Return |
NewerOlder