diff --git a/.dockerignore b/.dockerignore index 79c385ff..e391b818 100644 --- a/.dockerignore +++ b/.dockerignore @@ -7,7 +7,6 @@ _etc/ .gitignore .pre-commit-config.yaml .tool-versions -CNAME CODE_OF_CONDUCT.md CONTRIBUTING.md Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00929692..cf820bcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,11 +48,13 @@ jobs: - name: Check formatting, linting, license headers, types and run tests run: deno task ok - - name: Create lcov file - run: deno task test:generate-lcov + - name: Generate coverage report + run: deno task test:coverage-gen - name: Upload coverage uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: name: ${{ matrix.os }} - files: _etc/cov_profile.lcov + files: ./_etc/coverage.lcov diff --git a/.gitignore b/.gitignore index 24f4a381..2673b1c2 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ Thumbs.db # coverage files /_etc/coverage/* -/_etc/cov_profile.lcov +/_etc/coverage.lcov # package managers node_modules/* diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 221f2f4c..a69b416e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ repos: args: ["--maxkb=1024"] exclude: | (?x)^( - lime/src/build/esbuild_v0.19.2.wasm + lime/build/esbuild_v0.19.2.wasm )$ - id: check-case-conflict - id: check-executables-have-shebangs @@ -22,8 +22,9 @@ repos: - id: fix-byte-order-marker - id: forbid-new-submodules - id: mixed-line-ending + - id: trailing-whitespace - repo: https://github.com/crate-ci/typos - rev: v1.16.22 + rev: v1.16.23 hooks: - id: typos verbose: true @@ -46,7 +47,7 @@ repos: name: kebab-case files only entry: filenames must be kebab-case only language: fail - files: '[^a-z0-9.\-\/\[\]\@]' + files: '(?!\.test\.[jt]sx?$)[^a-z0-9.\/\[\]@-]' exclude: | (?x)^( _etc/.*| @@ -66,7 +67,6 @@ repos: lime/.*| parsing/README.md| standards/README.md| - CNAME| CODE_OF_CONDUCT.md| CONTRIBUTING.md| Dockerfile| diff --git a/.vscode/extensions.json b/.vscode/extensions.json index acdc8b19..70a40f21 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,7 +1,6 @@ { "recommendations": [ "denoland.vscode-deno", - "ryanluker.vscode-coverage-gutters", - "ronilaukkarinen.vscode-stylefmt" + "ryanluker.vscode-coverage-gutters" ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 27ecde09..1063d002 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,17 +1,37 @@ { - "coverage-gutters.coverageBaseDir": "**/_etc/coverage", - "coverage-gutters.coverageFileNames": ["cov_profile.lcov"], + "coverage-gutters.coverageBaseDir": "./_etc", + "coverage-gutters.coverageFileNames": [ + "coverage.lcov" + ], "coverage-gutters.showGutterCoverage": true, "coverage-gutters.showLineCoverage": true, "coverage-gutters.showRulerCoverage": true, + "deno.cacheOnSave": true, + "deno.codeLens.implementations": true, + "deno.codeLens.references": true, + "deno.codeLens.referencesAllFunctions": true, "deno.codeLens.test": true, "deno.enable": true, "deno.lint": true, - "deno.suggest.autoImports": true, - "deno.suggest.completeFunctionCalls": true, "deno.suggest.imports.autoDiscover": true, - "deno.suggest.names": true, - "deno.suggest.paths": true, + "deno.unstable": true, + "javascript.suggest.autoImports": true, + "javascript.suggest.completeFunctionCalls": true, + "javascript.suggest.completeJSDocs": true, + "javascript.suggest.enabled": true, + "javascript.suggest.includeAutomaticOptionalChainCompletions": true, + "javascript.suggest.includeCompletionsForImportStatements": true, + "javascript.suggest.jsdoc.generateReturns": true, + "javascript.suggest.names": true, + "javascript.suggest.paths": true, + "typescript.suggest.autoImports": true, + "typescript.suggest.completeFunctionCalls": true, + "typescript.suggest.completeJSDocs": true, + "typescript.suggest.enabled": true, + "typescript.suggest.includeAutomaticOptionalChainCompletions": true, + "typescript.suggest.includeCompletionsForImportStatements": true, + "typescript.suggest.jsdoc.generateReturns": true, + "typescript.suggest.paths": true, "editor.defaultFormatter": "denoland.vscode-deno", "yaml.schemas": { "https://json.schemastore.org/github-workflow.json": "./.github/workflows/*.yml" @@ -19,22 +39,7 @@ "[jsonc]": { "editor.defaultFormatter": "vscode.json-language-features" }, - "[postcss]": { - "editor.defaultFormatter": "ronilaukkarinen.vscode-stylefmt" - }, - "[javascriptreact]": { - "editor.defaultFormatter": "denoland.vscode-deno" - }, - "[javascript]": { - "editor.defaultFormatter": "denoland.vscode-deno" - }, - "[typescriptreact]": { - "editor.defaultFormatter": "denoland.vscode-deno" - }, - "[typescript]": { - "editor.defaultFormatter": "denoland.vscode-deno" - }, - "[markdown]": { + "[typescript][typescriptreact][javascript][javascriptreact][markdown]": { "editor.defaultFormatter": "denoland.vscode-deno" } } diff --git a/CNAME b/CNAME deleted file mode 100644 index 6a47e795..00000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -hex.mod.land diff --git a/Dockerfile b/Dockerfile index 41f6924f..3d9a0906 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM denoland/deno:debian-1.36.4 +FROM denoland/deno:distroless-1.38.5 EXPOSE 8080 @@ -8,5 +8,4 @@ USER deno COPY ./ ./ -ENTRYPOINT [] -CMD ["deno", "task", "repl"] +ENTRYPOINT ["deno", "task", "repl"] diff --git a/LICENSE b/LICENSE index ccc611c5..43fbb52a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2023 the cool authors. +Copyright 2023-present the cool authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/_etc/tasks/check-license.ts b/_etc/tasks/check-license.ts index ecf36ce4..7adf809e 100644 --- a/_etc/tasks/check-license.ts +++ b/_etc/tasks/check-license.ts @@ -1,23 +1,24 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. // Copied from $std/_tools/check_license.ts +import * as runtime from "../../standards/runtime.ts"; import { walk } from "$std/fs/walk.ts"; const EXTENSIONS = ["*.js", ".ts", "*.jsx", ".tsx"]; const ROOT = new URL("../../", import.meta.url); -const CHECK = Deno.args.includes("--check"); +const CHECK = runtime.args.includes("--check"); const CURRENT_YEAR = new Date().getFullYear(); const RX_COPYRIGHT = new RegExp( - `// Copyright ([0-9]{4}) the cool authors\\. All rights reserved\\. ([0-9A-Za-z\-\.]+) license\\.\n`, + `// Copyright ([0-9]{4})-present the cool authors\\. All rights reserved\\. ([0-9A-Za-z\-\.]+) license\\.\n`, ); const COPYRIGHT = - `// Copyright ${CURRENT_YEAR} the cool authors. All rights reserved. Apache-2.0 license.`; + `// Copyright ${CURRENT_YEAR}-present the cool authors. All rights reserved. Apache-2.0 license.`; let failed = false; for await ( - const { path } of walk(ROOT, { + const entry of walk(ROOT, { exts: EXTENSIONS, skip: [ /_etc\/coverage\/*$/, @@ -28,34 +29,34 @@ for await ( includeDirs: false, }) ) { - const content = await Deno.readTextFile(path); + const content = await runtime.readTextFile(entry.path); const match = content.match(RX_COPYRIGHT); if (!match) { if (CHECK) { - console.error(`Missing copyright header: ${path}`); + console.error(`Missing copyright header: ${entry.path}`); failed = true; } else { const contentWithCopyright = COPYRIGHT + "\n" + content; - await Deno.writeTextFile(path, contentWithCopyright); - console.log("Copyright header automatically added to " + path); + await runtime.writeTextFile(entry.path, contentWithCopyright); + console.log("Copyright header automatically added to " + entry.path); } } else if (parseInt(match[1]) !== CURRENT_YEAR) { if (CHECK) { - console.error(`Incorrect copyright year: ${path}`); + console.error(`Incorrect copyright year: ${entry.path}`); failed = true; } else { const index = match.index ?? 0; const contentWithoutCopyright = content.replace(match[0], ""); const contentWithCopyright = contentWithoutCopyright.substring(0, index) + COPYRIGHT + "\n" + contentWithoutCopyright.substring(index); - await Deno.writeTextFile(path, contentWithCopyright); - console.log("Copyright header automatically updated in " + path); + await runtime.writeTextFile(entry.path, contentWithCopyright); + console.log("Copyright header automatically updated in " + entry.path); } } } if (failed) { console.info(`Copyright header should be "${COPYRIGHT}"`); - Deno.exit(1); + runtime.exit(1); } diff --git a/appserver/appserver.ts b/appserver/appserver.ts index e66ef159..67775791 100644 --- a/appserver/appserver.ts +++ b/appserver/appserver.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { events } from "../events/events.ts"; import { di } from "../di/services.ts"; diff --git a/appserver/channel.ts b/appserver/channel.ts index dee614fe..95040d3e 100644 --- a/appserver/channel.ts +++ b/appserver/channel.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export interface Channel { name?: string; diff --git a/appserver/mod.ts b/appserver/mod.ts index c757d55a..ee647c8a 100644 --- a/appserver/mod.ts +++ b/appserver/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export * from "./module.ts"; export * from "./appserver.ts"; diff --git a/appserver/module.ts b/appserver/module.ts index 45aa5703..e9787cb5 100644 --- a/appserver/module.ts +++ b/appserver/module.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export interface Module { name?: string; diff --git a/appserver/version-checker.ts b/appserver/version-checker.ts new file mode 100644 index 00000000..64d7d6d5 --- /dev/null +++ b/appserver/version-checker.ts @@ -0,0 +1,29 @@ +// Copyright 2023-present the cool authors. All rights reserved. MIT license. + +import * as semver from "$std/semver/mod.ts"; +import * as runtime from "../standards/runtime.ts"; + +export function compareSemanticVersions( + currentVersion: semver.SemVer, + targetVersion: semver.SemVerRange | semver.SemVer, +) { + if (semver.isSemVerRange(targetVersion)) { + return semver.testRange(currentVersion, targetVersion); + } + + return !semver.gte(currentVersion, targetVersion); +} + +export function compareTextVersions( + currentVersion: string, + targetVersion: string, +) { + const currentSemanticVersion = semver.parse(currentVersion); + const targetSemanticVersion = semver.parseRange(targetVersion); + + return compareSemanticVersions(currentSemanticVersion, targetSemanticVersion); +} + +export function checkMinDenoVersion(minimumVersion: string) { + return compareTextVersions(runtime.version.runtime, minimumVersion); +} diff --git a/collector/collector.ts b/collector/collector.ts new file mode 100644 index 00000000..d84e4d9e --- /dev/null +++ b/collector/collector.ts @@ -0,0 +1,74 @@ +// Copyright 2023-present the cool authors. All rights reserved. MIT license. + +import * as path from "$std/path/mod.ts"; +import * as walk from "$std/fs/walk.ts"; +import * as patterns from "../standards/patterns.ts"; + +export async function* walkFiles( + baseDir: string, + globFilter: string | undefined, + ignoreFilePattern: RegExp, +) { + const routesFolder = walk.walk(baseDir, { + includeDirs: false, + includeFiles: true, + exts: patterns.JS_FILE_EXTENSIONS, + skip: [ignoreFilePattern], + }); + + for await (const entry of routesFolder) { + const rel = path.relative(baseDir, entry.path); + + if (globFilter !== undefined && !path.globToRegExp(globFilter).test(rel)) { + continue; + } + + yield rel; + } +} + +export interface CollectExportsOptions { + baseDir: string; + globFilter?: string; + exportFilter?: (entries: [string, unknown][]) => [string, unknown][]; + ignoreFilePattern?: RegExp; +} + +export async function collectExports(options: CollectExportsOptions) { + const ignoreFilePattern = options.ignoreFilePattern ?? + patterns.JS_TEST_FILE_PATTERN; + + const exports: Array<[string, Array<[string, unknown]>]> = []; + + for await ( + const entry of walkFiles( + options.baseDir, + options.globFilter, + ignoreFilePattern, + ) + ) { + const entryUri = `${options.baseDir}/${entry}`; + + try { + const entryModule = await import(entryUri); + const moduleExports = Object.entries(entryModule); + + if (options.exportFilter === undefined) { + exports.push([entry, moduleExports]); + continue; + } + + const selectedExports = options.exportFilter(moduleExports); + + if (selectedExports.length === 0) { + continue; + } + + exports.push([entry, selectedExports]); + } catch (err) { + console.error(err); + } + } + + return exports; +} diff --git a/collector/formatter.ts b/collector/formatter.ts new file mode 100644 index 00000000..d60c329f --- /dev/null +++ b/collector/formatter.ts @@ -0,0 +1,25 @@ +// Copyright 2023-present the cool authors. All rights reserved. MIT license. + +import * as runtime from "../standards/runtime.ts"; + +export const format = async (input: string) => { + const proc = new runtime.Command(runtime.execPath(), { + args: ["fmt", "-"], + stdin: "piped", + stdout: "piped", + stderr: "null", + }).spawn(); + + const raw = new ReadableStream({ + start(controller) { + controller.enqueue(new TextEncoder().encode(input)); + controller.close(); + }, + }); + await raw.pipeTo(proc.stdin); + const { stdout } = await proc.output(); + + const result = new TextDecoder().decode(stdout); + + return result; +}; diff --git a/collector/manifest.test.ts b/collector/manifest.test.ts new file mode 100644 index 00000000..049252dd --- /dev/null +++ b/collector/manifest.test.ts @@ -0,0 +1,65 @@ +// Copyright 2023-present the cool authors. All rights reserved. MIT license. + +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; +import * as manifest from "./manifest.ts"; + +bdd.describe("cool/collector/manifest", () => { + bdd.it("specifierToIdentifier", () => { + const used = new Set(); + + assert.assertEquals( + manifest.specifierToIdentifier("foo/bar.ts", used), + "foo_bar", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/bar.json.ts", used), + "foo_bar_json", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/[id]/bar", used), + "foo_id_bar", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/[...all]/bar", used), + "foo_all_bar", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/[[optional]]/bar", used), + "foo_optional_bar", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/as-df/bar", used), + "foo_as_df_bar", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/as@df", used), + "foo_as_df", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/foo.bar.baz.tsx", used), + "foo_foo_bar_baz", + ); + assert.assertEquals( + manifest.specifierToIdentifier("404", used), + "_404", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/_middleware", used), + "foo_middleware", + ); + }); + + bdd.it("specifierToIdentifier deals with duplicates", () => { + const used = new Set(); + + assert.assertEquals( + manifest.specifierToIdentifier("foo/bar", used), + "foo_bar", + ); + assert.assertEquals( + manifest.specifierToIdentifier("foo/bar", used), + "foo_bar_1", + ); + }); +}); diff --git a/collector/manifest.ts b/collector/manifest.ts new file mode 100644 index 00000000..2aeeb42c --- /dev/null +++ b/collector/manifest.ts @@ -0,0 +1,153 @@ +// Copyright 2023-present the cool authors. All rights reserved. MIT license. + +import { + isIdentifierChar, + isIdentifierStart, +} from "https://esm.sh/@babel/helper-validator-identifier@7.22.20"; +import * as path from "$std/path/mod.ts"; +import * as posix from "$std/path/posix/mod.ts"; +import * as runtime from "../standards/runtime.ts"; +import * as collector from "./collector.ts"; +import * as formatter from "./formatter.ts"; + +const IMPORT_PREFIX = "$$"; +const PLACEHOLDER_PREFIX = `##!!//__`; +const PLACEHOLDER_SUFFIX = "__//!!##"; + +/** + * Import specifiers must have forward slashes + */ +function toImportSpecifier(file: string) { + const specifier = posix.normalize(file).replace(/\\/g, "/"); + + if (!specifier.startsWith(".")) { + return `./${specifier}`; + } + + return specifier; +} + +// Create a valid JS identifier out of the project relative specifier. +// Note that we only need to deal with strings that _must_ have been +// valid file names in Windows, macOS and Linux and every identifier we +// create here will be prefixed with at least one "$". This greatly +// simplifies the invalid characters we have to account for. +export function specifierToIdentifier(specifier: string, used: Set) { + // specifier = specifier.replace(/^(?:\.\/pkg)\//, ""); + const ext = path.extname(specifier); + if (ext) { + specifier = specifier.slice(0, -ext.length); + } + + // Turn the specifier into a readable JS identifier + let ident = ""; + for (let i = 0; i < specifier.length; i++) { + const char = specifier.charCodeAt(i); + if (i === 0 && !isIdentifierStart(char)) { + ident += "_"; + if (isIdentifierChar(char)) { + ident += specifier[i]; + } + } else if (!isIdentifierChar(char)) { + if (ident[ident.length - 1] !== "_") { + ident += "_"; + } + } else if (ident[ident.length - 1] !== "_" || specifier[i] !== "_") { + ident += specifier[i]; + } + } + + if (used.has(ident)) { + let check = ident; + let i = 1; + while (used.has(check)) { + check = `${ident}_${i++}`; + } + ident = check; + } + + used.add(ident); + return ident; +} + +const getSortFn = function () { + const naturalCollator = new Intl.Collator(undefined, { numeric: true }); + + return naturalCollator.compare; +}; + +const placeholder = function (text: string) { + return `${PLACEHOLDER_PREFIX}${text}${PLACEHOLDER_SUFFIX}`; +}; + +export async function writeManifestToString( + collection: Array<[string, Array<[string, unknown]>]>, +) { + const sortFn = getSortFn(); + + const used = new Set(); + const imports = []; + const manifest = { + baseUrl: placeholder("import.meta.url"), + exports: [] as Array, + }; + + for (const [file, exports] of collection) { + const specifier = toImportSpecifier(file); + const identifier = specifierToIdentifier(file, used); + + imports.push( + `import * as ${IMPORT_PREFIX}${identifier} from "${specifier}";`, + ); + + const ref = function (target: unknown) { + const name = (target as { name: string }).name; + + return placeholder(`${IMPORT_PREFIX}${identifier}.${name}`); + }; + + for (const [, moduleFn] of exports) { + manifest.exports.push(ref(moduleFn)); + } + } + + imports.sort(sortFn); + const importsSerialized = imports.join("\n"); + + manifest.exports.sort(sortFn); + const manifestSerialized = JSON.stringify(manifest, null, 2) + .replaceAll(`"${PLACEHOLDER_PREFIX}`, "") + .replaceAll(`${PLACEHOLDER_SUFFIX}"`, ""); + + const output = + `// This file is generated by cool collector. Your changes might be overwritten. + +${importsSerialized} + +export const manifest = ${manifestSerialized}; +`; + + const manifestStr = await formatter.format(output); + + return manifestStr; +} + +export async function buildManifest(options: collector.CollectExportsOptions) { + const collection = await collector.collectExports(options); + + const manifestStr = await writeManifestToString(collection); + const manifestPath = path.join(options.baseDir, "./manifest.gen.ts"); + + await runtime.writeTextFile(manifestPath, manifestStr); + + const exportModules = Object.values(collection); + const exportCount = exportModules.reduce((acc, [, moduleFns]) => { + acc += moduleFns.length; + return acc; + }, 0); + + console.log( + `%cThe manifest file has been generated for ${exportCount} exports in ${exportModules.length} modules.`, + "color: blue", + ); +} diff --git a/collector/mod.ts b/collector/mod.ts new file mode 100644 index 00000000..1f3a9fec --- /dev/null +++ b/collector/mod.ts @@ -0,0 +1,4 @@ +// Copyright 2023-present the cool authors. All rights reserved. MIT license. + +export * from "./collector.ts"; +export * from "./manifest.ts"; diff --git a/cool.ts b/cool.ts index 681f3060..ffba00a6 100755 --- a/cool.ts +++ b/cool.ts @@ -1,5 +1,5 @@ #!/usr/bin/env -S deno run --allow-run --allow-read --allow-write --allow-net -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { metadata } from "https://deno.land/x/cool@0.7.13/mod.ts"; import { deno } from "https://deno.land/x/cool@0.7.13/deps.ts"; diff --git a/deno.jsonc b/deno.jsonc index 24a879c6..e152e344 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -4,7 +4,6 @@ "jsxImportSource": "$cool", "strict": true, - "noUncheckedIndexedAccess": true, "noPropertyAccessFromIndexSignature": true, "noImplicitOverride": true, "noImplicitReturns": true, @@ -13,15 +12,9 @@ }, "lock": false, "imports": { + "$cool/jsx-runtime": "./jsx-runtime/mod.ts", "$cool/": "./", - "$std/": "https://deno.land/std@0.205.0/" - // "react": "https://esm.sh/react@18.2.0", - // "react/": "https://esm.sh/react@18.2.0/", - // "react-dom": "https://esm.sh/react-dom@18.2.0", - // "react-dom/": "https://esm.sh/react-dom@18.2.0/", - - // "@preact/signals-core": "npm:@preact/signals-core@1.5.0", - // "@preact/signals-react": "npm:@preact/signals-react@1.3.6" + "$std/": "https://deno.land/std@0.208.0/" }, "lint": { "rules": { @@ -43,8 +36,7 @@ "test": { "exclude": [ "_etc/", - "docs/", - "lime/" + "docs/" ] }, "bench": { @@ -54,7 +46,7 @@ ] }, "tasks": { - "cleanup": "rm -rf ./_etc/coverage/ ./_etc/cov_profile.lcov ./deno.lock && deno cache --unstable --reload ./mod.ts", + "cleanup": "rm -rf ./_etc/coverage/ ./_etc/coverage.lcov ./deno.lock && deno cache --unstable --reload ./mod.ts", "check:license": "deno run --allow-read --allow-write ./_etc/tasks/check-license.ts", "check:mod": "deno run --check --reload ./mod.ts", "doc:lint": "deno doc --lint ./mod.ts", @@ -62,7 +54,7 @@ "test": "deno test --allow-sys --allow-net --allow-env --allow-read --allow-write --allow-run --parallel --watch", "test:run": "deno test --allow-sys --allow-net --allow-env --allow-read --allow-write --allow-run --parallel --trace-ops --coverage=./_etc/coverage/", "test:coverage": "deno coverage ./_etc/coverage/ --exclude='\\.(j|t)sx$'", - "test:generate-lcov": "deno coverage ./_etc/coverage --exclude='\\.(j|t)sx$' --lcov --output=./_etc/cov_profile.lcov", + "test:coverage-gen": "deno coverage ./_etc/coverage --exclude='\\.(j|t)sx$' --lcov --output=./_etc/coverage.lcov", "ok": "deno fmt --check && deno lint && deno task check:license --check && deno task check:mod && deno task test:run", "repl": "deno repl --unstable --allow-all --eval-file=./repl-init.ts" } diff --git a/deps.ts b/deps.ts deleted file mode 100644 index af766757..00000000 --- a/deps.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. - -/// -/// - -if (globalThis.Deno === undefined) { - throw new Error("Deno is not defined"); -} - -export const deno = globalThis.Deno; - -export * as assert from "$std/assert/mod.ts"; -export * as async from "$std/async/mod.ts"; -export * as bdd from "$std/testing/bdd.ts"; -export * as crypto from "$std/crypto/mod.ts"; -export * as datetime from "$std/datetime/mod.ts"; -export * as dotenv from "$std/dotenv/mod.ts"; -export * as flags from "$std/flags/mod.ts"; -export * as fs from "$std/fs/mod.ts"; -export * as http from "$std/http/mod.ts"; -export * as jsonc from "$std/jsonc/mod.ts"; -export * as mock from "$std/testing/mock.ts"; -export * as path from "$std/path/mod.ts"; -export * as posix from "$std/path/posix/mod.ts"; -export * as regexp from "$std/regexp/mod.ts"; -export * as semver from "$std/semver/mod.ts"; diff --git a/di/container.test.ts b/di/container.test.ts index d4a5998b..c21fc13b 100644 --- a/di/container.test.ts +++ b/di/container.test.ts @@ -1,6 +1,8 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd, mock } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; +import * as mock from "$std/testing/mock.ts"; import { Registry } from "./container.ts"; bdd.describe("cool/di/container", () => { diff --git a/di/container.ts b/di/container.ts index db6cb52a..520f2dd1 100644 --- a/di/container.ts +++ b/di/container.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { type AnonymousFunction } from "../standards/functions.ts"; diff --git a/di/decorators.test.ts b/di/decorators.test.ts index 21491079..17cfa929 100644 --- a/di/decorators.test.ts +++ b/di/decorators.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { di } from "./services.ts"; import { injectable } from "./decorators.ts"; diff --git a/di/decorators.ts b/di/decorators.ts index 08eeee78..ec030ad7 100644 --- a/di/decorators.ts +++ b/di/decorators.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type ServiceKey } from "./primitives.ts"; import { registry } from "./services.ts"; diff --git a/di/fluent-api-factory.test.ts b/di/fluent-api-factory.test.ts index 79520be7..892fdea6 100644 --- a/di/fluent-api-factory.test.ts +++ b/di/fluent-api-factory.test.ts @@ -1,6 +1,8 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd, mock } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; +import * as mock from "$std/testing/mock.ts"; import { Registry } from "./container.ts"; import { factory } from "./fluent-api-factory.ts"; diff --git a/di/fluent-api-factory.ts b/di/fluent-api-factory.ts index 8d04b18f..c6c9c31b 100644 --- a/di/fluent-api-factory.ts +++ b/di/fluent-api-factory.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { type AnonymousFunction } from "../standards/functions.ts"; diff --git a/di/invoker.test.ts b/di/invoker.test.ts index 03877c64..713fc3fd 100644 --- a/di/invoker.test.ts +++ b/di/invoker.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { Registry } from "./container.ts"; import { invoke } from "./invoker.ts"; diff --git a/di/invoker.ts b/di/invoker.ts index 49e0db69..eb7a6819 100644 --- a/di/invoker.ts +++ b/di/invoker.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type AnonymousFunction } from "../standards/functions.ts"; import { diff --git a/di/mod.ts b/di/mod.ts index 49b1fbe7..b3b8d2ec 100644 --- a/di/mod.ts +++ b/di/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export * from "./primitives.ts"; export * from "./container.ts"; diff --git a/di/primitives.ts b/di/primitives.ts index b3584c25..f6aff5fe 100644 --- a/di/primitives.ts +++ b/di/primitives.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { diff --git a/di/services.ts b/di/services.ts index 4759589e..858b55b4 100644 --- a/di/services.ts +++ b/di/services.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { Registry } from "./container.ts"; import { factory } from "./fluent-api-factory.ts"; diff --git a/docs/appserver.html b/docs/appserver.html index 6c3f5da9..1d2ed7ef 100644 --- a/docs/appserver.html +++ b/docs/appserver.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace appserver
- +
@@ -95,7 +95,7 @@

