Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: map std #236

Merged
merged 2 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
// Internal dependencies
export { config } from "https://deno.land/[email protected]/dotenv/mod.ts";
export {
cleanEnv,
makeValidator,
num,
str,
} from "https://deno.land/x/[email protected]/mod.ts";
export {
dirname,
fromFileUrl,
join,
resolve,
toFileUrl,
} from "https://deno.land/[email protected]/path/mod.ts";
export * from "https://deno.land/x/[email protected]/mod.ts";
export * as log from "https://deno.land/[email protected]/log/mod.ts";
export { getLevelByName } from "https://deno.land/[email protected]/log/levels.ts";
4 changes: 3 additions & 1 deletion env.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { cleanEnv, config, log, makeValidator, num, str } from "./deps.ts";
import * as log from "std/log/mod.ts";
import { config } from "std/dotenv/mod.ts";
import { cleanEnv, makeValidator, num, str } from "./deps.ts";

await config({ export: true });

Expand Down
3 changes: 2 additions & 1 deletion import_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"imports": {
"$grm": "https://deno.land/x/[email protected]/mod.ts",
"$grm-deps": "https://deno.land/x/[email protected]/deps.ts",
"$xor": "./xor.ts"
"$xor": "./xor.ts",
"std/": "https://deno.land/[email protected]/"
}
}
4 changes: 3 additions & 1 deletion module_manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as log from "std/log/mod.ts";
import { join, resolve, toFileUrl } from "std/path/mod.ts";
import { Api, NewMessageEvent, TelegramClient } from "$grm";
import { bold, fmt, join, log, resolve, toFileUrl } from "./deps.ts";
import { bold, fmt } from "./deps.ts";
import { CommandHandler, End } from "./handlers/mod.ts";
import { updateMessage } from "./helpers.ts";
import { getHelp, isModule, Module } from "./module.ts";
Expand Down
11 changes: 2 additions & 9 deletions modules/files/mod.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { join } from "std/path/mod.ts";
import { Api, CustomFile } from "$grm";
import { Buffer } from "$grm-deps";
import {
bold,
code,
CommandHandler,
fmt,
join,
Module,
updateMessage,
} from "$xor";
import { bold, code, CommandHandler, fmt, Module, updateMessage } from "$xor";
import { parseAttributes } from "./helpers.ts";

const files: Module = {
Expand Down
2 changes: 1 addition & 1 deletion modules/util/mod.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { toFileUrl } from "std/path/mod.ts";
import { Api, VERSION as telegramVersion } from "$grm";
import { bigInt } from "$grm-deps";
import {
Expand All @@ -7,7 +8,6 @@ import {
longText,
Module,
type Stringable,
toFileUrl,
updateMessage,
version,
} from "$xor";
Expand Down
3 changes: 2 additions & 1 deletion setup_log.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getLevelByName, log } from "./deps.ts";
import * as log from "std/log/mod.ts";
import { getLevelByName } from "std/log/levels.ts";

const level = (() => {
let toReturn = "INFO";
Expand Down
2 changes: 0 additions & 2 deletions xor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ export {
fmt,
FormattedString,
italic,
join,
link,
mentionUser,
pre,
spoiler,
strikethrough,
type Stringable,
toFileUrl,
underline,
} from "./deps.ts";