├── analyzer ├── checkIfSane.ts ├── tests │ ├── fixtures │ │ └── requireSyntax │ │ │ ├── exports.js │ │ │ ├── moduleExports.js │ │ │ ├── require.js │ │ │ ├── requireExport.js │ │ │ └── importRequire.ts │ └── sandbox.ts ├── spinner.ts ├── README.md ├── deps.ts ├── getReferences.ts ├── getEntry.ts ├── sanityCheck.ts ├── determineFullModuleName.ts ├── mod.ts ├── analyzer.ts └── diveFile.ts ├── .config ├── .vscode └── settings.json ├── server.ts ├── .github ├── dreg_logo_transparent.png └── workflows │ └── deploys.yml ├── vendor └── clispinners │ ├── deps.ts │ ├── util.ts │ ├── mod.ts │ └── spinners.ts ├── polyfill ├── process.ts ├── path.ts ├── chalk.ts ├── fs.ts └── supports-color.ts ├── utils ├── deps.ts ├── constants.ts ├── replaceExportAssignment.ts ├── replaceImportEqualsDecl.ts ├── fetchPj.ts ├── isRegistryEntry.ts ├── getDependencyMap.ts ├── esmSyntaxNodes.ts ├── resolveDependencyMap.ts ├── generateRegistryEntry.ts └── determineLocalDepExtension.ts ├── runtime ├── runtimeRegistry.ts ├── deps.ts ├── README.md ├── types │ └── registry.ts ├── mod.ts ├── handlePolyfills.ts ├── handleRegistryRequest.ts └── getSource.ts ├── scripts └── generateRegistryTs.ts ├── scripts.yml ├── fly.prod.toml ├── fly.toml ├── README.md ├── registry.json └── registry.ts /analyzer/checkIfSane.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /analyzer/tests/fixtures/requireSyntax/exports.js: -------------------------------------------------------------------------------- 1 | exports.foo = ""; 2 | -------------------------------------------------------------------------------- /analyzer/tests/fixtures/requireSyntax/moduleExports.js: -------------------------------------------------------------------------------- 1 | module.exports = "foo"; 2 | -------------------------------------------------------------------------------- /.config: -------------------------------------------------------------------------------- 1 | permissions="--allow-net --allow-read=./polyfill" 2 | deno_version="v1.3.0" 3 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "deno.enable": true, 3 | "deno.unstable": true 4 | } 5 | -------------------------------------------------------------------------------- /analyzer/tests/fixtures/requireSyntax/require.js: -------------------------------------------------------------------------------- 1 | var x = require("./moduleExports"); 2 | -------------------------------------------------------------------------------- /analyzer/tests/fixtures/requireSyntax/requireExport.js: -------------------------------------------------------------------------------- 1 | var x = require("./exports").foo; 2 | -------------------------------------------------------------------------------- /analyzer/tests/fixtures/requireSyntax/importRequire.ts: -------------------------------------------------------------------------------- 1 | import x = require("./moduleExports"); 2 | -------------------------------------------------------------------------------- /server.ts: -------------------------------------------------------------------------------- 1 | import server from "./runtime/mod.ts"; 2 | 3 | await server.listen({ port: 8080 }); 4 | -------------------------------------------------------------------------------- /.github/dreg_logo_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/denofn/dreg/HEAD/.github/dreg_logo_transparent.png -------------------------------------------------------------------------------- /vendor/clispinners/deps.ts: -------------------------------------------------------------------------------- 1 | export { red, green, bold, yellow, blue } from "https://deno.land/std@0.65.0/fmt/colors.ts"; 2 | -------------------------------------------------------------------------------- /polyfill/process.ts: -------------------------------------------------------------------------------- 1 | export * from "https://deno.land/std@0.66.0/node/process.ts"; 2 | export { default } from "https://deno.land/std@0.66.0/node/process.ts"; 3 | -------------------------------------------------------------------------------- /polyfill/path.ts: -------------------------------------------------------------------------------- 1 | export * from "https://deno.land/std@0.66.0/path/mod.ts"; 2 | import * as path from "https://deno.land/std@0.66.0/path/mod.ts"; 3 | export default path; 4 | -------------------------------------------------------------------------------- /polyfill/chalk.ts: -------------------------------------------------------------------------------- 1 | export * from "https://deno.land/std@0.66.0/fmt/colors.ts"; 2 | import * as colors from "https://deno.land/std@0.66.0/fmt/colors.ts"; 3 | export default colors; 4 | -------------------------------------------------------------------------------- /utils/deps.ts: -------------------------------------------------------------------------------- 1 | export * as path from "https://deno.land/std@0.65.0/path/mod.ts"; 2 | export { PackageJson } from "https://cdn.dreg.dev/package/type-fest@0.16.0/source/package-json.d.ts"; 3 | -------------------------------------------------------------------------------- /runtime/runtimeRegistry.ts: -------------------------------------------------------------------------------- 1 | import _registry from "../registry.ts"; 2 | import { Registry } from "./types/registry.ts"; 3 | 4 | export const keys = Object.keys(_registry); 5 | export const registry = _registry as Registry; 6 | -------------------------------------------------------------------------------- /utils/constants.ts: -------------------------------------------------------------------------------- 1 | export const jspm = `https://jspm.dev/npm:`; 2 | export const jsdelivr = (type: "npm" | "gh") => `https://cdn.jsdelivr.net/${type === "npm" ? "npm" : "gh"}`; 3 | export const unpkg = "https://unpkg.com"; 4 | -------------------------------------------------------------------------------- /analyzer/tests/sandbox.ts: -------------------------------------------------------------------------------- 1 | const testStringExports = ` 2 | import x = require("./moduleExports"); 3 | var x = require("./moduleExports"); 4 | var x = require("./exports").foo; 5 | exports = "foo"; 6 | exports.foo = "foo"; 7 | `; 8 | -------------------------------------------------------------------------------- /analyzer/spinner.ts: -------------------------------------------------------------------------------- 1 | import Spinner from "../vendor/clispinners/mod.ts"; 2 | 3 | const spinner = Spinner.getInstance(); 4 | spinner.setSpinnerType("triangle"); 5 | 6 | export function getSpinner(): Spinner { 7 | return spinner; 8 | } 9 | -------------------------------------------------------------------------------- /runtime/deps.ts: -------------------------------------------------------------------------------- 1 | const hash = await import("https://deno.land/std@0.65.0/hash/mod.ts"); 2 | export { hash }; 3 | 4 | export * as path from "https://deno.land/std@0.65.0/path/mod.ts"; 5 | 6 | export * as oak from "https://deno.land/x/oak@v6.0.2/mod.ts"; 7 | -------------------------------------------------------------------------------- /scripts/generateRegistryTs.ts: -------------------------------------------------------------------------------- 1 | await Deno.writeTextFile( 2 | "registry.ts", 3 | `import type { Registry } from "./runtime/types/registry.ts"; 4 | const registry: Registry = ${await Deno.readTextFile("registry.json")}; 5 | export default registry;\n` 6 | ); 7 | -------------------------------------------------------------------------------- /analyzer/README.md: -------------------------------------------------------------------------------- 1 | ## Next 2 | 3 | - Give choice between github and npm entrypoint (package.json or .{j,t}s file) from jsdelivr 4 | - Dive local dependencies and repeat process 5 | - Map function used from native dependencies and map against polyfillable targets 6 | -------------------------------------------------------------------------------- /utils/replaceExportAssignment.ts: -------------------------------------------------------------------------------- 1 | function makeRegex(raw: string): RegExp { 2 | return new RegExp(`export\( \)*=\( \)*${raw}`, "g"); 3 | } 4 | 5 | export function replaceExportAssignment(target: string, raw: string): string { 6 | return target.replaceAll(makeRegex(raw), `export default ${raw}`); 7 | } 8 | -------------------------------------------------------------------------------- /utils/replaceImportEqualsDecl.ts: -------------------------------------------------------------------------------- 1 | function makeRegex(raw: string): RegExp { 2 | return new RegExp(`\( \)*=\( \)*require\( \)*\\(\( \)*${raw}\( \)*\\)`, "g"); 3 | } 4 | 5 | export function replaceImportEqualsDecl(target: string, raw: string, value: string): string { 6 | return target.replaceAll(makeRegex(raw), ` from ${value}`); 7 | } 8 | -------------------------------------------------------------------------------- /utils/fetchPj.ts: -------------------------------------------------------------------------------- 1 | import { path } from "./deps.ts"; 2 | import type { PackageJson } from "./deps.ts"; 3 | 4 | export async function fetchPj(basePath: string): Promise<[string, PackageJson]> { 5 | const url = new URL(path.join(basePath, "package.json")); 6 | const result = await fetch(url); 7 | return [url.href, await result.json()]; 8 | } 9 | -------------------------------------------------------------------------------- /runtime/README.md: -------------------------------------------------------------------------------- 1 | # Runtime 2 | 3 | Focus on .d.ts files and denopack/rollup related tooling **first** 4 | 5 | - get detailed map of internal/external dependencies from registry 6 | - ad-hoc string replacement of sourcefiles 7 | - disallow unversions 8 | 9 | ## Next 10 | 11 | - custom polyfills (rollup -> walk for example) 12 | - semver ranges 13 | -------------------------------------------------------------------------------- /scripts.yml: -------------------------------------------------------------------------------- 1 | scripts: 2 | analyzer: deno run --unstable --allow-net --allow-run --allow-read=. --allow-write=. analyzer/mod.ts 3 | generate: deno run --allow-read=./registry.json --allow-write=./registry.ts scripts/generateRegistryTs.ts 4 | serve: deno run --allow-net --allow-read=./polyfill server.ts 5 | deployProd: flyctl deploy -c fly.prod.toml 6 | deployDev: flyctl deploy 7 | -------------------------------------------------------------------------------- /analyzer/deps.ts: -------------------------------------------------------------------------------- 1 | export { parse } from "https://jspm.dev/npm:@typescript-eslint/parser@3.7.1"; 2 | 3 | export { red, green, bold, yellow, blue } from "https://deno.land/std@0.65.0/fmt/colors.ts"; 4 | export * as flags from "https://deno.land/std@0.65.0/flags/mod.ts"; 5 | export * as path from "https://deno.land/std@0.65.0/path/mod.ts"; 6 | 7 | export { PackageJson } from "https://cdn.dreg.dev/package/type-fest@0.16.0/source/package-json.d.ts"; 8 | -------------------------------------------------------------------------------- /fly.prod.toml: -------------------------------------------------------------------------------- 1 | app = "dreg" 2 | 3 | [build] 4 | builder = "flyio/builder" 5 | 6 | 7 | [[services]] 8 | internal_port = 8080 9 | protocol = "tcp" 10 | 11 | [services.concurrency] 12 | hard_limit = 25 13 | soft_limit = 20 14 | 15 | [[services.ports]] 16 | handlers = ["http"] 17 | port = "80" 18 | 19 | [[services.ports]] 20 | handlers = ["tls", "http"] 21 | port = "443" 22 | 23 | [[services.tcp_checks]] 24 | interval = 10000 25 | timeout = 2000 26 | -------------------------------------------------------------------------------- /fly.toml: -------------------------------------------------------------------------------- 1 | app = "dreg-dev" 2 | 3 | [build] 4 | builder = "flyio/builder" 5 | 6 | 7 | [[services]] 8 | internal_port = 8080 9 | protocol = "tcp" 10 | 11 | [services.concurrency] 12 | hard_limit = 25 13 | soft_limit = 20 14 | 15 | [[services.ports]] 16 | handlers = ["http"] 17 | port = "80" 18 | 19 | [[services.ports]] 20 | handlers = ["tls", "http"] 21 | port = "443" 22 | 23 | [[services.tcp_checks]] 24 | interval = 10000 25 | timeout = 2000 26 | -------------------------------------------------------------------------------- /utils/isRegistryEntry.ts: -------------------------------------------------------------------------------- 1 | import type { RegistryEntryV1 } from "../runtime/types/registry.ts"; 2 | 3 | const keys = ([ 4 | "name", 5 | "description", 6 | "importStrategy", 7 | "importType", 8 | "entry", 9 | "version", 10 | "rewrites", 11 | "isAtTypes", 12 | "hasDefaultExport", 13 | ] as unknown) as (keyof RegistryEntryV1)[]; 14 | 15 | export function isRegistryEntry(x: Partial): x is RegistryEntryV1 { 16 | for (const k of keys) { 17 | if (typeof x[k] === "undefined") return false; 18 | } 19 | 20 | return true; 21 | } 22 | -------------------------------------------------------------------------------- /runtime/types/registry.ts: -------------------------------------------------------------------------------- 1 | export type Rewrites = Record>; 2 | 3 | export type RegistryEntryV1 = { 4 | name: string; 5 | importStrategy: "jsdelivr" | "jspm"; 6 | importType: "npm" | "gh"; 7 | isAtTypes: boolean; 8 | version: string; 9 | description: string; 10 | entry: string; 11 | typesEntry?: string; 12 | addProcess?: boolean; 13 | ghUser?: string; 14 | rewrites: Rewrites; 15 | additions?: Record; 16 | hasDefaultExport: boolean; 17 | }; 18 | 19 | export type Registry = Record; 20 | -------------------------------------------------------------------------------- /utils/getDependencyMap.ts: -------------------------------------------------------------------------------- 1 | import type { PackageJson } from "./deps.ts"; 2 | 3 | export function getDependencyMap(pj: PackageJson): Record { 4 | const depMap: Record = {}; 5 | const deps = pj.dependencies ?? {}; 6 | const devDeps = pj.devDependencies ?? {}; 7 | 8 | for (const dep in deps) { 9 | const v = deps[dep]; 10 | depMap[dep] = v; 11 | } 12 | 13 | for (const dep in devDeps) { 14 | if (!depMap[dep]) { 15 | const v = devDeps[dep]; 16 | depMap[dep] = v; 17 | } 18 | } 19 | 20 | return depMap; 21 | } 22 | -------------------------------------------------------------------------------- /vendor/clispinners/util.ts: -------------------------------------------------------------------------------- 1 | export const clearCurrentLine = async (textEncoder: TextEncoder, cols: number) => { 2 | await Deno.stdout.write(textEncoder.encode(`\x1b[${cols}D \x1b[K`)); 3 | }; 4 | 5 | export const printOnCurrentLine = async (textEncoder: TextEncoder, cols: number, message: string) => { 6 | await Deno.stdout.write(textEncoder.encode(`\x1b[${cols}D \x1b[K ${message}`)); 7 | }; 8 | 9 | export const printNewLine = async (textEncoder: TextEncoder, cols: number) => { 10 | await Deno.stdout.write(textEncoder.encode(`\x1b[${cols}D`)); 11 | await Deno.stdout.write(textEncoder.encode(`\x1b[1B`)); 12 | }; 13 | -------------------------------------------------------------------------------- /utils/esmSyntaxNodes.ts: -------------------------------------------------------------------------------- 1 | export const exportTypes = ["ExportAllDeclaration", "ExportNamedDeclaration"]; 2 | export const importTypes = ["ImportDeclaration"]; 3 | export const importEqualsTypes = ["TSImportEqualsDeclaration"]; 4 | export const exportAssignment = ["TSExportAssignment"]; 5 | export function esmSyntaxType(type: string): "export" | "import" | "importEquals" | "exportAssignment" | false { 6 | if (exportTypes.includes(type)) return "export"; 7 | if (importTypes.includes(type)) return "import"; 8 | if (importEqualsTypes.includes(type)) return "importEquals"; 9 | if (exportAssignment.includes(type)) return "exportAssignment"; 10 | return false; 11 | } 12 | -------------------------------------------------------------------------------- /runtime/mod.ts: -------------------------------------------------------------------------------- 1 | import { oak } from "./deps.ts"; 2 | import handlePolyfills from "./handlePolyfills.ts"; 3 | import handleRegistryRequest from "./handleRegistryRequest.ts"; 4 | 5 | const app = new oak.Application(); 6 | const router = new oak.Router(); 7 | 8 | router.get("/polyfill/node/:package", handlePolyfills); 9 | router.get("/package/@:org/:package", handleRegistryRequest); 10 | router.get("/package/@:org/:package/(.*)", handleRegistryRequest); 11 | router.get("/package/:package", handleRegistryRequest); 12 | router.get("/package/:package/(.*)", handleRegistryRequest); 13 | 14 | app.use(router.routes()); 15 | app.use(router.allowedMethods()); 16 | 17 | export default app; 18 | -------------------------------------------------------------------------------- /.github/workflows/deploys.yml: -------------------------------------------------------------------------------- 1 | name: Deploys 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - dev 8 | 9 | jobs: 10 | deploy: 11 | name: Deploy 12 | runs-on: ubuntu-latest 13 | 14 | env: 15 | FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | 20 | - name: Deploy dev 21 | if: github.ref == 'refs/heads/dev' 22 | uses: superfly/flyctl-actions@1.1 23 | with: 24 | args: "deploy" 25 | 26 | - name: Deploy prod 27 | if: github.ref == 'refs/heads/main' 28 | uses: superfly/flyctl-actions@1.1 29 | with: 30 | args: "deploy -c fly.prod.toml" 31 | -------------------------------------------------------------------------------- /analyzer/getReferences.ts: -------------------------------------------------------------------------------- 1 | export function getReferences(comments: Record[]): Record[] { 2 | const refPaths = comments 3 | .filter(({ type, value }) => type === "Line" && value.startsWith("/ ")) 4 | .map(({ value, ...comment }) => { 5 | const raw = value.replace("/ ", "").trim(); 6 | const v = raw.replaceAll(raw[0], ""); 7 | return { 8 | ...comment, 9 | value, 10 | source: { 11 | value: v, 12 | raw, 13 | }, 14 | type: "ImportDeclaration", 15 | importKind: "value", 16 | }; 17 | }); 18 | 19 | return refPaths; 20 | } 21 | -------------------------------------------------------------------------------- /utils/resolveDependencyMap.ts: -------------------------------------------------------------------------------- 1 | import { path } from "./deps.ts"; 2 | import { jsdelivr } from "./constants.ts"; 3 | import { fetchPj } from "./fetchPj.ts"; 4 | 5 | const VERSION_REGEXP = /^\d+.\d+.\d+$/; 6 | 7 | export async function resolveDependencyMap( 8 | raw: Record, 9 | ): Promise> { 10 | const jsdelivrSrc = jsdelivr("npm"); 11 | const final: Record = {}; 12 | 13 | for (const name in raw) { 14 | const version = raw[name]; 15 | if (VERSION_REGEXP.test(version)) { 16 | final[name] = version; 17 | } 18 | const [_, pj] = await fetchPj( 19 | path.join(jsdelivrSrc, `${name}${version ? `@${version}` : ""}`), 20 | ); 21 | if (!pj.version) { 22 | throw new Error( 23 | `${name} @ ${version} is missing version in resolved package.json`, 24 | ); 25 | } 26 | final[name] = pj.version; 27 | } 28 | 29 | return final; 30 | } 31 | -------------------------------------------------------------------------------- /analyzer/getEntry.ts: -------------------------------------------------------------------------------- 1 | import type { PackageJson } from "./deps.ts"; 2 | import { RegistryEntryGenerator } from "../utils/generateRegistryEntry.ts"; 3 | 4 | /** 5 | * 1. type only repos 6 | * 2. repos with entry and potential types 7 | */ 8 | export function getEntry(pj: PackageJson, _e: RegistryEntryGenerator): { entry: string; typesEntry?: string } { 9 | if (!!_e.isAtTypes) return { entry: pj.types! }; 10 | if (!pj.main && !pj.module && typeof pj.types === "string") return { entry: pj.types }; 11 | 12 | let result: { entry: string; typesEntry?: string }; 13 | if (typeof pj.module === "string") result = { entry: pj.module }; 14 | else if (!pj.main) throw new Error("Could not find entry file, quitting"); 15 | else result = { entry: pj.main }; 16 | 17 | if (typeof pj.types === "string") result.typesEntry = pj.types!; 18 | if (typeof pj.typings === "string") 19 | result.typesEntry = pj.typings!.endsWith(".d.ts") ? pj.typings : `${pj.typings}.d.ts`; 20 | 21 | return result; 22 | } 23 | -------------------------------------------------------------------------------- /analyzer/sanityCheck.ts: -------------------------------------------------------------------------------- 1 | import { path } from "./deps.ts"; 2 | import { RegistryEntryV1 } from "../runtime/types/registry.ts"; 3 | import { jsdelivr } from "../utils/constants.ts"; 4 | 5 | const dtsImport = (name: string) => `import {} from "${name}";`; 6 | const starImport = (name: string) => `import * as sanityCheck from "${name}";\nconsole.log(sanityCheck);`; 7 | const defaultImport = (name: string) => `import sanityCheck from "${name}";\nconsole.log(sanityCheck);`; 8 | 9 | export async function sanityCheck(R: RegistryEntryV1) { 10 | const thisDir = path.parse(new URL(import.meta.url).pathname).dir; 11 | const cisPath = path.join(thisDir, "checkIfSane.ts"); 12 | const name = new URL(path.join(jsdelivr("npm"), path.join(`${R.name}@${R.version}`, R.entry))).href; 13 | const file = name.endsWith(".d.ts") ? dtsImport(name) : starImport(name); 14 | 15 | await Deno.writeTextFile(cisPath, file); 16 | 17 | const p = Deno.run({ 18 | cmd: ["deno", "run", cisPath], 19 | }); 20 | 21 | await p.status(); 22 | p.close(); 23 | 24 | await Deno.writeTextFile(cisPath, ""); 25 | } 26 | -------------------------------------------------------------------------------- /analyzer/determineFullModuleName.ts: -------------------------------------------------------------------------------- 1 | import { keys } from "../runtime/runtimeRegistry.ts"; 2 | 3 | const jspmBase = "/npm:@jspm/core@2/nodelibs/"; 4 | const withJspmBase = (pack: string) => `${jspmBase}${pack}`; 5 | const internals = ["path", "process", "chalk", "supports-color", "fs"]; 6 | 7 | export function determineFullModuleName(depMap: Record, sourceValue: string) { 8 | if (internals.includes(sourceValue)) return `/polyfill/node/${sourceValue}.ts`; 9 | else if (internals.map(withJspmBase).includes(sourceValue)) { 10 | return `/polyfill/node/${sourceValue.substr(jspmBase.length)}.ts`; 11 | } 12 | 13 | let fullName; 14 | 15 | if (!!depMap[sourceValue]) fullName = sourceValue; 16 | else if (!!depMap[`@types/${sourceValue}`]) fullName = `@types/${sourceValue}`; 17 | else throw new Error(`Cannot resolve ${sourceValue}`); 18 | 19 | const depName = `${fullName}@${depMap[fullName!]}`; 20 | 21 | if (!keys.includes(depName)) 22 | throw new Error(`${depName} is not available in the registry yet, try adding that dependency first`); 23 | 24 | return `/package/${depName}`; 25 | } 26 | -------------------------------------------------------------------------------- /runtime/handlePolyfills.ts: -------------------------------------------------------------------------------- 1 | import { hash } from "./deps.ts"; 2 | 3 | const encoder = new TextEncoder(); 4 | 5 | type Params = { 6 | package: string; 7 | org?: string; 8 | 0?: string; 9 | }; 10 | 11 | const availablePolyfills = ["path.ts", "process.ts", "supports-color.ts", "chalk.ts", "fs.ts"]; 12 | 13 | export default async (context: any) => { 14 | const params: Params = context.params; 15 | const pckge = params.package; 16 | if (!availablePolyfills.includes(pckge)) context.throw(404); 17 | 18 | const source = await Deno.readTextFile(`./polyfill/${pckge}`); 19 | 20 | context.response.body = source; 21 | context.response.headers.set("content-type", "application/typescript; charset=utf-8"); 22 | context.response.headers.set("vary", "Accept-Encoding"); 23 | context.response.headers.set("cross-origin-resource-policy", "cross-origin"); 24 | context.response.headers.set("access-control-allow-origin", "*"); 25 | context.response.headers.set("access-control-expose-headers", "*"); 26 | context.response.headers.set( 27 | "etag", 28 | `W/"${encoder.encode(context.response.body).byteLength}-${hash 29 | .createHash("sha1") 30 | .update(context.response.body) 31 | .toString() 32 | .substring(0, 27)}"` 33 | ); 34 | }; 35 | -------------------------------------------------------------------------------- /utils/generateRegistryEntry.ts: -------------------------------------------------------------------------------- 1 | import type { RegistryEntryV1, Rewrites } from "../runtime/types/registry.ts"; 2 | import { isRegistryEntry } from "./isRegistryEntry.ts"; 3 | 4 | export class RegistryEntryGenerator { 5 | private _e: Partial; 6 | constructor(e: Partial) { 7 | this._e = e; 8 | } 9 | 10 | public update = (e: Partial): void => { 11 | this._e = { 12 | ...this._e, 13 | ...e, 14 | }; 15 | }; 16 | 17 | set updateTypeRewrites(rewrites: Rewrites) { 18 | this._e.rewrites = { 19 | ...(this._e.rewrites ?? {}), 20 | ...rewrites, 21 | }; 22 | } 23 | 24 | get entry(): RegistryEntryV1 | undefined { 25 | return isRegistryEntry(this._e) ? (this._e as RegistryEntryV1) : undefined; 26 | } 27 | 28 | get isAtTypes(): boolean | undefined { 29 | return this._e.isAtTypes; 30 | } 31 | 32 | get version(): string | undefined { 33 | return this._e.version ?? undefined; 34 | } 35 | 36 | get name(): string | undefined { 37 | return this._e.name; 38 | } 39 | 40 | get entryFile(): string | undefined { 41 | return this._e.entry; 42 | } 43 | 44 | get typesEntry(): string | undefined { 45 | return this._e.typesEntry; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /analyzer/mod.ts: -------------------------------------------------------------------------------- 1 | import { RegistryEntryV1 } from "../runtime/types/registry.ts"; 2 | import { analyze } from "./analyzer.ts"; 3 | import { flags, blue, green } from "./deps.ts"; 4 | import { sanityCheck } from "./sanityCheck.ts"; 5 | import { getSpinner } from "./spinner.ts"; 6 | 7 | const { d, v, doSanityCheck, persist, jspm, g } = flags.parse(Deno.args); 8 | if (!d) throw new Error("Please provide dependency name"); 9 | 10 | await getSpinner().start(blue(`Analyzing ${d}${v ? `@${v}` : ""}`)); 11 | const R: RegistryEntryV1 = await analyze(d, v, !!jspm, g); 12 | 13 | if (doSanityCheck) { 14 | await getSpinner().setText(`Performing sanity check`); 15 | await sanityCheck(R); 16 | } 17 | 18 | await getSpinner().succeed(green(`Analyzed ${R.name}@${R.version}, prepared the following registry entry:`)); 19 | 20 | const newDep = { 21 | [`${R.name}@${R.version}`]: R, 22 | }; 23 | 24 | console.log(""); 25 | console.log(JSON.stringify(newDep, null, 2)); 26 | 27 | if (persist) { 28 | const X = JSON.parse(await Deno.readTextFile("registry.json")); 29 | await Deno.writeTextFile( 30 | "registry.json", 31 | JSON.stringify( 32 | { 33 | ...X, 34 | ...newDep, 35 | }, 36 | null, 37 | 2 38 | ) 39 | ); 40 | 41 | Deno.exit(0); 42 | } else { 43 | Deno.exit(0); 44 | } 45 | -------------------------------------------------------------------------------- /polyfill/fs.ts: -------------------------------------------------------------------------------- 1 | export * from "https://deno.land/std@0.66.0/node/fs.ts"; 2 | import * as fs from "https://deno.land/std@0.66.0/node/fs.ts"; 3 | 4 | type NodeStats = Omit & { 5 | isDirectory(): boolean; 6 | isFile(): boolean; 7 | isSymbolicLink(): boolean; 8 | }; 9 | 10 | function createNodeStats(_stats: Deno.FileInfo): NodeStats { 11 | const { isDirectory, isFile, isSymlink, ...s } = _stats; 12 | const stats = { 13 | ...s, 14 | isDirectory: () => isDirectory, 15 | isFile: () => isFile, 16 | isSymbolicLink: () => isSymlink, 17 | }; 18 | 19 | return stats; 20 | } 21 | 22 | export function statSync(path: string) { 23 | return createNodeStats(Deno.statSync(path)); 24 | } 25 | 26 | export async function stat(path: string, callback: (err?: Error, stats?: NodeStats) => any) { 27 | try { 28 | callback(undefined, createNodeStats(await Deno.stat(path))); 29 | } catch (e) { 30 | callback(e); 31 | } 32 | } 33 | 34 | export function realPathSync(path: string) { 35 | return Deno.realPathSync(path); 36 | } 37 | 38 | export async function realPath(path: string, callback: (err?: Error, stats?: string) => any) { 39 | try { 40 | callback(undefined, await Deno.realPath(path)); 41 | } catch (e) { 42 | callback(e); 43 | } 44 | } 45 | 46 | export default { 47 | ...fs, 48 | statSync: statSync, 49 | stat: stat, 50 | realPathSync: realPathSync, 51 | realPath: realPath, 52 | }; 53 | -------------------------------------------------------------------------------- /utils/determineLocalDepExtension.ts: -------------------------------------------------------------------------------- 1 | import { path } from "./deps.ts"; 2 | 3 | const jsExtensions = [".js", ".es6", ".mjs"]; 4 | const jsxExtensions = [".jsx", ".tsx"]; 5 | 6 | async function doesFileExist(url: string) { 7 | const { status } = await fetch(url); 8 | return status === 200; 9 | } 10 | 11 | /** 12 | * 1. Try importers extension first 13 | * 1.1. Importer is a .d.ts file 14 | * 1.2. Importer is any other type of js/ts file 15 | * 2. Try in this order: .ts, .d.ts, jsExtensions, jsxExtensions 16 | */ 17 | export async function determineLocalDepExtension(base: string, importPath: string): Promise { 18 | const parsedBaseUrl = new URL(base); 19 | const resolvedBaseUrl = parsedBaseUrl; 20 | const parsedBasePath = path.parse(parsedBaseUrl.pathname); 21 | resolvedBaseUrl.pathname = path.join(parsedBasePath.dir, importPath); 22 | 23 | if (!!path.parse(importPath).ext) return importPath; 24 | if (await doesFileExist(resolvedBaseUrl.href)) return importPath; 25 | 26 | if ( 27 | parsedBasePath.ext === ".ts" && 28 | (parsedBasePath.base as string).endsWith(".d.ts") && 29 | (await doesFileExist(`${resolvedBaseUrl}.d.ts`)) 30 | ) 31 | return `${importPath}.d.ts`; 32 | if (jsExtensions.includes(parsedBasePath.ext) && (await doesFileExist(`${resolvedBaseUrl}${parsedBasePath.ext}`))) 33 | return `${importPath}${parsedBasePath.ext}`; 34 | 35 | if (await doesFileExist(`${resolvedBaseUrl}.js`)) return `${importPath}.js`; 36 | 37 | throw new Error("Could not resolve extension, quitting"); 38 | } 39 | // if ((parsedBasePath.base as string).endsWith(".d.ts")) { 40 | 41 | // } 42 | // } esle if (jsxExtensions.includes(parsedBasePath.ext)) { 43 | // } else if (jsExtensions.includes(parsedBasePath.ext)) { 44 | // } 45 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | dreg logo 3 |