Variables

- +

Interfaces

@@ -105,12 +105,12 @@

Variables

- +
- +
diff --git a/docs/appserver/AppServer.html b/docs/appserver/AppServer.html index b383a4d5..89367f22 100644 --- a/docs/appserver/AppServer.html +++ b/docs/appserver/AppServer.html @@ -13,70 +13,70 @@
← Back to index - +
- +
@@ -104,7 +104,7 @@

Variables

- +

Properties

@@ -123,9 +123,9 @@

Variables

- +
- + - + - + - + - + - +

Methods

@@ -199,9 +199,9 @@

Variables

- +
- + - + - + - + - +
diff --git a/docs/appserver/Module.html b/docs/appserver/Module.html index 771bd2b3..f1ba4873 100644 --- a/docs/appserver/Module.html +++ b/docs/appserver/Module.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface appserver.Module
- +
@@ -104,9 +104,9 @@

Variables

- + - + - + - + - + - + - + - + - + - +
diff --git a/docs/compound_index.html b/docs/compound_index.html index 14b02fc1..68b91b94 100644 --- a/docs/compound_index.html +++ b/docs/compound_index.html @@ -15,41 +15,41 @@

cool

APIs

Modules

    - +
  • - +

Index

- +
- +

Module

- - + +
diff --git a/docs/di.html b/docs/di.html index b8aa8aa9..7c749859 100644 --- a/docs/di.html +++ b/docs/di.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace di
- +
@@ -95,7 +95,7 @@

Variables

- + @@ -105,7 +105,7 @@

Variables

- +

Enums

@@ -115,7 +115,7 @@

Variables

- +

Interfaces

@@ -125,7 +125,7 @@

Variables

- +
@@ -135,7 +135,7 @@

Variables

- +

Type Aliases

@@ -145,7 +145,7 @@

Variables

- +
@@ -155,7 +155,7 @@

Variables

- +
@@ -165,7 +165,7 @@

Variables

- +
@@ -175,7 +175,7 @@

Variables

- +
@@ -185,7 +185,7 @@

Variables

- +
@@ -195,7 +195,7 @@

Variables

- +
@@ -205,7 +205,7 @@

Variables

- +
@@ -215,7 +215,7 @@

Variables

- +

Variables

@@ -225,7 +225,7 @@

Variables

- +
@@ -235,7 +235,7 @@

Variables

- +
@@ -245,7 +245,7 @@

Variables

- +
@@ -255,7 +255,7 @@

Variables

- +
@@ -265,12 +265,12 @@

Variables

- +
- +
diff --git a/docs/di/ClassService.html b/docs/di/ClassService.html index 7170e34c..d66e44bc 100644 --- a/docs/di/ClassService.html +++ b/docs/di/ClassService.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias di.ClassService
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/di/FunctionService.html b/docs/di/FunctionService.html index 0b4164d6..60a1d04a 100644 --- a/docs/di/FunctionService.html +++ b/docs/di/FunctionService.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias di.FunctionService
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/di/PromisableBuilder.html b/docs/di/PromisableBuilder.html index 2d67b704..710fe6c5 100644 --- a/docs/di/PromisableBuilder.html +++ b/docs/di/PromisableBuilder.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias di.PromisableBuilder
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/di/Registry.html b/docs/di/Registry.html index 918d94fd..4850d840 100644 --- a/docs/di/Registry.html +++ b/docs/di/Registry.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable di.registry
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/di/Scope.html b/docs/di/Scope.html index d98b91b3..c93028fa 100644 --- a/docs/di/Scope.html +++ b/docs/di/Scope.html @@ -13,70 +13,70 @@
← Back to index - +
- +
@@ -104,7 +104,7 @@

Variables

- +

Type Parameters

@@ -123,9 +123,9 @@

Variables

- +
- + - +

Properties

@@ -161,9 +161,9 @@

Variables

- +
- + - + - + - +

Methods

@@ -218,9 +218,9 @@

Variables

- +
- + - + - + - + - + - + - +
diff --git a/docs/di/ServiceDescriptor.html b/docs/di/ServiceDescriptor.html index ce8e5862..55a560eb 100644 --- a/docs/di/ServiceDescriptor.html +++ b/docs/di/ServiceDescriptor.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias di.ServiceDescriptor
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/di/ServiceKey.html b/docs/di/ServiceKey.html index 98986dc3..1903aab4 100644 --- a/docs/di/ServiceKey.html +++ b/docs/di/ServiceKey.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias di.ServiceKey
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/di/ServiceRegistry.html b/docs/di/ServiceRegistry.html index 2d45edda..919b61e6 100644 --- a/docs/di/ServiceRegistry.html +++ b/docs/di/ServiceRegistry.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface di.ServiceRegistry
- +
@@ -104,9 +104,9 @@

Variables

- + - + - +

Properties

@@ -142,7 +142,7 @@

Variables

- +

Methods

@@ -161,9 +161,9 @@

Variables

- +
- + - + - + - + - + - + - + - + - +
diff --git a/docs/di/ServiceResolution.html b/docs/di/ServiceResolution.html index a5a5b6fd..2a5184d3 100644 --- a/docs/di/ServiceResolution.html +++ b/docs/di/ServiceResolution.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias di.ServiceResolution
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/di/ServiceScope.html b/docs/di/ServiceScope.html index e9d02b24..3d4ed59b 100644 --- a/docs/di/ServiceScope.html +++ b/docs/di/ServiceScope.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface di.ServiceScope
- +
@@ -104,9 +104,9 @@

Variables

- + - + - +

Properties

@@ -142,9 +142,9 @@

Variables

- +
- + - + - + - +

Methods

@@ -212,15 +212,15 @@

Variables

- +
(token: K, defaultValue?: V2): ServiceResolution<V2> - + - + - + - + - + (fn: T): ReturnType<T> - + - + - + - +
diff --git a/docs/di/ServiceType.html b/docs/di/ServiceType.html index 5f9d0e75..429cddf1 100644 --- a/docs/di/ServiceType.html +++ b/docs/di/ServiceType.html @@ -13,77 +13,77 @@
← Back to index - +
- +
enum di.ServiceType
- +
@@ -104,9 +104,9 @@

Variables

- + - + - + - + - + - + - + - +
diff --git a/docs/di/ServiceValue.html b/docs/di/ServiceValue.html index 9311d0dd..10c50901 100644 --- a/docs/di/ServiceValue.html +++ b/docs/di/ServiceValue.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias di.ServiceValue
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/di/Value.html b/docs/di/Value.html index 550c0b5f..6a7ed4b7 100644 --- a/docs/di/Value.html +++ b/docs/di/Value.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias di.Value
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/di/di.html b/docs/di/di.html index 15fe7e24..7aa9db22 100644 --- a/docs/di/di.html +++ b/docs/di/di.html @@ -13,84 +13,84 @@
← Back to index - +
- +
variable di.di
- +
- +
- +
diff --git a/docs/di/inject.html b/docs/di/inject.html index 67e003ff..a4e0f6f3 100644 --- a/docs/di/inject.html +++ b/docs/di/inject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable di.inject
- +
@@ -104,12 +104,12 @@

Variables

- +
- +
diff --git a/docs/di/injectable.html b/docs/di/injectable.html index 4f51ea47..07d46381 100644 --- a/docs/di/injectable.html +++ b/docs/di/injectable.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable di.injectable
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/di/services.html b/docs/di/services.html index f3df9006..c72eb317 100644 --- a/docs/di/services.html +++ b/docs/di/services.html @@ -13,84 +13,84 @@
← Back to index - +
- +
variable di.services
- +
- +
- +
diff --git a/docs/dotenv.html b/docs/dotenv.html index 4a55d904..247de0c3 100644 --- a/docs/dotenv.html +++ b/docs/dotenv.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace dotenv
- +
@@ -95,7 +95,7 @@

Variables

- + @@ -105,7 +105,7 @@

Variables

- + @@ -115,7 +115,7 @@

Variables

- +

Type Aliases

@@ -125,7 +125,7 @@

Variables

- +
@@ -135,7 +135,7 @@

Variables

- +
@@ -145,7 +145,7 @@

Variables

- +

Variables

@@ -155,7 +155,7 @@

Variables

- +
@@ -165,7 +165,7 @@

Variables

- +
@@ -175,7 +175,7 @@

Variables

- +
@@ -185,7 +185,7 @@

Variables

- +
@@ -195,7 +195,7 @@

Variables

- +
@@ -205,7 +205,7 @@

Variables

- +
@@ -215,7 +215,7 @@

Variables

- +
@@ -225,12 +225,12 @@

Variables

- +
- +
diff --git a/docs/dotenv/BaseEnvVariables.html b/docs/dotenv/BaseEnvVariables.html index 2ebc5991..02b562a8 100644 --- a/docs/dotenv/BaseEnvVariables.html +++ b/docs/dotenv/BaseEnvVariables.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface dotenv.BaseEnvVariables
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/ConfigureFn.html b/docs/dotenv/ConfigureFn.html index 691166fe..5bad655f 100644 --- a/docs/dotenv/ConfigureFn.html +++ b/docs/dotenv/ConfigureFn.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias dotenv.ConfigureFn
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/dotenv/EnvMap.html b/docs/dotenv/EnvMap.html index dbd66600..383ee554 100644 --- a/docs/dotenv/EnvMap.html +++ b/docs/dotenv/EnvMap.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias dotenv.EnvMap
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/EnvReader.html b/docs/dotenv/EnvReader.html index ee3caf78..ff010595 100644 --- a/docs/dotenv/EnvReader.html +++ b/docs/dotenv/EnvReader.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface dotenv.EnvReader
- +
@@ -104,7 +104,7 @@

Variables

- +

Methods

@@ -136,15 +136,15 @@

Variables

- +
(key: string, defaultValue: T): T - + - + - + (key: string): T | undefined - + - + - + (key: string, values: Array<T>, defaultValue: T): T - + - + - + (key: string, values: Array<T>): T | undefined - + - + - + (key: string, defaultValue: T): T - + - + - + (key: string): T | undefined - + - + - + (key: string, defaultValue: T): T - + - + - + (key: string): T | undefined - + - +
diff --git a/docs/dotenv/EnvVariables.html b/docs/dotenv/EnvVariables.html index 8258cb20..d2e5db6c 100644 --- a/docs/dotenv/EnvVariables.html +++ b/docs/dotenv/EnvVariables.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias dotenv.EnvVariables
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/LoaderOptions.html b/docs/dotenv/LoaderOptions.html index 31ca6b98..9e5383c6 100644 --- a/docs/dotenv/LoaderOptions.html +++ b/docs/dotenv/LoaderOptions.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface dotenv.LoaderOptions
- +
@@ -104,9 +104,9 @@

Variables

- + - + - + - + - + - +
diff --git a/docs/dotenv/configure.html b/docs/dotenv/configure.html index ce8693c4..0fd07169 100644 --- a/docs/dotenv/configure.html +++ b/docs/dotenv/configure.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable dotenv.configure
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/createEnvReader.html b/docs/dotenv/createEnvReader.html index d29b1425..353a59a3 100644 --- a/docs/dotenv/createEnvReader.html +++ b/docs/dotenv/createEnvReader.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable dotenv.createEnvReader
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/defaultEnvValue.html b/docs/dotenv/defaultEnvValue.html index 1811e112..0a1b05f4 100644 --- a/docs/dotenv/defaultEnvValue.html +++ b/docs/dotenv/defaultEnvValue.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable dotenv.defaultEnvValue
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/defaultEnvVar.html b/docs/dotenv/defaultEnvVar.html index 386e8653..3e39af29 100644 --- a/docs/dotenv/defaultEnvVar.html +++ b/docs/dotenv/defaultEnvVar.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable dotenv.defaultEnvVar
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/env.html b/docs/dotenv/env.html index 22dc00bb..e215b47c 100644 --- a/docs/dotenv/env.html +++ b/docs/dotenv/env.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable dotenv.env
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/load.html b/docs/dotenv/load.html index 0a386b43..7cbb5fdf 100644 --- a/docs/dotenv/load.html +++ b/docs/dotenv/load.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable dotenv.load
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/parseEnvFromFile.html b/docs/dotenv/parseEnvFromFile.html index 6973e62e..2033232d 100644 --- a/docs/dotenv/parseEnvFromFile.html +++ b/docs/dotenv/parseEnvFromFile.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable dotenv.parseEnvFromFile
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/dotenv/parseEnvString.html b/docs/dotenv/parseEnvString.html index fe25c950..6034aedd 100644 --- a/docs/dotenv/parseEnvString.html +++ b/docs/dotenv/parseEnvString.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable dotenv.parseEnvString
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/events.html b/docs/events.html index 522e4234..6fa4f5a1 100644 --- a/docs/events.html +++ b/docs/events.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace events
- +
@@ -95,7 +95,7 @@

Variables

- + @@ -105,7 +105,7 @@

Variables

- +

Interfaces

@@ -115,7 +115,7 @@

Variables

- +
@@ -125,7 +125,7 @@

Variables

- +

Variables

@@ -135,7 +135,7 @@

Variables

- +
@@ -145,7 +145,7 @@

Variables

- +
@@ -155,12 +155,12 @@

Variables

- +
- +
diff --git a/docs/events/Dispatcher.html b/docs/events/Dispatcher.html index 0d267008..07cb0615 100644 --- a/docs/events/Dispatcher.html +++ b/docs/events/Dispatcher.html @@ -1,10 +1,10 @@ - events.dispatcher - cool documentation + events.Dispatcher - cool documentation - + @@ -13,84 +13,141 @@
← Back to index - + -
- +
+ - +
diff --git a/docs/events/EventDispatcher.html b/docs/events/EventDispatcher.html index 40991b3d..6b6c9fda 100644 --- a/docs/events/EventDispatcher.html +++ b/docs/events/EventDispatcher.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface events.EventDispatcher
- +
@@ -104,7 +104,7 @@

Variables

- +

Methods

@@ -136,18 +136,18 @@

Variables

- +
(type: string, eventInitDict?: CustomEventInit<T>): boolean - + - +
diff --git a/docs/events/EventRegistry.html b/docs/events/EventRegistry.html index db0203e5..21fba699 100644 --- a/docs/events/EventRegistry.html +++ b/docs/events/EventRegistry.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface events.EventRegistry
- +
@@ -104,7 +104,7 @@

Variables

- +

Methods

@@ -123,9 +123,9 @@

Variables

- +
- + - + - + - + - +
diff --git a/docs/events/Registry.html b/docs/events/Registry.html index 1c3c0efe..c6333c05 100644 --- a/docs/events/Registry.html +++ b/docs/events/Registry.html @@ -1,10 +1,10 @@ - events.registry - cool documentation + events.Registry - cool documentation - + @@ -13,84 +13,84 @@
← Back to index - + -
- +
+ - +
diff --git a/docs/events/events.html b/docs/events/events.html index 3d1a073e..676eb238 100644 --- a/docs/events/events.html +++ b/docs/events/events.html @@ -13,84 +13,84 @@
← Back to index - +
- +
variable events.events
- +
- +
- +
diff --git a/docs/fp.html b/docs/fp.html index a04870bd..b68bda2c 100644 --- a/docs/fp.html +++ b/docs/fp.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace fp
- +
@@ -95,7 +95,7 @@

Variables

- + @@ -105,7 +105,7 @@

Variables

- + @@ -115,7 +115,7 @@

Variables

- + @@ -125,7 +125,7 @@

Variables

- + @@ -135,7 +135,7 @@

Variables

- + @@ -145,7 +145,7 @@

Variables

- + @@ -155,7 +155,7 @@

Variables

- + @@ -165,7 +165,7 @@

Variables

- + @@ -175,7 +175,7 @@

Variables

- + @@ -185,7 +185,7 @@

Variables

- + @@ -195,7 +195,7 @@

Variables

- + @@ -205,7 +205,7 @@

Variables

- +

Variables

@@ -215,7 +215,7 @@

Variables

- +
@@ -225,7 +225,7 @@

Variables

- +
@@ -235,7 +235,7 @@

Variables

- +
@@ -245,7 +245,7 @@

Variables

- +
@@ -255,7 +255,7 @@

Variables

- +
@@ -265,7 +265,7 @@

Variables

- +
@@ -275,7 +275,7 @@

Variables

- +
@@ -285,7 +285,7 @@

Variables

- +
@@ -295,7 +295,7 @@

Variables

- +
@@ -305,7 +305,7 @@

Variables

- +
@@ -315,7 +315,7 @@

Variables

- +
@@ -325,7 +325,7 @@

Variables

- +
@@ -335,7 +335,7 @@

Variables

- +
@@ -345,7 +345,7 @@

Variables

- +
@@ -355,7 +355,7 @@

Variables

- +
@@ -365,7 +365,7 @@

Variables

- +
@@ -375,7 +375,7 @@

Variables

- +
@@ -385,7 +385,7 @@

Variables

- +
@@ -395,7 +395,7 @@

Variables

- +
@@ -405,7 +405,7 @@

Variables

- +
@@ -415,7 +415,7 @@

Variables

- +
@@ -425,7 +425,7 @@

Variables

- +
@@ -435,7 +435,7 @@

Variables

- +
@@ -445,7 +445,7 @@

Variables

- +
@@ -455,7 +455,7 @@

