repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/pklLspDistributionUpdater.ts | src/ts/pklLspDistributionUpdater.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/pklLspDistribution.ts | src/ts/pklLspDistribution.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/extension.ts | src/ts/extension.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/javaDistribution.ts | src/ts/javaDistribution.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/notifications.ts | src/ts/notifications.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/consts.ts | src/ts/consts.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/providers/PklTextDocumentContentProvider.ts | src/ts/providers/PklTextDocumentContentProvider.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/providers/PklSemanticTokensProvider.ts | src/ts/providers/PklSemanticTokensProvider.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/clients/logger.ts | src/ts/clients/logger.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
apple/pkl-vscode | https://github.com/apple/pkl-vscode/blob/08760b364aced4679359f4d2cd7111c253da39d2/src/ts/clients/maven.ts | src/ts/clients/maven.ts | /*
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.... | typescript | Apache-2.0 | 08760b364aced4679359f4d2cd7111c253da39d2 | 2026-01-05T04:59:38.546688Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/index.ts | index.ts | import { buildAppFromConfig } from "./src";
// from config
fly.http.respondWith(buildAppFromConfig());
| typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/balancer.ts | src/balancer.ts | import { FetchFunction } from "./fetch";
/**
* A fetch function load balancer. Distributes requests to a set of backends; attempts to
* send requests to most recently healthy backends using a 2 random (pick two healthiest,
* randomize which gets requests).
*
* If all backends are healthy, tries to evenly distr... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/text-replacements.ts | src/text-replacements.ts | /**
* @module HTTP
* @ignore
*/
export async function applyReplacements(resp: Response, replacements?: [string, string][]) {
if (!replacements || replacements.length === 0) return resp
const contentType = resp.headers.get("content-type") || ""
if (
contentType.includes("/html") ||
contentType.includes(... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/errors.ts | src/errors.ts | /** @module HTTP */
/** @ignore */
export class ValidationError extends Error {
public readonly field: string;
constructor(field: string, message: string) {
super(`${field} ${message}`);
this.field = field;
}
}
/** @ignore */
export class InputError extends Error { }
/** @ignore */
export function inval... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/middleware.ts | src/middleware.ts | /**
* @module Middleware
*/
export * from "./middleware/https-upgrader";
export * from "./middleware/response-headers";
export * from "./middleware/inject-html";
export * from "./middleware/http-cache";
export { autoWebp } from "./middleware/auto-webp";
| typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/util.ts | src/util.ts | /** @module HTTP */
import { merge as _merge, pick } from "lodash";
/** @hidden */
export function isObject<T = any>(thing: unknown): thing is Partial<T> {
return thing !== null && typeof thing === "object"
}
/** @hidden */
export function merge<T>(target: T, other: {}, keys: (keyof T)[]): T {
return _merge(targe... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/fetch.ts | src/fetch.ts | /**
* HTTP helpers, utilities, etc.
* @module HTTP
*/
import { FlyRequest } from "@fly/v8env/lib/fly/fetch";
/**
* Converts RequestInfo into a Request object.
* @param req raw request
*/
export function normalizeRequest(req: RequestInfo, init?: RequestInit) {
if (typeof req === "string") {
req = new Reques... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/proxy.ts | src/proxy.ts | /**
* Library for proxying requests to origins. Use this to create `fetch` like functions
* for making requests to other services. For example:
*
* ```javascript
* // sends all traffic to an Amazon ELB,
* // `Host` header passes through from visitor request
* const origin = proxy("https://elb1298.amazonaws.com"... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/pipeline.ts | src/pipeline.ts | /**
* A library for composing `fetch` generators into a single pipeline.
*
* @preferred
* @module HTTP
*/
import { FetchGenerator, FetchFunction } from "./fetch"
/**
* PipeplineStage can either be a FetchGenerator function, or a tuple of
* FetchGenerator + args.
*/
export type PipelineStage = FetchGenerator |... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/data.ts | src/data.ts | import db, { Collection } from "@fly/v8env/lib/fly/data";
import cache from "@fly/v8env/lib/fly/cache";
import { FetchFunction } from "./fetch";
export interface RestOptions{
authToken: string,
basePath?: string,
cache?: CacheOptions
}
export interface CacheOptions{
ttl?: number,
toCacheKey?: (collection: s... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/index.ts | src/index.ts |
/** @module HTTP */
export * from "./fetch";
export * from "./proxy";
export * from "./pipeline";
import * as middleware from "./middleware"
export { middleware }
import * as backends from "./backends";
import { FetchFunction } from "./fetch";
export { backends };
export { isCdnConfig, buildCdn, buildAppFromConfig } ... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends.ts | src/backends.ts | /**
* @module Backends
*/
export * from "./backends/origin";
export * from "./backends/glitch";
export * from "./backends/github_pages";
export * from "./backends/ghost_pro";
export * from "./backends/heroku";
export * from "./backends/netlify";
export * from "./backends/echo";
export * from "./backends/squarespace";... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/aws.ts | src/aws.ts | /** @module HTTP */
import { RequestSigner, sign } from 'aws4';
/** @hidden */
export interface Credentials {
accessKeyId: string,
secretAccessKey: string,
sessionToken?: string, // only required for temporary credentials
}
/** @hidden */
export interface RequestOptions {
path: string,
host?: strin... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/middleware/builder.ts | src/middleware/builder.ts | /**
* @module Middleware
*/
import { FetchFunction, FetchGeneratorWithOptions, FetchGenerator } from "../fetch";
export type ResponseModifierResult = Promise<undefined | void | Response> | undefined | void | Response
/**
* A convenience function for building middleware that only operates on a request.
* @param fn ... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/middleware/https-upgrader.ts | src/middleware/https-upgrader.ts | /**
* @module Middleware
*/
import { RedirectOptions } from "../fetch";
import { requestModifier } from "./builder";
/**
* Redirects http requests to https in production.
*
* In development, this only logs a message
*/
export const httpsUpgrader = requestModifier(httpsRedirect)
/**
* Checks request protocol, ... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/middleware/inject-html.ts | src/middleware/inject-html.ts | /**
* @module Middleware
*/
import { FetchFunction } from "../fetch";
import { applyReplacements } from "../text-replacements";
export interface InjectHTMLOptions {
targetTag: string;
html: string;
}
/** @ignore */
export function injectHTML(fetch: FetchFunction, options?: InjectHTMLOptions): FetchFunction {
... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/middleware/response-headers.ts | src/middleware/response-headers.ts | /**
* @module Middleware
*/
import { responseModifier } from "./builder";
/**
* Header name/value pairs to set on a response. The boolean `false` removes the header entirely.
*/
export interface ResponseHeadersOptions {
[name: string]: string | false
}
/**
* Middleware to set headers on responses
* @param fet... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/middleware/auto-webp.ts | src/middleware/auto-webp.ts | /** @module Middleware */
import { Image } from "@fly/v8env/lib/fly/image";
import responseCache from "@fly/v8env/lib/fly/cache/response";
import { FetchFunction } from "../fetch";
/**
* Automatically encodes images as webp for supported clients.
* This would apply to requests with 'image/webp' in the accept header ... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/middleware/http-cache.ts | src/middleware/http-cache.ts | /**
* @module Middleware
*/
import cache from "@fly/v8env/lib/fly/cache";
import { FetchFunction } from "../fetch";
/**
* HTTP caching options.
*/
export interface HTTPCacheOptions{
/** Overrides the cache TTL for all cacheable requests */
overrideMaxAge?: number
}
/**
* Cache HTTP responses with `cache-contr... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/shims/crypto.ts | src/shims/crypto.ts | /** @module HTTP */
import * as sjcl from 'sjcl'
/** @hidden */
export function createHmac(_algo: string, key: string | sjcl.BitArray) {
const mac = new sjcl.misc.hmac(typeof key === 'string' ? sjcl.codec.utf8String.toBits(key) : key);
return {
update: (data: string) => {
mac.update(data);
... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/firebase.ts | src/backends/firebase.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { normalizeOptions, SubdomainOptions } from "./subdomain_service";
/**
* Creates a `fetch` like function for proxying requests to hosted Firebase sites.
*
* Example:
* ```typescript
* import { firebase } from "./src/backends";
... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/squarespace.ts | src/backends/squarespace.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { SubdomainOptions, normalizeOptions } from "./subdomain_service";
/**
* Creates a `fetch` like function for proxying requests to hosted Squarespace.
*
* Example:
* ```typescript
* import { squarespace } from "./src/backends";
*... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/glitch.ts | src/backends/glitch.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { SubdomainOptions, optionNormalizer } from "./subdomain_service";
/**
* Glitch configuration.
*/
export interface GlitchOptions {
/** Glitch application name: <appName>.glitch.me */
appName: string
}
const normalizeOptions =... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/github_pages.ts | src/backends/github_pages.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { isObject, merge } from "../util";
import * as errors from "../errors";
/**
* GitHub Repository information.
*/
export interface GitHubPagesOptions {
/** Repository owner */
owner: string,
/** Repository name <repository> f... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/subdomain_service.ts | src/backends/subdomain_service.ts | /**
* @module Backends
*/
import { isObject, merge } from "../util";
import * as errors from "../errors";
/**
* Settings for backends that use subdomains
*/
export interface SubdomainOptions {
[k: string]: string | undefined
/** Backend's subdomain: <subdomain>.example.com */
subdomain: string,
/** Subdire... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/echo.ts | src/backends/echo.ts | /**
* @module Backends
*/
/**
* A useful fetch-like function for debugging. Echos request information
* as a JSON response.
* @hidden
* @param req The request to echo
* @param init Request init information
*/
export async function echo(req: RequestInfo, init?: RequestInit){
if(typeof req === "string"){
re... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/ghost_pro.ts | src/backends/ghost_pro.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { SubdomainOptions, normalizeOptions } from "./subdomain_service";
/**
* Creates a `fetch` like function for proxying requests to hosted Ghost Pro blogs.
*
* Example:
* ```typescript
* import { ghost } from "./src/backends";
* ... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/surge.ts | src/backends/surge.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { SubdomainOptions, normalizeOptions } from "./subdomain_service";
/**
* Creates a `fetch` like function for proxying requests to hosted Surge.
*
* Example:
* ```typescript
* import { surge } from "./src/backends";
* const backe... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/netlify.ts | src/backends/netlify.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { normalizeOptions, SubdomainOptions } from "./subdomain_service";
/**
* Creates a `fetch` like function for proxying requests to hosted Netlify sites.
*
* Example:
* ```typescript
* import { netlify } from "./src/backends";
* ... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/origin.ts | src/backends/origin.ts | /**
* @module Backends
*/
import { ProxyFunction, proxy } from "../proxy";
import { isObject, merge } from "../util";
import * as errors from "../errors";
/**
* Proxy options for generic http/https backends
* @hidden
* See {@link Backends/backend}
*/
export interface OriginOptions {
origin: string | URL,
for... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/gitlab_pages.ts | src/backends/gitlab_pages.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { isObject, merge } from "../util";
import * as errors from "../errors";
/**
* GitLab Repository information.
*/
export interface GitLabPagesOptions {
/** Repository owner */
owner: string,
/** Repository name <repository> f... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/aws_s3.ts | src/backends/aws_s3.ts | /**
* @module Backends
*/
import aws, { Credentials } from '../aws'
import { ProxyFunction } from '../proxy';
/**
* AWS S3 bucket options
*/
export interface AwsS3Options {
bucket: string,
region?: string,
credentials?: Credentials
}
const allowedMethods = ["GET", "HEAD"]
/**
* Creates a fetch-like ... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/aerobatic.ts | src/backends/aerobatic.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { normalizeOptions, SubdomainOptions } from "./subdomain_service";
/**
* Creates a `fetch` like function for proxying requests to hosted Aerobatic sites.
*
* Example:
* ```typescript
* import { aerobatic } from "./src/backends";... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/zeit-now.ts | src/backends/zeit-now.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { SubdomainOptions, normalizeOptions } from "./subdomain_service";
/**
* Creates a `fetch` like function for proxying requests to hosted Zeit Now.
*
* Example:
* ```typescript
* import { zeitNow } from "./src/backends";
* const ... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/backends/heroku.ts | src/backends/heroku.ts | /**
* @module Backends
*/
import { proxy, ProxyFunction } from "../proxy";
import { SubdomainOptions, optionNormalizer } from "./subdomain_service";
/**
* Heroku application configuration.
*/
export interface HerokuOptions {
/** Heroku App name: <appName>.herokuapp.com */
appName: string,
/** If Heroku is... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/config/middleware.ts | src/config/middleware.ts | /** @module Config */
import { FetchFactory, FetchFunction } from "../fetch";
import * as middleware from "../middleware";
import { ItemConfig } from "./index";
type FactoryDefinition = [FetchFactory, ((options: any) => boolean)?];
const factories = new Map<string, FactoryDefinition>([
["https-upgrader", [middlewar... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/config/rules.ts | src/config/rules.ts | /**
* @module Config
* @ignore
* */
import { applyReplacements } from "../text-replacements";
import { BackendProxies } from "./index";
export interface RuleInfo {
actionType: "redirect" | "rewrite",
backendKey?: string,
matchScheme?: string,
hostname?: string,
pathMatchMode?: "prefix" | "full",
httpHea... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/config/index.ts | src/config/index.ts | /** @module Config */
import { validateBackend, buildBackend } from "./backends";
import { isObject } from "../util";
import { FetchFunction } from "../fetch";
import { ProxyFunction } from "../proxy";
import { RuleInfo, validateRule, buildRules } from "./rules";
import { buildMiddleware, validateMiddleware } from "./m... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/src/config/backends.ts | src/config/backends.ts | /** @module Config */
import * as backends from "../backends";
import { ProxyFunction, ProxyFactory } from "../proxy";
import { ItemConfig } from "./index";
export type BackendMap = Map<string, ProxyFactory>;
// type FactoryDefinition = [ProxyFactory, (options: any) => boolean];
const factories = new Map<string, Pr... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/pipeline.spec.ts | test/pipeline.spec.ts | import { expect } from "chai"
import { pipeline, FetchFunction } from "../src"
function outer(fetch: FetchFunction) {
return async function outerFetch(req: RequestInfo, init?: RequestInit) {
(req as any).headers.set("Outer-Fn", "woop!")
return fetch(req, init)
}
}
function inner(fetch: FetchFunction) {
... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/balancer.spec.ts | test/balancer.spec.ts | import { expect } from 'chai'
import balancer, { _internal, Backend, syncBackends } from "../src/balancer"
async function fakeFetch(req: RequestInfo, init?: RequestInit) {
return new Response("hi")
}
async function fakeFetchError(req: RequestInfo, init?: RequestInit) {
return new Response("nooooo", { status: 502 }... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/data.spec.ts | test/data.spec.ts | import { expect } from 'chai';
import * as data from "../src/data";
import { FetchFunction } from '../src/fetch';
import db from "@fly/v8env/lib/fly/data";
import cache from "@fly/v8env/lib/fly/cache";
describe("restAPI", () => {
const paths:Record<string,FetchFunction> = {
"/": data.restAPI("asdf"),
"/with... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/proxy.spec.ts | test/proxy.spec.ts | import { expect } from "chai"
import * as proxy from "../src/proxy"
const origin = "https://fly.io/proxy/"
const req = new Request("https://wat.com/path/to/thing", { headers: { host: "notwat.com" } })
describe("proxy", () => {
it("includes host header and base path properly", () => {
const breq = proxy.buildPro... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/middleware/auto-webp.spec.ts | test/middleware/auto-webp.spec.ts | import { expect } from "chai";
import { autoWebp } from "../../src/middleware";
import { Image } from "@fly/v8env/lib/fly/image";
const img = require("../fixtures/image.png");
async function mock(req: RequestInfo){
const url = new URL(typeof req === "string" ? req : req.url);
if(url.pathname === "/text"){
return... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/middleware/response-headers.spec.ts | test/middleware/response-headers.spec.ts | import { expect } from "chai";
import { responseHeaders } from "../../src/middleware";
import { echo } from "../../src/backends";
describe("middleware/responseHeaders", function() {
it("sets a header with a string value", async ()=>{
const fn = responseHeaders(echo, { "Powered-By": "Caffeine" });
const resp... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/middleware/https-upgrader.spec.ts | test/middleware/https-upgrader.spec.ts | import { expect } from "chai";
import { httpsUpgrader } from "../../src/middleware";
import { echo } from "../../src/backends";
describe("middleware/httpsUpgrader", function() {
it("redirects with default options", async ()=>{
const fn = httpsUpgrader(echo);
const resp = await fn("http://wat/")
expect(r... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/middleware/http-cache.spec.ts | test/middleware/http-cache.spec.ts | import { expect } from "chai";
import { httpCache } from "../../src/middleware";
function withHeaders(headers:any){
return async function fetchWithHeaders(..._:any[]){
const resp = new Response(`response at: ${Date.now()}`)
for(const k of Object.getOwnPropertyNames(headers)){
const v = headers[k];
... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/backends/aws_s3.spec.ts | test/backends/aws_s3.spec.ts | import { expect } from 'chai';
import { backends } from "../../src"
const { awsS3 } = backends
describe("backends/awsS3", () => {
describe("public", () => {
it("responds with the file's content", async () => {
const fn = awsS3("flyio-test-website");
const resp = await fn("/index.ht... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/backends/github_pages.spec.ts | test/backends/github_pages.spec.ts | import { expect } from 'chai';
import { githubPages } from "../../src/backends"
import * as errors from "../../src/errors";
describe("backends/githubPages", function() {
this.timeout(15000)
describe("options", () => {
const validOptions = [
[
"superfly/edge",
{ owner: "superfly", reposi... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/backends/gitlab_pages.ts | test/backends/gitlab_pages.ts | import { expect } from 'chai';
import { gitlabPages } from "../../src/backends"
import * as errors from "../../src/errors";
describe("backends/gitlabPages", function() {
this.timeout(15000)
describe("options", () => {
const validOptions = [
[
"superfly/cdn",
{ owner: "superfly", reposit... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/backends/subdomain_services.spec.ts | test/backends/subdomain_services.spec.ts | import { expect } from "chai";
import { squarespace, ghostProBlog, glitch, netlify, heroku, surge, zeitNow, aerobatic, firebase } from "../../src/backends"
import * as errors from "../../src/errors";
import { normalizeOptions } from "../../src/backends/subdomain_service";
const defs: any[] = [
{ backend: ghostProBlo... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/backends/origin.spec.ts | test/backends/origin.spec.ts | import { expect } from "chai";
import { origin } from "../../src/backends"
import * as errors from "../../src/errors";
describe("backends/origin", function() {
this.timeout(15000)
describe("options", () => {
const validOptions = [
[
"https://fly.io",
{ origin: "https://fly.io", forwardH... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/config/builder.spec.ts | test/config/builder.spec.ts | import { expect } from "chai"
import { buildAppFromConfig, backends } from "../../src";
import { glitch } from "../../src/backends";
const expected:any = {
"getting-started": backends.origin({
origin: "https://getting-started.edgeapp.net",
headers:{
host: "getting-started.edgeapp.net"
}
}),
"gl... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/test/config/rules.spec.ts | test/config/rules.spec.ts | import { expect } from "chai"
import { PathPatternMatcher } from "../../src/config/rules";
it("replaces a matched pattern", () => {
const pathPattern = new PathPatternMatcher("/first/:first/second/:second/rest/*rest")
const path = "/first/1/second/2/rest/a/b/c/1/2/3"
expect(pathPattern.match(path)).to.be.true
... | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
superfly/edge | https://github.com/superfly/edge/blob/5cb72c65463ce0c5b4aa7edaf7b790e13faa3793/examples/getting-started/index.ts | examples/getting-started/index.ts | import { backends, proxy, middleware, pipeline } from "@fly/cdn";
const mw = pipeline(
middleware.httpsUpgrader,
middleware.httpCache
)
const app = mw(
proxy("https://getting-started.edgeapp.net")
);
fly.http.respondWith(app); | typescript | Apache-2.0 | 5cb72c65463ce0c5b4aa7edaf7b790e13faa3793 | 2026-01-05T04:59:39.389338Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/contexts.ts | packages/contexts.ts | export const SECURITY_CONTEXT_URL = 'https://w3id.org/security/v2';
export const SECURITY_CONTEXT_V1_URL = 'https://w3id.org/security/v1';
export const SECURITY_CONTEXT_V2_URL = 'https://w3id.org/security/v2';
export const SECURITY_PROOF_URL = 'https://w3id.org/security#proof';
export const SECURITY_SIGNATURE_URL = 'ht... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/types.ts | packages/types.ts | export type Seed = string;
export type Did = string;
export type DidDocument = {
'@context': string | string[];
id: Did;
assertionMethod?: string[];
publicKey?: PublicKeyMeta[];
};
export type NetworkIdentifer = string;
export type Address = string;
export type Payload = Buffer[];
export type Mnid = string;
e... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/mnid/src/index.ts | packages/mnid/src/index.ts | /** @module mnid */
import { Buffer } from 'buffer';
import { sha3_256 } from 'js-sha3';
// @ts-ignore
import * as baseX from 'base-x';
import { Payload, MnidModel, Mnid } from '../../types';
const BASE58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
const base58 = baseX(BASE58);
const hex = baseX('0... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/mnid/test/mnid.test.ts | packages/mnid/test/mnid.test.ts | import { encodeToMnid, decodeFromMnid } from '../src';
const NETWORK = '0x1';
const ADDRESS =
'NZM9BLOBTPNNKTJOFRWEVWIJTL9ESTKFKQZEPVQLFVYYQLEDRFLKQHPBS99TXEXNCTZCOKTNEGHG9QGR9';
const MNID =
'MiqGgUdwdCHjudYe15YsjkTkc45izoB2F7eG7TA5aSG6k8pQyC6L41qrTctEupgRXJGhJNPqc1';
describe('MNID encoding module', () => {
i... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/did/src/did.ts | packages/did/src/did.ts | /** @module did */
// @ts-ignore
import { Did, PublicKeyPem, PublicKeyMeta } from '../../types';
const DID_URL_REGEX = /^did:(?<method>[a-z0-9]+):(?<idstring>[A-Za-z0-9\.\-_]+)(?:#(?<fragment>.*))?$/;
const IDSTRING_REGEX = /^(?<channelRoot>[A-Z9]{81})_?$/;
/**
* Encode TangleID DID.
* @function encodeToDid
* @par... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/did/src/IdenityRegistry.ts | packages/did/src/IdenityRegistry.ts | // @ts-ignore
import * as mamClient from 'mam.tools.js';
import { trytesToAscii } from '@iota/converter';
import { encodeToDid, decodeFromDid, createMetaPublicKeys } from './did';
import { Seed, Did, DidDocument, TangleProvider, PublicKeyPem } from '../../types';
const FIRST_MESSAGE = '{}';
const DEFAULT_PROVIDER: Ta... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/did/src/index.ts | packages/did/src/index.ts | export * from './did';
export * from './IdenityRegistry';
| typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/did/test/utils.ts | packages/did/test/utils.ts | import * as forge from 'node-forge';
import { PublicKeyPem, PrivateKeyPem } from '../../types';
/**
* Generate RSA key pairs.
* @function generateKeyPair
* @param {object} [options] - Generate key pair options.
* @param {number} [bits] - Key length of key pair.
*/
export const generateKeyPair = ({ bits = 1024 } =... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/did/test/registry.test.ts | packages/did/test/registry.test.ts | /* tslint:disable */
const mock = require('mam.tools.js/test/mamMock');
const { log } = require('mam.tools.js/lib/logger');
/* tslint:enable */
// @ts-ignore
import * as mamClient from 'mam.tools.js';
import { IdenityRegistry } from '../src';
import { generateKeyPair } from './utils';
import { DidDocument } from '../.... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/core/src/CoreAPI.ts | packages/core/src/CoreAPI.ts | import { IdenityRegistry } from '@tangleid/did';
import { signRsaSignature, verifyRsaSignature } from '@tangleid/jsonld';
import { DocumentLoader } from './jsonld/documentLoader';
import { TangleProvider, Seed, Did, PublicKeyMeta, PrivateKeyPem, PublicKeyPem } from '../../types';
export type Settings = {
provider?:... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/core/src/index.ts | packages/core/src/index.ts | /** @module core */
export * from './CoreAPI';
export * from './composeAPI';
| typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/core/src/composeAPI.ts | packages/core/src/composeAPI.ts | import { CoreAPI, Settings } from './CoreAPI';
/**
* Composes API object from it's components
*
* @memberof module:core
*
* @function composeAPI
* @param {object} [settings={}] - Connection settings
* @param {object} [params.provider] - Uri of IRI node.
*
* @return {API}
*/
export const composeAPI = (setting... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/core/src/jsonld/documentLoader.ts | packages/core/src/jsonld/documentLoader.ts | import { IdenityRegistry, decodeFromDidUrl, isDidUrl } from '@tangleid/did';
import { findNodeById } from '@tangleid/jsonld';
// @ts-ignore
import * as jsonld from 'jsonld';
// @ts-ignore
const nodeDocumentLoader = jsonld.documentLoaders.node();
type CachedDocuments = {
[index: string]: any;
};
export class Documen... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/core/test/core.test.ts | packages/core/test/core.test.ts | /* tslint:disable */
const mock = require('mam.tools.js/test/mamMock');
const { log } = require('mam.tools.js/lib/logger');
import { composeAPI } from '../src';
import { publicKeyPem, privateKeyPem } from './keypair';
import { generateSeed } from './utilities';
// disable mam.tools.js console logging
log.silent = tru... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/core/test/keypair.ts | packages/core/test/keypair.ts | export const publicKeyPem = `-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAol+0LrzQ4+Z128AsTIsE
k+7+NRttp97tYP5jF1oqMShYfuqmYkde2p2V99Wp4c1/m0SX31t6/XkokXAClC/F
3LDQj4cYkR16wW/ff5hi4J19KxQN35ANeRMcNLphCjZqTm6YmCOVfptjIIM3a7fx
Y+cVacnjNMf9KKmQYaq6dUNv4aOM6m+7kyVZlCf+ZoQWQ3290vXi70Mq9RHQeoKL
2lW1... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/core/test/utilities.ts | packages/core/test/utilities.ts | export const generateSeed = (length = 81) => {
const charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ9';
let buffer = '';
for (let i = 0; i < length; i++) {
buffer += charset.charAt(Math.floor(Math.random() * charset.length));
}
return buffer;
};
| typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/credential/src/credential.ts | packages/credential/src/credential.ts | /** @module credential */
import { CREDENTIAL_CONTEXT_URL } from '../../contexts';
import {
CredentialMetadata,
ContextArray,
CredentialSubject,
ContextTypeAlias,
} from '../../types';
type ComposeCredentialParams = {
subject: CredentialSubject;
metadata?: CredentialMetadata;
context?: ContextArray;
al... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/credential/src/index.ts | packages/credential/src/index.ts | export * from '../../contexts';
export * from './credential';
| typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/credential/test/index.test.ts | packages/credential/test/index.test.ts | import { CREDENTIAL_CONTEXT_URL, SCHEMA_CONTEXT_URL, generateCredential } from '../src';
const credentaiExpected = {
'@context': [
'https://www.w3.org/2018/credentials/v1',
'https://schema.org/',
{
AlumniCredential: 'http://example.edu/AlumniCredential',
},
],
type: ['VerifiableCredential',... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/src/signature.ts | packages/jsonld/src/signature.ts | /** @module jsonld */
import * as forge from 'node-forge';
// @ts-ignore
import * as jsigs from 'jsonld-signatures';
// @ts-ignore
import { RSAKeyPair } from 'crypto-ld';
import { createDocumentLoader, strictExpansionMap } from '../src';
import { RsaKeyPair, PrivateKeyPem, PublicKeyMeta } from '../../types';
const { R... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/src/jsonld.ts | packages/jsonld/src/jsonld.ts | /** @module jsonld */
// @ts-ignore
import * as jsonld from 'jsonld';
/**
* Compact JSON-LD document with context.
* @function compact
* @param {object} document - JSON-LD document to compacted.
* @param {context} context - the context to compact with.
* @param {object} [options = {}] - Options of the compaction.... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/src/expansionMap.ts | packages/jsonld/src/expansionMap.ts | export const strictExpansionMap = (info: any) => {
if (info.unmappedProperty) {
throw new Error(
`The property "${
info.unmappedProperty
}" in the input was not defined in the context.`,
);
}
};
| typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/src/documentLoader.ts | packages/jsonld/src/documentLoader.ts | /** @module jsonld */
// @ts-ignore
import * as jsonld from 'jsonld';
// @ts-ignore
const nodeDocumentLoader = jsonld.documentLoaders.node();
type CachedDocuments = {
[index: string]: any;
};
/**
* Create JSON-LD document loader with cache.
* @function createDocumentLoader
* @param {object} [documents = {}] - JS... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/src/index.ts | packages/jsonld/src/index.ts | export * from './jsonld';
export * from './documentLoader';
export * from './expansionMap';
export * from './signature';
| typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/test/signature.test.ts | packages/jsonld/test/signature.test.ts | import { signRsaSignature, verifyRsaSignature, generateRsaKeyPair } from '../src';
import { createDocumentLoaderByMetadata } from './mock/documentLoader';
describe('signing credential', () => {
let signed: any;
let documentLoader: any;
beforeAll(async () => {
const { publicKeyPem, privateKeyPem } = generate... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/test/loader.test.ts | packages/jsonld/test/loader.test.ts | import { expand, compact, canonize } from '../src';
import { documentLoader } from './mock/documentLoader';
import {
document,
expected_expaneded,
expected_compacted,
expected_canonized,
} from './data';
const createMockedLoader = () => {
return jest.fn((url: string) => {
return documentLoader(url);
}... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/test/data.ts | packages/jsonld/test/data.ts | export const document = {
'@context': [
'https://www.w3.org/2018/credentials/v1',
'https://schema.org/',
{ '@version': 1.1 },
],
type: ['VerifiableCredential'],
id: 'http://example.edu/credentials/3732',
issuer: 'https://example.edu/issuers/14',
issuanceDate: '2010-01-01T19:23:24Z',
expiration... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/test/mock/documentLoader.ts | packages/jsonld/test/mock/documentLoader.ts | import SCHEMA_CONTEXT from './context/schema';
import SECURITY_V1_CONTEXT from './context/security-v1';
import SECURITY_V2_CONTEXT from './context/security-v2';
import CREDENTIAL_CONTEXT from './context/credential';
import {
SCHEMA_CONTEXT_URL,
CREDENTIAL_CONTEXT_URL,
SECURITY_CONTEXT_URL,
SECURITY_CONTEXT_V1_U... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/test/mock/context/security-v2.ts | packages/jsonld/test/mock/context/security-v2.ts | const context = {
'@context': [
{
'@version': 1.1,
},
'https://w3id.org/security/v1',
{
AesKeyWrappingKey2019: 'sec:AesKeyWrappingKey2019',
Ed25519Signature2018: 'sec:Ed25519Signature2018',
Ed25519VerificationKey2018: 'sec:Ed25519VerificationKey2018',
EquihashProof2018: '... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/test/mock/context/credential.ts | packages/jsonld/test/mock/context/credential.ts | const context = {
'@context': [
{
'@version': 1.1,
},
'https://w3id.org/security/v2',
{
cred: 'https://w3.org/2018/credentials#',
xsd: 'http://www.w3.org/2001/XMLSchema#',
id: '@id',
type: '@type',
JsonSchemaValidator2018: 'cred:JsonSchemaValidator2018',
Man... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/test/mock/context/schema.ts | packages/jsonld/test/mock/context/schema.ts | const context = {
'@context': {
type: '@type',
id: '@id',
HTML: {
'@id': 'rdf:HTML',
},
'@vocab': 'http://schema.org/',
xml: 'http://www.w3.org/XML/1998/namespace',
foaf: 'http://xmlns.com/foaf/0.1/',
eli: 'http://data.europa.eu/eli/ontology#',
snomed: 'http://purl.bioontolog... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | true |
TangleID/TangleID | https://github.com/TangleID/TangleID/blob/d747bfa1346c6b6d397f3ae869082a16384db59e/packages/jsonld/test/mock/context/security-v1.ts | packages/jsonld/test/mock/context/security-v1.ts | const context = {
'@context': {
id: '@id',
type: '@type',
dc: 'http://purl.org/dc/terms/',
sec: 'https://w3id.org/security#',
xsd: 'http://www.w3.org/2001/XMLSchema#',
EcdsaKoblitzSignature2016: 'sec:EcdsaKoblitzSignature2016',
Ed25519Signature2018: 'sec:Ed25519Signature2018',
Encryp... | typescript | MIT | d747bfa1346c6b6d397f3ae869082a16384db59e | 2026-01-05T04:59:38.577006Z | false |
andreasbm/masonry-layout | https://github.com/andreasbm/masonry-layout/blob/a8a551324ca1917dc55d6b1ccb018c950187f42a/typings.d.ts | typings.d.ts | typescript | MIT | a8a551324ca1917dc55d6b1ccb018c950187f42a | 2026-01-05T04:59:38.086698Z | false | |
andreasbm/masonry-layout | https://github.com/andreasbm/masonry-layout/blob/a8a551324ca1917dc55d6b1ccb018c950187f42a/rollup-build.config.ts | rollup-build.config.ts | import ts from "rollup-plugin-ts";
import path from "path";
import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import progress from "rollup-plugin-progress";
import { terser } from "rollup-plugin-terser";
const folders = {
src: path.resolve(__dirname, "src/lib"),
dist:... | typescript | MIT | a8a551324ca1917dc55d6b1ccb018c950187f42a | 2026-01-05T04:59:38.086698Z | false |
andreasbm/masonry-layout | https://github.com/andreasbm/masonry-layout/blob/a8a551324ca1917dc55d6b1ccb018c950187f42a/src/lib/masonry-helpers.ts | src/lib/masonry-helpers.ts | export const DEFAULT_MAX_COL_WIDTH = 500;
export const DEFAULT_COLS = "auto";
export const DEFAULT_DEBOUNCE_MS = 300;
export const DEFAULT_GAP_PX = 24;
export const COL_COUNT_CSS_VAR_NAME = `--_masonry-layout-col-count`;
export const GAP_CSS_VAR_NAME = `--_masonry-layout-gap`;
// https://developer.mozilla.org/en-US/d... | typescript | MIT | a8a551324ca1917dc55d6b1ccb018c950187f42a | 2026-01-05T04:59:38.086698Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.