4 |

https://cdn.dreg.dev/package/PACKAGENAME@VERSION

5 |

A safe registry for importing NPM packages in Deno as ES Modules.

6 | 7 | --- 8 | 9 | This project spawned as a necessary tool for [denopack](https://github.com/denofn/denopack) to use predefined Rollup plugins. The goal is to be as generic as possible and to only use a target like jspm/skypack with transpile cjs bundles when it's absolutely necessary. Primary target for proxying is jsdelivr, with automatic rewrites happening in the runtime. 10 | 11 | This registry follows the same principles as deno.land/x and nest.land - only versioned packages are allowed. You can check available packages in [registry.json](./registry.json). 12 | 13 | ## Analyzer 14 | 15 | The analyzer currently creates the registry entries for `registry.json`. The best way to use it currently would be to clone the project and - assuming you're using Velociraptor - run `vr analyzer -d `. 16 | 17 | Available flags: 18 | 19 | - `-d `: package name 20 | - `-v `: predefined version to check. Not using this flag means analyzer will check the latest available version. 21 | - `--doSanityCheck`: spot potential compiler errors 22 | - `--persist`: writes to `registry.json`. Run `vr generate` afterwards to persist in `registry.ts` as well 23 | 24 | ## Runtime 25 | 26 | The backbone for the CDN. Code is loaded and rewritten ad-hoc thanks to the registry. 27 | 28 | ## Loading in types 29 | 30 | Failures on loading dependencies from dreg can sometimes be resolved with running `--no-check` the first time a package is loaded. This is a known issue that has been logged on Deno's Github page: https://github.com/denoland/deno/issues/7145 31 | 32 | ## Acknowledgements 33 | 34 | - The brick emoji is courtesy of [Twemoji](https://twemoji.twitter.com/) 35 | -------------------------------------------------------------------------------- /runtime/handleRegistryRequest.ts: -------------------------------------------------------------------------------- 1 | import { hash, path } from "./deps.ts"; 2 | import { getSource } from "./getSource.ts"; 3 | import { keys, registry } from "./runtimeRegistry.ts"; 4 | 5 | const encoder = new TextEncoder(); 6 | 7 | type Params = { 8 | package: string; 9 | org?: string; 10 | 0?: string; 11 | }; 12 | 13 | export default async (context: any) => { 14 | const params: Params = context.params; 15 | const pckge = `${!!params.org ? `@${params.org}/` : ""}${params.package}`; 16 | const noSource = !params["0"] ?? true; 17 | const registryEntry = registry[pckge as keyof typeof registry]; 18 | if (!keys.includes(pckge)) context.throw(404); 19 | 20 | const [source, fileURL] = await getSource(context.request.url.pathname, registryEntry, pckge, params["0"]); 21 | const parsedFileUrl = path.parse(fileURL); 22 | context.response.body = source; 23 | context.response.headers.set( 24 | "content-type", 25 | `application/${parsedFileUrl.ext.startsWith(".ts") ? "typescript" : "javascript"}; charset=utf-8` 26 | ); 27 | 28 | if (noSource && registryEntry.entry.endsWith(".d.ts")) { 29 | context.response.headers.set("x-typescript-types", path.join(context.request.url.pathname, registryEntry.entry)); 30 | } else if (noSource && registryEntry.typesEntry!) { 31 | context.response.headers.set( 32 | "x-typescript-types", 33 | registryEntry.importStrategy === "jspm" 34 | ? registryEntry.typesEntry 35 | : path.join(context.request.url.pathname, registryEntry.typesEntry!) 36 | // path.join(context.request.url.pathname, registryEntry.typesEntry!) 37 | ); 38 | } 39 | 40 | context.response.headers.set("vary", "Accept-Encoding"); 41 | context.response.headers.set("cross-origin-resource-policy", "cross-origin"); 42 | context.response.headers.set("access-control-allow-origin", "*"); 43 | context.response.headers.set("access-control-expose-headers", "*"); 44 | context.response.headers.set( 45 | "etag", 46 | `W/"${encoder.encode(context.response.body).byteLength}-${hash 47 | .createHash("sha1") 48 | .update(context.response.body) 49 | .toString() 50 | .substring(0, 27)}"` 51 | ); 52 | }; 53 | -------------------------------------------------------------------------------- /analyzer/analyzer.ts: -------------------------------------------------------------------------------- 1 | import { path, blue } from "./deps.ts"; 2 | import { jsdelivr, jspm } from "../utils/constants.ts"; 3 | import { fetchPj } from "../utils/fetchPj.ts"; 4 | import { RegistryEntryV1 } from "../runtime/types/registry.ts"; 5 | import { RegistryEntryGenerator } from "../utils/generateRegistryEntry.ts"; 6 | import { getDependencyMap } from "../utils/getDependencyMap.ts"; 7 | import { diveFile } from "./diveFile.ts"; 8 | import { getEntry } from "./getEntry.ts"; 9 | import { getSpinner } from "./spinner.ts"; 10 | import { resolveDependencyMap } from "../utils/resolveDependencyMap.ts"; 11 | 12 | export async function analyze(d: string, v?: string, isJspm?: boolean, ghUser?: string): Promise { 13 | const jsdelivrSrc = !!ghUser ? `${jsdelivr("gh")}/${ghUser}` : jsdelivr("npm"); 14 | const R = new RegistryEntryGenerator({ 15 | name: d, 16 | importStrategy: "jsdelivr", 17 | importType: !!ghUser ? "gh" : "npm", 18 | ghUser: ghUser ?? undefined, 19 | isAtTypes: (d as string).startsWith("@types/"), 20 | }); 21 | 22 | const fetchUrl = !v ? path.join(jsdelivrSrc, d) : path.join(jsdelivrSrc, `${d}@${v}`); 23 | const [pjUrl, pj] = await fetchPj(fetchUrl); 24 | 25 | if (v) R.update({ version: v, description: pj.description ?? "" }); 26 | else { 27 | await getSpinner().setText(blue(`Analyzing ${d}@${pj.version!}`)); 28 | R.update({ version: pj.version!, description: pj.description ?? "" }); 29 | } 30 | 31 | const rawDepMap = getDependencyMap(pj); 32 | const depMap = await resolveDependencyMap(rawDepMap); 33 | 34 | const { entry, typesEntry } = getEntry(pj, R); 35 | R.update({ entry, typesEntry }); 36 | 37 | const packName = `${R.name!}@${R.version!}`; 38 | const entryFileUrl = new URL(path.join(jsdelivrSrc, path.join(packName, R.entryFile!))).href; 39 | R.update(await handleDive(entryFileUrl, depMap, packName, isJspm)); 40 | 41 | if (!!R.typesEntry) { 42 | const typesEntryFileUrl = new URL(path.join(jsdelivrSrc, path.join(packName, R.typesEntry))).href; 43 | const [typeDeps] = await diveFile(typesEntryFileUrl, depMap); 44 | R.updateTypeRewrites = typeDeps; 45 | } 46 | 47 | if (!R.entry) throw new Error("Info incomplete, quitting"); 48 | return R.entry; 49 | } 50 | 51 | async function handleDive( 52 | entryFileUrl: string, 53 | depMap: Record, 54 | packName: string, 55 | isJspm?: boolean 56 | ): Promise> { 57 | try { 58 | if (isJspm) throw new Error("CJS syntax detected, quitting"); 59 | 60 | const [rewrites, hasDefaultExport] = await diveFile(entryFileUrl, depMap); 61 | return { rewrites, hasDefaultExport }; 62 | } catch (e) { 63 | if (e?.message !== "CJS syntax detected, quitting") throw new Error(e.message); 64 | const jspmEntryFile = new URL(`${jspm}${packName}!cjs`).href; 65 | const [rewrites, hasDefaultExport] = await diveFile(jspmEntryFile, {}); 66 | return { 67 | entry: jspmEntryFile, 68 | importStrategy: "jspm", 69 | rewrites, 70 | hasDefaultExport, 71 | }; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /vendor/clispinners/mod.ts: -------------------------------------------------------------------------------- 1 | import { red, green, bold, yellow, blue } from "./deps.ts"; 2 | import { SPINNERS, SpinnerType } from "./spinners.ts"; 3 | import { clearCurrentLine, printOnCurrentLine, printNewLine } from "./util.ts"; 4 | 5 | export class Spinner { 6 | private static instance: Spinner; 7 | private currentText: string; 8 | private currentTimer: number | null; 9 | private spinner: any; 10 | private cols: number; 11 | private textEncoder: TextEncoder; 12 | private spinnerType: SpinnerType; 13 | 14 | private constructor() { 15 | this.spinnerType = "dots2"; 16 | this.spinner = SPINNERS[this.spinnerType]; 17 | this.cols = 0; 18 | this.textEncoder = new TextEncoder(); 19 | this.currentTimer = null; 20 | this.currentText = ""; 21 | } 22 | 23 | public static getInstance() { 24 | if (Spinner.instance === undefined) { 25 | return new Spinner(); 26 | } else { 27 | return Spinner.instance; 28 | } 29 | } 30 | 31 | public setSpinnerType(type: SpinnerType) { 32 | if (SPINNERS[type]) { 33 | this.spinner = SPINNERS[type]; 34 | } else { 35 | throw new Error(`unknown spinner type ${type}`); 36 | } 37 | } 38 | 39 | public async start(text: string) { 40 | if (this.isRunning()) { 41 | throw new Error("Can't start a new spinner while a spinner is already running!"); 42 | } 43 | 44 | this.currentText = text; 45 | let currentFrame = 0; 46 | let totalFrames = this.spinner.frames.length; 47 | 48 | this.currentTimer = setInterval(async () => { 49 | let message = `${blue(this.spinner.frames[currentFrame])} ${this.currentText}`; 50 | let lastMessage; 51 | 52 | if (lastMessage !== message) { 53 | await clearCurrentLine(this.textEncoder, this.cols); 54 | } 55 | 56 | await this.print(message); 57 | 58 | lastMessage = message; 59 | currentFrame = (currentFrame + 1) % totalFrames; 60 | }, this.spinner.interval); 61 | } 62 | 63 | public async setText(text: string) { 64 | this.currentText = text; 65 | } 66 | 67 | public async stop() { 68 | this.stopSpinner(); 69 | await clearCurrentLine(this.textEncoder, this.cols); 70 | await this.printNewLine(); 71 | } 72 | 73 | private async stopSpinner(text?: string) { 74 | if (this.currentTimer) { 75 | clearInterval(this.currentTimer); 76 | } 77 | 78 | if (text) { 79 | await this.print(text); 80 | } 81 | 82 | this.currentTimer = null; 83 | } 84 | 85 | private async print(text: string) { 86 | if (text.length > this.cols) { 87 | this.cols = text.length; 88 | } 89 | 90 | await printOnCurrentLine(this.textEncoder, this.cols, text); 91 | } 92 | 93 | private async printNewLine() { 94 | await printNewLine(this.textEncoder, this.cols); 95 | } 96 | 97 | public isRunning() { 98 | if (this.currentTimer !== null) { 99 | return true; 100 | } else { 101 | return false; 102 | } 103 | } 104 | 105 | private async stopSpinnerWithStatus(status: string, text?: string) { 106 | if (text) { 107 | this.setText(text); 108 | } 109 | 110 | let message = `${status} ${this.currentText}`; 111 | 112 | await this.stopSpinner(message); 113 | 114 | await this.print(message); 115 | await this.printNewLine(); 116 | } 117 | 118 | public async succeed(text?: string) { 119 | await this.stopSpinnerWithStatus(bold(green("√")), text); 120 | } 121 | 122 | public async fail(text?: string) { 123 | await this.stopSpinnerWithStatus(bold(red("×")), text); 124 | } 125 | 126 | public async warn(text?: string) { 127 | await this.stopSpinnerWithStatus(bold(yellow("!!")), text); 128 | } 129 | 130 | public async info(text?: string) { 131 | await this.stopSpinnerWithStatus(bold(yellow("i")), text); 132 | } 133 | } 134 | 135 | export default Spinner; 136 | -------------------------------------------------------------------------------- /runtime/getSource.ts: -------------------------------------------------------------------------------- 1 | import { jsdelivr, jspm } from "../utils/constants.ts"; 2 | import { replaceExportAssignment } from "../utils/replaceExportAssignment.ts"; 3 | import { replaceImportEqualsDecl } from "../utils/replaceImportEqualsDecl.ts"; 4 | import { path } from "./deps.ts"; 5 | import { RegistryEntryV1 } from "./types/registry.ts"; 6 | 7 | const importEquals = "dregImportEquals:"; 8 | const exportAssignment = "dregExportAssignment:"; 9 | 10 | export async function getSource( 11 | reqUrl: string, 12 | registryEntry: RegistryEntryV1, 13 | packageName: string, 14 | filePath?: string 15 | ): Promise<[string, string]> { 16 | if (reqUrl === registryEntry.typesEntry) return getJsdelivrSource(reqUrl, registryEntry, packageName, filePath); 17 | switch (registryEntry.importStrategy) { 18 | case "jsdelivr": 19 | return getJsdelivrSource(reqUrl, registryEntry, packageName, filePath); 20 | case "jspm": 21 | return getJspmSource(registryEntry, packageName, filePath); 22 | } 23 | } 24 | 25 | export async function getJspmSource( 26 | registryEntry: RegistryEntryV1, 27 | packageName: string, 28 | filePath?: string 29 | ): Promise<[string, string]> { 30 | let fileURL = ""; 31 | 32 | if (typeof filePath === "undefined") { 33 | fileURL = registryEntry.entry; 34 | } else { 35 | fileURL = new URL(path.join(`${jspm}${packageName}`, filePath)).href; 36 | } 37 | 38 | const localRewrites = registryEntry.rewrites[fileURL]; 39 | if (!localRewrites) return ["", ""]; 40 | 41 | const result = await fetch(fileURL); 42 | let resultText = await result.text(); 43 | 44 | const rewriteKeys = Object.keys(localRewrites).sort().reverse(); 45 | 46 | for (const k of rewriteKeys) { 47 | if (k.startsWith(importEquals)) { 48 | resultText = replaceImportEqualsDecl(resultText, k.substr(importEquals.length), localRewrites[k]); 49 | } else if (k.startsWith(exportAssignment)) { 50 | resultText = replaceExportAssignment(resultText, k.substr(exportAssignment.length)); 51 | } else resultText = resultText.replaceAll(k, localRewrites[k]); 52 | } 53 | 54 | return [resultText, fileURL]; 55 | } 56 | 57 | export async function getJsdelivrSource( 58 | reqUrl: string, 59 | registryEntry: RegistryEntryV1, 60 | packageName: string, 61 | filePath?: string 62 | ): Promise<[string, string]> { 63 | if (typeof filePath === "undefined") { 64 | return [ 65 | `${!!registryEntry.addProcess ? `import "/polyfill/node/process.ts";\n` : ""}export * from "${path.join( 66 | reqUrl, 67 | registryEntry.entry 68 | )}";\n${ 69 | registryEntry.hasDefaultExport ? `export { default } from "${path.join(reqUrl, registryEntry.entry)}";` : "" 70 | }`, 71 | registryEntry.entry, 72 | ]; 73 | } 74 | 75 | const fileURL = new URL( 76 | path.join( 77 | jsdelivr(registryEntry.importType), 78 | registryEntry.importType === "gh" ? `${registryEntry.ghUser!}/${packageName}` : packageName, 79 | filePath 80 | ) 81 | ).href; 82 | const localRewrites = registryEntry.rewrites[fileURL]; 83 | const localAdditions = registryEntry.additions?.[fileURL] ?? []; 84 | if (!localRewrites) return ["", ""]; 85 | 86 | const result = await fetch(fileURL); 87 | let resultText = await result.text(); 88 | 89 | const rewriteKeys = Object.keys(localRewrites).sort().reverse(); 90 | 91 | for (const k of rewriteKeys) { 92 | if (k.startsWith(importEquals)) { 93 | resultText = replaceImportEqualsDecl(resultText, k.substr(importEquals.length), localRewrites[k]); 94 | } else if (k.startsWith(exportAssignment)) { 95 | resultText = replaceExportAssignment(resultText, k.substr(exportAssignment.length)); 96 | } else resultText = resultText.replaceAll(k, localRewrites[k]); 97 | } 98 | 99 | for (const a of localAdditions) { 100 | resultText += `\n${a}\n`; 101 | } 102 | 103 | return [resultText, fileURL]; 104 | } 105 | -------------------------------------------------------------------------------- /polyfill/supports-color.ts: -------------------------------------------------------------------------------- 1 | import { parse } from "https://deno.land/std@0.66.0/flags/mod.ts"; 2 | 3 | const { args, env } = Deno; 4 | const parsedArgs = parse(args); 5 | 6 | // Forcefully set a color preference 7 | 8 | /** 9 | * forceColor 10 | * Forcefully set a color preference 11 | * Values: null (no preference), 1, 2, 3 12 | * In case 0, it will simply return false 13 | * In case 1 & above, it will check further 14 | */ 15 | let forceColor: number | null = null; 16 | 17 | if ( 18 | parsedArgs._.includes("no-color") || 19 | parsedArgs._.includes("no-colors") || 20 | (parsedArgs.color !== undefined && 21 | (parsedArgs.color === false || parsedArgs.color === "false" || parsedArgs.color === "never")) 22 | ) { 23 | forceColor = 0; 24 | } else if ( 25 | parsedArgs._.includes("color") || 26 | parsedArgs._.includes("colors") || 27 | (parsedArgs.color !== undefined && 28 | (parsedArgs.color === true || parsedArgs.color === "true" || parsedArgs.color === "always")) 29 | ) { 30 | forceColor = 1; 31 | } 32 | 33 | if (Deno.env.get("FORCE_COLOR") !== undefined) { 34 | if (Deno.env.get("FORCE_COLOR") === "true") { 35 | forceColor = 1; 36 | } else if (Deno.env.get("FORCE_COLOR") === "false") { 37 | forceColor = 0; 38 | } else { 39 | forceColor = 40 | Deno.env.get("FORCE_COLOR")!.length === 0 ? 1 : Math.min(parseInt(Deno.env.get("FORCE_COLOR")!, 10), 3); 41 | } 42 | } 43 | 44 | function translateLevel( 45 | level: number 46 | ): 47 | | false 48 | | { 49 | level: number; 50 | hasBasic: boolean; 51 | has256: boolean; 52 | has16m: boolean; 53 | } { 54 | if (level === 0) { 55 | return false; 56 | } 57 | 58 | return { 59 | level, 60 | hasBasic: level >= 1, 61 | has256: level >= 2, 62 | has16m: level >= 3, 63 | }; 64 | } 65 | 66 | function checkSupportsColor(haveStream: Deno.Writer & Deno.Closer & { rid: number }, streamIsTTY: boolean): number { 67 | // Deno.noColor to be respected above all 68 | // See https://no-color.org/ 69 | if (Deno.noColor) return 0; 70 | 71 | if (forceColor === 0) { 72 | return 0; 73 | } 74 | 75 | if ( 76 | parsedArgs.color !== undefined && 77 | (parsedArgs.color == "16m" || parsedArgs.color == "full" || parsedArgs.color == "truecolor") 78 | ) { 79 | return 3; 80 | } 81 | 82 | if (parsedArgs.color !== undefined && parsedArgs.color == "256") { 83 | return 2; 84 | } 85 | 86 | if (haveStream && !streamIsTTY && forceColor === null) { 87 | return 0; 88 | } 89 | 90 | const min = forceColor || 0; 91 | 92 | if (env.get("TERM") === "dumb") { 93 | return min; 94 | } 95 | 96 | if (Deno.build.os === "windows") { 97 | // Windows 10 build 10586 is the first Windows release that supports 256 colors. 98 | // Windows 10 build 14931 is the first release that supports 16m/TrueColor. 99 | 100 | // Unimplemented as of v1.0.1 101 | // [Issue #3802](https://github.com/denoland/deno/issues/3802) 102 | return 2; // Assumption 103 | 104 | // const osRelease = os.release().split('.'); 105 | // if ( 106 | // Number(osRelease[0]) >= 10 && 107 | // Number(osRelease[2]) >= 10586 108 | // ) { 109 | // return Number(osRelease[2]) >= 14931 ? 3 : 2; 110 | // } 111 | // return 1; 112 | } 113 | 114 | if (env.get("CI") !== undefined) { 115 | if ( 116 | ["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS"].some((sign) => sign in env.toObject()) || 117 | env.get("CI_NAME") === "codeship" 118 | ) { 119 | return 1; 120 | } 121 | 122 | return min; 123 | } 124 | 125 | if (env.get("TEAMCITY_VERSION") !== undefined) { 126 | return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.get("TEAMCITY_VERSION")!) ? 1 : 0; 127 | } 128 | 129 | if (env.get("COLORTERM") === "truecolor") { 130 | return 3; 131 | } 132 | 133 | if (env.get("TERM_PROGRAM") !== undefined) { 134 | const version = parseInt((env.get("TERM_PROGRAM_VERSION") || "").split(".")[0], 10); 135 | 136 | switch (env.get("TERM_PROGRAM")) { 137 | case "iTerm.app": 138 | return version >= 3 ? 3 : 2; 139 | case "Apple_Terminal": 140 | return 2; 141 | // No default 142 | } 143 | } 144 | 145 | if (env.get("TERM") !== undefined) { 146 | if (/-256(color)?$/i.test(env.get("TERM")!)) { 147 | return 2; 148 | } 149 | 150 | if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.get("TERM")!)) { 151 | return 1; 152 | } 153 | } 154 | 155 | if (env.get("COLORTERM") !== undefined) { 156 | return 1; 157 | } 158 | 159 | return min; 160 | } 161 | 162 | function getSupportLevel( 163 | stream: Deno.Writer & Deno.Closer & { rid: number } 164 | ): 165 | | false 166 | | { 167 | level: number; 168 | hasBasic: boolean; 169 | has256: boolean; 170 | has16m: boolean; 171 | } { 172 | const level = checkSupportsColor(stream, stream && Deno.isatty(stream.rid)); 173 | return translateLevel(level); 174 | } 175 | 176 | export const supportsColor = { 177 | supportsColor: getSupportLevel, 178 | stdout: translateLevel(checkSupportsColor(Deno.stdout, Deno.isatty(Deno.stdout.rid))), 179 | stderr: translateLevel(checkSupportsColor(Deno.stderr, Deno.isatty(Deno.stderr.rid))), 180 | }; 181 | 182 | export default supportsColor; 183 | -------------------------------------------------------------------------------- /analyzer/diveFile.ts: -------------------------------------------------------------------------------- 1 | import { parse, path, blue } from "./deps.ts"; 2 | import { Rewrites } from "../runtime/types/registry.ts"; 3 | import { determineLocalDepExtension } from "../utils/determineLocalDepExtension.ts"; 4 | import { determineFullModuleName } from "./determineFullModuleName.ts"; 5 | import { esmSyntaxType } from "../utils/esmSyntaxNodes.ts"; 6 | import { getSpinner } from "./spinner.ts"; 7 | import { getReferences } from "./getReferences.ts"; 8 | 9 | function encodeDepValue(q: string, dep: string): string { 10 | return `${q}${dep}${q}`; 11 | } 12 | 13 | export async function diveFile( 14 | filePath: string, 15 | depMap: Record, 16 | parentRewrites?: Rewrites 17 | ): Promise<[Rewrites, boolean]> { 18 | let hasDefaultExport = false; 19 | 20 | await getSpinner().setText(blue(`Checking: ${filePath}`)); 21 | 22 | let rewrites: Rewrites = { 23 | [filePath]: {}, 24 | }; 25 | 26 | const fetchFileResult = await fetch(filePath); 27 | const file = await fetchFileResult.text(); 28 | 29 | const { body: parsedFileBody, comments: parsedFileComments } = parse(file, { 30 | sourceType: "module", 31 | range: true, 32 | comment: true, 33 | }); 34 | 35 | for (const node of [...getReferences(parsedFileComments), ...parsedFileBody]) { 36 | if (!esmSyntaxType(node.type)) checkForCjsSyntax(node); 37 | 38 | // import require 39 | if (esmSyntaxType(node.type) === "importEquals") { 40 | const { value: sourceValue, raw } = node.moduleReference.expression; 41 | const resolvedNode = await resolveDive({ 42 | rewrites, 43 | depMap, 44 | q: raw[0], 45 | source: `dregImportEquals:${raw}`, 46 | filePath, 47 | sourceValue, 48 | parentRewrites, 49 | }); 50 | 51 | rewrites = { 52 | ...rewrites, 53 | ...resolvedNode, 54 | }; 55 | 56 | continue; 57 | } 58 | 59 | // export default 60 | if (node.type === "ExportDefaultDeclaration") hasDefaultExport = true; 61 | 62 | // export assignment 63 | if (esmSyntaxType(node.type) === "exportAssignment") { 64 | rewrites[filePath][`dregExportAssignment:${node.expression.name}`] = ""; 65 | hasDefaultExport = true; 66 | continue; 67 | } 68 | 69 | // esm 70 | if (node?.exportKind !== "value" && node?.importKind !== "value") continue; 71 | if (node?.specifiers?.[0]?.exported?.type === "Identifier" && node?.specifiers?.[0]?.exported?.name === "default") 72 | hasDefaultExport = true; 73 | 74 | const source: string | undefined = node.source?.raw; 75 | const sourceValue: string | undefined = node.source?.value; 76 | 77 | if (!sourceValue) continue; 78 | 79 | const q = source![0]; 80 | 81 | const resolvedEsmNode = await handleEsmSyntaxDeps({ 82 | rewrites, 83 | depMap, 84 | sourceValue, 85 | filePath, 86 | source: source!, 87 | q, 88 | parentRewrites, 89 | }); 90 | 91 | rewrites = { 92 | ...rewrites, 93 | ...resolvedEsmNode, 94 | }; 95 | } 96 | 97 | return [rewrites, hasDefaultExport]; 98 | } 99 | 100 | async function handleEsmSyntaxDeps({ 101 | rewrites, 102 | parentRewrites, 103 | depMap, 104 | sourceValue, 105 | filePath, 106 | source, 107 | q, 108 | }: { 109 | rewrites: Rewrites; 110 | parentRewrites?: Rewrites; 111 | depMap: Record; 112 | sourceValue: string; 113 | filePath: string; 114 | source: string; 115 | q: string; 116 | }): Promise { 117 | if (!sourceValue[0].startsWith(".")) { 118 | const resolvedSource = determineFullModuleName(depMap, sourceValue); 119 | rewrites[filePath][source!] = encodeDepValue(q, resolvedSource); 120 | return rewrites; 121 | } 122 | 123 | return resolveDive({ rewrites, depMap, sourceValue, filePath, source, q, parentRewrites }); 124 | } 125 | 126 | async function resolveDive({ 127 | rewrites, 128 | parentRewrites, 129 | depMap, 130 | sourceValue, 131 | filePath, 132 | source, 133 | q, 134 | }: { 135 | rewrites: Rewrites; 136 | parentRewrites?: Rewrites; 137 | depMap: Record; 138 | sourceValue: string; 139 | filePath: string; 140 | source: string; 141 | q: string; 142 | }) { 143 | const _resolvedSource = await determineLocalDepExtension(filePath, sourceValue!); 144 | const resolvedSource = _resolvedSource.startsWith("./npm:") 145 | ? _resolvedSource.replace("./npm:", "/package/") 146 | : _resolvedSource; 147 | rewrites[filePath][source!] = encodeDepValue(q, resolvedSource); 148 | 149 | const resolvedUrl = new URL(filePath); 150 | resolvedUrl.pathname = path.join(path.parse(resolvedUrl.pathname).dir, _resolvedSource); 151 | 152 | if (!rewrites[resolvedUrl.href] && !parentRewrites?.[resolvedUrl.href]) { 153 | const [resolvedDive] = await diveFile(resolvedUrl.href, depMap, { ...(parentRewrites ?? {}), ...rewrites }); 154 | 155 | rewrites = { 156 | ...rewrites, 157 | ...resolvedDive, 158 | }; 159 | } 160 | 161 | return rewrites; 162 | } 163 | 164 | function checkForCjsSyntax(node: Record): void { 165 | const cjsErr = "CJS syntax detected, quitting"; 166 | 167 | if (node.type !== "ExpressionStatement" || node.expression.type !== "AssignmentExpression") return; 168 | 169 | const { left, right } = node.expression; 170 | 171 | if (left.type === "MemberExpression" && left.object.type === "Identifier" && left.object.name === "module") 172 | throw new Error(cjsErr); 173 | if (right.type === "CallExpression" && right.callee.type === "Identifier" && left.callee.name === "require") 174 | throw new Error(cjsErr); 175 | } 176 | -------------------------------------------------------------------------------- /vendor/clispinners/spinners.ts: -------------------------------------------------------------------------------- 1 | export const SPINNERS = { 2 | dots: { 3 | interval: 80, 4 | frames: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"], 5 | }, 6 | dots2: { 7 | interval: 80, 8 | frames: ["⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"], 9 | }, 10 | dots3: { 11 | interval: 80, 12 | frames: ["⠋", "⠙", "⠚", "⠞", "⠖", "⠦", "⠴", "⠲", "⠳", "⠓"], 13 | }, 14 | dots4: { 15 | interval: 80, 16 | frames: ["⠄", "⠆", "⠇", "⠋", "⠙", "⠸", "⠰", "⠠", "⠰", "⠸", "⠙", "⠋", "⠇", "⠆"], 17 | }, 18 | dots5: { 19 | interval: 80, 20 | frames: ["⠋", "⠙", "⠚", "⠒", "⠂", "⠂", "⠒", "⠲", "⠴", "⠦", "⠖", "⠒", "⠐", "⠐", "⠒", "⠓", "⠋"], 21 | }, 22 | dots6: { 23 | interval: 80, 24 | frames: [ 25 | "⠁", 26 | "⠉", 27 | "⠙", 28 | "⠚", 29 | "⠒", 30 | "⠂", 31 | "⠂", 32 | "⠒", 33 | "⠲", 34 | "⠴", 35 | "⠤", 36 | "⠄", 37 | "⠄", 38 | "⠤", 39 | "⠴", 40 | "⠲", 41 | "⠒", 42 | "⠂", 43 | "⠂", 44 | "⠒", 45 | "⠚", 46 | "⠙", 47 | "⠉", 48 | "⠁", 49 | ], 50 | }, 51 | dots7: { 52 | interval: 80, 53 | frames: [ 54 | "⠈", 55 | "⠉", 56 | "⠋", 57 | "⠓", 58 | "⠒", 59 | "⠐", 60 | "⠐", 61 | "⠒", 62 | "⠖", 63 | "⠦", 64 | "⠤", 65 | "⠠", 66 | "⠠", 67 | "⠤", 68 | "⠦", 69 | "⠖", 70 | "⠒", 71 | "⠐", 72 | "⠐", 73 | "⠒", 74 | "⠓", 75 | "⠋", 76 | "⠉", 77 | "⠈", 78 | ], 79 | }, 80 | dots8: { 81 | interval: 80, 82 | frames: [ 83 | "⠁", 84 | "⠁", 85 | "⠉", 86 | "⠙", 87 | "⠚", 88 | "⠒", 89 | "⠂", 90 | "⠂", 91 | "⠒", 92 | "⠲", 93 | "⠴", 94 | "⠤", 95 | "⠄", 96 | "⠄", 97 | "⠤", 98 | "⠠", 99 | "⠠", 100 | "⠤", 101 | "⠦", 102 | "⠖", 103 | "⠒", 104 | "⠐", 105 | "⠐", 106 | "⠒", 107 | "⠓", 108 | "⠋", 109 | "⠉", 110 | "⠈", 111 | "⠈", 112 | ], 113 | }, 114 | dots9: { 115 | interval: 80, 116 | frames: ["⢹", "⢺", "⢼", "⣸", "⣇", "⡧", "⡗", "⡏"], 117 | }, 118 | dots10: { 119 | interval: 80, 120 | frames: ["⢄", "⢂", "⢁", "⡁", "⡈", "⡐", "⡠"], 121 | }, 122 | dots11: { 123 | interval: 100, 124 | frames: ["⠁", "⠂", "⠄", "⡀", "⢀", "⠠", "⠐", "⠈"], 125 | }, 126 | dots12: { 127 | interval: 80, 128 | frames: [ 129 | "⢀⠀", 130 | "⡀⠀", 131 | "⠄⠀", 132 | "⢂⠀", 133 | "⡂⠀", 134 | "⠅⠀", 135 | "⢃⠀", 136 | "⡃⠀", 137 | "⠍⠀", 138 | "⢋⠀", 139 | "⡋⠀", 140 | "⠍⠁", 141 | "⢋⠁", 142 | "⡋⠁", 143 | "⠍⠉", 144 | "⠋⠉", 145 | "⠋⠉", 146 | "⠉⠙", 147 | "⠉⠙", 148 | "⠉⠩", 149 | "⠈⢙", 150 | "⠈⡙", 151 | "⢈⠩", 152 | "⡀⢙", 153 | "⠄⡙", 154 | "⢂⠩", 155 | "⡂⢘", 156 | "⠅⡘", 157 | "⢃⠨", 158 | "⡃⢐", 159 | "⠍⡐", 160 | "⢋⠠", 161 | "⡋⢀", 162 | "⠍⡁", 163 | "⢋⠁", 164 | "⡋⠁", 165 | "⠍⠉", 166 | "⠋⠉", 167 | "⠋⠉", 168 | "⠉⠙", 169 | "⠉⠙", 170 | "⠉⠩", 171 | "⠈⢙", 172 | "⠈⡙", 173 | "⠈⠩", 174 | "⠀⢙", 175 | "⠀⡙", 176 | "⠀⠩", 177 | "⠀⢘", 178 | "⠀⡘", 179 | "⠀⠨", 180 | "⠀⢐", 181 | "⠀⡐", 182 | "⠀⠠", 183 | "⠀⢀", 184 | "⠀⡀", 185 | ], 186 | }, 187 | line: { 188 | interval: 130, 189 | frames: ["-", "\\", "|", "/"], 190 | }, 191 | line2: { 192 | interval: 100, 193 | frames: ["⠂", "-", "–", "—", "–", "-"], 194 | }, 195 | pipe: { 196 | interval: 100, 197 | frames: ["┤", "┘", "┴", "└", "├", "┌", "┬", "┐"], 198 | }, 199 | simpleDots: { 200 | interval: 400, 201 | frames: [". ", ".. ", "...", " "], 202 | }, 203 | simpleDotsScrolling: { 204 | interval: 200, 205 | frames: [". ", ".. ", "...", " ..", " .", " "], 206 | }, 207 | star: { 208 | interval: 70, 209 | frames: ["✶", "✸", "✹", "✺", "✹", "✷"], 210 | }, 211 | star2: { 212 | interval: 80, 213 | frames: ["+", "x", "*"], 214 | }, 215 | flip: { 216 | interval: 70, 217 | frames: ["_", "_", "_", "-", "`", "`", "'", "´", "-", "_", "_", "_"], 218 | }, 219 | hamburger: { 220 | interval: 100, 221 | frames: ["☱", "☲", "☴"], 222 | }, 223 | growVertical: { 224 | interval: 120, 225 | frames: ["▁", "▃", "▄", "▅", "▆", "▇", "▆", "▅", "▄", "▃"], 226 | }, 227 | growHorizontal: { 228 | interval: 120, 229 | frames: ["▏", "▎", "▍", "▌", "▋", "▊", "▉", "▊", "▋", "▌", "▍", "▎"], 230 | }, 231 | balloon: { 232 | interval: 140, 233 | frames: [" ", ".", "o", "O", "@", "*", " "], 234 | }, 235 | balloon2: { 236 | interval: 120, 237 | frames: [".", "o", "O", "°", "O", "o", "."], 238 | }, 239 | noise: { 240 | interval: 100, 241 | frames: ["▓", "▒", "░"], 242 | }, 243 | bounce: { 244 | interval: 120, 245 | frames: ["⠁", "⠂", "⠄", "⠂"], 246 | }, 247 | boxBounce: { 248 | interval: 120, 249 | frames: ["▖", "▘", "▝", "▗"], 250 | }, 251 | boxBounce2: { 252 | interval: 100, 253 | frames: ["▌", "▀", "▐", "▄"], 254 | }, 255 | triangle: { 256 | interval: 50, 257 | frames: ["◢", "◣", "◤", "◥"], 258 | }, 259 | arc: { 260 | interval: 100, 261 | frames: ["◜", "◠", "◝", "◞", "◡", "◟"], 262 | }, 263 | circle: { 264 | interval: 120, 265 | frames: ["◡", "⊙", "◠"], 266 | }, 267 | squareCorners: { 268 | interval: 180, 269 | frames: ["◰", "◳", "◲", "◱"], 270 | }, 271 | circleQuarters: { 272 | interval: 120, 273 | frames: ["◴", "◷", "◶", "◵"], 274 | }, 275 | circleHalves: { 276 | interval: 50, 277 | frames: ["◐", "◓", "◑", "◒"], 278 | }, 279 | squish: { 280 | interval: 100, 281 | frames: ["╫", "╪"], 282 | }, 283 | toggle: { 284 | interval: 250, 285 | frames: ["⊶", "⊷"], 286 | }, 287 | toggle2: { 288 | interval: 80, 289 | frames: ["▫", "▪"], 290 | }, 291 | toggle3: { 292 | interval: 120, 293 | frames: ["□", "■"], 294 | }, 295 | toggle4: { 296 | interval: 100, 297 | frames: ["■", "□", "▪", "▫"], 298 | }, 299 | toggle5: { 300 | interval: 100, 301 | frames: ["▮", "▯"], 302 | }, 303 | toggle6: { 304 | interval: 300, 305 | frames: ["ဝ", "၀"], 306 | }, 307 | toggle7: { 308 | interval: 80, 309 | frames: ["⦾", "⦿"], 310 | }, 311 | toggle8: { 312 | interval: 100, 313 | frames: ["◍", "◌"], 314 | }, 315 | toggle9: { 316 | interval: 100, 317 | frames: ["◉", "◎"], 318 | }, 319 | toggle10: { 320 | interval: 100, 321 | frames: ["㊂", "㊀", "㊁"], 322 | }, 323 | toggle11: { 324 | interval: 50, 325 | frames: ["⧇", "⧆"], 326 | }, 327 | toggle12: { 328 | interval: 120, 329 | frames: ["☗", "☖"], 330 | }, 331 | toggle13: { 332 | interval: 80, 333 | frames: ["=", "*", "-"], 334 | }, 335 | arrow: { 336 | interval: 100, 337 | frames: ["←", "↖", "↑", "↗", "→", "↘", "↓", "↙"], 338 | }, 339 | arrow2: { 340 | interval: 80, 341 | frames: ["⬆️ ", "↗️ ", "➡️ ", "↘️ ", "⬇️ ", "↙️ ", "⬅️ ", "↖️ "], 342 | }, 343 | arrow3: { 344 | interval: 120, 345 | frames: ["▹▹▹▹▹", "▸▹▹▹▹", "▹▸▹▹▹", "▹▹▸▹▹", "▹▹▹▸▹", "▹▹▹▹▸"], 346 | }, 347 | bouncingBar: { 348 | interval: 80, 349 | frames: [ 350 | "[ ]", 351 | "[= ]", 352 | "[== ]", 353 | "[=== ]", 354 | "[ ===]", 355 | "[ ==]", 356 | "[ =]", 357 | "[ ]", 358 | "[ =]", 359 | "[ ==]", 360 | "[ ===]", 361 | "[====]", 362 | "[=== ]", 363 | "[== ]", 364 | "[= ]", 365 | ], 366 | }, 367 | bouncingBall: { 368 | interval: 80, 369 | frames: [ 370 | "( ● )", 371 | "( ● )", 372 | "( ● )", 373 | "( ● )", 374 | "( ●)", 375 | "( ● )", 376 | "( ● )", 377 | "( ● )", 378 | "( ● )", 379 | "(● )", 380 | ], 381 | }, 382 | smiley: { 383 | interval: 200, 384 | frames: ["😄 ", "😝 "], 385 | }, 386 | monkey: { 387 | interval: 300, 388 | frames: ["🙈 ", "🙈 ", "🙉 ", "🙊 "], 389 | }, 390 | hearts: { 391 | interval: 100, 392 | frames: ["💛 ", "💙 ", "💜 ", "💚 ", "❤️ "], 393 | }, 394 | clock: { 395 | interval: 100, 396 | frames: ["🕛 ", "🕐 ", "🕑 ", "🕒 ", "🕓 ", "🕔 ", "🕕 ", "🕖 ", "🕗 ", "🕘 ", "🕙 ", "🕚 "], 397 | }, 398 | earth: { 399 | interval: 180, 400 | frames: ["🌍 ", "🌎 ", "🌏 "], 401 | }, 402 | moon: { 403 | interval: 80, 404 | frames: ["🌑 ", "🌒 ", "🌓 ", "🌔 ", "🌕 ", "🌖 ", "🌗 ", "🌘 "], 405 | }, 406 | runner: { 407 | interval: 140, 408 | frames: ["🚶 ", "🏃 "], 409 | }, 410 | pong: { 411 | interval: 80, 412 | frames: [ 413 | "▐⠂ ▌", 414 | "▐⠈ ▌", 415 | "▐ ⠂ ▌", 416 | "▐ ⠠ ▌", 417 | "▐ ⡀ ▌", 418 | "▐ ⠠ ▌", 419 | "▐ ⠂ ▌", 420 | "▐ ⠈ ▌", 421 | "▐ ⠂ ▌", 422 | "▐ ⠠ ▌", 423 | "▐ ⡀ ▌", 424 | "▐ ⠠ ▌", 425 | "▐ ⠂ ▌", 426 | "▐ ⠈ ▌", 427 | "▐ ⠂▌", 428 | "▐ ⠠▌", 429 | "▐ ⡀▌", 430 | "▐ ⠠ ▌", 431 | "▐ ⠂ ▌", 432 | "▐ ⠈ ▌", 433 | "▐ ⠂ ▌", 434 | "▐ ⠠ ▌", 435 | "▐ ⡀ ▌", 436 | "▐ ⠠ ▌", 437 | "▐ ⠂ ▌", 438 | "▐ ⠈ ▌", 439 | "▐ ⠂ ▌", 440 | "▐ ⠠ ▌", 441 | "▐ ⡀ ▌", 442 | "▐⠠ ▌", 443 | ], 444 | }, 445 | shark: { 446 | interval: 120, 447 | frames: [ 448 | "▐|\\____________▌", 449 | "▐_|\\___________▌", 450 | "▐__|\\__________▌", 451 | "▐___|\\_________▌", 452 | "▐____|\\________▌", 453 | "▐_____|\\_______▌", 454 | "▐______|\\______▌", 455 | "▐_______|\\_____▌", 456 | "▐________|\\____▌", 457 | "▐_________|\\___▌", 458 | "▐__________|\\__▌", 459 | "▐___________|\\_▌", 460 | "▐____________|\\▌", 461 | "▐____________/|▌", 462 | "▐___________/|_▌", 463 | "▐__________/|__▌", 464 | "▐_________/|___▌", 465 | "▐________/|____▌", 466 | "▐_______/|_____▌", 467 | "▐______/|______▌", 468 | "▐_____/|_______▌", 469 | "▐____/|________▌", 470 | "▐___/|_________▌", 471 | "▐__/|__________▌", 472 | "▐_/|___________▌", 473 | "▐/|____________▌", 474 | ], 475 | }, 476 | dqpb: { 477 | interval: 100, 478 | frames: ["d", "q", "p", "b"], 479 | }, 480 | weather: { 481 | interval: 100, 482 | frames: [ 483 | "☀️ ", 484 | "☀️ ", 485 | "☀️ ", 486 | "🌤 ", 487 | "⛅️ ", 488 | "🌥 ", 489 | "☁️ ", 490 | "🌧 ", 491 | "🌨 ", 492 | "🌧 ", 493 | "🌨 ", 494 | "🌧 ", 495 | "🌨 ", 496 | "⛈ ", 497 | "🌨 ", 498 | "🌧 ", 499 | "🌨 ", 500 | "☁️ ", 501 | "🌥 ", 502 | "⛅️ ", 503 | "🌤 ", 504 | "☀️ ", 505 | "☀️ ", 506 | ], 507 | }, 508 | christmas: { 509 | interval: 400, 510 | frames: ["🌲", "🎄"], 511 | }, 512 | grenade: { 513 | interval: 80, 514 | frames: ["، ", "′ ", " ´ ", " ‾ ", " ⸌", " ⸊", " |", " ⁎", " ⁕", " ෴ ", " ⁓", " ", " ", " "], 515 | }, 516 | point: { 517 | interval: 125, 518 | frames: ["∙∙∙", "●∙∙", "∙●∙", "∙∙●", "∙∙∙"], 519 | }, 520 | layer: { 521 | interval: 150, 522 | frames: ["-", "=", "≡"], 523 | }, 524 | }; 525 | 526 | export type SpinnerType = keyof typeof SPINNERS; 527 | -------------------------------------------------------------------------------- /registry.json: -------------------------------------------------------------------------------- 1 | { 2 | "estree-walker@2.0.1": { 3 | "name": "estree-walker", 4 | "hasDefaultExport": false, 5 | "importStrategy": "jsdelivr", 6 | "importType": "npm", 7 | "isAtTypes": false, 8 | "version": "2.0.1", 9 | "description": "Traverse an ESTree-compliant AST", 10 | "entry": "src/estree-walker.js", 11 | "typesEntry": "types/index.d.ts", 12 | "rewrites": { 13 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/src/estree-walker.js": {}, 14 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/types/index.d.ts": { 15 | "\"estree\"": "\"/package/@types/estree@0.0.42\"", 16 | "\"./sync\"": "\"./sync.d.ts\"", 17 | "\"./async\"": "\"./async.d.ts\"" 18 | }, 19 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/types/sync.d.ts": { 20 | "\"./walker\"": "\"./walker.d.ts\"", 21 | "\"estree\"": "\"/package/@types/estree@0.0.42\"" 22 | }, 23 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/types/walker.d.ts": { 24 | "\"estree\"": "\"/package/@types/estree@0.0.42\"" 25 | }, 26 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/types/async.d.ts": { 27 | "\"./walker\"": "\"./walker.d.ts\"", 28 | "\"estree\"": "\"/package/@types/estree@0.0.42\"" 29 | } 30 | } 31 | }, 32 | "@types/estree@0.0.42": { 33 | "name": "@types/estree", 34 | "hasDefaultExport": false, 35 | "importStrategy": "jsdelivr", 36 | "importType": "npm", 37 | "isAtTypes": true, 38 | "version": "0.0.42", 39 | "description": "TypeScript definitions for ESTree AST specification", 40 | "entry": "index.d.ts", 41 | "rewrites": { 42 | "https://cdn.jsdelivr.net/npm/@types/estree@0.0.42/index.d.ts": {} 43 | } 44 | }, 45 | "@types/estree@0.0.45": { 46 | "name": "@types/estree", 47 | "hasDefaultExport": false, 48 | "importStrategy": "jsdelivr", 49 | "importType": "npm", 50 | "isAtTypes": true, 51 | "version": "0.0.45", 52 | "description": "TypeScript definitions for ESTree AST specification", 53 | "entry": "index.d.ts", 54 | "rewrites": { 55 | "https://cdn.jsdelivr.net/npm/@types/estree@0.0.45/index.d.ts": {} 56 | } 57 | }, 58 | "type-fest@0.16.0": { 59 | "name": "type-fest", 60 | "hasDefaultExport": false, 61 | "importStrategy": "jsdelivr", 62 | "importType": "npm", 63 | "isAtTypes": false, 64 | "version": "0.16.0", 65 | "description": "A collection of essential TypeScript types", 66 | "entry": "index.d.ts", 67 | "rewrites": { 68 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/index.d.ts": { 69 | "'./source/basic'": "'./source/basic.d.ts'", 70 | "'./source/except'": "'./source/except.d.ts'", 71 | "'./source/mutable'": "'./source/mutable.d.ts'", 72 | "'./source/merge'": "'./source/merge.d.ts'", 73 | "'./source/merge-exclusive'": "'./source/merge-exclusive.d.ts'", 74 | "'./source/require-at-least-one'": "'./source/require-at-least-one.d.ts'", 75 | "'./source/require-exactly-one'": "'./source/require-exactly-one.d.ts'", 76 | "'./source/partial-deep'": "'./source/partial-deep.d.ts'", 77 | "'./source/readonly-deep'": "'./source/readonly-deep.d.ts'", 78 | "'./source/literal-union'": "'./source/literal-union.d.ts'", 79 | "'./source/promisable'": "'./source/promisable.d.ts'", 80 | "'./source/opaque'": "'./source/opaque.d.ts'", 81 | "'./source/set-optional'": "'./source/set-optional.d.ts'", 82 | "'./source/set-required'": "'./source/set-required.d.ts'", 83 | "'./source/value-of'": "'./source/value-of.d.ts'", 84 | "'./source/promise-value'": "'./source/promise-value.d.ts'", 85 | "'./source/async-return-type'": "'./source/async-return-type.d.ts'", 86 | "'./source/conditional-except'": "'./source/conditional-except.d.ts'", 87 | "'./source/conditional-keys'": "'./source/conditional-keys.d.ts'", 88 | "'./source/conditional-pick'": "'./source/conditional-pick.d.ts'", 89 | "'./source/union-to-intersection'": "'./source/union-to-intersection.d.ts'", 90 | "'./source/stringified'": "'./source/stringified.d.ts'", 91 | "'./source/fixed-length-array'": "'./source/fixed-length-array.d.ts'", 92 | "'./source/package-json'": "'./source/package-json.d.ts'", 93 | "'./source/tsconfig-json'": "'./source/tsconfig-json.d.ts'" 94 | }, 95 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/basic.d.ts": {}, 96 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/except.d.ts": {}, 97 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/mutable.d.ts": {}, 98 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/merge.d.ts": { 99 | "'./except'": "'./except.d.ts'" 100 | }, 101 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/merge-exclusive.d.ts": {}, 102 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/require-at-least-one.d.ts": { 103 | "'./except'": "'./except.d.ts'" 104 | }, 105 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/require-exactly-one.d.ts": {}, 106 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/partial-deep.d.ts": { 107 | "'./basic'": "'./basic.d.ts'" 108 | }, 109 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/readonly-deep.d.ts": { 110 | "'./basic'": "'./basic.d.ts'" 111 | }, 112 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/literal-union.d.ts": { 113 | "'./basic'": "'./basic.d.ts'" 114 | }, 115 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/promisable.d.ts": {}, 116 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/opaque.d.ts": {}, 117 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/set-optional.d.ts": { 118 | "'./except'": "'./except.d.ts'" 119 | }, 120 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/set-required.d.ts": { 121 | "'./except'": "'./except.d.ts'" 122 | }, 123 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/value-of.d.ts": {}, 124 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/promise-value.d.ts": {}, 125 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/async-return-type.d.ts": { 126 | "'./promise-value'": "'./promise-value.d.ts'" 127 | }, 128 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/conditional-except.d.ts": { 129 | "'./except'": "'./except.d.ts'", 130 | "'./conditional-keys'": "'./conditional-keys.d.ts'" 131 | }, 132 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/conditional-keys.d.ts": {}, 133 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/conditional-pick.d.ts": { 134 | "'./conditional-keys'": "'./conditional-keys.d.ts'" 135 | }, 136 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/union-to-intersection.d.ts": {}, 137 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/stringified.d.ts": {}, 138 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/fixed-length-array.d.ts": {}, 139 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/package-json.d.ts": { 140 | "'./literal-union'": "'./literal-union.d.ts'" 141 | }, 142 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/tsconfig-json.d.ts": {} 143 | } 144 | }, 145 | "picomatch@2.2.2": { 146 | "name": "picomatch", 147 | "importStrategy": "jspm", 148 | "importType": "npm", 149 | "isAtTypes": false, 150 | "version": "2.2.2", 151 | "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", 152 | "entry": "https://jspm.dev/npm:picomatch@2.2.2!cjs", 153 | "rewrites": { 154 | "https://jspm.dev/npm:picomatch@2.2.2!cjs": { 155 | "'/npm:@jspm/core@2/nodelibs/path'": "'/polyfill/node/path.ts'", 156 | "'./npm:picomatch@2.2.2/_/9ee23622.js'": "'/package/picomatch@2.2.2/_/9ee23622.js'", 157 | "'/npm:@jspm/core@2/nodelibs/process'": "'/polyfill/node/process.ts'" 158 | }, 159 | "https://jspm.dev/npm:picomatch@2.2.2/_/9ee23622.js": { 160 | "'/npm:@jspm/core@2/nodelibs/path'": "'/polyfill/node/path.ts'", 161 | "'/npm:@jspm/core@2/nodelibs/process'": "'/polyfill/node/process.ts'" 162 | } 163 | }, 164 | "typesEntry": "/package/@types/picomatch@2.2.1", 165 | "hasDefaultExport": true 166 | }, 167 | "@types/picomatch@2.2.1": { 168 | "name": "@types/picomatch", 169 | "importStrategy": "jsdelivr", 170 | "importType": "npm", 171 | "isAtTypes": true, 172 | "version": "2.2.1", 173 | "description": "TypeScript definitions for picomatch", 174 | "entry": "index.d.ts", 175 | "rewrites": { 176 | "https://cdn.jsdelivr.net/npm/@types/picomatch@2.2.1/index.d.ts": { 177 | "dregImportEquals:'./parse'": "'./parse.d.ts'", 178 | "dregImportEquals:'./constants'": "'./constants.d.ts'", 179 | "dregExportAssignment:picomatch": "" 180 | }, 181 | "https://cdn.jsdelivr.net/npm/@types/picomatch@2.2.1/parse.d.ts": { 182 | "dregExportAssignment:parse": "" 183 | }, 184 | "https://cdn.jsdelivr.net/npm/@types/picomatch@2.2.1/constants.d.ts": { 185 | "dregExportAssignment:constants": "" 186 | } 187 | }, 188 | "hasDefaultExport": true 189 | }, 190 | "@rollup/pluginutils@4.0.0": { 191 | "name": "@rollup/pluginutils", 192 | "importStrategy": "jsdelivr", 193 | "importType": "npm", 194 | "isAtTypes": false, 195 | "version": "4.0.0", 196 | "description": "A set of utility functions commonly used by Rollup plugins", 197 | "entry": "./dist/es/index.js", 198 | "typesEntry": "types/index.d.ts", 199 | "rewrites": { 200 | "https://cdn.jsdelivr.net/npm/@rollup/pluginutils@4.0.0/dist/es/index.js": { 201 | "'path'": "'/polyfill/node/path.ts'", 202 | "'picomatch'": "'/package/picomatch@2.2.2'" 203 | }, 204 | "https://cdn.jsdelivr.net/npm/@rollup/pluginutils@4.0.0/types/index.d.ts": { 205 | "'estree'": "'/package/@types/estree@0.0.45'" 206 | } 207 | }, 208 | "hasDefaultExport": true 209 | }, 210 | "source-map@0.6.1": { 211 | "name": "source-map", 212 | "importStrategy": "jspm", 213 | "importType": "npm", 214 | "isAtTypes": false, 215 | "version": "0.6.1", 216 | "description": "Generates and consumes source maps", 217 | "entry": "https://jspm.dev/npm:source-map@0.6.1!cjs", 218 | "typesEntry": "/package/source-map@0.6.1/source-map.d.ts", 219 | "rewrites": { 220 | "https://jspm.dev/npm:source-map@0.6.1!cjs": { 221 | "'./npm:source-map@0.6.1/_/b1dbe139.js'": "'/package/source-map@0.6.1/_/b1dbe139.js'", 222 | "'./npm:source-map@0.6.1/lib/util!cjs'": "'/package/source-map@0.6.1/lib/util!cjs'", 223 | "'./npm:source-map@0.6.1/lib/source-map-generator!cjs'": "'/package/source-map@0.6.1/lib/source-map-generator!cjs'", 224 | "'./npm:source-map@0.6.1/lib/source-map-consumer!cjs'": "'/package/source-map@0.6.1/lib/source-map-consumer!cjs'" 225 | }, 226 | "https://jspm.dev/npm:source-map@0.6.1/_/b1dbe139.js": { 227 | "'../lib/util!cjs'": "'../lib/util!cjs'" 228 | }, 229 | "https://jspm.dev/npm:source-map@0.6.1/lib/util!cjs": {}, 230 | "https://jspm.dev/npm:source-map@0.6.1/lib/source-map-generator!cjs": { 231 | "'../_/b1dbe139.js'": "'../_/b1dbe139.js'", 232 | "'./util!cjs'": "'./util!cjs'" 233 | }, 234 | "https://jspm.dev/npm:source-map@0.6.1/lib/source-map-consumer!cjs": { 235 | "'../_/b1dbe139.js'": "'../_/b1dbe139.js'", 236 | "'./util!cjs'": "'./util!cjs'" 237 | }, 238 | "https://cdn.jsdelivr.net/npm/source-map@0.6.1/source-map.d.ts": {} 239 | }, 240 | "hasDefaultExport": true 241 | }, 242 | "postcss@7.0.32": { 243 | "name": "postcss", 244 | "importStrategy": "jsdelivr", 245 | "importType": "gh", 246 | "ghUser": "postcss", 247 | "isAtTypes": false, 248 | "version": "7.0.32", 249 | "description": "Tool for transforming styles with JS plugins", 250 | "entry": "lib/postcss.es6", 251 | "typesEntry": "lib/postcss.d.ts", 252 | "rewrites": { 253 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/postcss.es6": { 254 | "'./declaration'": "'./declaration.es6'", 255 | "'./processor'": "'./processor.es6'", 256 | "'./stringify'": "'./stringify.es6'", 257 | "'./comment'": "'./comment.es6'", 258 | "'./at-rule'": "'./at-rule.es6'", 259 | "'./vendor'": "'./vendor.es6'", 260 | "'./parse'": "'./parse.es6'", 261 | "'./list'": "'./list.es6'", 262 | "'./rule'": "'./rule.es6'", 263 | "'./root'": "'./root.es6'" 264 | }, 265 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/declaration.es6": { 266 | "'./node'": "'./node.es6'" 267 | }, 268 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/node.es6": { 269 | "'./css-syntax-error'": "'./css-syntax-error.es6'", 270 | "'./stringifier'": "'./stringifier.es6'", 271 | "'./stringify'": "'./stringify.es6'" 272 | }, 273 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/css-syntax-error.es6": { 274 | "'supports-color'": "'/polyfill/node/supports-color.ts'", 275 | "'chalk'": "'/polyfill/node/chalk.ts'", 276 | "'./terminal-highlight'": "'./terminal-highlight.es6'" 277 | }, 278 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/terminal-highlight.es6": { 279 | "'chalk'": "'/polyfill/node/chalk.ts'", 280 | "'./tokenize'": "'./tokenize.es6'", 281 | "'./input'": "'./input.es6'" 282 | }, 283 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/tokenize.es6": {}, 284 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/input.es6": { 285 | "'path'": "'/polyfill/node/path.ts'", 286 | "'./css-syntax-error'": "'./css-syntax-error.es6'", 287 | "'./previous-map'": "'./previous-map.es6'" 288 | }, 289 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/previous-map.es6": { 290 | "'source-map'": "'/package/source-map@0.6.1'", 291 | "'path'": "'/polyfill/node/path.ts'", 292 | "'fs'": "'/polyfill/node/fs.ts'" 293 | }, 294 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/stringifier.es6": {}, 295 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/stringify.es6": { 296 | "'./stringifier'": "'./stringifier.es6'" 297 | }, 298 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/processor.es6": { 299 | "'./lazy-result'": "'./lazy-result.es6'" 300 | }, 301 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/lazy-result.es6": { 302 | "'./map-generator'": "'./map-generator.es6'", 303 | "'./stringify'": "'./stringify.es6'", 304 | "'./warn-once'": "'./warn-once.es6'", 305 | "'./result'": "'./result.es6'", 306 | "'./parse'": "'./parse.es6'" 307 | }, 308 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/map-generator.es6": { 309 | "'source-map'": "'/package/source-map@0.6.1'", 310 | "'path'": "'/polyfill/node/path.ts'" 311 | }, 312 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/warn-once.es6": {}, 313 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/result.es6": { 314 | "'./warning'": "'./warning.es6'" 315 | }, 316 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/warning.es6": {}, 317 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/parse.es6": { 318 | "'./parser'": "'./parser.es6'", 319 | "'./input'": "'./input.es6'" 320 | }, 321 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/parser.es6": { 322 | "'./declaration'": "'./declaration.es6'", 323 | "'./tokenize'": "'./tokenize.es6'", 324 | "'./comment'": "'./comment.es6'", 325 | "'./at-rule'": "'./at-rule.es6'", 326 | "'./root'": "'./root.es6'", 327 | "'./rule'": "'./rule.es6'" 328 | }, 329 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/comment.es6": { 330 | "'./node'": "'./node.es6'" 331 | }, 332 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/at-rule.es6": { 333 | "'./container'": "'./container.es6'" 334 | }, 335 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/container.es6": { 336 | "'./declaration'": "'./declaration.es6'", 337 | "'./comment'": "'./comment.es6'", 338 | "'./node'": "'./node.es6'" 339 | }, 340 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/root.es6": { 341 | "'./container'": "'./container.es6'" 342 | }, 343 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/rule.es6": { 344 | "'./container'": "'./container.es6'", 345 | "'./list'": "'./list.es6'" 346 | }, 347 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/list.es6": {}, 348 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/vendor.es6": {}, 349 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/postcss.d.ts": { 350 | "'source-map'": "'/package/source-map@0.6.1'", 351 | "dregExportAssignment:postcss": "" 352 | } 353 | }, 354 | "additions": { 355 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/postcss.d.ts": [ 356 | "export type Plugin = postcss.Plugin;" 357 | ] 358 | }, 359 | "hasDefaultExport": true, 360 | "addProcess": true 361 | }, 362 | "postcss-value-parser@4.1.0": { 363 | "name": "postcss-value-parser", 364 | "importStrategy": "jspm", 365 | "importType": "npm", 366 | "isAtTypes": false, 367 | "version": "4.1.0", 368 | "typesEntry": "/package/postcss-value-parser@4.1.0/lib/index.d.ts", 369 | "description": "Transforms css values and at-rule params into the tree", 370 | "entry": "https://jspm.dev/npm:postcss-value-parser@4.1.0!cjs", 371 | "rewrites": { 372 | "https://jspm.dev/npm:postcss-value-parser@4.1.0!cjs": { 373 | "'./npm:postcss-value-parser@4.1.0/lib/unit!cjs'": "'/package/postcss-value-parser@4.1.0/lib/unit!cjs'" 374 | }, 375 | "https://jspm.dev/npm:postcss-value-parser@4.1.0/lib/unit!cjs": {}, 376 | "https://cdn.jsdelivr.net/npm/postcss-value-parser@4.1.0/lib/index.d.ts": { 377 | "dregExportAssignment:postcssValueParser": "" 378 | } 379 | }, 380 | "hasDefaultExport": true 381 | }, 382 | "postcss@7.0.16": { 383 | "name": "postcss", 384 | "importStrategy": "jsdelivr", 385 | "importType": "gh", 386 | "ghUser": "postcss", 387 | "isAtTypes": false, 388 | "version": "7.0.16", 389 | "description": "Tool for transforming styles with JS plugins", 390 | "entry": "lib/postcss.es6", 391 | "typesEntry": "lib/postcss.d.ts", 392 | "rewrites": { 393 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/postcss.es6": { 394 | "'./declaration'": "'./declaration.es6'", 395 | "'./processor'": "'./processor.es6'", 396 | "'./stringify'": "'./stringify.es6'", 397 | "'./comment'": "'./comment.es6'", 398 | "'./at-rule'": "'./at-rule.es6'", 399 | "'./vendor'": "'./vendor.es6'", 400 | "'./parse'": "'./parse.es6'", 401 | "'./list'": "'./list.es6'", 402 | "'./rule'": "'./rule.es6'", 403 | "'./root'": "'./root.es6'" 404 | }, 405 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/declaration.es6": { 406 | "'./node'": "'./node.es6'" 407 | }, 408 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/node.es6": { 409 | "'./css-syntax-error'": "'./css-syntax-error.es6'", 410 | "'./stringifier'": "'./stringifier.es6'", 411 | "'./stringify'": "'./stringify.es6'" 412 | }, 413 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/css-syntax-error.es6": { 414 | "'supports-color'": "'/polyfill/node/supports-color.ts'", 415 | "'chalk'": "'/polyfill/node/chalk.ts'", 416 | "'./terminal-highlight'": "'./terminal-highlight.es6'" 417 | }, 418 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/terminal-highlight.es6": { 419 | "'chalk'": "'/polyfill/node/chalk.ts'", 420 | "'./tokenize'": "'./tokenize.es6'", 421 | "'./input'": "'./input.es6'" 422 | }, 423 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/tokenize.es6": {}, 424 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/input.es6": { 425 | "'path'": "'/polyfill/node/path.ts'", 426 | "'./css-syntax-error'": "'./css-syntax-error.es6'", 427 | "'./previous-map'": "'./previous-map.es6'" 428 | }, 429 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/previous-map.es6": { 430 | "'source-map'": "'/package/source-map@0.6.1'", 431 | "'path'": "'/polyfill/node/path.ts'", 432 | "'fs'": "'/polyfill/node/fs.ts'" 433 | }, 434 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/stringifier.es6": {}, 435 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/stringify.es6": { 436 | "'./stringifier'": "'./stringifier.es6'" 437 | }, 438 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/processor.es6": { 439 | "'./lazy-result'": "'./lazy-result.es6'" 440 | }, 441 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/lazy-result.es6": { 442 | "'./map-generator'": "'./map-generator.es6'", 443 | "'./stringify'": "'./stringify.es6'", 444 | "'./warn-once'": "'./warn-once.es6'", 445 | "'./result'": "'./result.es6'", 446 | "'./parse'": "'./parse.es6'" 447 | }, 448 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/map-generator.es6": { 449 | "'source-map'": "'/package/source-map@0.6.1'", 450 | "'path'": "'/polyfill/node/path.ts'" 451 | }, 452 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/warn-once.es6": {}, 453 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/result.es6": { 454 | "'./warning'": "'./warning.es6'" 455 | }, 456 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/warning.es6": {}, 457 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/parse.es6": { 458 | "'./parser'": "'./parser.es6'", 459 | "'./input'": "'./input.es6'" 460 | }, 461 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/parser.es6": { 462 | "'./declaration'": "'./declaration.es6'", 463 | "'./tokenize'": "'./tokenize.es6'", 464 | "'./comment'": "'./comment.es6'", 465 | "'./at-rule'": "'./at-rule.es6'", 466 | "'./root'": "'./root.es6'", 467 | "'./rule'": "'./rule.es6'" 468 | }, 469 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/comment.es6": { 470 | "'./node'": "'./node.es6'" 471 | }, 472 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/at-rule.es6": { 473 | "'./container'": "'./container.es6'" 474 | }, 475 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/container.es6": { 476 | "'./declaration'": "'./declaration.es6'", 477 | "'./comment'": "'./comment.es6'", 478 | "'./node'": "'./node.es6'" 479 | }, 480 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/root.es6": { 481 | "'./container'": "'./container.es6'" 482 | }, 483 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/rule.es6": { 484 | "'./container'": "'./container.es6'", 485 | "'./list'": "'./list.es6'" 486 | }, 487 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/list.es6": {}, 488 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/vendor.es6": {}, 489 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/postcss.d.ts": { 490 | "'source-map'": "'/package/source-map@0.6.1'", 491 | "dregExportAssignment:postcss": "" 492 | } 493 | }, 494 | "additions": { 495 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/postcss.d.ts": [ 496 | "export type Plugin = postcss.Plugin;" 497 | ] 498 | }, 499 | "hasDefaultExport": true 500 | }, 501 | "@types/browserslist@4.8.0": { 502 | "name": "@types/browserslist", 503 | "importStrategy": "jsdelivr", 504 | "importType": "npm", 505 | "isAtTypes": true, 506 | "version": "4.8.0", 507 | "description": "TypeScript definitions for browserslist", 508 | "entry": "index.d.ts", 509 | "rewrites": { 510 | "https://cdn.jsdelivr.net/npm/@types/browserslist@4.8.0/index.d.ts": { 511 | "dregExportAssignment:browserslist": "" 512 | } 513 | }, 514 | "additions": { 515 | "https://cdn.jsdelivr.net/npm/@types/browserslist@4.8.0/index.d.ts": ["export type Stats = browserslist.Stats;"] 516 | }, 517 | "hasDefaultExport": true 518 | }, 519 | "@types/autoprefixer@9.7.2": { 520 | "name": "@types/autoprefixer", 521 | "importStrategy": "jsdelivr", 522 | "importType": "npm", 523 | "isAtTypes": true, 524 | "version": "9.7.2", 525 | "description": "TypeScript definitions for autoprefixer", 526 | "entry": "index.d.ts", 527 | "rewrites": { 528 | "https://cdn.jsdelivr.net/npm/@types/autoprefixer@9.7.2/index.d.ts": { 529 | "'postcss'": "'/package/postcss@7.0.32/lib/postcss.d.ts'", 530 | "'browserslist'": "'/package/@types/browserslist@4.8.0/index.d.ts'", 531 | "dregExportAssignment:autoprefixer": "" 532 | } 533 | }, 534 | "hasDefaultExport": true 535 | }, 536 | "@types/cssnano@4.0.0": { 537 | "name": "@types/cssnano", 538 | "importStrategy": "jsdelivr", 539 | "importType": "npm", 540 | "isAtTypes": true, 541 | "version": "4.0.0", 542 | "description": "TypeScript definitions for cssnano", 543 | "entry": "index.d.ts", 544 | "rewrites": { 545 | "https://cdn.jsdelivr.net/npm/@types/cssnano@4.0.0/index.d.ts": { 546 | "'postcss'": "'/package/postcss@7.0.32'", 547 | "dregExportAssignment:cssnano": "" 548 | } 549 | }, 550 | "hasDefaultExport": true 551 | }, 552 | "vue@2.6.12": { 553 | "name": "vue", 554 | "importStrategy": "jspm", 555 | "importType": "npm", 556 | "isAtTypes": false, 557 | "version": "2.6.12", 558 | "description": "Reactive, component-oriented view layer for modern web interfaces.", 559 | "entry": "https://jspm.dev/npm:vue@2.6.12!cjs", 560 | "typesEntry": "/package/vue@2.6.12/types/index.d.ts", 561 | "rewrites": { 562 | "https://jspm.dev/npm:vue@2.6.12!cjs": { 563 | "'/npm:@jspm/core@2/nodelibs/process'": "'/polyfill/node/process.ts'" 564 | }, 565 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/index.d.ts": { 566 | "\"./vue\"": "\"./vue.d.ts\"", 567 | "\"./umd\"": "\"./umd.d.ts\"", 568 | "\"./options\"": "\"./options.d.ts\"", 569 | "\"./plugin\"": "\"./plugin.d.ts\"", 570 | "\"./vnode\"": "\"./vnode.d.ts\"" 571 | }, 572 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/vue.d.ts": { 573 | "\"./options\"": "\"./options.d.ts\"", 574 | "\"./vnode\"": "\"./vnode.d.ts\"", 575 | "\"./plugin\"": "\"./plugin.d.ts\"" 576 | }, 577 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/options.d.ts": { 578 | "\"./vue\"": "\"./vue.d.ts\"", 579 | "\"./vnode\"": "\"./vnode.d.ts\"" 580 | }, 581 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/vnode.d.ts": { 582 | "\"./vue\"": "\"./vue.d.ts\"" 583 | }, 584 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/plugin.d.ts": { 585 | "\"./vue\"": "\"./vue.d.ts\"" 586 | }, 587 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/umd.d.ts": { 588 | "\"./index\"": "\"./index.d.ts\"", 589 | "\"./options\"": "\"./options.d.ts\"", 590 | "dregExportAssignment:Vue": "" 591 | } 592 | }, 593 | "hasDefaultExport": true 594 | } 595 | } -------------------------------------------------------------------------------- /registry.ts: -------------------------------------------------------------------------------- 1 | import type { Registry } from "./runtime/types/registry.ts"; 2 | const registry: Registry = { 3 | "estree-walker@2.0.1": { 4 | "name": "estree-walker", 5 | "hasDefaultExport": false, 6 | "importStrategy": "jsdelivr", 7 | "importType": "npm", 8 | "isAtTypes": false, 9 | "version": "2.0.1", 10 | "description": "Traverse an ESTree-compliant AST", 11 | "entry": "src/estree-walker.js", 12 | "typesEntry": "types/index.d.ts", 13 | "rewrites": { 14 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/src/estree-walker.js": {}, 15 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/types/index.d.ts": { 16 | "\"estree\"": "\"/package/@types/estree@0.0.42\"", 17 | "\"./sync\"": "\"./sync.d.ts\"", 18 | "\"./async\"": "\"./async.d.ts\"" 19 | }, 20 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/types/sync.d.ts": { 21 | "\"./walker\"": "\"./walker.d.ts\"", 22 | "\"estree\"": "\"/package/@types/estree@0.0.42\"" 23 | }, 24 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/types/walker.d.ts": { 25 | "\"estree\"": "\"/package/@types/estree@0.0.42\"" 26 | }, 27 | "https://cdn.jsdelivr.net/npm/estree-walker@2.0.1/types/async.d.ts": { 28 | "\"./walker\"": "\"./walker.d.ts\"", 29 | "\"estree\"": "\"/package/@types/estree@0.0.42\"" 30 | } 31 | } 32 | }, 33 | "@types/estree@0.0.42": { 34 | "name": "@types/estree", 35 | "hasDefaultExport": false, 36 | "importStrategy": "jsdelivr", 37 | "importType": "npm", 38 | "isAtTypes": true, 39 | "version": "0.0.42", 40 | "description": "TypeScript definitions for ESTree AST specification", 41 | "entry": "index.d.ts", 42 | "rewrites": { 43 | "https://cdn.jsdelivr.net/npm/@types/estree@0.0.42/index.d.ts": {} 44 | } 45 | }, 46 | "@types/estree@0.0.45": { 47 | "name": "@types/estree", 48 | "hasDefaultExport": false, 49 | "importStrategy": "jsdelivr", 50 | "importType": "npm", 51 | "isAtTypes": true, 52 | "version": "0.0.45", 53 | "description": "TypeScript definitions for ESTree AST specification", 54 | "entry": "index.d.ts", 55 | "rewrites": { 56 | "https://cdn.jsdelivr.net/npm/@types/estree@0.0.45/index.d.ts": {} 57 | } 58 | }, 59 | "type-fest@0.16.0": { 60 | "name": "type-fest", 61 | "hasDefaultExport": false, 62 | "importStrategy": "jsdelivr", 63 | "importType": "npm", 64 | "isAtTypes": false, 65 | "version": "0.16.0", 66 | "description": "A collection of essential TypeScript types", 67 | "entry": "index.d.ts", 68 | "rewrites": { 69 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/index.d.ts": { 70 | "'./source/basic'": "'./source/basic.d.ts'", 71 | "'./source/except'": "'./source/except.d.ts'", 72 | "'./source/mutable'": "'./source/mutable.d.ts'", 73 | "'./source/merge'": "'./source/merge.d.ts'", 74 | "'./source/merge-exclusive'": "'./source/merge-exclusive.d.ts'", 75 | "'./source/require-at-least-one'": "'./source/require-at-least-one.d.ts'", 76 | "'./source/require-exactly-one'": "'./source/require-exactly-one.d.ts'", 77 | "'./source/partial-deep'": "'./source/partial-deep.d.ts'", 78 | "'./source/readonly-deep'": "'./source/readonly-deep.d.ts'", 79 | "'./source/literal-union'": "'./source/literal-union.d.ts'", 80 | "'./source/promisable'": "'./source/promisable.d.ts'", 81 | "'./source/opaque'": "'./source/opaque.d.ts'", 82 | "'./source/set-optional'": "'./source/set-optional.d.ts'", 83 | "'./source/set-required'": "'./source/set-required.d.ts'", 84 | "'./source/value-of'": "'./source/value-of.d.ts'", 85 | "'./source/promise-value'": "'./source/promise-value.d.ts'", 86 | "'./source/async-return-type'": "'./source/async-return-type.d.ts'", 87 | "'./source/conditional-except'": "'./source/conditional-except.d.ts'", 88 | "'./source/conditional-keys'": "'./source/conditional-keys.d.ts'", 89 | "'./source/conditional-pick'": "'./source/conditional-pick.d.ts'", 90 | "'./source/union-to-intersection'": "'./source/union-to-intersection.d.ts'", 91 | "'./source/stringified'": "'./source/stringified.d.ts'", 92 | "'./source/fixed-length-array'": "'./source/fixed-length-array.d.ts'", 93 | "'./source/package-json'": "'./source/package-json.d.ts'", 94 | "'./source/tsconfig-json'": "'./source/tsconfig-json.d.ts'" 95 | }, 96 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/basic.d.ts": {}, 97 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/except.d.ts": {}, 98 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/mutable.d.ts": {}, 99 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/merge.d.ts": { 100 | "'./except'": "'./except.d.ts'" 101 | }, 102 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/merge-exclusive.d.ts": {}, 103 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/require-at-least-one.d.ts": { 104 | "'./except'": "'./except.d.ts'" 105 | }, 106 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/require-exactly-one.d.ts": {}, 107 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/partial-deep.d.ts": { 108 | "'./basic'": "'./basic.d.ts'" 109 | }, 110 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/readonly-deep.d.ts": { 111 | "'./basic'": "'./basic.d.ts'" 112 | }, 113 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/literal-union.d.ts": { 114 | "'./basic'": "'./basic.d.ts'" 115 | }, 116 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/promisable.d.ts": {}, 117 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/opaque.d.ts": {}, 118 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/set-optional.d.ts": { 119 | "'./except'": "'./except.d.ts'" 120 | }, 121 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/set-required.d.ts": { 122 | "'./except'": "'./except.d.ts'" 123 | }, 124 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/value-of.d.ts": {}, 125 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/promise-value.d.ts": {}, 126 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/async-return-type.d.ts": { 127 | "'./promise-value'": "'./promise-value.d.ts'" 128 | }, 129 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/conditional-except.d.ts": { 130 | "'./except'": "'./except.d.ts'", 131 | "'./conditional-keys'": "'./conditional-keys.d.ts'" 132 | }, 133 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/conditional-keys.d.ts": {}, 134 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/conditional-pick.d.ts": { 135 | "'./conditional-keys'": "'./conditional-keys.d.ts'" 136 | }, 137 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/union-to-intersection.d.ts": {}, 138 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/stringified.d.ts": {}, 139 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/fixed-length-array.d.ts": {}, 140 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/package-json.d.ts": { 141 | "'./literal-union'": "'./literal-union.d.ts'" 142 | }, 143 | "https://cdn.jsdelivr.net/npm/type-fest@0.16.0/source/tsconfig-json.d.ts": {} 144 | } 145 | }, 146 | "picomatch@2.2.2": { 147 | "name": "picomatch", 148 | "importStrategy": "jspm", 149 | "importType": "npm", 150 | "isAtTypes": false, 151 | "version": "2.2.2", 152 | "description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.", 153 | "entry": "https://jspm.dev/npm:picomatch@2.2.2!cjs", 154 | "rewrites": { 155 | "https://jspm.dev/npm:picomatch@2.2.2!cjs": { 156 | "'/npm:@jspm/core@2/nodelibs/path'": "'/polyfill/node/path.ts'", 157 | "'./npm:picomatch@2.2.2/_/9ee23622.js'": "'/package/picomatch@2.2.2/_/9ee23622.js'", 158 | "'/npm:@jspm/core@2/nodelibs/process'": "'/polyfill/node/process.ts'" 159 | }, 160 | "https://jspm.dev/npm:picomatch@2.2.2/_/9ee23622.js": { 161 | "'/npm:@jspm/core@2/nodelibs/path'": "'/polyfill/node/path.ts'", 162 | "'/npm:@jspm/core@2/nodelibs/process'": "'/polyfill/node/process.ts'" 163 | } 164 | }, 165 | "typesEntry": "/package/@types/picomatch@2.2.1", 166 | "hasDefaultExport": true 167 | }, 168 | "@types/picomatch@2.2.1": { 169 | "name": "@types/picomatch", 170 | "importStrategy": "jsdelivr", 171 | "importType": "npm", 172 | "isAtTypes": true, 173 | "version": "2.2.1", 174 | "description": "TypeScript definitions for picomatch", 175 | "entry": "index.d.ts", 176 | "rewrites": { 177 | "https://cdn.jsdelivr.net/npm/@types/picomatch@2.2.1/index.d.ts": { 178 | "dregImportEquals:'./parse'": "'./parse.d.ts'", 179 | "dregImportEquals:'./constants'": "'./constants.d.ts'", 180 | "dregExportAssignment:picomatch": "" 181 | }, 182 | "https://cdn.jsdelivr.net/npm/@types/picomatch@2.2.1/parse.d.ts": { 183 | "dregExportAssignment:parse": "" 184 | }, 185 | "https://cdn.jsdelivr.net/npm/@types/picomatch@2.2.1/constants.d.ts": { 186 | "dregExportAssignment:constants": "" 187 | } 188 | }, 189 | "hasDefaultExport": true 190 | }, 191 | "@rollup/pluginutils@4.0.0": { 192 | "name": "@rollup/pluginutils", 193 | "importStrategy": "jsdelivr", 194 | "importType": "npm", 195 | "isAtTypes": false, 196 | "version": "4.0.0", 197 | "description": "A set of utility functions commonly used by Rollup plugins", 198 | "entry": "./dist/es/index.js", 199 | "typesEntry": "types/index.d.ts", 200 | "rewrites": { 201 | "https://cdn.jsdelivr.net/npm/@rollup/pluginutils@4.0.0/dist/es/index.js": { 202 | "'path'": "'/polyfill/node/path.ts'", 203 | "'picomatch'": "'/package/picomatch@2.2.2'" 204 | }, 205 | "https://cdn.jsdelivr.net/npm/@rollup/pluginutils@4.0.0/types/index.d.ts": { 206 | "'estree'": "'/package/@types/estree@0.0.45'" 207 | } 208 | }, 209 | "hasDefaultExport": true 210 | }, 211 | "source-map@0.6.1": { 212 | "name": "source-map", 213 | "importStrategy": "jspm", 214 | "importType": "npm", 215 | "isAtTypes": false, 216 | "version": "0.6.1", 217 | "description": "Generates and consumes source maps", 218 | "entry": "https://jspm.dev/npm:source-map@0.6.1!cjs", 219 | "typesEntry": "/package/source-map@0.6.1/source-map.d.ts", 220 | "rewrites": { 221 | "https://jspm.dev/npm:source-map@0.6.1!cjs": { 222 | "'./npm:source-map@0.6.1/_/b1dbe139.js'": "'/package/source-map@0.6.1/_/b1dbe139.js'", 223 | "'./npm:source-map@0.6.1/lib/util!cjs'": "'/package/source-map@0.6.1/lib/util!cjs'", 224 | "'./npm:source-map@0.6.1/lib/source-map-generator!cjs'": "'/package/source-map@0.6.1/lib/source-map-generator!cjs'", 225 | "'./npm:source-map@0.6.1/lib/source-map-consumer!cjs'": "'/package/source-map@0.6.1/lib/source-map-consumer!cjs'" 226 | }, 227 | "https://jspm.dev/npm:source-map@0.6.1/_/b1dbe139.js": { 228 | "'../lib/util!cjs'": "'../lib/util!cjs'" 229 | }, 230 | "https://jspm.dev/npm:source-map@0.6.1/lib/util!cjs": {}, 231 | "https://jspm.dev/npm:source-map@0.6.1/lib/source-map-generator!cjs": { 232 | "'../_/b1dbe139.js'": "'../_/b1dbe139.js'", 233 | "'./util!cjs'": "'./util!cjs'" 234 | }, 235 | "https://jspm.dev/npm:source-map@0.6.1/lib/source-map-consumer!cjs": { 236 | "'../_/b1dbe139.js'": "'../_/b1dbe139.js'", 237 | "'./util!cjs'": "'./util!cjs'" 238 | }, 239 | "https://cdn.jsdelivr.net/npm/source-map@0.6.1/source-map.d.ts": {} 240 | }, 241 | "hasDefaultExport": true 242 | }, 243 | "postcss@7.0.32": { 244 | "name": "postcss", 245 | "importStrategy": "jsdelivr", 246 | "importType": "gh", 247 | "ghUser": "postcss", 248 | "isAtTypes": false, 249 | "version": "7.0.32", 250 | "description": "Tool for transforming styles with JS plugins", 251 | "entry": "lib/postcss.es6", 252 | "typesEntry": "lib/postcss.d.ts", 253 | "rewrites": { 254 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/postcss.es6": { 255 | "'./declaration'": "'./declaration.es6'", 256 | "'./processor'": "'./processor.es6'", 257 | "'./stringify'": "'./stringify.es6'", 258 | "'./comment'": "'./comment.es6'", 259 | "'./at-rule'": "'./at-rule.es6'", 260 | "'./vendor'": "'./vendor.es6'", 261 | "'./parse'": "'./parse.es6'", 262 | "'./list'": "'./list.es6'", 263 | "'./rule'": "'./rule.es6'", 264 | "'./root'": "'./root.es6'" 265 | }, 266 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/declaration.es6": { 267 | "'./node'": "'./node.es6'" 268 | }, 269 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/node.es6": { 270 | "'./css-syntax-error'": "'./css-syntax-error.es6'", 271 | "'./stringifier'": "'./stringifier.es6'", 272 | "'./stringify'": "'./stringify.es6'" 273 | }, 274 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/css-syntax-error.es6": { 275 | "'supports-color'": "'/polyfill/node/supports-color.ts'", 276 | "'chalk'": "'/polyfill/node/chalk.ts'", 277 | "'./terminal-highlight'": "'./terminal-highlight.es6'" 278 | }, 279 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/terminal-highlight.es6": { 280 | "'chalk'": "'/polyfill/node/chalk.ts'", 281 | "'./tokenize'": "'./tokenize.es6'", 282 | "'./input'": "'./input.es6'" 283 | }, 284 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/tokenize.es6": {}, 285 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/input.es6": { 286 | "'path'": "'/polyfill/node/path.ts'", 287 | "'./css-syntax-error'": "'./css-syntax-error.es6'", 288 | "'./previous-map'": "'./previous-map.es6'" 289 | }, 290 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/previous-map.es6": { 291 | "'source-map'": "'/package/source-map@0.6.1'", 292 | "'path'": "'/polyfill/node/path.ts'", 293 | "'fs'": "'/polyfill/node/fs.ts'" 294 | }, 295 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/stringifier.es6": {}, 296 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/stringify.es6": { 297 | "'./stringifier'": "'./stringifier.es6'" 298 | }, 299 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/processor.es6": { 300 | "'./lazy-result'": "'./lazy-result.es6'" 301 | }, 302 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/lazy-result.es6": { 303 | "'./map-generator'": "'./map-generator.es6'", 304 | "'./stringify'": "'./stringify.es6'", 305 | "'./warn-once'": "'./warn-once.es6'", 306 | "'./result'": "'./result.es6'", 307 | "'./parse'": "'./parse.es6'" 308 | }, 309 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/map-generator.es6": { 310 | "'source-map'": "'/package/source-map@0.6.1'", 311 | "'path'": "'/polyfill/node/path.ts'" 312 | }, 313 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/warn-once.es6": {}, 314 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/result.es6": { 315 | "'./warning'": "'./warning.es6'" 316 | }, 317 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/warning.es6": {}, 318 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/parse.es6": { 319 | "'./parser'": "'./parser.es6'", 320 | "'./input'": "'./input.es6'" 321 | }, 322 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/parser.es6": { 323 | "'./declaration'": "'./declaration.es6'", 324 | "'./tokenize'": "'./tokenize.es6'", 325 | "'./comment'": "'./comment.es6'", 326 | "'./at-rule'": "'./at-rule.es6'", 327 | "'./root'": "'./root.es6'", 328 | "'./rule'": "'./rule.es6'" 329 | }, 330 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/comment.es6": { 331 | "'./node'": "'./node.es6'" 332 | }, 333 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/at-rule.es6": { 334 | "'./container'": "'./container.es6'" 335 | }, 336 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/container.es6": { 337 | "'./declaration'": "'./declaration.es6'", 338 | "'./comment'": "'./comment.es6'", 339 | "'./node'": "'./node.es6'" 340 | }, 341 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/root.es6": { 342 | "'./container'": "'./container.es6'" 343 | }, 344 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/rule.es6": { 345 | "'./container'": "'./container.es6'", 346 | "'./list'": "'./list.es6'" 347 | }, 348 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/list.es6": {}, 349 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/vendor.es6": {}, 350 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/postcss.d.ts": { 351 | "'source-map'": "'/package/source-map@0.6.1'", 352 | "dregExportAssignment:postcss": "" 353 | } 354 | }, 355 | "additions": { 356 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.32/lib/postcss.d.ts": [ 357 | "export type Plugin = postcss.Plugin;" 358 | ] 359 | }, 360 | "hasDefaultExport": true, 361 | "addProcess": true 362 | }, 363 | "postcss-value-parser@4.1.0": { 364 | "name": "postcss-value-parser", 365 | "importStrategy": "jspm", 366 | "importType": "npm", 367 | "isAtTypes": false, 368 | "version": "4.1.0", 369 | "typesEntry": "/package/postcss-value-parser@4.1.0/lib/index.d.ts", 370 | "description": "Transforms css values and at-rule params into the tree", 371 | "entry": "https://jspm.dev/npm:postcss-value-parser@4.1.0!cjs", 372 | "rewrites": { 373 | "https://jspm.dev/npm:postcss-value-parser@4.1.0!cjs": { 374 | "'./npm:postcss-value-parser@4.1.0/lib/unit!cjs'": "'/package/postcss-value-parser@4.1.0/lib/unit!cjs'" 375 | }, 376 | "https://jspm.dev/npm:postcss-value-parser@4.1.0/lib/unit!cjs": {}, 377 | "https://cdn.jsdelivr.net/npm/postcss-value-parser@4.1.0/lib/index.d.ts": { 378 | "dregExportAssignment:postcssValueParser": "" 379 | } 380 | }, 381 | "hasDefaultExport": true 382 | }, 383 | "postcss@7.0.16": { 384 | "name": "postcss", 385 | "importStrategy": "jsdelivr", 386 | "importType": "gh", 387 | "ghUser": "postcss", 388 | "isAtTypes": false, 389 | "version": "7.0.16", 390 | "description": "Tool for transforming styles with JS plugins", 391 | "entry": "lib/postcss.es6", 392 | "typesEntry": "lib/postcss.d.ts", 393 | "rewrites": { 394 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/postcss.es6": { 395 | "'./declaration'": "'./declaration.es6'", 396 | "'./processor'": "'./processor.es6'", 397 | "'./stringify'": "'./stringify.es6'", 398 | "'./comment'": "'./comment.es6'", 399 | "'./at-rule'": "'./at-rule.es6'", 400 | "'./vendor'": "'./vendor.es6'", 401 | "'./parse'": "'./parse.es6'", 402 | "'./list'": "'./list.es6'", 403 | "'./rule'": "'./rule.es6'", 404 | "'./root'": "'./root.es6'" 405 | }, 406 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/declaration.es6": { 407 | "'./node'": "'./node.es6'" 408 | }, 409 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/node.es6": { 410 | "'./css-syntax-error'": "'./css-syntax-error.es6'", 411 | "'./stringifier'": "'./stringifier.es6'", 412 | "'./stringify'": "'./stringify.es6'" 413 | }, 414 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/css-syntax-error.es6": { 415 | "'supports-color'": "'/polyfill/node/supports-color.ts'", 416 | "'chalk'": "'/polyfill/node/chalk.ts'", 417 | "'./terminal-highlight'": "'./terminal-highlight.es6'" 418 | }, 419 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/terminal-highlight.es6": { 420 | "'chalk'": "'/polyfill/node/chalk.ts'", 421 | "'./tokenize'": "'./tokenize.es6'", 422 | "'./input'": "'./input.es6'" 423 | }, 424 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/tokenize.es6": {}, 425 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/input.es6": { 426 | "'path'": "'/polyfill/node/path.ts'", 427 | "'./css-syntax-error'": "'./css-syntax-error.es6'", 428 | "'./previous-map'": "'./previous-map.es6'" 429 | }, 430 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/previous-map.es6": { 431 | "'source-map'": "'/package/source-map@0.6.1'", 432 | "'path'": "'/polyfill/node/path.ts'", 433 | "'fs'": "'/polyfill/node/fs.ts'" 434 | }, 435 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/stringifier.es6": {}, 436 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/stringify.es6": { 437 | "'./stringifier'": "'./stringifier.es6'" 438 | }, 439 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/processor.es6": { 440 | "'./lazy-result'": "'./lazy-result.es6'" 441 | }, 442 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/lazy-result.es6": { 443 | "'./map-generator'": "'./map-generator.es6'", 444 | "'./stringify'": "'./stringify.es6'", 445 | "'./warn-once'": "'./warn-once.es6'", 446 | "'./result'": "'./result.es6'", 447 | "'./parse'": "'./parse.es6'" 448 | }, 449 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/map-generator.es6": { 450 | "'source-map'": "'/package/source-map@0.6.1'", 451 | "'path'": "'/polyfill/node/path.ts'" 452 | }, 453 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/warn-once.es6": {}, 454 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/result.es6": { 455 | "'./warning'": "'./warning.es6'" 456 | }, 457 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/warning.es6": {}, 458 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/parse.es6": { 459 | "'./parser'": "'./parser.es6'", 460 | "'./input'": "'./input.es6'" 461 | }, 462 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/parser.es6": { 463 | "'./declaration'": "'./declaration.es6'", 464 | "'./tokenize'": "'./tokenize.es6'", 465 | "'./comment'": "'./comment.es6'", 466 | "'./at-rule'": "'./at-rule.es6'", 467 | "'./root'": "'./root.es6'", 468 | "'./rule'": "'./rule.es6'" 469 | }, 470 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/comment.es6": { 471 | "'./node'": "'./node.es6'" 472 | }, 473 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/at-rule.es6": { 474 | "'./container'": "'./container.es6'" 475 | }, 476 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/container.es6": { 477 | "'./declaration'": "'./declaration.es6'", 478 | "'./comment'": "'./comment.es6'", 479 | "'./node'": "'./node.es6'" 480 | }, 481 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/root.es6": { 482 | "'./container'": "'./container.es6'" 483 | }, 484 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/rule.es6": { 485 | "'./container'": "'./container.es6'", 486 | "'./list'": "'./list.es6'" 487 | }, 488 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/list.es6": {}, 489 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/vendor.es6": {}, 490 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/postcss.d.ts": { 491 | "'source-map'": "'/package/source-map@0.6.1'", 492 | "dregExportAssignment:postcss": "" 493 | } 494 | }, 495 | "additions": { 496 | "https://cdn.jsdelivr.net/gh/postcss/postcss@7.0.16/lib/postcss.d.ts": [ 497 | "export type Plugin = postcss.Plugin;" 498 | ] 499 | }, 500 | "hasDefaultExport": true 501 | }, 502 | "@types/browserslist@4.8.0": { 503 | "name": "@types/browserslist", 504 | "importStrategy": "jsdelivr", 505 | "importType": "npm", 506 | "isAtTypes": true, 507 | "version": "4.8.0", 508 | "description": "TypeScript definitions for browserslist", 509 | "entry": "index.d.ts", 510 | "rewrites": { 511 | "https://cdn.jsdelivr.net/npm/@types/browserslist@4.8.0/index.d.ts": { 512 | "dregExportAssignment:browserslist": "" 513 | } 514 | }, 515 | "additions": { 516 | "https://cdn.jsdelivr.net/npm/@types/browserslist@4.8.0/index.d.ts": ["export type Stats = browserslist.Stats;"] 517 | }, 518 | "hasDefaultExport": true 519 | }, 520 | "@types/autoprefixer@9.7.2": { 521 | "name": "@types/autoprefixer", 522 | "importStrategy": "jsdelivr", 523 | "importType": "npm", 524 | "isAtTypes": true, 525 | "version": "9.7.2", 526 | "description": "TypeScript definitions for autoprefixer", 527 | "entry": "index.d.ts", 528 | "rewrites": { 529 | "https://cdn.jsdelivr.net/npm/@types/autoprefixer@9.7.2/index.d.ts": { 530 | "'postcss'": "'/package/postcss@7.0.32/lib/postcss.d.ts'", 531 | "'browserslist'": "'/package/@types/browserslist@4.8.0/index.d.ts'", 532 | "dregExportAssignment:autoprefixer": "" 533 | } 534 | }, 535 | "hasDefaultExport": true 536 | }, 537 | "@types/cssnano@4.0.0": { 538 | "name": "@types/cssnano", 539 | "importStrategy": "jsdelivr", 540 | "importType": "npm", 541 | "isAtTypes": true, 542 | "version": "4.0.0", 543 | "description": "TypeScript definitions for cssnano", 544 | "entry": "index.d.ts", 545 | "rewrites": { 546 | "https://cdn.jsdelivr.net/npm/@types/cssnano@4.0.0/index.d.ts": { 547 | "'postcss'": "'/package/postcss@7.0.32'", 548 | "dregExportAssignment:cssnano": "" 549 | } 550 | }, 551 | "hasDefaultExport": true 552 | }, 553 | "vue@2.6.12": { 554 | "name": "vue", 555 | "importStrategy": "jspm", 556 | "importType": "npm", 557 | "isAtTypes": false, 558 | "version": "2.6.12", 559 | "description": "Reactive, component-oriented view layer for modern web interfaces.", 560 | "entry": "https://jspm.dev/npm:vue@2.6.12!cjs", 561 | "typesEntry": "/package/vue@2.6.12/types/index.d.ts", 562 | "rewrites": { 563 | "https://jspm.dev/npm:vue@2.6.12!cjs": { 564 | "'/npm:@jspm/core@2/nodelibs/process'": "'/polyfill/node/process.ts'" 565 | }, 566 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/index.d.ts": { 567 | "\"./vue\"": "\"./vue.d.ts\"", 568 | "\"./umd\"": "\"./umd.d.ts\"", 569 | "\"./options\"": "\"./options.d.ts\"", 570 | "\"./plugin\"": "\"./plugin.d.ts\"", 571 | "\"./vnode\"": "\"./vnode.d.ts\"" 572 | }, 573 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/vue.d.ts": { 574 | "\"./options\"": "\"./options.d.ts\"", 575 | "\"./vnode\"": "\"./vnode.d.ts\"", 576 | "\"./plugin\"": "\"./plugin.d.ts\"" 577 | }, 578 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/options.d.ts": { 579 | "\"./vue\"": "\"./vue.d.ts\"", 580 | "\"./vnode\"": "\"./vnode.d.ts\"" 581 | }, 582 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/vnode.d.ts": { 583 | "\"./vue\"": "\"./vue.d.ts\"" 584 | }, 585 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/plugin.d.ts": { 586 | "\"./vue\"": "\"./vue.d.ts\"" 587 | }, 588 | "https://cdn.jsdelivr.net/npm/vue@2.6.12/types/umd.d.ts": { 589 | "\"./index\"": "\"./index.d.ts\"", 590 | "\"./options\"": "\"./options.d.ts\"", 591 | "dregExportAssignment:Vue": "" 592 | } 593 | }, 594 | "hasDefaultExport": true 595 | } 596 | }; 597 | export default registry; 598 | --------------------------------------------------------------------------------