Variables

- +
@@ -465,7 +465,7 @@

Variables

- +
@@ -475,7 +475,7 @@

Variables

- +
@@ -485,7 +485,7 @@

Variables

- +
@@ -495,7 +495,7 @@

Variables

- +
@@ -505,7 +505,7 @@

Variables

- +
@@ -515,7 +515,7 @@

Variables

- +
@@ -525,7 +525,7 @@

Variables

- +
@@ -535,7 +535,7 @@

Variables

- +
@@ -545,7 +545,7 @@

Variables

- +
@@ -555,7 +555,7 @@

Variables

- +
@@ -565,7 +565,7 @@

Variables

- +
@@ -575,7 +575,7 @@

Variables

- +
@@ -585,7 +585,7 @@

Variables

- +
@@ -595,7 +595,7 @@

Variables

- +
@@ -605,7 +605,7 @@

Variables

- +
@@ -615,7 +615,7 @@

Variables

- +
@@ -625,7 +625,9 @@

Variables

- +

The splitObject function splits an object into two parts based on a given number, with the first +part containing the specified number of items and the second part containing the remaining items.

+
@@ -635,7 +637,7 @@

Variables

- +
@@ -645,7 +647,7 @@

Variables

- +
@@ -655,7 +657,7 @@

Variables

- +
@@ -665,12 +667,12 @@

Variables

- +
- +
diff --git a/docs/fp/Callback.html b/docs/fp/Callback.html index 6515b83c..4661d407 100644 --- a/docs/fp/Callback.html +++ b/docs/fp/Callback.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.Callback
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/Decorated.html b/docs/fp/Decorated.html index 6fea1ee5..18cc0171 100644 --- a/docs/fp/Decorated.html +++ b/docs/fp/Decorated.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.Decorated
- +
@@ -104,9 +104,9 @@

Variables

- + - + - +

Definition

@@ -142,12 +142,12 @@

Variables

- +
- +
diff --git a/docs/fp/EventType.html b/docs/fp/EventType.html index 2b26b1c7..f6726fb2 100644 --- a/docs/fp/EventType.html +++ b/docs/fp/EventType.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.EventType
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/LogType.html b/docs/fp/LogType.html index 7c8d46ae..cc7745c0 100644 --- a/docs/fp/LogType.html +++ b/docs/fp/LogType.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.LogType
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/fp/LoggerType.html b/docs/fp/LoggerType.html index 57b0b090..47fd57ee 100644 --- a/docs/fp/LoggerType.html +++ b/docs/fp/LoggerType.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.LoggerType
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/fp/MutatorType.html b/docs/fp/MutatorType.html index b87dadc7..4ca6232a 100644 --- a/docs/fp/MutatorType.html +++ b/docs/fp/MutatorType.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.MutatorType
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/fp/NextType.html b/docs/fp/NextType.html index 449a257d..5e8e08ee 100644 --- a/docs/fp/NextType.html +++ b/docs/fp/NextType.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.NextType
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/fp/Pattern.html b/docs/fp/Pattern.html index ec09ceb4..17182918 100644 --- a/docs/fp/Pattern.html +++ b/docs/fp/Pattern.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.Pattern
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/PickFromArrayResult.html b/docs/fp/PickFromArrayResult.html index 30680e52..23754938 100644 --- a/docs/fp/PickFromArrayResult.html +++ b/docs/fp/PickFromArrayResult.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.PickFromArrayResult
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/fp/PickFromObjectResult.html b/docs/fp/PickFromObjectResult.html index e17f6963..b22958cc 100644 --- a/docs/fp/PickFromObjectResult.html +++ b/docs/fp/PickFromObjectResult.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.PickFromObjectResult
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/fp/SplitArrayResult.html b/docs/fp/SplitArrayResult.html index 0e3cfacb..3990e334 100644 --- a/docs/fp/SplitArrayResult.html +++ b/docs/fp/SplitArrayResult.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.SplitArrayResult
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/fp/SplitObjectResult.html b/docs/fp/SplitObjectResult.html index 6a470208..d4a18fc7 100644 --- a/docs/fp/SplitObjectResult.html +++ b/docs/fp/SplitObjectResult.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias fp.SplitObjectResult
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/fp/appendToArray.html b/docs/fp/appendToArray.html index 240dc24a..07243829 100644 --- a/docs/fp/appendToArray.html +++ b/docs/fp/appendToArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.appendToArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/appendToObject.html b/docs/fp/appendToObject.html index 0a1f2b9c..41a66e4f 100644 --- a/docs/fp/appendToObject.html +++ b/docs/fp/appendToObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.appendToObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/associateArray.html b/docs/fp/associateArray.html index 4d622e5d..b356ff2c 100644 --- a/docs/fp/associateArray.html +++ b/docs/fp/associateArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.associateArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/associateObject.html b/docs/fp/associateObject.html index 60e52aa5..0686ac94 100644 --- a/docs/fp/associateObject.html +++ b/docs/fp/associateObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.associateObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/compose.html b/docs/fp/compose.html index c7d8473c..3ad185f7 100644 --- a/docs/fp/compose.html +++ b/docs/fp/compose.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.compose
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/curry.html b/docs/fp/curry.html index 2d915c27..69d63e24 100644 --- a/docs/fp/curry.html +++ b/docs/fp/curry.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.curry
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/curryFunctions.html b/docs/fp/curryFunctions.html index 8ec80049..5ab3f938 100644 --- a/docs/fp/curryFunctions.html +++ b/docs/fp/curryFunctions.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.curryFunctions
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/curryRight.html b/docs/fp/curryRight.html index 70ac9b15..06fd47f0 100644 --- a/docs/fp/curryRight.html +++ b/docs/fp/curryRight.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.curryRight
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/decorate.html b/docs/fp/decorate.html index da793a75..2b92f762 100644 --- a/docs/fp/decorate.html +++ b/docs/fp/decorate.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.decorate
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/deepCopy.html b/docs/fp/deepCopy.html index 827f2e41..1b6bb902 100644 --- a/docs/fp/deepCopy.html +++ b/docs/fp/deepCopy.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.deepCopy
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/deepCopy2.html b/docs/fp/deepCopy2.html index cda13e2d..9ab973bc 100644 --- a/docs/fp/deepCopy2.html +++ b/docs/fp/deepCopy2.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.deepCopy2
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/deepMerge.html b/docs/fp/deepMerge.html index 55567349..2b56971c 100644 --- a/docs/fp/deepMerge.html +++ b/docs/fp/deepMerge.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.deepMerge
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/dispatcher.html b/docs/fp/dispatcher.html index 9ce8acc7..1c69ad1d 100644 --- a/docs/fp/dispatcher.html +++ b/docs/fp/dispatcher.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.dispatcher
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/distinctArray.html b/docs/fp/distinctArray.html index a52a7e4f..de04f85a 100644 --- a/docs/fp/distinctArray.html +++ b/docs/fp/distinctArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.distinctArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/distinctObject.html b/docs/fp/distinctObject.html index f3731399..41bd0936 100644 --- a/docs/fp/distinctObject.html +++ b/docs/fp/distinctObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.distinctObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/dropFromArray.html b/docs/fp/dropFromArray.html index beec8c0b..1253b2d1 100644 --- a/docs/fp/dropFromArray.html +++ b/docs/fp/dropFromArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.dropFromArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/dropFromObject.html b/docs/fp/dropFromObject.html index 51c7c8e6..03d2a121 100644 --- a/docs/fp/dropFromObject.html +++ b/docs/fp/dropFromObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.dropFromObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/emitter.html b/docs/fp/emitter.html index 990a75e6..eda2b25c 100644 --- a/docs/fp/emitter.html +++ b/docs/fp/emitter.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.emitter
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/filterArray.html b/docs/fp/filterArray.html index 3e451ebc..b669c6fc 100644 --- a/docs/fp/filterArray.html +++ b/docs/fp/filterArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.filterArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/filterObject.html b/docs/fp/filterObject.html index 8d1bd3e4..c9877df1 100644 --- a/docs/fp/filterObject.html +++ b/docs/fp/filterObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.filterObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/iterate.html b/docs/fp/iterate.html index bcd2965e..ff955cbb 100644 --- a/docs/fp/iterate.html +++ b/docs/fp/iterate.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.iterate
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/mapArray.html b/docs/fp/mapArray.html index 00cf2a56..c069e864 100644 --- a/docs/fp/mapArray.html +++ b/docs/fp/mapArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.mapArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/mapObject.html b/docs/fp/mapObject.html index cfb957b0..b88e84a1 100644 --- a/docs/fp/mapObject.html +++ b/docs/fp/mapObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.mapObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/match.html b/docs/fp/match.html index f01c6623..5731da7a 100644 --- a/docs/fp/match.html +++ b/docs/fp/match.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.match
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/mergeArrays.html b/docs/fp/mergeArrays.html index 4cb80fe1..05e76b35 100644 --- a/docs/fp/mergeArrays.html +++ b/docs/fp/mergeArrays.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.mergeArrays
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/mergeObjects.html b/docs/fp/mergeObjects.html index 9e0616c2..004811d0 100644 --- a/docs/fp/mergeObjects.html +++ b/docs/fp/mergeObjects.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.mergeObjects
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/mutate.html b/docs/fp/mutate.html index 41a8fa1a..1835f81e 100644 --- a/docs/fp/mutate.html +++ b/docs/fp/mutate.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.mutate
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/pickFromArray.html b/docs/fp/pickFromArray.html index 1410aadf..c7c84cff 100644 --- a/docs/fp/pickFromArray.html +++ b/docs/fp/pickFromArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.pickFromArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/pickFromObject.html b/docs/fp/pickFromObject.html index 328e3f6c..74671368 100644 --- a/docs/fp/pickFromObject.html +++ b/docs/fp/pickFromObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.pickFromObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/pipe.html b/docs/fp/pipe.html index 30a60193..494d5f5b 100644 --- a/docs/fp/pipe.html +++ b/docs/fp/pipe.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.pipe
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/prependToArray.html b/docs/fp/prependToArray.html index 5eab5383..76751e31 100644 --- a/docs/fp/prependToArray.html +++ b/docs/fp/prependToArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.prependToArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/prependToObject.html b/docs/fp/prependToObject.html index ac4d78b8..f99806bd 100644 --- a/docs/fp/prependToObject.html +++ b/docs/fp/prependToObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.prependToObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/removeFirstMatchFromArray.html b/docs/fp/removeFirstMatchFromArray.html index 78f348e3..d7d66b91 100644 --- a/docs/fp/removeFirstMatchFromArray.html +++ b/docs/fp/removeFirstMatchFromArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.removeFirstMatchFromArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/removeFirstMatchFromObject.html b/docs/fp/removeFirstMatchFromObject.html index b3e52886..38c42e55 100644 --- a/docs/fp/removeFirstMatchFromObject.html +++ b/docs/fp/removeFirstMatchFromObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.removeFirstMatchFromObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/removeIndexFromArray.html b/docs/fp/removeIndexFromArray.html index ccb276af..02b3c0c7 100644 --- a/docs/fp/removeIndexFromArray.html +++ b/docs/fp/removeIndexFromArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.removeIndexFromArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/removeKeyFromObject.html b/docs/fp/removeKeyFromObject.html index 5337585f..02500faa 100644 --- a/docs/fp/removeKeyFromObject.html +++ b/docs/fp/removeKeyFromObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.removeKeyFromObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/removeValueFromArray.html b/docs/fp/removeValueFromArray.html index 2508e033..f00fdb05 100644 --- a/docs/fp/removeValueFromArray.html +++ b/docs/fp/removeValueFromArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.removeValueFromArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/removeValueFromObject.html b/docs/fp/removeValueFromObject.html index 8e5d67ff..396bd5bd 100644 --- a/docs/fp/removeValueFromObject.html +++ b/docs/fp/removeValueFromObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.removeValueFromObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/reverseArray.html b/docs/fp/reverseArray.html index 071d79e8..d1ba6df2 100644 --- a/docs/fp/reverseArray.html +++ b/docs/fp/reverseArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.reverseArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/reverseObject.html b/docs/fp/reverseObject.html index 2ac6a1bd..770fe8dc 100644 --- a/docs/fp/reverseObject.html +++ b/docs/fp/reverseObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.reverseObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/splitArray.html b/docs/fp/splitArray.html index f59df1c2..7318d124 100644 --- a/docs/fp/splitArray.html +++ b/docs/fp/splitArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.splitArray
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/splitObject.html b/docs/fp/splitObject.html index 01b10e25..24297dcd 100644 --- a/docs/fp/splitObject.html +++ b/docs/fp/splitObject.html @@ -13,81 +13,83 @@
← Back to index - +
- +
variable fp.splitObject
- +
-

type

+

The splitObject function splits an object into two parts based on a given number, with the first +part containing the specified number of items and the second part containing the remaining items.

+
- +
diff --git a/docs/fp/takeFromArray.html b/docs/fp/takeFromArray.html index 80e4d243..85482985 100644 --- a/docs/fp/takeFromArray.html +++ b/docs/fp/takeFromArray.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.takeFromArray
- +
@@ -104,12 +104,12 @@

Variables

- +
- +
diff --git a/docs/fp/takeFromObject.html b/docs/fp/takeFromObject.html index 535173aa..23537acd 100644 --- a/docs/fp/takeFromObject.html +++ b/docs/fp/takeFromObject.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.takeFromObject
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/wth.html b/docs/fp/wth.html index cc01cb5e..cfd95517 100644 --- a/docs/fp/wth.html +++ b/docs/fp/wth.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.wth
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/fp/wthout.html b/docs/fp/wthout.html index c4d525c1..943cc781 100644 --- a/docs/fp/wthout.html +++ b/docs/fp/wthout.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable fp.wthout
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/functions.html b/docs/functions.html index bd27fd9a..7ed8ddc0 100644 --- a/docs/functions.html +++ b/docs/functions.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace functions
- +
@@ -95,7 +95,7 @@

Variables

- + @@ -105,7 +105,7 @@

Variables

- +

Type Aliases

@@ -115,7 +115,7 @@

Variables

- +
@@ -125,7 +125,7 @@

Variables

- +
@@ -135,7 +135,7 @@

Variables

- +
@@ -145,7 +145,7 @@

Variables

- +
@@ -155,7 +155,7 @@

Variables

- +
@@ -165,7 +165,7 @@

Variables

- +

Variables

@@ -175,7 +175,7 @@

Variables

- +
@@ -185,7 +185,7 @@

Variables

- +
@@ -195,12 +195,12 @@

Variables

- +
- +
diff --git a/docs/functions/AcceptableResult.html b/docs/functions/AcceptableResult.html index cc9927a2..2b70086e 100644 --- a/docs/functions/AcceptableResult.html +++ b/docs/functions/AcceptableResult.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias functions.AcceptableResult
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/functions/Context.html b/docs/functions/Context.html index fee4f0c8..b5c1d044 100644 --- a/docs/functions/Context.html +++ b/docs/functions/Context.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias functions.Context
- +
@@ -104,9 +104,9 @@

Variables

- + - + - +

Definition

@@ -142,12 +142,12 @@

Variables

- +
- +
diff --git a/docs/functions/ExtraData.html b/docs/functions/ExtraData.html index 5a63ed41..2cbe21de 100644 --- a/docs/functions/ExtraData.html +++ b/docs/functions/ExtraData.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias functions.ExtraData
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/functions/Fail.html b/docs/functions/Fail.html index 1cf29624..d68ed2e9 100644 --- a/docs/functions/Fail.html +++ b/docs/functions/Fail.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable functions.Fail
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/functions/Fn.html b/docs/functions/Fn.html index 229b7cad..840e9cf8 100644 --- a/docs/functions/Fn.html +++ b/docs/functions/Fn.html @@ -1,10 +1,10 @@ - functions.fn - cool documentation + functions.Fn - cool documentation - + @@ -13,84 +13,103 @@
← Back to index - + -
- +
+ - +
diff --git a/docs/functions/FnResult.html b/docs/functions/FnResult.html index 0ad24c67..ed158829 100644 --- a/docs/functions/FnResult.html +++ b/docs/functions/FnResult.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias functions.FnResult
- +
@@ -104,7 +104,7 @@

Variables

- +

Definition

@@ -123,12 +123,12 @@

Variables

- +
- +
diff --git a/docs/functions/Ok.html b/docs/functions/Ok.html index f6218bd4..3fafa591 100644 --- a/docs/functions/Ok.html +++ b/docs/functions/Ok.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable functions.Ok
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/functions/Pipeline.html b/docs/functions/Pipeline.html index f303ea60..9fbb77e6 100644 --- a/docs/functions/Pipeline.html +++ b/docs/functions/Pipeline.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias functions.Pipeline
- +
@@ -104,9 +104,9 @@

Variables

- + - + - +

Definition

@@ -142,12 +142,12 @@

Variables

- +
- +
diff --git a/docs/functions/Result.html b/docs/functions/Result.html index 9a5440b9..f1d3fc9f 100644 --- a/docs/functions/Result.html +++ b/docs/functions/Result.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface functions.Result
- +
@@ -104,7 +104,7 @@

Variables

- +

Properties

@@ -123,9 +123,9 @@

Variables

- +
- + - + - + - + - +
diff --git a/docs/functions/State.html b/docs/functions/State.html index 746ff242..a8df934a 100644 --- a/docs/functions/State.html +++ b/docs/functions/State.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias functions.State
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/index.html b/docs/index.html index f6c3960c..f3994ad1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -13,66 +13,66 @@

Index

- + @@ -85,7 +85,7 @@

Index

- + @@ -95,7 +95,7 @@

Index

- + @@ -105,7 +105,7 @@

Index

- + @@ -115,7 +115,7 @@

Index

- + @@ -125,7 +125,7 @@

Index

- + @@ -135,7 +135,7 @@

Index

- + @@ -145,7 +145,7 @@

Index

- + @@ -155,7 +155,7 @@

Index

- +

Variables

@@ -165,7 +165,7 @@

Index

- +
diff --git a/docs/metadata.html b/docs/metadata.html index ef806d2a..679d6874 100644 --- a/docs/metadata.html +++ b/docs/metadata.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable metadata
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/parsing.html b/docs/parsing.html index 36b0ae09..29b5acf3 100644 --- a/docs/parsing.html +++ b/docs/parsing.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace parsing
- +
@@ -95,7 +95,7 @@

Variables

- +

Interfaces

@@ -105,7 +105,7 @@

Variables

- +
@@ -115,7 +115,7 @@

Variables

- +
@@ -125,7 +125,7 @@

Variables

- +

Type Aliases

@@ -135,7 +135,7 @@

Variables

- +
@@ -145,7 +145,7 @@

Variables

- +
@@ -155,7 +155,7 @@

Variables

- +

Variables

@@ -165,7 +165,7 @@

Variables

- +
@@ -175,7 +175,7 @@

Variables

- +
@@ -185,12 +185,12 @@

Variables

- +
- +
diff --git a/docs/parsing/ASTNode.html b/docs/parsing/ASTNode.html index 31434a6b..6fa648c1 100644 --- a/docs/parsing/ASTNode.html +++ b/docs/parsing/ASTNode.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface parsing.ASTNode
- +
@@ -111,12 +111,12 @@

Variables

- + - +
diff --git a/docs/parsing/Parser.html b/docs/parsing/Parser.html index db4cbe9e..73650f97 100644 --- a/docs/parsing/Parser.html +++ b/docs/parsing/Parser.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias parsing.Parser
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/parsing/PatternFunction.html b/docs/parsing/PatternFunction.html index ccc612a0..1c7e2a98 100644 --- a/docs/parsing/PatternFunction.html +++ b/docs/parsing/PatternFunction.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias parsing.PatternFunction
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/parsing/PatternFunctionResult.html b/docs/parsing/PatternFunctionResult.html index 02a9e43b..416384f5 100644 --- a/docs/parsing/PatternFunctionResult.html +++ b/docs/parsing/PatternFunctionResult.html @@ -13,77 +13,77 @@
← Back to index - +
- +
type alias parsing.PatternFunctionResult
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/parsing/TokenDefinitions.html b/docs/parsing/TokenDefinitions.html index 6bf69536..597e84f1 100644 --- a/docs/parsing/TokenDefinitions.html +++ b/docs/parsing/TokenDefinitions.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface parsing.TokenDefinitions
- +
@@ -111,9 +111,9 @@

Variables

- + - + - + - +
diff --git a/docs/parsing/Tokenizer.html b/docs/parsing/Tokenizer.html index bcc3fc97..99a83bb3 100644 --- a/docs/parsing/Tokenizer.html +++ b/docs/parsing/Tokenizer.html @@ -13,70 +13,70 @@
← Back to index - +
- +
@@ -104,7 +104,7 @@

Variables

- +

Properties

@@ -123,9 +123,9 @@

Variables

- +
- + - + - + - +

Methods

@@ -180,9 +180,9 @@

Variables

- +
- + - + - + - + - + - + - +
diff --git a/docs/parsing/sequence.html b/docs/parsing/sequence.html index 1baa7aa3..e7675b67 100644 --- a/docs/parsing/sequence.html +++ b/docs/parsing/sequence.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable parsing.sequence
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/parsing/simpleTokens.html b/docs/parsing/simpleTokens.html index 528781dd..8a109d0b 100644 --- a/docs/parsing/simpleTokens.html +++ b/docs/parsing/simpleTokens.html @@ -13,77 +13,77 @@
← Back to index - +
- +
variable parsing.simpleTokens
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/docs/parsing/token.html b/docs/parsing/token.html index 83af31f6..e5961cb6 100644 --- a/docs/parsing/token.html +++ b/docs/parsing/token.html @@ -1,10 +1,10 @@ - parsing.Token - cool documentation + parsing.token - cool documentation - + @@ -13,84 +13,84 @@
← Back to index - + -
- +
+ - +
diff --git a/docs/search_index.js b/docs/search_index.js index 1a1b9814..6edcb6a4 100644 --- a/docs/search_index.js +++ b/docs/search_index.js @@ -1,3 +1,3 @@ (function () { - window.DENO_DOC_SEARCH_INDEX = {"nodes":[{"kind":"namespace","name":"appserver","nsQualifiers":"","location":{"filename":"","line":5,"col":7},"declarationKind":"export"},{"kind":"interface","name":"Module","nsQualifiers":"appserver","location":{"filename":"/Users/eser/projects/eser/cool/appserver/module.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"class","name":"AppServer","nsQualifiers":"appserver","location":{"filename":"/Users/eser/projects/eser/cool/appserver/appserver.ts","line":9,"col":0},"declarationKind":"export"},{"kind":"namespace","name":"di","nsQualifiers":"","location":{"filename":"","line":6,"col":7},"declarationKind":"export"},{"kind":"enum","name":"ServiceType","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":9,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Value","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":17,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ClassService","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":18,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"FunctionService","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":19,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ServiceKey","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":21,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ServiceValue","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":22,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"PromisableBuilder","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":23,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ServiceDescriptor","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":26,"col":0},"declarationKind":"export"},{"kind":"interface","name":"ServiceRegistry","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":31,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ServiceResolution","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":42,"col":0},"declarationKind":"export"},{"kind":"interface","name":"ServiceScope","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":44,"col":0},"declarationKind":"export"},{"kind":"class","name":"Registry","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/container.ts","line":17,"col":0},"declarationKind":"export"},{"kind":"class","name":"Scope","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/container.ts","line":50,"col":0},"declarationKind":"export"},{"kind":"variable","name":"registry","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/services.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"services","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/services.ts","line":7,"col":13},"declarationKind":"export"},{"kind":"variable","name":"di","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/services.ts","line":9,"col":13},"declarationKind":"export"},{"kind":"variable","name":"injectable","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/decorators.ts","line":14,"col":13},"declarationKind":"export"},{"kind":"variable","name":"inject","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/decorators.ts","line":29,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"dotenv","nsQualifiers":"","location":{"filename":"","line":8,"col":7},"declarationKind":"export"},{"kind":"variable","name":"env","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/base.ts","line":4,"col":13},"declarationKind":"export"},{"kind":"variable","name":"defaultEnvVar","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/base.ts","line":7,"col":13},"declarationKind":"export"},{"kind":"variable","name":"defaultEnvValue","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/base.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"EnvMap","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/base.ts","line":11,"col":0},"declarationKind":"export"},{"kind":"interface","name":"LoaderOptions","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/loader.ts","line":7,"col":0},"declarationKind":"export"},{"kind":"variable","name":"parseEnvString","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/loader.ts","line":14,"col":13},"declarationKind":"export"},{"kind":"variable","name":"parseEnvFromFile","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/loader.ts","line":20,"col":13},"declarationKind":"export"},{"kind":"variable","name":"load","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/loader.ts","line":40,"col":13},"declarationKind":"export"},{"kind":"interface","name":"EnvReader","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/reader.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"createEnvReader","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/reader.ts","line":19,"col":13},"declarationKind":"export"},{"kind":"interface","name":"BaseEnvVariables","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/configure.ts","line":9,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"EnvVariables","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/configure.ts","line":13,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ConfigureFn","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/configure.ts","line":15,"col":0},"declarationKind":"export"},{"kind":"variable","name":"configure","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/configure.ts","line":21,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"events","nsQualifiers":"","location":{"filename":"","line":9,"col":7},"declarationKind":"export"},{"kind":"interface","name":"EventRegistry","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/primitives.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"interface","name":"EventDispatcher","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/primitives.ts","line":20,"col":0},"declarationKind":"export"},{"kind":"class","name":"Registry","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/container.ts","line":5,"col":0},"declarationKind":"export"},{"kind":"class","name":"Dispatcher","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/container.ts","line":33,"col":0},"declarationKind":"export"},{"kind":"variable","name":"registry","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/events.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"dispatcher","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/events.ts","line":7,"col":13},"declarationKind":"export"},{"kind":"variable","name":"events","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/events.ts","line":9,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"fp","nsQualifiers":"","location":{"filename":"","line":10,"col":7},"declarationKind":"export"},{"kind":"variable","name":"emitter","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/emitter.ts","line":16,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"EventType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/emitter.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"appendToArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/append-to-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"appendToObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/append-to-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"associateArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/associate-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"associateObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/associate-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"compose","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/compose.ts","line":10,"col":13},"declarationKind":"export"},{"kind":"variable","name":"curryFunctions","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/curry-functions.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"variable","name":"curryRight","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/curry-right.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"curry","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/curry.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"Decorated","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/decorate.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"decorate","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/decorate.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"variable","name":"deepCopy","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/deep-copy.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"deepCopy2","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/deep-copy.ts","line":32,"col":13},"declarationKind":"export"},{"kind":"variable","name":"deepMerge","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/deep-merge.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"NextType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"MutatorType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":4,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"LogType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":5,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"LoggerType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"dispatcher","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"variable","name":"distinctArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/distinct-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"distinctObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/distinct-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"dropFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/drop-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"dropFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/drop-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"filterArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/filter-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"filterObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/filter-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"iterate","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/iterate.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mapArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/map-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mapObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/map-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"Callback","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/match.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Pattern","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/match.ts","line":4,"col":0},"declarationKind":"export"},{"kind":"variable","name":"match","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/match.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mergeArrays","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/merge-arrays.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mergeObjects","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/merge-objects.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mutate","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/mutate.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"PickFromArrayResult","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pick-from-array.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"pickFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pick-from-array.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"PickFromObjectResult","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pick-from-object.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"pickFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pick-from-object.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"variable","name":"pipe","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pipe.ts","line":10,"col":13},"declarationKind":"export"},{"kind":"variable","name":"prependToArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/prepend-to-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"prependToObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/prepend-to-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeFirstMatchFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-first-match-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeFirstMatchFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-first-match-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeIndexFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-index-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeKeyFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-key-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeValueFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-value-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeValueFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-value-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"reverseArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/reverse-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"reverseObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/reverse-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"SplitArrayResult","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/split-array.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"splitArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/split-array.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"SplitObjectResult","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/split-object.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"splitObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/split-object.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"variable","name":"takeFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/take-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"takeFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/take-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"wth","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/wth.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"wthout","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/wthout.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"functions","nsQualifiers":"","location":{"filename":"","line":11,"col":7},"declarationKind":"export"},{"kind":"typeAlias","name":"ExtraData","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/results.ts","line":4,"col":0},"declarationKind":"export"},{"kind":"interface","name":"Result","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/results.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"Ok","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/results.ts","line":16,"col":13},"declarationKind":"export"},{"kind":"variable","name":"Fail","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/results.ts","line":22,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"AcceptableResult","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"State","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":9,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Context","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":11,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"FnResult","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":19,"col":0},"declarationKind":"export"},{"kind":"interface","name":"Fn","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":27,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Pipeline","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":34,"col":0},"declarationKind":"export"},{"kind":"variable","name":"fn","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":44,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"parsing","nsQualifiers":"","location":{"filename":"","line":14,"col":7},"declarationKind":"export"},{"kind":"interface","name":"Token","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/lexer.ts","line":8,"col":0},"declarationKind":"export"},{"kind":"class","name":"Tokenizer","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/lexer.ts","line":13,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"PatternFunctionResult","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/tokens/definition.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"PatternFunction","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/tokens/definition.ts","line":4,"col":0},"declarationKind":"export"},{"kind":"interface","name":"TokenDefinitions","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/tokens/definition.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"simpleTokens","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/tokens/simple.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"interface","name":"ASTNode","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/parser.ts","line":5,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Parser","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/parser.ts","line":10,"col":0},"declarationKind":"export"},{"kind":"variable","name":"token","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/parser.ts","line":12,"col":13},"declarationKind":"export"},{"kind":"variable","name":"sequence","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/parser.ts","line":29,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"standards","nsQualifiers":"","location":{"filename":"","line":15,"col":7},"declarationKind":"export"},{"kind":"namespace","name":"logging","nsQualifiers":"standards","location":{"filename":"/Users/eser/projects/eser/cool/standards/mod.ts","line":3,"col":7},"declarationKind":"export"},{"kind":"namespace","name":"logging","nsQualifiers":"","location":{"filename":"/Users/eser/projects/eser/cool/standards/mod.ts","line":3,"col":7},"declarationKind":"export"},{"kind":"enum","name":"Severity","nsQualifiers":"logging","location":{"filename":"/Users/eser/projects/eser/cool/standards/logging.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"interface","name":"Logger","nsQualifiers":"logging","location":{"filename":"/Users/eser/projects/eser/cool/standards/logging.ts","line":17,"col":0},"declarationKind":"export"},{"kind":"interface","name":"default","nsQualifiers":"logging","location":{"filename":"/Users/eser/projects/eser/cool/standards/logging.ts","line":17,"col":0},"declarationKind":"export"},{"kind":"import","name":"ArgList","nsQualifiers":"logging","location":{"filename":"/Users/eser/projects/eser/cool/standards/logging.ts","line":3,"col":0},"declarationKind":"private"},{"kind":"variable","name":"metadata","nsQualifiers":"","location":{"filename":"/Users/eser/projects/eser/cool/metadata.json","line":1,"col":0},"declarationKind":"export"},{"kind":"import","name":"metadata","nsQualifiers":"","location":{"filename":"","line":3,"col":0},"declarationKind":"private"}]}; + window.DENO_DOC_SEARCH_INDEX = {"nodes":[{"kind":"namespace","name":"appserver","nsQualifiers":"","location":{"filename":"","line":5,"col":7},"declarationKind":"export"},{"kind":"interface","name":"Module","nsQualifiers":"appserver","location":{"filename":"/Users/eser/projects/eser/cool/appserver/module.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"class","name":"AppServer","nsQualifiers":"appserver","location":{"filename":"/Users/eser/projects/eser/cool/appserver/appserver.ts","line":9,"col":0},"declarationKind":"export"},{"kind":"namespace","name":"di","nsQualifiers":"","location":{"filename":"","line":6,"col":7},"declarationKind":"export"},{"kind":"enum","name":"ServiceType","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":9,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Value","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":17,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ClassService","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":18,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"FunctionService","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":19,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ServiceKey","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":21,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ServiceValue","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":22,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"PromisableBuilder","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":23,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ServiceDescriptor","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":26,"col":0},"declarationKind":"export"},{"kind":"interface","name":"ServiceRegistry","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":31,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ServiceResolution","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":42,"col":0},"declarationKind":"export"},{"kind":"interface","name":"ServiceScope","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/primitives.ts","line":44,"col":0},"declarationKind":"export"},{"kind":"class","name":"Registry","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/container.ts","line":17,"col":0},"declarationKind":"export"},{"kind":"class","name":"Scope","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/container.ts","line":50,"col":0},"declarationKind":"export"},{"kind":"variable","name":"registry","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/services.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"services","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/services.ts","line":7,"col":13},"declarationKind":"export"},{"kind":"variable","name":"di","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/services.ts","line":9,"col":13},"declarationKind":"export"},{"kind":"variable","name":"injectable","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/decorators.ts","line":14,"col":13},"declarationKind":"export"},{"kind":"variable","name":"inject","nsQualifiers":"di","location":{"filename":"/Users/eser/projects/eser/cool/di/decorators.ts","line":29,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"dotenv","nsQualifiers":"","location":{"filename":"","line":8,"col":7},"declarationKind":"export"},{"kind":"variable","name":"env","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/base.ts","line":4,"col":13},"declarationKind":"export"},{"kind":"variable","name":"defaultEnvVar","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/base.ts","line":7,"col":13},"declarationKind":"export"},{"kind":"variable","name":"defaultEnvValue","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/base.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"EnvMap","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/base.ts","line":11,"col":0},"declarationKind":"export"},{"kind":"interface","name":"LoaderOptions","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/loader.ts","line":7,"col":0},"declarationKind":"export"},{"kind":"variable","name":"parseEnvString","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/loader.ts","line":14,"col":13},"declarationKind":"export"},{"kind":"variable","name":"parseEnvFromFile","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/loader.ts","line":20,"col":13},"declarationKind":"export"},{"kind":"variable","name":"load","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/loader.ts","line":40,"col":13},"declarationKind":"export"},{"kind":"interface","name":"EnvReader","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/reader.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"createEnvReader","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/reader.ts","line":19,"col":13},"declarationKind":"export"},{"kind":"interface","name":"BaseEnvVariables","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/configure.ts","line":9,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"EnvVariables","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/configure.ts","line":13,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"ConfigureFn","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/configure.ts","line":15,"col":0},"declarationKind":"export"},{"kind":"variable","name":"configure","nsQualifiers":"dotenv","location":{"filename":"/Users/eser/projects/eser/cool/dotenv/configure.ts","line":21,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"events","nsQualifiers":"","location":{"filename":"","line":9,"col":7},"declarationKind":"export"},{"kind":"interface","name":"EventRegistry","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/primitives.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"interface","name":"EventDispatcher","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/primitives.ts","line":20,"col":0},"declarationKind":"export"},{"kind":"class","name":"Registry","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/container.ts","line":5,"col":0},"declarationKind":"export"},{"kind":"class","name":"Dispatcher","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/container.ts","line":33,"col":0},"declarationKind":"export"},{"kind":"variable","name":"registry","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/events.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"dispatcher","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/events.ts","line":7,"col":13},"declarationKind":"export"},{"kind":"variable","name":"events","nsQualifiers":"events","location":{"filename":"/Users/eser/projects/eser/cool/events/events.ts","line":9,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"fp","nsQualifiers":"","location":{"filename":"","line":10,"col":7},"declarationKind":"export"},{"kind":"variable","name":"emitter","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/emitter.ts","line":16,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"EventType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/emitter.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"appendToArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/append-to-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"appendToObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/append-to-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"associateArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/associate-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"associateObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/associate-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"compose","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/compose.ts","line":10,"col":13},"declarationKind":"export"},{"kind":"variable","name":"curryFunctions","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/curry-functions.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"variable","name":"curryRight","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/curry-right.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"curry","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/curry.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"Decorated","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/decorate.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"decorate","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/decorate.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"variable","name":"deepCopy","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/deep-copy.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"deepCopy2","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/deep-copy.ts","line":32,"col":13},"declarationKind":"export"},{"kind":"variable","name":"deepMerge","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/deep-merge.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"NextType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"MutatorType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":4,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"LogType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":5,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"LoggerType","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"dispatcher","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/dispatcher.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"variable","name":"distinctArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/distinct-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"distinctObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/distinct-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"dropFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/drop-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"dropFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/drop-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"filterArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/filter-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"filterObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/filter-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"iterate","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/iterate.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mapArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/map-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mapObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/map-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"Callback","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/match.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Pattern","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/match.ts","line":4,"col":0},"declarationKind":"export"},{"kind":"variable","name":"match","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/match.ts","line":6,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mergeArrays","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/merge-arrays.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mergeObjects","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/merge-objects.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"mutate","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/mutate.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"PickFromArrayResult","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pick-from-array.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"pickFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pick-from-array.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"PickFromObjectResult","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pick-from-object.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"pickFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pick-from-object.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"variable","name":"pipe","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/pipe.ts","line":10,"col":13},"declarationKind":"export"},{"kind":"variable","name":"prependToArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/prepend-to-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"prependToObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/prepend-to-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeFirstMatchFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-first-match-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeFirstMatchFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-first-match-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeIndexFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-index-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeKeyFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-key-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeValueFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-value-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"removeValueFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/remove-value-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"reverseArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/reverse-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"reverseObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/reverse-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"SplitArrayResult","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/split-array.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"splitArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/split-array.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"SplitObjectResult","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/split-object.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"variable","name":"splitObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/split-object.ts","line":17,"col":13},"declarationKind":"export"},{"kind":"variable","name":"takeFromArray","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/take-from-array.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"takeFromObject","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/take-from-object.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"wth","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/wth.ts","line":3,"col":13},"declarationKind":"export"},{"kind":"variable","name":"wthout","nsQualifiers":"fp","location":{"filename":"/Users/eser/projects/eser/cool/fp/wthout.ts","line":5,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"functions","nsQualifiers":"","location":{"filename":"","line":11,"col":7},"declarationKind":"export"},{"kind":"typeAlias","name":"ExtraData","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/results.ts","line":4,"col":0},"declarationKind":"export"},{"kind":"interface","name":"Result","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/results.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"Ok","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/results.ts","line":16,"col":13},"declarationKind":"export"},{"kind":"variable","name":"Fail","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/results.ts","line":22,"col":13},"declarationKind":"export"},{"kind":"typeAlias","name":"AcceptableResult","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"State","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":9,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Context","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":11,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"FnResult","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":19,"col":0},"declarationKind":"export"},{"kind":"interface","name":"Fn","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":27,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Pipeline","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":34,"col":0},"declarationKind":"export"},{"kind":"variable","name":"fn","nsQualifiers":"functions","location":{"filename":"/Users/eser/projects/eser/cool/functions/fn.ts","line":44,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"parsing","nsQualifiers":"","location":{"filename":"","line":14,"col":7},"declarationKind":"export"},{"kind":"interface","name":"Token","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/lexer.ts","line":8,"col":0},"declarationKind":"export"},{"kind":"class","name":"Tokenizer","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/lexer.ts","line":13,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"PatternFunctionResult","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/tokens/definition.ts","line":3,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"PatternFunction","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/tokens/definition.ts","line":4,"col":0},"declarationKind":"export"},{"kind":"interface","name":"TokenDefinitions","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/tokens/definition.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"variable","name":"simpleTokens","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/lexer/tokens/simple.ts","line":8,"col":13},"declarationKind":"export"},{"kind":"interface","name":"ASTNode","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/parser.ts","line":5,"col":0},"declarationKind":"export"},{"kind":"typeAlias","name":"Parser","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/parser.ts","line":10,"col":0},"declarationKind":"export"},{"kind":"variable","name":"token","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/parser.ts","line":12,"col":13},"declarationKind":"export"},{"kind":"variable","name":"sequence","nsQualifiers":"parsing","location":{"filename":"/Users/eser/projects/eser/cool/parsing/parser.ts","line":29,"col":13},"declarationKind":"export"},{"kind":"namespace","name":"standards","nsQualifiers":"","location":{"filename":"","line":15,"col":7},"declarationKind":"export"},{"kind":"namespace","name":"logging","nsQualifiers":"standards","location":{"filename":"/Users/eser/projects/eser/cool/standards/mod.ts","line":3,"col":7},"declarationKind":"export"},{"kind":"namespace","name":"logging","nsQualifiers":"","location":{"filename":"/Users/eser/projects/eser/cool/standards/mod.ts","line":3,"col":7},"declarationKind":"export"},{"kind":"enum","name":"Severity","nsQualifiers":"logging","location":{"filename":"/Users/eser/projects/eser/cool/standards/logging.ts","line":6,"col":0},"declarationKind":"export"},{"kind":"interface","name":"Logger","nsQualifiers":"logging","location":{"filename":"/Users/eser/projects/eser/cool/standards/logging.ts","line":17,"col":0},"declarationKind":"export"},{"kind":"interface","name":"default","nsQualifiers":"logging","location":{"filename":"/Users/eser/projects/eser/cool/standards/logging.ts","line":17,"col":0},"declarationKind":"export"},{"kind":"import","name":"ArgList","nsQualifiers":"logging","location":{"filename":"/Users/eser/projects/eser/cool/standards/logging.ts","line":3,"col":0},"declarationKind":"private"},{"kind":"variable","name":"metadata","nsQualifiers":"","location":{"filename":"/Users/eser/projects/eser/cool/metadata.json","line":1,"col":0},"declarationKind":"export"},{"kind":"import","name":"metadata","nsQualifiers":"","location":{"filename":"","line":3,"col":0},"declarationKind":"private"}]}; })() diff --git a/docs/standards.html b/docs/standards.html index 66a89437..fa5949b4 100644 --- a/docs/standards.html +++ b/docs/standards.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace standards
- +
@@ -95,12 +95,12 @@

Variables

- +
- +
diff --git a/docs/standards/logging.html b/docs/standards/logging.html index e4382c0f..d7c7ccd0 100644 --- a/docs/standards/logging.html +++ b/docs/standards/logging.html @@ -13,77 +13,77 @@
← Back to index - +
- +
namespace standards.logging
- +
@@ -95,7 +95,7 @@

Variables

- +

Interfaces

@@ -105,7 +105,7 @@

Variables

- +
@@ -115,12 +115,12 @@

Variables

- +
- +
diff --git a/docs/standards/logging/ArgList.html b/docs/standards/logging/ArgList.html index 4fe61ed7..0be36143 100644 --- a/docs/standards/logging/ArgList.html +++ b/docs/standards/logging/ArgList.html @@ -13,70 +13,70 @@
← Back to index - +
- +
diff --git a/docs/standards/logging/Logger.html b/docs/standards/logging/Logger.html index cd73d74d..8cce8ac4 100644 --- a/docs/standards/logging/Logger.html +++ b/docs/standards/logging/Logger.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface standards.logging.Logger
- +
@@ -104,12 +104,12 @@

Variables

- +
- +
diff --git a/docs/standards/logging/Severity.html b/docs/standards/logging/Severity.html index 6f435bad..f12df35f 100644 --- a/docs/standards/logging/Severity.html +++ b/docs/standards/logging/Severity.html @@ -13,77 +13,77 @@
← Back to index - +
- +
enum standards.logging.Severity
- +
@@ -104,9 +104,9 @@

Variables

- + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +
diff --git a/docs/standards/logging/default.html b/docs/standards/logging/default.html index 75206dbc..a7c81534 100644 --- a/docs/standards/logging/default.html +++ b/docs/standards/logging/default.html @@ -13,77 +13,77 @@
← Back to index - +
- +
interface standards.logging.default
- +
@@ -104,12 +104,12 @@

Variables

- + - +
diff --git a/dotenv/base.ts b/dotenv/base.ts index 0495fe7c..826bde59 100644 --- a/dotenv/base.ts +++ b/dotenv/base.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. // public symbols export const env = Symbol("env"); diff --git a/dotenv/configure.ts b/dotenv/configure.ts index ee7bd936..0fbba4ba 100644 --- a/dotenv/configure.ts +++ b/dotenv/configure.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { env } from "./base.ts"; diff --git a/dotenv/loader.ts b/dotenv/loader.ts index 33bee74b..0cef52ad 100644 --- a/dotenv/loader.ts +++ b/dotenv/loader.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { deno, dotenv } from "../deps.ts"; +import * as dotenv from "$std/dotenv/mod.ts"; +import * as runtime from "../standards/runtime.ts"; import { defaultEnvValue, defaultEnvVar, env, type EnvMap } from "./base.ts"; // interface definitions @@ -21,7 +22,7 @@ export const parseEnvFromFile = async ( filepath: string, ): Promise> => { try { - const data = await deno.readFile(filepath); + const data = await runtime.readFile(filepath); const decoded = new TextDecoder("utf-8").decode(data); const escaped = decodeURIComponent(decoded); @@ -29,7 +30,7 @@ export const parseEnvFromFile = async ( return result; } catch (e) { - if (e instanceof deno.errors.NotFound) { + if (e instanceof runtime.errors.NotFound) { return {}; } @@ -47,7 +48,7 @@ export const load = async ( ...(options ?? {}), }; - const sysVars = deno.env.toObject(); + const sysVars = runtime.env.toObject(); const envName = sysVars[options_.defaultEnvVar] ?? options_.defaultEnvValue; const vars = new Map(); diff --git a/dotenv/mod.ts b/dotenv/mod.ts index 45d6258e..40c37a99 100644 --- a/dotenv/mod.ts +++ b/dotenv/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export * from "./base.ts"; export * from "./loader.ts"; diff --git a/dotenv/reader.ts b/dotenv/reader.ts index 7716e382..ad6968fb 100644 --- a/dotenv/reader.ts +++ b/dotenv/reader.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { defaultEnvValue, env, type EnvMap } from "./base.ts"; diff --git a/events/container.test.ts b/events/container.test.ts index 5d88c490..39284763 100644 --- a/events/container.test.ts +++ b/events/container.test.ts @@ -1,6 +1,8 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd, mock } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; +import * as mock from "$std/testing/mock.ts"; import { Registry } from "./container.ts"; bdd.describe("cool/events/container", () => { diff --git a/events/container.ts b/events/container.ts index 1f0711ee..14fcf238 100644 --- a/events/container.ts +++ b/events/container.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type EventDispatcher, type EventRegistry } from "./primitives.ts"; diff --git a/events/events.ts b/events/events.ts index f9267152..5f44825c 100644 --- a/events/events.ts +++ b/events/events.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { Registry } from "./container.ts"; import { factory } from "./fluent-api-factory.ts"; diff --git a/events/fluent-api-factory.ts b/events/fluent-api-factory.ts index 5f02a00f..c1cae5c1 100644 --- a/events/fluent-api-factory.ts +++ b/events/fluent-api-factory.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type EventDispatcher } from "./primitives.ts"; diff --git a/events/mod.ts b/events/mod.ts index 0a27842a..941e5939 100644 --- a/events/mod.ts +++ b/events/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export * from "./primitives.ts"; export * from "./container.ts"; diff --git a/events/primitives.ts b/events/primitives.ts index f9eb3991..3951a360 100644 --- a/events/primitives.ts +++ b/events/primitives.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export interface EventRegistry { target: EventTarget; diff --git a/fp/append-to-array.bench.ts b/fp/append-to-array.bench.ts index d4e4835c..ed5c6025 100644 --- a/fp/append-to-array.bench.ts +++ b/fp/append-to-array.bench.ts @@ -1,17 +1,17 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { deno } from "../deps.ts"; +import * as runtime from "../standards/runtime.ts"; import { appendToArray } from "./append-to-array.ts"; const group = "append-to-array"; -deno.bench("cool/fp/append-to-array", { group, baseline: true }, () => { +runtime.bench("cool/fp/append-to-array", { group, baseline: true }, () => { const arr1 = ["a", "b"]; appendToArray(arr1, "c"); }); -deno.bench("spread operator", { group }, () => { +runtime.bench("spread operator", { group }, () => { const arr1 = ["a", "b"]; [...arr1, "c"]; diff --git a/fp/append-to-array.test.ts b/fp/append-to-array.test.ts index 476232b3..5755cc37 100644 --- a/fp/append-to-array.test.ts +++ b/fp/append-to-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { appendToArray } from "./append-to-array.ts"; bdd.describe("cool/fp/append-to-array", () => { diff --git a/fp/append-to-array.ts b/fp/append-to-array.ts index 63cd8137..b551e6aa 100644 --- a/fp/append-to-array.ts +++ b/fp/append-to-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const appendToArray = ( instance: Iterable, diff --git a/fp/append-to-object.bench.ts b/fp/append-to-object.bench.ts index 8aa336e1..b22660e7 100644 --- a/fp/append-to-object.bench.ts +++ b/fp/append-to-object.bench.ts @@ -1,23 +1,23 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { deno } from "../deps.ts"; +import * as runtime from "../standards/runtime.ts"; import { appendToObject } from "./append-to-object.ts"; const group = "append-to-object"; -deno.bench("cool/fp/append-to-object", { group, baseline: true }, () => { +runtime.bench("cool/fp/append-to-object", { group, baseline: true }, () => { const obj1 = { a: 1, b: 2 }; appendToObject(obj1, { c: 3 }); }); -deno.bench("Object.assign", { group }, () => { +runtime.bench("Object.assign", { group }, () => { const obj1 = { a: 1, b: 2 }; Object.assign({}, obj1, { c: 3 }); }); -deno.bench("spread operator", { group }, () => { +runtime.bench("spread operator", { group }, () => { const obj1 = { a: 1, b: 2 }; ({ ...obj1, c: 3 }); diff --git a/fp/append-to-object.test.ts b/fp/append-to-object.test.ts index d8be88b5..5a7a6434 100644 --- a/fp/append-to-object.test.ts +++ b/fp/append-to-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { appendToObject } from "./append-to-object.ts"; bdd.describe("cool/fp/append-to-object", () => { diff --git a/fp/append-to-object.ts b/fp/append-to-object.ts index 1f776fab..6121a6bd 100644 --- a/fp/append-to-object.ts +++ b/fp/append-to-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const appendToObject = ( instance: Record, diff --git a/fp/associate-array.test.ts b/fp/associate-array.test.ts index b8cd6671..1c9cd2c9 100644 --- a/fp/associate-array.test.ts +++ b/fp/associate-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { associateArray } from "./associate-array.ts"; bdd.describe("cool/fp/associate-array", () => { diff --git a/fp/associate-array.ts b/fp/associate-array.ts index d8e43aed..0fcb10d7 100644 --- a/fp/associate-array.ts +++ b/fp/associate-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const associateArray = ( instance: Iterable, diff --git a/fp/associate-object.test.ts b/fp/associate-object.test.ts index cfe686c4..5eaf390e 100644 --- a/fp/associate-object.test.ts +++ b/fp/associate-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { associateObject } from "./associate-object.ts"; bdd.describe("cool/fp/associate-object", () => { diff --git a/fp/associate-object.ts b/fp/associate-object.ts index 324eefc5..8f50ce46 100644 --- a/fp/associate-object.ts +++ b/fp/associate-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const associateObject = ( instance: Record, diff --git a/fp/compose.test.ts b/fp/compose.test.ts index 7310a42e..b833bff0 100644 --- a/fp/compose.test.ts +++ b/fp/compose.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { compose } from "./compose.ts"; bdd.describe("cool/fp/compose", () => { diff --git a/fp/compose.ts b/fp/compose.ts index 9e385d9d..70a542ed 100644 --- a/fp/compose.ts +++ b/fp/compose.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type AnonymousFunction, diff --git a/fp/curry-functions.test.ts b/fp/curry-functions.test.ts index ca823b58..ffd30a6c 100644 --- a/fp/curry-functions.test.ts +++ b/fp/curry-functions.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { curryFunctions } from "./curry-functions.ts"; bdd.describe("cool/fp/curry-functions", () => { diff --git a/fp/curry-functions.ts b/fp/curry-functions.ts index 80da08cb..e5c03903 100644 --- a/fp/curry-functions.ts +++ b/fp/curry-functions.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { curry } from "./curry.ts"; diff --git a/fp/curry-right.test.ts b/fp/curry-right.test.ts index 106cfe6f..e757ebfd 100644 --- a/fp/curry-right.test.ts +++ b/fp/curry-right.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { curryRight } from "./curry-right.ts"; bdd.describe("cool/fp/curry-right", () => { diff --git a/fp/curry-right.ts b/fp/curry-right.ts index 665da53e..2d9ee4f0 100644 --- a/fp/curry-right.ts +++ b/fp/curry-right.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const curryRight = ( func: (...args: readonly [...ReadonlyArray, ...ReadonlyArray]) => T3, diff --git a/fp/curry.test.ts b/fp/curry.test.ts index 8c13329c..02936552 100644 --- a/fp/curry.test.ts +++ b/fp/curry.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { curry } from "./curry.ts"; bdd.describe("cool/fp/curry", () => { diff --git a/fp/curry.ts b/fp/curry.ts index 96ba7390..247294a2 100644 --- a/fp/curry.ts +++ b/fp/curry.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const curry = ( func: (...args: readonly [...ReadonlyArray, ...ReadonlyArray]) => T3, diff --git a/fp/decorate.test.ts b/fp/decorate.test.ts index 888de87f..d0753fcd 100644 --- a/fp/decorate.test.ts +++ b/fp/decorate.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { decorate } from "./decorate.ts"; bdd.describe("cool/fp/decorate", () => { diff --git a/fp/decorate.ts b/fp/decorate.ts index 375435c8..00c083b7 100644 --- a/fp/decorate.ts +++ b/fp/decorate.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export type Decorated = (...args: ReadonlyArray) => T2; diff --git a/fp/deep-copy.bench.ts b/fp/deep-copy.bench.ts index 3b074f11..aaa0fb52 100644 --- a/fp/deep-copy.bench.ts +++ b/fp/deep-copy.bench.ts @@ -1,6 +1,6 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { deno } from "../deps.ts"; +import * as runtime from "../standards/runtime.ts"; import { deepCopy, deepCopy2 } from "./deep-copy.ts"; const group = "deep-copy"; @@ -13,19 +13,19 @@ class Dummy { } } -deno.bench("cool/fp/deep-copy", { group, baseline: true }, () => { +runtime.bench("cool/fp/deep-copy", { group, baseline: true }, () => { const obj1 = new Dummy({ value: 5 }); deepCopy(obj1); }); -deno.bench("cool/fp/deep-copy-2", { group }, () => { +runtime.bench("cool/fp/deep-copy-2", { group }, () => { const obj1 = new Dummy({ value: 5 }); deepCopy2(obj1); }); -deno.bench("structuredClone", { group }, () => { +runtime.bench("structuredClone", { group }, () => { const obj1 = new Dummy({ value: 5 }); structuredClone(obj1); diff --git a/fp/deep-copy.test.ts b/fp/deep-copy.test.ts index 769e59d3..36e43bcc 100644 --- a/fp/deep-copy.test.ts +++ b/fp/deep-copy.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { deepCopy } from "./deep-copy.ts"; class Dummy { diff --git a/fp/deep-copy.ts b/fp/deep-copy.ts index e2673df0..7e58f76c 100644 --- a/fp/deep-copy.ts +++ b/fp/deep-copy.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. type Key = string | number | symbol; diff --git a/fp/deep-merge.test.ts b/fp/deep-merge.test.ts index 92284ab7..3743669e 100644 --- a/fp/deep-merge.test.ts +++ b/fp/deep-merge.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { deepMerge } from "./deep-merge.ts"; type Dummy1Prop = { diff --git a/fp/deep-merge.ts b/fp/deep-merge.ts index 860976e2..73a82f69 100644 --- a/fp/deep-merge.ts +++ b/fp/deep-merge.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. // deno-lint-ignore no-explicit-any type ObjectType = Record; diff --git a/fp/dispatcher.test.ts b/fp/dispatcher.test.ts index a43c2da4..c2bbd6f4 100644 --- a/fp/dispatcher.test.ts +++ b/fp/dispatcher.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { dispatcher, type LogType, type NextType } from "./dispatcher.ts"; type StateType = Record; diff --git a/fp/dispatcher.ts b/fp/dispatcher.ts index 73d8500f..2646a8b6 100644 --- a/fp/dispatcher.ts +++ b/fp/dispatcher.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export type NextType = (newState: T) => Promise; export type MutatorType = (state: T, next: NextType) => Promise; diff --git a/fp/distinct-array.test.ts b/fp/distinct-array.test.ts index 181d08e3..2743d269 100644 --- a/fp/distinct-array.test.ts +++ b/fp/distinct-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { distinctArray } from "./distinct-array.ts"; bdd.describe("cool/fp/distinct-array", () => { diff --git a/fp/distinct-array.ts b/fp/distinct-array.ts index 0c83676b..d924a676 100644 --- a/fp/distinct-array.ts +++ b/fp/distinct-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const distinctArray = ( instance: Iterable, diff --git a/fp/distinct-object.test.ts b/fp/distinct-object.test.ts index 19baffd4..64093739 100644 --- a/fp/distinct-object.test.ts +++ b/fp/distinct-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { distinctObject } from "./distinct-object.ts"; bdd.describe("cool/fp/distinct-object", () => { diff --git a/fp/distinct-object.ts b/fp/distinct-object.ts index 2e1a7031..5d753a1c 100644 --- a/fp/distinct-object.ts +++ b/fp/distinct-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const distinctObject = ( instance: Record, diff --git a/fp/drop-from-array.test.ts b/fp/drop-from-array.test.ts index 7db3fae0..de5e0eab 100644 --- a/fp/drop-from-array.test.ts +++ b/fp/drop-from-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { dropFromArray } from "./drop-from-array.ts"; bdd.describe("cool/fp/drop-from-array", () => { diff --git a/fp/drop-from-array.ts b/fp/drop-from-array.ts index ba8f084b..a66c95a7 100644 --- a/fp/drop-from-array.ts +++ b/fp/drop-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const dropFromArray = ( instance: Iterable, diff --git a/fp/drop-from-object.test.ts b/fp/drop-from-object.test.ts index 5d33087b..42527952 100644 --- a/fp/drop-from-object.test.ts +++ b/fp/drop-from-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { dropFromObject } from "./drop-from-object.ts"; bdd.describe("cool/fp/drop-from-object", () => { diff --git a/fp/drop-from-object.ts b/fp/drop-from-object.ts index d1002493..d1e2ae03 100644 --- a/fp/drop-from-object.ts +++ b/fp/drop-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const dropFromObject = ( instance: Record, diff --git a/fp/emitter.test.ts b/fp/emitter.test.ts index c16cf739..c3bf126e 100644 --- a/fp/emitter.test.ts +++ b/fp/emitter.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { emitter, type LogType } from "./emitter.ts"; bdd.describe("cool/fp/emitter", () => { diff --git a/fp/emitter.ts b/fp/emitter.ts index 5e70bf87..8d37a3dc 100644 --- a/fp/emitter.ts +++ b/fp/emitter.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { type ArgList } from "../standards/functions.ts"; diff --git a/fp/filter-array.test.ts b/fp/filter-array.test.ts index edb6b5f0..9c0476d3 100644 --- a/fp/filter-array.test.ts +++ b/fp/filter-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { filterArray } from "./filter-array.ts"; bdd.describe("cool/fp/filter-array", () => { diff --git a/fp/filter-array.ts b/fp/filter-array.ts index b6806518..5a4c5a58 100644 --- a/fp/filter-array.ts +++ b/fp/filter-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const filterArray = ( instance: Iterable, diff --git a/fp/filter-object.test.ts b/fp/filter-object.test.ts index b0891bf4..1562be05 100644 --- a/fp/filter-object.test.ts +++ b/fp/filter-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { filterObject } from "./filter-object.ts"; bdd.describe("cool/fp/filter-object", () => { diff --git a/fp/filter-object.ts b/fp/filter-object.ts index 5ade4577..afb3ebf0 100644 --- a/fp/filter-object.ts +++ b/fp/filter-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const filterObject = ( instance: Record, diff --git a/fp/iterate.test.ts b/fp/iterate.test.ts index fac63dd1..9bcbd4a1 100644 --- a/fp/iterate.test.ts +++ b/fp/iterate.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { pipe } from "./pipe.ts"; import { iterate } from "./iterate.ts"; diff --git a/fp/iterate.ts b/fp/iterate.ts index 9c25a4b3..701d3b7d 100644 --- a/fp/iterate.ts +++ b/fp/iterate.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type Promisable } from "../standards/promises.ts"; import { type ArgList } from "../standards/functions.ts"; diff --git a/fp/map-array.test.ts b/fp/map-array.test.ts index 2c03d88e..d467eba0 100644 --- a/fp/map-array.test.ts +++ b/fp/map-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { mapArray } from "./map-array.ts"; bdd.describe("cool/fp/map-array", () => { diff --git a/fp/map-array.ts b/fp/map-array.ts index f4e5f7f1..c62bf252 100644 --- a/fp/map-array.ts +++ b/fp/map-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const mapArray = ( instance: Iterable, diff --git a/fp/map-object.test.ts b/fp/map-object.test.ts index 0ebe58c7..974e95fa 100644 --- a/fp/map-object.test.ts +++ b/fp/map-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { mapObject } from "./map-object.ts"; bdd.describe("cool/fp/map-object", () => { diff --git a/fp/map-object.ts b/fp/map-object.ts index f635c7e5..b1e36d69 100644 --- a/fp/map-object.ts +++ b/fp/map-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const mapObject = ( instance: Record, diff --git a/fp/match.test.ts b/fp/match.test.ts index 0ba86acc..bfb145c8 100644 --- a/fp/match.test.ts +++ b/fp/match.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { match } from "./match.ts"; bdd.describe("cool/fp/match", () => { diff --git a/fp/match.ts b/fp/match.ts index 717999ce..20adc030 100644 --- a/fp/match.ts +++ b/fp/match.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export type Callback = () => unknown; export type Pattern = [unknown, Callback]; diff --git a/fp/merge-arrays.test.ts b/fp/merge-arrays.test.ts index 6e3245a6..d85f6c97 100644 --- a/fp/merge-arrays.test.ts +++ b/fp/merge-arrays.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { mergeArrays } from "./merge-arrays.ts"; bdd.describe("cool/fp/merge-arrays", () => { diff --git a/fp/merge-arrays.ts b/fp/merge-arrays.ts index 59a8882f..fddf223e 100644 --- a/fp/merge-arrays.ts +++ b/fp/merge-arrays.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const mergeArrays = ( ...instances: ReadonlyArray> diff --git a/fp/merge-objects.test.ts b/fp/merge-objects.test.ts index 1817b6ea..770b45a2 100644 --- a/fp/merge-objects.test.ts +++ b/fp/merge-objects.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { mergeObjects } from "./merge-objects.ts"; bdd.describe("cool/fp/merge-objects", () => { diff --git a/fp/merge-objects.ts b/fp/merge-objects.ts index f306f2d2..ee356675 100644 --- a/fp/merge-objects.ts +++ b/fp/merge-objects.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const mergeObjects = ( ...instances: ReadonlyArray> diff --git a/fp/mod.ts b/fp/mod.ts index 92269d74..ce990498 100644 --- a/fp/mod.ts +++ b/fp/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export * from "./append-to-array.ts"; export * from "./append-to-object.ts"; diff --git a/fp/mutate.bench.ts b/fp/mutate.bench.ts index e96e7294..c658ee20 100644 --- a/fp/mutate.bench.ts +++ b/fp/mutate.bench.ts @@ -1,11 +1,11 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { deno } from "../deps.ts"; +import * as runtime from "../standards/runtime.ts"; import { mutate } from "./mutate.ts"; const group = "mutate"; -deno.bench("cool/fp/mutate", { group, baseline: true }, () => { +runtime.bench("cool/fp/mutate", { group, baseline: true }, () => { const obj1 = { firstName: "Eser", lastName: "Ozvataf", @@ -15,7 +15,7 @@ deno.bench("cool/fp/mutate", { group, baseline: true }, () => { mutate(obj1, (x) => x.firstName = "Helo"); }); -deno.bench("Object.assign", { group }, () => { +runtime.bench("Object.assign", { group }, () => { const obj1 = { firstName: "Eser", lastName: "Ozvataf", @@ -25,7 +25,7 @@ deno.bench("Object.assign", { group }, () => { Object.assign({}, obj1, { firstName: "Helo" }); }); -deno.bench("spread operator", { group }, () => { +runtime.bench("spread operator", { group }, () => { const obj1 = { firstName: "Eser", lastName: "Ozvataf", diff --git a/fp/mutate.test.ts b/fp/mutate.test.ts index 4647959f..16298349 100644 --- a/fp/mutate.test.ts +++ b/fp/mutate.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { mutate } from "./mutate.ts"; bdd.describe("cool/fp/mutate", () => { diff --git a/fp/mutate.ts b/fp/mutate.ts index 25d3f0bd..a53c021e 100644 --- a/fp/mutate.ts +++ b/fp/mutate.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { deepCopy } from "./deep-copy.ts"; diff --git a/fp/pick-from-array.test.ts b/fp/pick-from-array.test.ts index e8d91cd7..fcd8fdb8 100644 --- a/fp/pick-from-array.test.ts +++ b/fp/pick-from-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { pickFromArray } from "./pick-from-array.ts"; bdd.describe("cool/fp/pick-from-array", () => { diff --git a/fp/pick-from-array.ts b/fp/pick-from-array.ts index a6596eca..81e06911 100644 --- a/fp/pick-from-array.ts +++ b/fp/pick-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export type PickFromArrayResult = { items: Array; rest: Array }; diff --git a/fp/pick-from-object.test.ts b/fp/pick-from-object.test.ts index af7925b9..fbb5fc10 100644 --- a/fp/pick-from-object.test.ts +++ b/fp/pick-from-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { pickFromObject } from "./pick-from-object.ts"; bdd.describe("cool/fp/pick-from-object", () => { diff --git a/fp/pick-from-object.ts b/fp/pick-from-object.ts index ae6d42a4..f71680e5 100644 --- a/fp/pick-from-object.ts +++ b/fp/pick-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export type PickFromObjectResult = { items: Record; diff --git a/fp/pipe.test.ts b/fp/pipe.test.ts index 9152f4da..4e12c476 100644 --- a/fp/pipe.test.ts +++ b/fp/pipe.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { pipe } from "./pipe.ts"; bdd.describe("cool/fp/pipe", () => { diff --git a/fp/pipe.ts b/fp/pipe.ts index 1f74a45c..4b4bcb6d 100644 --- a/fp/pipe.ts +++ b/fp/pipe.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type AnonymousFunction, diff --git a/fp/prepend-to-array.test.ts b/fp/prepend-to-array.test.ts index b4b7cc83..7332fc98 100644 --- a/fp/prepend-to-array.test.ts +++ b/fp/prepend-to-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { prependToArray } from "./prepend-to-array.ts"; bdd.describe("cool/fp/prepend-to-array", () => { diff --git a/fp/prepend-to-array.ts b/fp/prepend-to-array.ts index 2b25f090..ba92c43e 100644 --- a/fp/prepend-to-array.ts +++ b/fp/prepend-to-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const prependToArray = ( instance: Iterable, diff --git a/fp/prepend-to-object.test.ts b/fp/prepend-to-object.test.ts index 5ccc7eee..258ad2ce 100644 --- a/fp/prepend-to-object.test.ts +++ b/fp/prepend-to-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { prependToObject } from "./prepend-to-object.ts"; bdd.describe("cool/fp/prepend-to-object", () => { diff --git a/fp/prepend-to-object.ts b/fp/prepend-to-object.ts index 1942aafc..df34ca4d 100644 --- a/fp/prepend-to-object.ts +++ b/fp/prepend-to-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const prependToObject = ( instance: Record, diff --git a/fp/remove-first-match-from-array.test.ts b/fp/remove-first-match-from-array.test.ts index e25b316f..db6ecd85 100644 --- a/fp/remove-first-match-from-array.test.ts +++ b/fp/remove-first-match-from-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { removeFirstMatchFromArray } from "./remove-first-match-from-array.ts"; bdd.describe("cool/fp/remove-first-match-from-array", () => { diff --git a/fp/remove-first-match-from-array.ts b/fp/remove-first-match-from-array.ts index d3907e1a..abc948a3 100644 --- a/fp/remove-first-match-from-array.ts +++ b/fp/remove-first-match-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const removeFirstMatchFromArray = ( instance: Iterable, diff --git a/fp/remove-first-match-from-object.test.ts b/fp/remove-first-match-from-object.test.ts index 1d8a2cfb..af535ea3 100644 --- a/fp/remove-first-match-from-object.test.ts +++ b/fp/remove-first-match-from-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { removeFirstMatchFromObject } from "./remove-first-match-from-object.ts"; bdd.describe("cool/fp/remove-first-match-from-object", () => { diff --git a/fp/remove-first-match-from-object.ts b/fp/remove-first-match-from-object.ts index 5b57765b..9a253d4a 100644 --- a/fp/remove-first-match-from-object.ts +++ b/fp/remove-first-match-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const removeFirstMatchFromObject = ( instance: Record, diff --git a/fp/remove-index-from-array.test.ts b/fp/remove-index-from-array.test.ts index 0a9409d9..7e4da309 100644 --- a/fp/remove-index-from-array.test.ts +++ b/fp/remove-index-from-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { removeIndexFromArray } from "./remove-index-from-array.ts"; bdd.describe("cool/fp/remove-index-from-array", () => { diff --git a/fp/remove-index-from-array.ts b/fp/remove-index-from-array.ts index 95af640a..50c083c3 100644 --- a/fp/remove-index-from-array.ts +++ b/fp/remove-index-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const removeIndexFromArray = ( instance: Iterable, diff --git a/fp/remove-key-from-object.test.ts b/fp/remove-key-from-object.test.ts index b47fc76f..24ba7e4e 100644 --- a/fp/remove-key-from-object.test.ts +++ b/fp/remove-key-from-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { removeKeyFromObject } from "./remove-key-from-object.ts"; bdd.describe("cool/fp/remove-key-from-object", () => { diff --git a/fp/remove-key-from-object.ts b/fp/remove-key-from-object.ts index fe40c262..6367f0a8 100644 --- a/fp/remove-key-from-object.ts +++ b/fp/remove-key-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const removeKeyFromObject = ( instance: Record, diff --git a/fp/remove-value-from-array.test.ts b/fp/remove-value-from-array.test.ts index 41713572..ba07bb5b 100644 --- a/fp/remove-value-from-array.test.ts +++ b/fp/remove-value-from-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { removeValueFromArray } from "./remove-value-from-array.ts"; bdd.describe("cool/fp/remove-value-from-array", () => { diff --git a/fp/remove-value-from-array.ts b/fp/remove-value-from-array.ts index 7956bfd2..603d9268 100644 --- a/fp/remove-value-from-array.ts +++ b/fp/remove-value-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const removeValueFromArray = ( instance: Iterable, diff --git a/fp/remove-value-from-object.test.ts b/fp/remove-value-from-object.test.ts index 7b706654..7fb76af9 100644 --- a/fp/remove-value-from-object.test.ts +++ b/fp/remove-value-from-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { removeValueFromObject } from "./remove-value-from-object.ts"; bdd.describe("cool/fp/remove-value-from-object", () => { diff --git a/fp/remove-value-from-object.ts b/fp/remove-value-from-object.ts index e6254969..2f130c22 100644 --- a/fp/remove-value-from-object.ts +++ b/fp/remove-value-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const removeValueFromObject = ( instance: Record, diff --git a/fp/reverse-array.test.ts b/fp/reverse-array.test.ts index c837f32a..2f89514a 100644 --- a/fp/reverse-array.test.ts +++ b/fp/reverse-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { reverseArray } from "./reverse-array.ts"; bdd.describe("cool/fp/reverse-array", () => { diff --git a/fp/reverse-array.ts b/fp/reverse-array.ts index 3b3eb68c..4e1c3a3f 100644 --- a/fp/reverse-array.ts +++ b/fp/reverse-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const reverseArray = (instance: Iterable): Array => { const arrInstance = (instance.constructor === Array) diff --git a/fp/reverse-object.test.ts b/fp/reverse-object.test.ts index b36bb3dc..a8857e63 100644 --- a/fp/reverse-object.test.ts +++ b/fp/reverse-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { reverseObject } from "./reverse-object.ts"; bdd.describe("cool/fp/reverse-object", () => { diff --git a/fp/reverse-object.ts b/fp/reverse-object.ts index 477f7d5b..ac12a2d4 100644 --- a/fp/reverse-object.ts +++ b/fp/reverse-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const reverseObject = ( instance: Record, diff --git a/fp/split-array.test.ts b/fp/split-array.test.ts index 47dea66f..6f9c70b5 100644 --- a/fp/split-array.test.ts +++ b/fp/split-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { splitArray } from "./split-array.ts"; bdd.describe("cool/fp/split-array", () => { diff --git a/fp/split-array.ts b/fp/split-array.ts index 16e1d085..777c619f 100644 --- a/fp/split-array.ts +++ b/fp/split-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export type SplitArrayResult = { items: Array; rest: Array }; diff --git a/fp/split-object.test.ts b/fp/split-object.test.ts index 688e2389..b3735968 100644 --- a/fp/split-object.test.ts +++ b/fp/split-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { splitObject } from "./split-object.ts"; bdd.describe("cool/fp/split-object", () => { diff --git a/fp/split-object.ts b/fp/split-object.ts index abb9f8ee..c66e5a3b 100644 --- a/fp/split-object.ts +++ b/fp/split-object.ts @@ -1,10 +1,19 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export type SplitObjectResult = { items: Record; rest: Record; }; +/** + * The `splitObject` function splits an object into two parts based on a given number, with the first + * part containing the specified number of items and the second part containing the remaining items. + * @param instance - The `instance` parameter is an object with keys of type `string`, `number`, or + * `symbol`, and values of type `T`. + * @param {number} n - The parameter `n` represents the number of items you want to split from the + * object. + * @returns The function `splitObject` returns an object of type `SplitObjectResult`. + */ export const splitObject = ( instance: Record, n: number, diff --git a/fp/take-from-array.test.ts b/fp/take-from-array.test.ts index 3f50a3d5..5792cbc9 100644 --- a/fp/take-from-array.test.ts +++ b/fp/take-from-array.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { takeFromArray } from "./take-from-array.ts"; bdd.describe("cool/fp/take-from-array", () => { diff --git a/fp/take-from-array.ts b/fp/take-from-array.ts index 0bb70bce..db1a5831 100644 --- a/fp/take-from-array.ts +++ b/fp/take-from-array.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const takeFromArray = ( instance: Iterable, diff --git a/fp/take-from-object.test.ts b/fp/take-from-object.test.ts index 94244220..2e592095 100644 --- a/fp/take-from-object.test.ts +++ b/fp/take-from-object.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { takeFromObject } from "./take-from-object.ts"; bdd.describe("cool/fp/take-from-object", () => { diff --git a/fp/take-from-object.ts b/fp/take-from-object.ts index 31654bdb..f6202a4f 100644 --- a/fp/take-from-object.ts +++ b/fp/take-from-object.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const takeFromObject = ( instance: Record, diff --git a/fp/wth.bench.ts b/fp/wth.bench.ts index b7e61519..3859518c 100644 --- a/fp/wth.bench.ts +++ b/fp/wth.bench.ts @@ -1,15 +1,15 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { deno } from "../deps.ts"; +import * as runtime from "../standards/runtime.ts"; import { wth } from "./wth.ts"; const group = "wth"; -deno.bench("cool/fp/wth", { group, baseline: true }, () => { +runtime.bench("cool/fp/wth", { group, baseline: true }, () => { wth({ a: 1 }, { b: 2 }); }); -deno.bench("spread operator", { group }, () => { +runtime.bench("spread operator", { group }, () => { const instance = { a: 1 }; const mapping = { b: 2 }; diff --git a/fp/wth.test.ts b/fp/wth.test.ts index f1ad13c0..170b6c67 100644 --- a/fp/wth.test.ts +++ b/fp/wth.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { wth } from "./wth.ts"; bdd.describe("cool/fp/wth", () => { diff --git a/fp/wth.ts b/fp/wth.ts index bb3b4a67..90f67f03 100644 --- a/fp/wth.ts +++ b/fp/wth.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export const wth = ( instance: Record, diff --git a/fp/wthout.bench.ts b/fp/wthout.bench.ts index ff9308e2..3ddea0e6 100644 --- a/fp/wthout.bench.ts +++ b/fp/wthout.bench.ts @@ -1,12 +1,12 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { deno } from "../deps.ts"; +import * as runtime from "../standards/runtime.ts"; import { wthout } from "./wthout.ts"; import lodashReject from "npm:lodash.reject"; const group = "wthout"; -deno.bench("cool/fp/wthout", { group, baseline: true }, () => { +runtime.bench("cool/fp/wthout", { group, baseline: true }, () => { const student = { id: 1, name: "John Doe", @@ -17,7 +17,7 @@ deno.bench("cool/fp/wthout", { group, baseline: true }, () => { wthout(student, "name", "age"); }); -deno.bench("npm:lodash.reject", { group }, () => { +runtime.bench("npm:lodash.reject", { group }, () => { const student = { id: 1, name: "John Doe", diff --git a/fp/wthout.test.ts b/fp/wthout.test.ts index bf4eb3e6..0c7cb9db 100644 --- a/fp/wthout.test.ts +++ b/fp/wthout.test.ts @@ -1,6 +1,7 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; import { wthout } from "./wthout.ts"; bdd.describe("cool/fp/wthout", () => { diff --git a/fp/wthout.ts b/fp/wthout.ts index a6a1149c..eb8f9fa2 100644 --- a/fp/wthout.ts +++ b/fp/wthout.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. type Key = string | number | symbol; diff --git a/functions/fn.test.ts b/functions/fn.test.ts index 011cdefe..a1960c39 100644 --- a/functions/fn.test.ts +++ b/functions/fn.test.ts @@ -1,6 +1,8 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. -import { assert, bdd, mock } from "../deps.ts"; +import * as assert from "$std/assert/mod.ts"; +import * as bdd from "$std/testing/bdd.ts"; +import * as mock from "$std/testing/mock.ts"; import { Ok, type Result } from "./results.ts"; import { fn } from "./fn.ts"; diff --git a/functions/fn.ts b/functions/fn.ts index dd1317c5..e91ba379 100644 --- a/functions/fn.ts +++ b/functions/fn.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. import { type ArgList } from "../standards/functions.ts"; diff --git a/functions/mod.ts b/functions/mod.ts index e45e7bda..ce797a31 100644 --- a/functions/mod.ts +++ b/functions/mod.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. export * from "./results.ts"; export * from "./fn.ts"; diff --git a/functions/results.ts b/functions/results.ts index b5454023..823e4755 100644 --- a/functions/results.ts +++ b/functions/results.ts @@ -1,4 +1,4 @@ -// Copyright 2023 the cool authors. All rights reserved. Apache-2.0 license. +// Copyright 2023-present the cool authors. All rights reserved. Apache-2.0 license. // deno-lint-ignore no-explicit-any export type ExtraData = Record; diff --git a/jsx-runtime/.gitkeep b/jsx-runtime/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/jsx-runtime/mod.ts b/jsx-runtime/mod.ts new file mode 100644 index 00000000..b48be9af --- /dev/null +++ b/jsx-runtime/mod.ts @@ -0,0 +1,8 @@ +// Copyright 2023-present the cool authors. All rights reserved. MIT license. + +export { + jsx, + jsxAttr, + jsxEscape, + jsxTemplate, +} from "npm:preact@10.19.2/jsx-runtime"; diff --git a/lime/LICENSE b/lime/LICENSE deleted file mode 100644 index 1b731511..00000000 --- a/lime/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023-2023 Eser Ozvataf -Copyright (c) 2021-2023 Luca Casonato - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/lime/README.md b/lime/README.md deleted file mode 100644 index ca7fba0e..00000000 --- a/lime/README.md +++ /dev/null @@ -1,125 +0,0 @@ -[Documentation](#-documentation) | [Getting started](#-getting-started) | -[API Reference](https://deno.land/x/coollime?doc) - -# cool lime - -The cool lime logo: a sliced lime dripping with juice - -**cool lime** is a next generation web framework, built for speed, reliability, -and simplicity. - -it's built on top of [Deno](https://deno.land/) and it's -[Fresh](https://fresh.deno.dev/) framework. - -Some stand-out features: - -- Just-in-time rendering on the edge. -- Island based client hydration for maximum interactivity. -- Zero runtime overhead: no JS is shipped to the client by default. -- No build step. -- No configuration necessary. -- TypeScript support out of the box. -- File-system routing à la Next.js. - -## 📖 Documentation - -The [documentation](https://coollime.deno.dev/docs/) is available on -[coollime.deno.dev](https://coollime.deno.dev/). - -## 🚀 Getting started - -Install [Deno CLI](https://deno.land/) version 1.36 or higher. - -You can scaffold a new project by running the cool lime init script. To scaffold -a project run the following: - -```sh -deno run -A -r https://coollime.deno.dev -``` - -Then navigate to the newly created project folder: - -``` -cd lime-demo -``` - -From within your project folder, start the development server using the -`deno task` command: - -``` -deno task start -``` - -Now open http://localhost:8000 in your browser to view the page. You make -changes to the project source code and see them reflected in your browser. - -To deploy the project to the live internet, you can use -[Deno Deploy](https://deno.com/deploy): - -1. Push your project to GitHub. -2. [Create a Deno Deploy project](https://dash.deno.com/new). -3. [Link](https://deno.com/deploy/docs/projects#enabling) the Deno Deploy - project to the **`main.ts`** file in the root of the created repository. -4. The project will be deployed to a public $project.deno.dev subdomain. - -For a more in-depth getting started guide, visit the -[Getting Started](https://coollime.deno.dev/docs/getting-started) page in the -cool lime docs. - -## Contributing - -We appreciate your help! To contribute, please read our -[contributing instructions](https://coollime.deno.dev/docs/contributing). - -## Adding your project to the showcase - -If you feel that your project would be helpful to other cool lime users, please -consider putting your project on the -[showcase](https://coollime.deno.dev/showcase). However, websites that are just -for promotional purposes may not be listed. - -To take a screenshot, run the following command. - -```sh -deno task screenshot [url] [your-app-name] -``` - -Then add your site to -[showcase.json](https://github.com/eser/cool/blob/main/lime/www/data/showcase.json), -preferably with source code on GitHub, but not required. - -## Badges - -![Made with cool lime](./www/static/lime-badge.svg) - -```md -[![Made with cool lime](https://coollime.deno.dev/lime-badge.svg)](https://coollime.deno.dev) -``` - -```html - - Made with cool lime - -``` - -![Made with cool lime(dark)](./www/static/lime-badge-dark.svg) - -```md -[![Made with cool lime](https://coollime.deno.dev/lime-badge-dark.svg)](https://coollime.deno.dev) -``` - -```html - - Made with cool lime - -``` diff --git a/lime/dev.ts b/lime/dev.ts deleted file mode 100644 index 58ef0218..00000000 --- a/lime/dev.ts +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -export { dev } from "./src/dev/dev_command.ts"; diff --git a/lime/init.ts b/lime/init.ts deleted file mode 100644 index 0ad706c5..00000000 --- a/lime/init.ts +++ /dev/null @@ -1,624 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { basename, colors, join, parse, resolve } from "./src/dev/deps.ts"; -import { error } from "./src/dev/error.ts"; -import { buildManifestFile, ensureMinDenoVersion } from "./src/dev/mod.ts"; -import { baseImports } from "./src/dev/imports.ts"; -import { view } from "./runtime.ts"; - -ensureMinDenoVersion(); - -const help = `lime-init - -Initialize a new cool lime project. This will create all the necessary files for a -new project. - -To generate a project in the './foobar' subdirectory: - lime-init ./foobar - -To generate a project in the current directory: - lime-init . - -USAGE: - lime-init [DIRECTORY] - -OPTIONS: - --force Overwrite existing files - --docker Setup Project to use Docker -`; - -const CONFIRM_EMPTY_MESSAGE = - "The target directory is not empty (files could get overwritten). Do you want to continue anyway?"; - -const flags = parse(Deno.args, { - boolean: ["force", "docker"], - default: { "force": null, "docker": null }, -}); - -console.log(); -console.log( - colors.bgRgb8( - colors.black(colors.bold(" 🍋 cool lime: The next-gen web framework. ")), - 121, - ), -); -console.log(); - -let unresolvedDirectory = Deno.args[0]; -if (flags._.length !== 1) { - const userInput = prompt("Project Name", "lime-project"); - if (!userInput) { - error(help); - } - - unresolvedDirectory = userInput; -} - -const resolvedDirectory = resolve(unresolvedDirectory); - -try { - const dir = [...Deno.readDirSync(resolvedDirectory)]; - const isEmpty = dir.length === 0 || - dir.length === 1 && dir[0].name === ".git"; - if ( - !isEmpty && - !(flags.force === null ? confirm(CONFIRM_EMPTY_MESSAGE) : flags.force) - ) { - error("Directory is not empty."); - } -} catch (err) { - if (!(err instanceof Deno.errors.NotFound)) { - throw err; - } -} -console.log( - "%cLet's set up your new cool lime project.\n", - "font-weight: bold", -); - -const useDocker = flags.docker; - -await Promise.all([ - Deno.mkdir(join(resolvedDirectory, "routes", "api"), { recursive: true }), - Deno.mkdir(join(resolvedDirectory, "islands"), { recursive: true }), - Deno.mkdir(join(resolvedDirectory, "static"), { recursive: true }), - Deno.mkdir(join(resolvedDirectory, "components"), { recursive: true }), - Deno.mkdir(join(resolvedDirectory, ".vscode"), { recursive: true }), -]); - -const GITIGNORE = `# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# cool lime build directory -_lime/ -`; - -await Deno.writeTextFile( - join(resolvedDirectory, ".gitignore"), - GITIGNORE, -); - -if (useDocker) { - const DENO_VERSION = Deno.version.deno; - const DOCKERFILE_TEXT = ` -FROM denoland/deno:${DENO_VERSION} - -ARG GIT_REVISION -ENV DENO_DEPLOYMENT_ID=\${GIT_REVISION} - -WORKDIR /app - -COPY . . -RUN deno cache main.ts - -EXPOSE 8000 - -CMD ["run", "-A", "main.ts"] - -`; - - await Deno.writeTextFile( - join(resolvedDirectory, "Dockerfile"), - DOCKERFILE_TEXT, - ); -} - -const ROUTES_INDEX_TSX = - `import { useSignal } from "${view.adapter.libSignals}"; -import Counter from "../islands/Counter.tsx"; - -export default function Home() { - const count = useSignal(3); - return ( -
-
- the cool lime logo: a sliced lime dripping with juice -

Welcome to cool lime

-

- Try updating this message in the - ./routes/index.tsx file, and refresh. -

- -
-
- ); -} -`; - -const COMPONENTS_BUTTON_TSX = `import { JSX } from "${view.adapter.libJSX}"; -import { IS_BROWSER } from "$cool/lime/runtime.ts"; - -export function Button(props: JSX.HTMLAttributes) { - return ( - -

{props.count}

- - - ); -} -`; - -// 404 page -const ROUTES_404_PAGE = `import { Head } from "$cool/lime/runtime.ts"; - -export default function Error404() { - return ( - <> - - 404 - Page not found - -
-
- the cool lime logo: a sliced lime dripping with juice -

404 - Page not found

-

- The page you were looking for doesn't exist. -

- Go back home -
-
- - ); -} -`; - -await Promise.all([ - Deno.writeTextFile( - join(resolvedDirectory, "routes", "index.tsx"), - ROUTES_INDEX_TSX, - ), - Deno.writeTextFile( - join(resolvedDirectory, "components", "Button.tsx"), - COMPONENTS_BUTTON_TSX, - ), - Deno.writeTextFile( - join(resolvedDirectory, "islands", "Counter.tsx"), - ISLANDS_COUNTER_TSX, - ), - Deno.writeTextFile( - join(resolvedDirectory, "routes", "_404.tsx"), - ROUTES_404_PAGE, - ), -]); - -const ROUTES_GREET_TSX = `import { PageProps } from "$cool/lime/server.ts"; -export default function Greet(props: PageProps) { - return
Hello {props.params["name"]}
; -} -`; -await Deno.mkdir(join(resolvedDirectory, "routes", "greet"), { - recursive: true, -}); -await Deno.writeTextFile( - join(resolvedDirectory, "routes", "greet", "[name].tsx"), - ROUTES_GREET_TSX, -); - -const ROUTES_API_JOKE_TS = - `import { type HandlerContext } from "$cool/lime/server.ts"; - -// Jokes courtesy of https://punsandoneliners.com/randomness/programmer-jokes/ -const JOKES = [ - "Why do Java developers often wear glasses? They can't C#.", - "A SQL query walks into a bar, goes up to two tables and says “can I join you?”", - "Wasn't hard to crack Forrest Gump's password. 1forrest1.", - "I love pressing the F5 key. It's refreshing.", - "Called IT support and a chap from Australia came to fix my network connection. I asked “Do you come from a LAN down under?”", - "There are 10 types of people in the world. Those who understand binary and those who don't.", - "Why are assembly programmers often wet? They work below C level.", - "My favourite computer based band is the Black IPs.", - "What programme do you use to predict the music tastes of former US presidential candidates? An Al Gore Rhythm.", - "An SEO expert walked into a bar, pub, inn, tavern, hostelry, public house.", -]; - -export const handler = (_req: Request, _ctx: HandlerContext): Response => { - const randomIndex = Math.floor(Math.random() * JOKES.length); - const body = JOKES[randomIndex]; - return new Response(body); -}; -`; -await Deno.writeTextFile( - join(resolvedDirectory, "routes", "api", "joke.ts"), - ROUTES_API_JOKE_TS, -); - -const DEFAULT_STYLES = ` -*, -*::before, -*::after { - box-sizing: border-box; -} -* { - margin: 0; -} -button { - color: inherit; -} -button, [role="button"] { - cursor: pointer; -} -code { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, - "Liberation Mono", "Courier New", monospace; - font-size: 1em; -} -img, -svg { - display: block; -} -img, -video { - max-width: 100%; - height: auto; -} - -html { - line-height: 1.5; - -webkit-text-size-adjust: 100%; - font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, - "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, - "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; -} -.transition-colors { - transition-property: background-color, border-color, color, fill, stroke; - transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); - transition-duration: 150ms; -} -.my-6 { - margin-bottom: 1.5rem; - margin-top: 1.5rem; -} -.text-4xl { - font-size: 2.25rem; - line-height: 2.5rem; -} -.mx-2 { - margin-left: 0.5rem; - margin-right: 0.5rem; -} -.my-4 { - margin-bottom: 1rem; - margin-top: 1rem; -} -.mx-auto { - margin-left: auto; - margin-right: auto; -} -.px-4 { - padding-left: 1rem; - padding-right: 1rem; -} -.py-8 { - padding-bottom: 2rem; - padding-top: 2rem; -} -.bg-\\[\\#86efac\\] { - background-color: #86efac; -} -.text-3xl { - font-size: 1.875rem; - line-height: 2.25rem; -} -.py-6 { - padding-bottom: 1.5rem; - padding-top: 1.5rem; -} -.px-2 { - padding-left: 0.5rem; - padding-right: 0.5rem; -} -.py-1 { - padding-bottom: 0.25rem; - padding-top: 0.25rem; -} -.border-gray-500 { - border-color: #6b7280; -} -.bg-white { - background-color: #fff; -} -.flex { - display: flex; -} -.gap-8 { - grid-gap: 2rem; - gap: 2rem; -} -.font-bold { - font-weight: 700; -} -.max-w-screen-md { - max-width: 768px; -} -.flex-col { - flex-direction: column; -} -.items-center { - align-items: center; -} -.justify-center { - justify-content: center; -} -.border-2 { - border-width: 2px; -} -.rounded { - border-radius: 0.25rem; -} -.hover\\:bg-gray-200:hover { - background-color: #e5e7eb; -} -`; - -const APP_WRAPPER = `import { type AppProps } from "$cool/lime/server.ts"; - -export default function App({ Component }: AppProps) { - return ( - - - - - ${basename(resolvedDirectory)} - - - - - - - ); -} -`; - -await Deno.writeTextFile( - join(resolvedDirectory, "static", "styles.css"), - DEFAULT_STYLES, -); - -await Deno.writeTextFile( - join(resolvedDirectory, "routes", "_app.tsx"), - APP_WRAPPER, -); - -const STATIC_LOGO = - ` - - - - -`; - -await Deno.writeTextFile( - join(resolvedDirectory, "static", "logo.svg"), - STATIC_LOGO, -); - -try { - const faviconArrayBuffer = await fetch( - "https://coollime.deno.dev/favicon.ico", - ) - .then((d) => d.arrayBuffer()); - await Deno.writeFile( - join(resolvedDirectory, "static", "favicon.ico"), - new Uint8Array(faviconArrayBuffer), - ); -} catch { - // Skip this and be silent if there is a network issue. -} - -let LIME_CONFIG_TS = `import { defineConfig } from "$cool/lime/server.ts";\n`; - -LIME_CONFIG_TS += ` -export const config = defineConfig({ - plugins: [], -}); -`; -const CONFIG_TS_PATH = join(resolvedDirectory, "config.ts"); -await Deno.writeTextFile(CONFIG_TS_PATH, LIME_CONFIG_TS); - -let MAIN_TS = `/// -/// -/// -/// -/// - -import "$std/dotenv/load.ts"; - -import { start } from "$cool/lime/server.ts"; -import { manifest } from "./manifest.gen.ts"; -import { config } from "./config.ts"; -`; - -MAIN_TS += ` -await start(manifest, config);\n`; -const MAIN_TS_PATH = join(resolvedDirectory, "main.ts"); -await Deno.writeTextFile(MAIN_TS_PATH, MAIN_TS); - -const DEV_TS = `#!/usr/bin/env -S deno run -A --watch=static/,routes/ - -import { dev } from "$cool/lime/dev.ts"; -import { config } from "./config.ts"; - -import "$std/dotenv/load.ts"; - -await dev(import.meta.url, config); -`; -const DEV_TS_PATH = join(resolvedDirectory, "dev.ts"); -await Deno.writeTextFile(DEV_TS_PATH, DEV_TS); -try { - await Deno.chmod(DEV_TS_PATH, 0o777); -} catch { - // this throws on windows -} - -const config = { - lock: false, - tasks: { - check: - "deno fmt --check && deno lint && deno check ./**/*.ts && deno check ./**/*.tsx", - start: "deno run -A --watch=static/,routes/ ./dev.ts", - build: "deno run -A ./dev.ts build", - preview: "deno run -A ./main.ts", - }, - lint: { - rules: { - tags: ["fresh", "recommended"], - }, - }, - exclude: ["**/_lime/*"], - imports: {} as Record, - compilerOptions: { - jsx: "precompile", - jsxImportSource: "$cool", - }, -}; -baseImports(config.imports); - -const DENO_CONFIG = JSON.stringify(config, null, 2) + "\n"; - -await Deno.writeTextFile(join(resolvedDirectory, "deno.jsonc"), DENO_CONFIG); - -const README_MD = `# cool lime project - -Your new cool lime project is ready to go. You can follow the cool lime "Getting -Started" guide here: https://coollime.deno.dev/docs/getting-started - -### Usage - -Make sure to install Deno: https://deno.land/manual/getting_started/installation - -Then start the project: - -\`\`\` -deno task start -\`\`\` - -This will watch the project directory and restart as necessary. -`; -await Deno.writeTextFile( - join(resolvedDirectory, "README.md"), - README_MD, -); - -const vscodeSettings = { - "deno.enable": true, - "deno.lint": true, - "editor.defaultFormatter": "denoland.vscode-deno", - "[javascriptreact]": { - "editor.defaultFormatter": "denoland.vscode-deno", - }, - "[javascript]": { - "editor.defaultFormatter": "denoland.vscode-deno", - }, - "[typescriptreact]": { - "editor.defaultFormatter": "denoland.vscode-deno", - }, - "[typescript]": { - "editor.defaultFormatter": "denoland.vscode-deno", - }, -}; - -const VSCODE_SETTINGS = JSON.stringify(vscodeSettings, null, 2) + "\n"; - -await Deno.writeTextFile( - join(resolvedDirectory, ".vscode", "settings.json"), - VSCODE_SETTINGS, -); - -const vscodeExtensions = { - recommendations: ["denoland.vscode-deno"], -}; - -const VSCODE_EXTENSIONS = JSON.stringify(vscodeExtensions, null, 2) + "\n"; - -await Deno.writeTextFile( - join(resolvedDirectory, ".vscode", "extensions.json"), - VSCODE_EXTENSIONS, -); - -await buildManifestFile(resolvedDirectory); - -// Specifically print unresolvedDirectory, rather than resolvedDirectory in order to -// not leak personal info (e.g. `/Users/MyName`) -console.log("\n%cProject initialized!\n", "color: green; font-weight: bold"); - -if (unresolvedDirectory !== ".") { - console.log( - `Enter your project directory using %ccd ${unresolvedDirectory}%c.`, - "color: cyan", - "", - ); -} -console.log( - "Run %cdeno task start%c to start the project. %cCTRL-C%c to stop.", - "color: cyan", - "", - "color: cyan", - "", -); -// console.log(); -// console.log( -// "Stuck? Join our Discord %chttps://discord.gg/deno", -// "color: cyan", -// "", -// ); -console.log(); -console.log( - "%cHappy hacking! 🦕", - "color: gray", -); diff --git a/lime/last_fresh_sync_sha1.txt b/lime/last_fresh_sync_sha1.txt deleted file mode 100644 index aac98baf..00000000 --- a/lime/last_fresh_sync_sha1.txt +++ /dev/null @@ -1 +0,0 @@ -264f3073bdba193de0ca2e20abe699b549f13d5a diff --git a/lime/runtime.ts b/lime/runtime.ts deleted file mode 100644 index b410fa28..00000000 --- a/lime/runtime.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import "./src/types.ts"; -export * from "./src/runtime/utils.ts"; -export * from "./src/runtime/head.ts"; -export * from "./src/runtime/island.tsx"; -export * from "./src/runtime/csp.ts"; -export * from "./src/runtime/Partial.tsx"; -export { - type ComponentChildren, - view, - type VNode, -} from "./src/runtime/drivers/view.tsx"; diff --git a/lime/server.ts b/lime/server.ts deleted file mode 100644 index 3e5c7053..00000000 --- a/lime/server.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import "./src/types.ts"; -export * from "./src/server/mod.ts"; diff --git a/lime/src/build/aot_snapshot.ts b/lime/src/build/aot_snapshot.ts deleted file mode 100644 index 994bd997..00000000 --- a/lime/src/build/aot_snapshot.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { type ResolvedLimeConfig } from "../server/types.ts"; -import { colors, join } from "../server/deps.ts"; -import { type BuildSnapshot, type BuildSnapshotJson } from "./mod.ts"; -import { setBuildId } from "../server/build_id.ts"; - -export class AotSnapshot implements BuildSnapshot { - #files: Map; - #dependencies: Map>; - - constructor( - files: Map, - dependencies: Map>, - ) { - this.#files = files; - this.#dependencies = dependencies; - } - - get paths(): Array { - return Array.from(this.#files.keys()); - } - - async read(path: string): Promise | null> { - const filePath = this.#files.get(path); - if (filePath !== undefined) { - try { - const file = await Deno.open(filePath, { read: true }); - return file.readable; - } catch (_err) { - return null; - } - } - - // Handler will turn this into a 404 - return null; - } - - dependencies(path: string): Array { - return this.#dependencies.get(path) ?? []; - } -} - -export async function loadAotSnapshot( - config: ResolvedLimeConfig, -): Promise { - const snapshotDirPath = config.build.outDir; - try { - if ((await Deno.stat(snapshotDirPath)).isDirectory) { - console.log( - `Using snapshot found at ${colors.cyan(snapshotDirPath)}`, - ); - - const snapshotPath = join(snapshotDirPath, "snapshot.json"); - const json = JSON.parse( - await Deno.readTextFile(snapshotPath), - ) as BuildSnapshotJson; - setBuildId(json.build_id); - - const dependencies = new Map>( - Object.entries(json.files), - ); - - const files = new Map(); - Object.keys(json.files).forEach((name) => { - const filePath = join(snapshotDirPath, name); - files.set(name, filePath); - }); - - return new AotSnapshot(files, dependencies); - } - return null; - } catch (err) { - if (!(err instanceof Deno.errors.NotFound)) { - throw err; - } - - return null; - } -} diff --git a/lime/src/build/deps.ts b/lime/src/build/deps.ts deleted file mode 100644 index 9aaa330a..00000000 --- a/lime/src/build/deps.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -// -- $std -- -export { fromFileUrl, join, relative, toFileUrl } from "$std/path/mod.ts"; -export { escape as regexpEscape } from "$std/regexp/escape.ts"; - -export { denoPlugins } from "https://deno.land/x/esbuild_deno_loader@0.8.2/mod.ts"; diff --git a/lime/src/build/esbuild.ts b/lime/src/build/esbuild.ts deleted file mode 100644 index bbcee79f..00000000 --- a/lime/src/build/esbuild.ts +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { - type BuildOptions, - type OnLoadOptions, - type Plugin, -} from "https://deno.land/x/esbuild@v0.19.4/mod.js"; -import { denoPlugins, fromFileUrl, regexpEscape, relative } from "./deps.ts"; -import { Builder, BuildSnapshot } from "./mod.ts"; -import { BUNDLE_PUBLIC_PATH } from "../server/constants.ts"; - -export interface EsbuildBuilderOptions { - /** The build ID. */ - buildID: string; - /** The entrypoints, mapped from name to URL. */ - entrypoints: Record; - /** Whether or not this is a dev build. */ - dev: boolean; - /** The path to the deno.json / deno.jsonc config file. */ - configPath: string; - /** The JSX configuration. */ - jsx?: string; - jsxImportSource?: string; - target: string | Array; - absoluteWorkingDir: string; -} - -export class EsbuildBuilder implements Builder { - #options: EsbuildBuilderOptions; - - constructor(options: EsbuildBuilderOptions) { - this.#options = options; - } - - async build(): Promise { - const opts = this.#options; - - // Lazily initialize esbuild - // @deno-types="https://deno.land/x/esbuild@v0.19.4/mod.d.ts" - const esbuild = - // deno-lint-ignore no-deprecated-deno-api - Deno.run === undefined || - Deno.env.get("LIME_ESBUILD_LOADER") === "portable" - ? await import("https://deno.land/x/esbuild@v0.19.4/wasm.js") - : await import("https://deno.land/x/esbuild@v0.19.4/mod.js"); - const esbuildWasmURL = - new URL("./esbuild_v0.19.4.wasm", import.meta.url).href; - - // deno-lint-ignore no-deprecated-deno-api - if (Deno.run === undefined) { - await esbuild.initialize({ - wasmURL: esbuildWasmURL, - worker: false, - }); - } else { - await esbuild.initialize({}); - } - - try { - const absWorkingDir = opts.absoluteWorkingDir; - - // In dev-mode we skip identifier minification to be able to show proper - // component names in React DevTools instead of single characters. - const minifyOptions: Partial = opts.dev - ? { - minifyIdentifiers: false, - minifySyntax: true, - minifyWhitespace: true, - } - : { minify: true }; - - const bundle = await esbuild.build({ - entryPoints: opts.entrypoints, - - platform: "browser", - target: this.#options.target, - - format: "esm", - bundle: true, - splitting: true, - treeShaking: true, - sourcemap: opts.dev ? "linked" : false, - ...minifyOptions, - - jsx: opts.jsx === "react" - ? "transform" - : opts.jsx === "react-native" || opts.jsx === "preserve" - ? "preserve" - : !opts.jsxImportSource - ? "transform" - : "automatic", - jsxImportSource: opts.jsxImportSource ?? "react", - - absWorkingDir, - outdir: ".", - publicPath: BUNDLE_PUBLIC_PATH, - write: false, - metafile: true, - - plugins: [ - buildIdPlugin(opts.buildID), - ...denoPlugins({ configPath: opts.configPath }), - ], - }); - - const files = new Map(); - const dependencies = new Map>(); - - for (const file of bundle.outputFiles) { - const path = relative(absWorkingDir, file.path); - files.set(path, file.contents); - } - - files.set( - "metafile.json", - new TextEncoder().encode(JSON.stringify(bundle.metafile)), - ); - - const metaOutputs = new Map(Object.entries(bundle.metafile.outputs)); - - for (const [path, entry] of metaOutputs.entries()) { - const imports = entry.imports - .filter(({ kind }) => kind === "import-statement") - .map(({ path }) => path); - dependencies.set(path, imports); - } - - return new EsbuildSnapshot(files, dependencies); - } finally { - esbuild.stop(); - } - } -} - -function buildIdPlugin(buildId: string): Plugin { - const file = import.meta.resolve("../runtime/build_id.ts"); - const url = new URL(file); - let options: OnLoadOptions; - if (url.protocol === "file:") { - const path = fromFileUrl(url); - const filter = new RegExp(`^${regexpEscape(path)}$`); - options = { filter, namespace: "file" }; - } else { - const namespace = url.protocol.slice(0, -1); - const path = url.href.slice(namespace.length + 1); - const filter = new RegExp(`^${regexpEscape(path)}$`); - options = { filter, namespace }; - } - return { - name: "lime-build-id", - setup(build) { - build.onLoad( - options, - () => ({ contents: `export const BUILD_ID = "${buildId}";` }), - ); - }, - }; -} - -export class EsbuildSnapshot implements BuildSnapshot { - #files: Map; - #dependencies: Map>; - - constructor( - files: Map, - dependencies: Map>, - ) { - this.#files = files; - this.#dependencies = dependencies; - } - - get paths(): Array { - return Array.from(this.#files.keys()); - } - - read(path: string): Uint8Array | null { - return this.#files.get(path) ?? null; - } - - dependencies(path: string): Array { - return this.#dependencies.get(path) ?? []; - } -} diff --git a/lime/src/build/esbuild_test.ts b/lime/src/build/esbuild_test.ts deleted file mode 100644 index 3d132915..00000000 --- a/lime/src/build/esbuild_test.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { assertEquals } from "$std/assert/mod.ts"; -import { fromFileUrl, join, toFileUrl } from "../server/deps.ts"; -import { locateDenoConfig } from "../server/config.ts"; -import { EsbuildBuilder } from "./esbuild.ts"; - -const denoJson = await locateDenoConfig(join( - fromFileUrl(import.meta.url), - "..", - "..", - "..", -)); - -const mainEntry = toFileUrl(join( - fromFileUrl(import.meta.url), - "..", - "..", - "runtime", - "entrypoints", - "client.ts", -)).href; - -Deno.test("esbuild snapshot with cwd=Deno.cwd()", async () => { - const builder = new EsbuildBuilder({ - absoluteWorkingDir: Deno.cwd(), - buildID: "foo", - configPath: denoJson!, - dev: false, - entrypoints: { - main: mainEntry, - }, - jsx: "react", - target: "es2020", - }); - - const snapshot = await builder.build(); - assertEquals(snapshot.paths, ["main.js", "metafile.json"]); -}); - -Deno.test({ - name: "esbuild snapshot with cwd=/", - ignore: Deno.build.os === "windows", - fn: async () => { - const builder = new EsbuildBuilder({ - absoluteWorkingDir: "/", - buildID: "foo", - configPath: denoJson!, - dev: false, - entrypoints: { - main: mainEntry, - }, - jsx: "react", - target: "es2020", - }); - - const snapshot = await builder.build(); - assertEquals(snapshot.paths, ["main.js", "metafile.json"]); - }, -}); diff --git a/lime/src/build/esbuild_v0.19.4.wasm b/lime/src/build/esbuild_v0.19.4.wasm deleted file mode 100644 index 6e465479..00000000 Binary files a/lime/src/build/esbuild_v0.19.4.wasm and /dev/null differ diff --git a/lime/src/build/mod.ts b/lime/src/build/mod.ts deleted file mode 100644 index b91d5ca2..00000000 --- a/lime/src/build/mod.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -export { - EsbuildBuilder, - type EsbuildBuilderOptions, - EsbuildSnapshot, -} from "./esbuild.ts"; -export { AotSnapshot } from "./aot_snapshot.ts"; -export interface Builder { - build(): Promise; -} - -export interface BuildSnapshot { - /** The list of files contained in this snapshot, not prefixed by a slash. */ - readonly paths: Array; - - /** For a given file, return it's contents. - * @throws If the file is not contained in this snapshot. */ - read( - path: string, - ): - | ReadableStream - | Uint8Array - | null - | Promise | Uint8Array | null>; - - /** For a given entrypoint, return it's list of dependencies. - * - * Returns an empty array if the entrypoint does not exist. */ - dependencies(path: string): Array; -} - -export interface BuildSnapshotJson { - build_id: string; - files: Record>; -} diff --git a/lime/src/constants.ts b/lime/src/constants.ts deleted file mode 100644 index 1d7c1725..00000000 --- a/lime/src/constants.ts +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -export const PARTIAL_SEARCH_PARAM = "lime-partial"; -export const PARTIAL_ATTR = "f-partial"; -export const LOADING_ATTR = "f-loading"; -export const CLIENT_NAV_ATTR = "f-client-nav"; -export const DATA_KEY_ATTR = "data-lime-key"; -export const DATA_CURRENT = "data-current"; -export const DATA_ANCESTOR = "data-ancestor"; - -export const enum PartialMode { - REPLACE, - APPEND, - PREPEND, -} diff --git a/lime/src/dev/build.ts b/lime/src/dev/build.ts deleted file mode 100644 index abc928a8..00000000 --- a/lime/src/dev/build.ts +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { getServerContext } from "../server/context.ts"; -import { join } from "../server/deps.ts"; -import { colors, fs } from "./deps.ts"; -import { type BuildSnapshotJson } from "../build/mod.ts"; -import { BUILD_ID } from "../server/build_id.ts"; -import { type InternalLimeState } from "../server/types.ts"; - -export async function build( - state: InternalLimeState, -) { - const outDir = state.config.build.outDir; - const plugins = state.config.plugins; - - // Ensure that build dir is empty - await fs.emptyDir(outDir); - - // Create a directory for static assets produced during the build - await Deno.mkdir(join(outDir, "static")); - - await Promise.all(plugins.map((plugin) => plugin.buildStart?.(state.config))); - - // Bundle assets - const ctx = await getServerContext(state); - const snapshot = await ctx.buildSnapshot(); - - // Write output files to disk - await Promise.all(snapshot.paths.map(async (fileName) => { - const data = await snapshot.read(fileName); - - if (data === null) { - return; - } - - return Deno.writeFile(join(outDir, fileName), data); - })); - - // Write dependency snapshot file to disk - const jsonSnapshot: BuildSnapshotJson = { - build_id: BUILD_ID, - files: {}, - }; - - for (const filePath of snapshot.paths) { - const dependencies = snapshot.dependencies(filePath); - - jsonSnapshot.files[filePath] = dependencies; - } - - const snapshotPath = join(outDir, "snapshot.json"); - - await Deno.writeTextFile(snapshotPath, JSON.stringify(jsonSnapshot, null, 2)); - - console.log( - `Assets written to: ${colors.green(outDir)}`, - ); - - await Promise.all(plugins.map((plugin) => plugin.buildEnd?.())); -} diff --git a/lime/src/dev/deps.ts b/lime/src/dev/deps.ts deleted file mode 100644 index 4abf5ef2..00000000 --- a/lime/src/dev/deps.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -// std -export { - basename, - dirname, - extname, - fromFileUrl, - join, - relative, - resolve, - SEP, - toFileUrl, -} from "$std/path/mod.ts"; -export * as posix from "$std/path/posix/mod.ts"; -export { DAY, WEEK } from "$std/datetime/constants.ts"; -export * as colors from "$std/fmt/colors.ts"; -export { walk, type WalkEntry, WalkError } from "$std/fs/walk.ts"; -export { parse } from "$std/flags/mod.ts"; -export { existsSync } from "$std/fs/mod.ts"; -export * as semver from "$std/semver/mod.ts"; -export * as JSONC from "$std/jsonc/mod.ts"; -export * as fs from "$std/fs/mod.ts"; - -// ts-morph -export { Node, Project } from "https://deno.land/x/ts_morph@20.0.0/mod.ts"; diff --git a/lime/src/dev/dev_command.ts b/lime/src/dev/dev_command.ts deleted file mode 100644 index 8a9fcca6..00000000 --- a/lime/src/dev/dev_command.ts +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { updateCheck } from "./update_check.ts"; -import { DAY, dirname, fromFileUrl, join, toFileUrl } from "./deps.ts"; -import { type LimeConfig, Manifest as ServerManifest } from "../server/mod.ts"; -import { build } from "./build.ts"; -import { - collect, - ensureMinDenoVersion, - generate, - type Manifest, -} from "./mod.ts"; -import { startServer } from "../server/boot.ts"; -import { getInternalLimeState } from "../server/config.ts"; -import { getServerContext } from "../server/context.ts"; - -export async function dev( - base: string, - config?: LimeConfig, -) { - ensureMinDenoVersion(); - - // Run update check in background - updateCheck(DAY).catch(() => {}); - - const dir = dirname(fromFileUrl(base)); - - let currentManifest: Manifest; - const prevManifest = Deno.env.get("LIME_DEV_PREVIOUS_MANIFEST"); - - if (prevManifest) { - currentManifest = JSON.parse(prevManifest); - } else { - currentManifest = { islands: [], routes: [] }; - } - - const newManifest = await collect(dir, config?.router?.ignoreFilePattern); - - Deno.env.set("LIME_DEV_PREVIOUS_MANIFEST", JSON.stringify(newManifest)); - - const manifestChanged = - !arraysEqual(newManifest.routes, currentManifest.routes) || - !arraysEqual(newManifest.islands, currentManifest.islands); - - if (manifestChanged) { - await generate(dir, newManifest); - } - - const manifest = (await import(toFileUrl(join(dir, "manifest.gen.ts")).href)) - .default as ServerManifest; - - const state = await getInternalLimeState( - manifest, - config ?? {}, - ); - state.loadSnapshot = false; - - if (Deno.args.includes("build")) { - state.config.dev = false; - - await build(state); - - return; - } - - state.config.dev = true; - - const ctx = await getServerContext(state); - await startServer(ctx.handler(), state.config.server); -} - -function arraysEqual(a: ReadonlyArray, b: ReadonlyArray): boolean { - if (a.length !== b.length) { - return false; - } - - for (let i = 0; i < a.length; ++i) { - if (a[i] !== b[i]) { - return false; - } - } - - return true; -} diff --git a/lime/src/dev/error.ts b/lime/src/dev/error.ts deleted file mode 100644 index e452f663..00000000 --- a/lime/src/dev/error.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -export function printError(message: string) { - console.error(`%cerror%c: ${message}`, "color: red; font-weight: bold", ""); -} - -export function error(message: string): never { - printError(message); - Deno.exit(1); -} diff --git a/lime/src/dev/imports.ts b/lime/src/dev/imports.ts deleted file mode 100644 index 7b96bc07..00000000 --- a/lime/src/dev/imports.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -export const RECOMMENDED_STD_VERSION = "0.205.0"; - -export function baseImports(imports: Record) { - imports["$cool/"] = new URL("../../../", import.meta.url).href; - imports["$std/"] = `https://deno.land/std@${RECOMMENDED_STD_VERSION}/`; -} diff --git a/lime/src/dev/manifest.ts b/lime/src/dev/manifest.ts deleted file mode 100644 index 61afa513..00000000 --- a/lime/src/dev/manifest.ts +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { extname, join, posix } from "./deps.ts"; - -/** - * Import specifiers must have forward slashes - */ -function toImportSpecifier(file: string) { - let specifier = posix.normalize(file).replace(/\\/g, "/"); - if (!specifier.startsWith(".")) { - specifier = "./" + specifier; - } - return specifier; -} - -// Create a valid JS identifier out of the project relative specifier. -// Note that we only need to deal with strings that _must_ have been -// valid file names in Windows, macOS and Linux and every identifier we -// create here will be prefixed with at least one "$". This greatly -// simplifies the invalid characters we have to account for. -export function specifierToIdentifier(specifier: string, used: Set) { - specifier = specifier.replace(/^(?:routes|islands)\//, ""); - const ext = extname(specifier); - if (ext) specifier = specifier.slice(0, -ext.length); - - let ident = ""; - if (/^[\d]/.test(specifier)) { - ident += "_"; - } - ident += specifier.replace(/[\/.\(\)\[\]\s@-]/g, "_").replace(/_+/g, "_"); - - if (used.has(ident)) { - let check = ident; - let i = 1; - while (used.has(check)) { - check = `${ident}_${i++}`; - } - ident = check; - } - - used.add(ident); - return ident; -} - -export interface Manifest { - routes: Array; - islands: Array; -} - -export async function generate(directory: string, manifest: Manifest) { - const { routes, islands } = manifest; - - // Keep track of which identifier we've already used - const used = new Set(); - - const normalizedRoutes = new Map(); - for (let i = 0; i < routes.length; i++) { - const file = routes[i]; - const specifier = toImportSpecifier(file); - const identifier = specifierToIdentifier(file, used); - normalizedRoutes.set(specifier, identifier); - } - - const normalizedIslands = new Map(); - for (let i = 0; i < islands.length; i++) { - const file = islands[i]; - const specifier = toImportSpecifier(file); - const identifier = specifierToIdentifier(file, used); - normalizedIslands.set(specifier, identifier); - } - - const output = `// DO NOT EDIT. This file is generated by cool lime. -// This file SHOULD be checked into source version control. -// This file is automatically updated during development when running \`dev.ts\`. -${ - Array.from(normalizedRoutes.entries()).map(([specifier, identifier]) => - `import * as $${identifier} from "${specifier}";` - ).join( - "\n", - ) - } -${ - Array.from(normalizedIslands.entries()).map(([specifier, identifier]) => - `import * as $$${identifier} from "${specifier}";` - ) - .join("\n") - } -export const manifest = { - routes: { - ${ - Array.from(normalizedRoutes.entries()).map(([specifier, identifier]) => - `${JSON.stringify(`${specifier}`)}: $${identifier},` - ) - .join("\n ") - } - }, - islands: { - ${ - Array.from(normalizedIslands.entries()).map(([specifier, identifier]) => - `${JSON.stringify(`${specifier}`)}: $$${identifier},` - ) - .join("\n ") - } - }, - baseUrl: import.meta.url, -}; -`; - - const proc = new Deno.Command(Deno.execPath(), { - args: ["fmt", "-"], - stdin: "piped", - stdout: "piped", - stderr: "null", - }).spawn(); - - const raw = new ReadableStream({ - start(controller) { - controller.enqueue(new TextEncoder().encode(output)); - controller.close(); - }, - }); - await raw.pipeTo(proc.stdin); - const { stdout } = await proc.output(); - - const manifestStr = new TextDecoder().decode(stdout); - const manifestPath = join(directory, "./manifest.gen.ts"); - - await Deno.writeTextFile(manifestPath, manifestStr); - // console.log( - // `%cThe manifest has been generated for ${routes.length} routes and ${islands.length} islands.`, - // "color: blue; font-weight: bold", - // ); -} diff --git a/lime/src/dev/manifest_test.ts b/lime/src/dev/manifest_test.ts deleted file mode 100644 index 658f67d3..00000000 --- a/lime/src/dev/manifest_test.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { assertEquals } from "$std/assert/mod.ts"; -import { specifierToIdentifier } from "./manifest.ts"; - -const run = specifierToIdentifier; - -Deno.test("specifierToIdentifier", () => { - const used = new Set(); - assertEquals(run("foo/bar.ts", used), "foo_bar"); - assertEquals(run("foo/bar.json.ts", used), "foo_bar_json"); - assertEquals(run("foo/[id]/bar", used), "foo_id_bar"); - assertEquals(run("foo/[...all]/bar", used), "foo_all_bar"); - assertEquals(run("foo/[[optional]]/bar", used), "foo_optional_bar"); - assertEquals(run("foo/as-df/bar", used), "foo_as_df_bar"); - assertEquals(run("foo/as@df", used), "foo_as_df"); -}); - -Deno.test("specifierToIdentifier deals with duplicates", () => { - const used = new Set(); - assertEquals(run("foo/bar", used), "foo_bar"); - assertEquals(run("foo/bar", used), "foo_bar_1"); -}); diff --git a/lime/src/dev/mod.ts b/lime/src/dev/mod.ts deleted file mode 100644 index 417cd747..00000000 --- a/lime/src/dev/mod.ts +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { join, relative, semver, walk, WalkEntry } from "./deps.ts"; -export { generate, type Manifest } from "./manifest.ts"; -import { generate, type Manifest } from "./manifest.ts"; -import { error } from "./error.ts"; - -const MIN_DENO_VERSION = "1.38.0"; -const TEST_FILE_PATTERN = /[._]test\.(?:[tj]sx?|[mc][tj]s)$/; - -export function ensureMinDenoVersion() { - // Check that the minimum supported Deno version is being used. - if ( - !semver.gte(semver.parse(Deno.version.deno), semver.parse(MIN_DENO_VERSION)) - ) { - let message = - `Deno version ${MIN_DENO_VERSION} or higher is required. Please update Deno.\n\n`; - - if (Deno.execPath().includes("homebrew")) { - message += - "You seem to have installed Deno via homebrew. To update, run: `brew upgrade deno`\n"; - } else { - message += "To update, run: `deno upgrade`\n"; - } - - error(message); - } -} - -async function collectDir( - dir: string, - callback: (entry: WalkEntry, dir: string) => void, - ignoreFilePattern = TEST_FILE_PATTERN, -): Promise { - // Check if provided path is a directory - try { - const stat = await Deno.stat(dir); - if (!stat.isDirectory) { - return; - } - } catch (err) { - if (err instanceof Deno.errors.NotFound) { - return; - } - - throw err; - } - - const routesFolder = walk(dir, { - includeDirs: false, - includeFiles: true, - exts: ["tsx", "jsx", "ts", "js"], - skip: [ignoreFilePattern], - }); - - for await (const entry of routesFolder) { - callback(entry, dir); - } -} - -const GROUP_REG = /[/\\\\]\((_[^/\\\\]+)\)[/\\\\]/; -export async function collect( - directory: string, - ignoreFilePattern?: RegExp, -): Promise { - const filePaths = new Set(); - - const routes: Array = []; - const islands: Array = []; - await Promise.all([ - collectDir(join(directory, "./routes"), (entry, dir) => { - const rel = join("routes", relative(dir, entry.path)); - const normalized = rel.slice(0, rel.lastIndexOf(".")); - - // A `(_islands)` path segment is a local island folder. - // Any route path segment wrapped in `(_...)` is ignored - // during route collection. - const match = normalized.match(GROUP_REG); - if (match !== null && match[1]?.startsWith("_") === true) { - if (match[1] === "_islands") { - islands.push(rel); - } - return; - } - - if (filePaths.has(normalized)) { - throw new Error( - `Route conflict detected. Multiple files have the same name: ${dir}${normalized}`, - ); - } - filePaths.add(normalized); - routes.push(rel); - }, ignoreFilePattern), - collectDir(join(directory, "./islands"), (entry, dir) => { - const rel = join("islands", relative(dir, entry.path)); - islands.push(rel); - }, ignoreFilePattern), - ]); - - routes.sort(); - islands.sort(); - - return { routes, islands }; -} - -export async function buildManifestFile(base: string) { - const manifest = await collect(base); - await generate(base, manifest); - - console.log( - `%cThe manifest has been generated for ${manifest.routes.length} routes and ${manifest.islands.length} islands.`, - "color: blue; font-weight: bold", - ); - - // return manifest; -} diff --git a/lime/src/dev/update_check.ts b/lime/src/dev/update_check.ts deleted file mode 100644 index d803599c..00000000 --- a/lime/src/dev/update_check.ts +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { colors, join, semver } from "./deps.ts"; - -export interface CheckFile { - last_checked: string; - last_shown?: string; - latest_version: string; - current_version: string; -} - -function getHomeDir(): string | null { - switch (Deno.build.os) { - case "linux": { - const xdg = Deno.env.get("XDG_CACHE_HOME"); - - if (xdg) { - return xdg; - } - - const home = Deno.env.get("HOME"); - - if (home) { - return `${home}/.cache`; - } - - break; - } - - case "darwin": { - const home = Deno.env.get("HOME"); - - if (home) { - return `${home}/Library/Caches`; - } - - break; - } - - case "windows": - return Deno.env.get("LOCALAPPDATA") ?? null; - } - - return null; -} - -function getLimeCacheDir(): string | null { - const home = getHomeDir(); - - if (home) { - return join(home, "lime"); - } - - return null; -} - -async function fetchLatestVersion() { - const res = await fetch("https://dl.deno.land/coollime/release-latest.txt"); - - if (res.ok) { - return (await res.text()).trim().replace(/^v/, ""); - } - - throw new Error(`Could not fetch latest version.`); -} - -async function readCurrentVersion() { - const versions = (await import("../../versions.json", { - "assert": { type: "json" }, - })).default as Array; - - return versions[0]; -} - -export async function updateCheck( - interval: number, - getCacheDir = getLimeCacheDir, - getLatestVersion = fetchLatestVersion, - getCurrentVersion = readCurrentVersion, -) { - // Skip update checks on CI or Deno Deploy - if ( - Deno.env.get("CI") === "true" || - Deno.env.get("LIME_NO_UPDATE_CHECK") === "true" || - Deno.env.get("DENO_DEPLOYMENT_ID") - ) { - return; - } - - const home = getCacheDir(); - - if (!home) { - return; - } - - const filePath = join(home, "latest.json"); - - try { - await Deno.mkdir(home, { recursive: true }); - } catch (err) { - if (!(err instanceof Deno.errors.AlreadyExists)) { - throw err; - } - } - - const version = await getCurrentVersion() ?? "0.0.0"; - - let checkFile: CheckFile = { - current_version: version, - latest_version: version, - last_checked: new Date(0).toISOString(), - }; - - try { - const text = await Deno.readTextFile(filePath); - - checkFile = JSON.parse(text); - } catch (err) { - if (!(err instanceof Deno.errors.NotFound)) { - throw err; - } - } - - // Update current version - checkFile.current_version = version; - - // Only check in the specified interval - if (Date.now() >= new Date(checkFile.last_checked).getTime() + interval) { - try { - checkFile.latest_version = await getLatestVersion(); - checkFile.last_checked = new Date().toISOString(); - } catch (err) { - // Update check is optional and shouldn't abort the program. - console.error( - colors.red(` Update check failed: `) + err.message, - ); - - return; - } - } - - // Only show update message if current version is smaller than latest - const currentVersion = semver.parse(checkFile.current_version); - const latestVersion = semver.parse(checkFile.latest_version); - if ( - (!checkFile.last_shown || - Date.now() >= new Date(checkFile.last_shown).getTime() + interval) && - semver.lt(currentVersion, latestVersion) - ) { - checkFile.last_shown = new Date().toISOString(); - - const current = colors.bold(colors.rgb8(checkFile.current_version, 208)); - const latest = colors.bold(colors.rgb8(checkFile.latest_version, 121)); - console.log( - ` cool lime ${latest} is available. You're on ${current}`, - ); - console.log(); - } - - // Migrate old format to current - if (!checkFile.last_shown) { - checkFile.last_shown = new Date().toISOString(); - } - - const raw = JSON.stringify(checkFile, null, 2); - - await Deno.writeTextFile(filePath, raw); -} diff --git a/lime/src/dev/ws_connection.ts b/lime/src/dev/ws_connection.ts deleted file mode 100644 index 266e23c8..00000000 --- a/lime/src/dev/ws_connection.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -export const WS_REVISION = "revision" as const; - -export interface WsServerState { - type: typeof WS_REVISION; - value: number; - hot: boolean; -} - -// deno-lint-ignore no-explicit-any -export function isWsRevision(msg: any): msg is WsServerState { - return msg !== null && typeof msg === "object" && msg.type === WS_REVISION; -} diff --git a/lime/src/runtime/Partial.tsx b/lime/src/runtime/Partial.tsx deleted file mode 100644 index d1cbd83e..00000000 --- a/lime/src/runtime/Partial.tsx +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { type ReactElement } from "react"; -import { type ComponentChildren } from "./drivers/view.tsx"; - -export interface PartialProps { - children?: ComponentChildren; - /** - * The name of the partial. This value must be unique across partials. - */ - name: string; - /** - * Define how the new HTML should be applied. - * @default {"replace"} - */ - mode?: "replace" | "prepend" | "append"; -} - -export function Partial(props: PartialProps): ReactElement { - // deno-lint-ignore no-explicit-any - return props.children as any; -} -Partial.displayName = "Partial"; diff --git a/lime/src/runtime/active_url.ts b/lime/src/runtime/active_url.ts deleted file mode 100644 index 0b902893..00000000 --- a/lime/src/runtime/active_url.ts +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { type ReactElement } from "react"; -import { DATA_ANCESTOR, DATA_CURRENT } from "../constants.ts"; - -export const enum UrlMatchKind { - None, - Ancestor, - Current, -} - -export function matchesUrl(current: string, needle: string): UrlMatchKind { - let href = new URL(needle, "http://localhost").pathname; - if (href !== "/" && href.endsWith("/")) { - href = href.slice(0, -1); - } - - if (current !== "/" && current.endsWith("/")) { - current = current.slice(0, -1); - } - - if (current === href) { - return UrlMatchKind.Current; - } else if (current.startsWith(href + "/") || href === "/") { - return UrlMatchKind.Ancestor; - } - - return UrlMatchKind.None; -} - -/** - * Mark active or ancestor link - * Note: This function is used both on the server and the client - */ -export function setActiveUrl(vnode: ReactElement, pathname: string): void { - const props = vnode.props as Record; - const hrefProp = props.href; - if (typeof hrefProp === "string" && hrefProp.startsWith("/")) { - const match = matchesUrl(pathname, hrefProp); - if (match === UrlMatchKind.Current) { - props[DATA_CURRENT] = "true"; - props["aria-current"] = "page"; - } else if (match === UrlMatchKind.Ancestor) { - props[DATA_ANCESTOR] = "true"; - props["aria-current"] = "true"; - } - } -} diff --git a/lime/src/runtime/build_id.ts b/lime/src/runtime/build_id.ts deleted file mode 100644 index 34771f40..00000000 --- a/lime/src/runtime/build_id.ts +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -// Note: in the client build this file is replaced with a file exporting a static string -export { BUILD_ID } from "../server/build_id.ts"; diff --git a/lime/src/runtime/csp.ts b/lime/src/runtime/csp.ts deleted file mode 100644 index 29e67bd3..00000000 --- a/lime/src/runtime/csp.ts +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2023 the cool authors. All rights reserved. MIT license. - -import { view } from "./drivers/view.tsx"; - -export const SELF = "'self'"; -export const UNSAFE_INLINE = "'unsafe-inline'"; -export const UNSAFE_EVAL = "'unsafe-eval'"; -export const UNSAFE_HASHES = "'unsafe-hashes'"; -export const NONE = "'none'"; -export const STRICT_DYNAMIC = "'strict-dynamic'"; - -export function nonce(val: string) { - return `'nonce-${val}'`; -} - -export interface ContentSecurityPolicy { - directives: ContentSecurityPolicyDirectives; - reportOnly: boolean; -} - -export interface ContentSecurityPolicyDirectives { - // Fetch directives - /** - * Defines the valid sources for web workers and nested browsing contexts - * loaded using elements such as and