Skip to content

Commit

Permalink
.js file names
Browse files Browse the repository at this point in the history
  • Loading branch information
lancejpollard committed Jun 26, 2024
1 parent e678248 commit 8abbb03
Show file tree
Hide file tree
Showing 182 changed files with 691 additions and 886 deletions.
4 changes: 2 additions & 2 deletions code/action/archive/command.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
buildCommandSequence,
getCommand,
} from '~/code/tool/shared/command'
import { Archive } from '~/code/type/shared'
} from '~/code/tool/shared/command.js'
import { Archive } from '~/code/type/shared/index.js'

// https://superuser.com/questions/190053/universal-command-line-unarchiving-tool-on-a-mac
// atool
Expand Down
2 changes: 1 addition & 1 deletion code/action/check/file/shared.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fileTypeFromBuffer, fileTypeFromFile } from 'file-type'
import { CheckFileTypeUsingMagicBytes } from '~/code/type/shared'
import { CheckFileTypeUsingMagicBytes } from '~/code/type/shared/index.js'
import { GuessLang } from 'guesslang-js'

export async function checkFileTypeUsingMagicBytes(
Expand Down
12 changes: 6 additions & 6 deletions code/action/compile/code/c/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import {
CompileCBrowserInputParser,
CompileCBrowserLocalInput,
CompileCBrowserRemoteInput,
} from '~/code/type/browser/parser'
import { buildFormDataRequestToCompile } from '~/code/action/compile/code/shared'
import kink from '~/code/tool/shared/kink'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work'
import { NativeOptions } from '~/code/tool/shared/request'
import { WorkFileAsBlob } from '~/code/tool/shared/work'
} from '~/code/type/browser/parser.js'
import { buildFormDataRequestToCompile } from '~/code/action/compile/code/shared.js'
import kink from '~/code/tool/shared/kink.js'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work.js'
import { NativeOptions } from '~/code/tool/shared/request.js'
import { WorkFileAsBlob } from '~/code/tool/shared/work.js'

export async function compileCBrowser(
source: CompileCBrowserInput,
Expand Down
17 changes: 8 additions & 9 deletions code/action/compile/code/c/node.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
import {
CompileCNodeInput,
CompileCNodeInputParser,
CompileCNodeOutputParser,
CompileCNodeLocalInternalInput,
CompileCNodeLocalExternalInput,
CompileCNodeLocalInputParser,
CompileCNodeRemoteInput,
CompileCNodeClientInputParser,
} from '~/code/type/node/parser'
import { buildCommandToCompileC } from '../command'
import { runCommandSequence } from '~/code/tool/node/command'
} from '~/code/type/node/parser.js'
import { buildCommandToCompileC } from '../command.js'
import { runCommandSequence } from '~/code/tool/node/command.js'
import {
resolveInputForCompileLocalExternalNode,
resolveInputForCompileLocalInternalNode,
resolveInputForCompileRemoteNode,
} from '~/code/action/compile/code/tool/node'
import { extend } from '~/code/tool/shared/object'
import { buildRequestToCompile } from '~/code/action/compile/code/shared'
import { resolveWorkFileNode } from '~/code/tool/node/request'
import { NativeOptions } from '~/code/tool/shared/request'
} from '~/code/action/compile/code/tool/node.js'
import { extend } from '~/code/tool/shared/object.js'
import { buildRequestToCompile } from '~/code/action/compile/code/shared.js'
import { resolveWorkFileNode } from '~/code/tool/node/request.js'
import { NativeOptions } from '~/code/tool/shared/request.js'

export async function compileCNode(
source: CompileCNodeInput,
Expand Down
6 changes: 3 additions & 3 deletions code/action/compile/code/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
import {
buildCommandSequence,
getCommand,
} from '~/code/tool/shared/command'
import { getConfig } from '~/code/tool/shared/config'
} from '~/code/tool/shared/command.js'
import { getConfig } from '~/code/tool/shared/config.js'
import {
CompileCCommandInput,
CompileCppCommandInput,
CompileLlvmIrToAssembly,
CompileRustCommandInput,
CompileSwiftCommandInput,
} from '~/code/type/shared'
} from '~/code/type/shared/index.js'

// @.str = private unnamed_addr constant [14 x i8] c"Hello, World!\00", align 1
export async function buildCommandToCompileC(
Expand Down
12 changes: 6 additions & 6 deletions code/action/compile/code/cpp/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {
CompileCppBrowserLocalInput,
CompileCppBrowserOutputParser,
CompileCppBrowserRemoteInput,
} from '~/code/type/browser/parser'
import { buildFormDataRequestToCompile } from '~/code/action/compile/code/shared'
import kink from '~/code/tool/shared/kink'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work'
import { NativeOptions } from '~/code/tool/shared/request'
import { WorkFileAsBlob } from '~/code/tool/shared/work'
} from '~/code/type/browser/parser.js'
import { buildFormDataRequestToCompile } from '~/code/action/compile/code/shared.js'
import kink from '~/code/tool/shared/kink.js'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work.js'
import { NativeOptions } from '~/code/tool/shared/request.js'
import { WorkFileAsBlob } from '~/code/tool/shared/work.js'

export async function compileCppBrowser(
source: CompileCppBrowserInput,
Expand Down
16 changes: 8 additions & 8 deletions code/action/compile/code/cpp/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import {
CompileCppNodeLocalInputParser,
CompileCppNodeRemoteInput,
CompileCppNodeClientInputParser,
} from '~/code/type/node/parser'
import { buildCommandToCompileCpp } from '../command'
import { runCommandSequence } from '~/code/tool/node/command'
} from '~/code/type/node/parser.js'
import { buildCommandToCompileCpp } from '../command.js'
import { runCommandSequence } from '~/code/tool/node/command.js'
import {
resolveInputForCompileLocalExternalNode,
resolveInputForCompileLocalInternalNode,
resolveInputForCompileRemoteNode,
} from '~/code/action/compile/code/tool/node'
import { extend } from '~/code/tool/shared/object'
import { buildRequestToCompile } from '~/code/action/compile/code/shared'
import { resolveWorkFileNode } from '~/code/tool/node/request'
import { NativeOptions } from '~/code/tool/shared/request'
} from '~/code/action/compile/code/tool/node.js'
import { extend } from '~/code/tool/shared/object.js'
import { buildRequestToCompile } from '~/code/action/compile/code/shared.js'
import { resolveWorkFileNode } from '~/code/tool/node/request.js'
import { NativeOptions } from '~/code/tool/shared/request.js'

export async function compileCppNode(
source: CompileCppNodeInput,
Expand Down
6 changes: 3 additions & 3 deletions code/action/compile/code/handler.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChildProcessError, exec } from '~/code/tool/node/process'
import kink from '~/code/tool/shared/kink'
import { Command } from '~/code/type/node/parser'
import { ChildProcessError, exec } from '~/code/tool/node/process.js'
import kink from '~/code/tool/shared/kink.js'
import { Command } from '~/code/type/node/parser.js'

export async function runClangCommand(cmd: Command) {
await exec(cmd.link)
Expand Down
2 changes: 1 addition & 1 deletion code/action/compile/code/request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildRemoteRequest } from '~/code/tool/shared/request'
import { buildRemoteRequest } from '~/code/tool/shared/request.js'

export async function buildRequestToCompile(language: string, input) {
return buildRemoteRequest('POST', `/compile/${language}`, input)
Expand Down
12 changes: 6 additions & 6 deletions code/action/compile/code/rust/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import {
CompileRustBrowserInputParser,
CompileRustBrowserLocalInput,
CompileRustBrowserRemoteInput,
} from '~/code/type/browser/parser'
import { buildFormDataRequestToCompile } from '~/code/action/compile/code/shared'
import kink from '~/code/tool/shared/kink'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work'
import { NativeOptions } from '~/code/tool/shared/request'
import { WorkFileAsBlob } from '~/code/tool/shared/work'
} from '~/code/type/browser/parser.js'
import { buildFormDataRequestToCompile } from '~/code/action/compile/code/shared.js'
import kink from '~/code/tool/shared/kink.js'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work.js'
import { NativeOptions } from '~/code/tool/shared/request.js'
import { WorkFileAsBlob } from '~/code/tool/shared/work.js'

export async function compileRustBrowser(
source: CompileRustBrowserInput,
Expand Down
16 changes: 8 additions & 8 deletions code/action/compile/code/rust/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import {
CompileRustNodeLocalInputParser,
CompileRustNodeRemoteInput,
CompileRustNodeClientInputParser,
} from '~/code/type/node/parser'
import { buildCommandToCompileRust } from '../command'
import { runCommandSequence } from '~/code/tool/node/command'
} from '~/code/type/node/parser.js'
import { buildCommandToCompileRust } from '../command.js'
import { runCommandSequence } from '~/code/tool/node/command.js'
import {
resolveInputForCompileLocalExternalNode,
resolveInputForCompileLocalInternalNode,
resolveInputForCompileRemoteNode,
} from '~/code/action/compile/code/tool/node'
import { extend } from '~/code/tool/shared/object'
import { buildRequestToCompile } from '~/code/action/compile/code/shared'
import { resolveWorkFileNode } from '~/code/tool/node/request'
import { NativeOptions } from '~/code/tool/shared/request'
} from '~/code/action/compile/code/tool/node.js'
import { extend } from '~/code/tool/shared/object.js'
import { buildRequestToCompile } from '~/code/action/compile/code/shared.js'
import { resolveWorkFileNode } from '~/code/tool/node/request.js'
import { NativeOptions } from '~/code/tool/shared/request.js'

export async function compileRustNode(
source: CompileRustNodeInput,
Expand Down
6 changes: 3 additions & 3 deletions code/action/compile/code/shared.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { serialize as serializeToFormData } from 'object-to-formdata'
import { omitNested } from '~/code/tool/shared/object'
import { buildRemoteRequest } from '~/code/tool/shared/request'
import { CompileApi } from '~/code/type/shared'
import { omitNested } from '~/code/tool/shared/object.js'
import { buildRemoteRequest } from '~/code/tool/shared/request.js'
import { CompileApi } from '~/code/type/shared/index.js'

export type CompileFileTest = {
input: {
Expand Down
12 changes: 6 additions & 6 deletions code/action/compile/code/swift/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import {
CompileSwiftBrowserLocalInput,
CompileSwiftBrowserOutputParser,
CompileSwiftBrowserRemoteInput,
} from '~/code/type/browser/parser'
import { buildFormDataRequestToCompile } from '~/code/action/compile/code/shared'
import kink from '~/code/tool/shared/kink'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work'
import { NativeOptions } from '~/code/tool/shared/request'
import { WorkFileAsBlob } from '~/code/tool/shared/work'
} from '~/code/type/browser/parser.js'
import { buildFormDataRequestToCompile } from '~/code/action/compile/code/shared.js'
import kink from '~/code/tool/shared/kink.js'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work.js'
import { NativeOptions } from '~/code/tool/shared/request.js'
import { WorkFileAsBlob } from '~/code/tool/shared/work.js'

export async function compileSwiftBrowser(
source: CompileSwiftBrowserInput,
Expand Down
16 changes: 8 additions & 8 deletions code/action/compile/code/swift/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import {
CompileSwiftNodeLocalInputParser,
CompileSwiftNodeRemoteInput,
CompileSwiftNodeClientInputParser,
} from '~/code/type/node/parser'
import { buildCommandToCompileSwift } from '../command'
import { runCommandSequence } from '~/code/tool/node/command'
} from '~/code/type/node/parser.js'
import { buildCommandToCompileSwift } from '../command.js'
import { runCommandSequence } from '~/code/tool/node/command.js'
import {
resolveInputForCompileLocalExternalNode,
resolveInputForCompileLocalInternalNode,
resolveInputForCompileRemoteNode,
} from '~/code/action/compile/code/tool/node'
import { extend } from '~/code/tool/shared/object'
import { buildRequestToCompile } from '~/code/action/compile/code/shared'
import { resolveWorkFileNode } from '~/code/tool/node/request'
import { NativeOptions } from '~/code/tool/shared/request'
} from '~/code/action/compile/code/tool/node.js'
import { extend } from '~/code/tool/shared/object.js'
import { buildRequestToCompile } from '~/code/action/compile/code/shared.js'
import { resolveWorkFileNode } from '~/code/tool/node/request.js'
import { NativeOptions } from '~/code/tool/shared/request.js'

export async function compileSwiftNode(
source: CompileSwiftNodeInput,
Expand Down
12 changes: 6 additions & 6 deletions code/action/compile/code/tool/node.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import set from 'lodash/set'
import unset from 'lodash/unset'
import fsp from 'fs/promises'
import debug from '~/code/tool/shared/debug'
import debug from '~/code/tool/shared/debug.js'
import {
createStreamableFile,
getFallbackFilePath,
getScopeDirectory,
readRemoteFileNode,
resolveRemoteFile,
} from '~/code/tool/node/file'
} from '~/code/tool/node/file.js'
import {
parsePath,
resolvePathRelativeToScope,
} from '~/code/tool/shared/file'
import { cloneOptions } from '~/code/tool/shared/object'
} from '~/code/tool/shared/file.js'
import { cloneOptions } from '~/code/tool/shared/object.js'
import {
ResolveInputForCompileLocalExternal,
ResolveInputForCompileLocalInternal,
ResolveInputForCompileRemote,
} from '~/code/type/node/parser'
// import debug from '~/code/tool/shared/debug'
} from '~/code/type/node/parser.js'
// import debug from '~/code/tool/shared/debug.js'

// https://www.npmjs.com/package/ftp

Expand Down
15 changes: 7 additions & 8 deletions code/action/convert/archive/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ import {
ConvertArchiveBrowserInput,
ConvertArchiveBrowserInputParser,
ConvertArchiveBrowserLocalInput,
ConvertArchiveBrowserOutputParser,
ConvertArchiveBrowserRemoteInput,
} from '~/code/type/browser/parser'
import { buildFormDataRequestToConvert } from '../shared'
import kink from '~/code/tool/shared/kink'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work'
import { NativeOptions } from '~/code/tool/shared/request'
import { testConvertArchive } from './shared'
import { WorkFileAsBlob } from '~/code/tool/shared/work'
} from '~/code/type/browser/parser.js'
import { buildFormDataRequestToConvert } from '../shared.js'
import kink from '~/code/tool/shared/kink.js'
import { resolveWorkFileAsBlob } from '~/code/tool/browser/work.js'
import { NativeOptions } from '~/code/tool/shared/request.js'
import { testConvertArchive } from './shared.js'
import { WorkFileAsBlob } from '~/code/tool/shared/work.js'

export async function convertArchiveBrowser(
source: ConvertArchiveBrowserInput,
Expand Down
4 changes: 2 additions & 2 deletions code/action/convert/archive/handler.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { exec } from '~/code/tool/node/process'
import { Command } from '~/code/type/shared'
import { exec } from '~/code/tool/node/process.js'
import { Command } from '~/code/type/shared/index.js'

export async function handleZipCommand(cmd: Command) {
return await exec(cmd.link)
Expand Down
24 changes: 12 additions & 12 deletions code/action/convert/archive/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ import {
ConvertArchiveNodeClientInputParser,
ExtractWithUnarchiverParser,
ArchiveParser,
} from '~/code/type/node/parser'
import { runCommandSequence } from '~/code/tool/node/command'
} from '~/code/type/node/parser.js'
import { runCommandSequence } from '~/code/tool/node/command.js'
import {
resolveInputForConvertLocalExternalNode,
resolveInputForConvertLocalInternalNode,
resolveInputForConvertRemoteNode,
} from '../tool/node'
import { extend } from '~/code/tool/shared/object'
import { buildRequestToConvert } from '../shared'
import { resolveWorkFileNode } from '~/code/tool/node/request'
import { NativeOptions } from '~/code/tool/shared/request'
import { buildCommandToExtractWithUnarchiver } from '../../extract/archive/command'
} from '../tool/node.js'
import { extend } from '~/code/tool/shared/object.js'
import { buildRequestToConvert } from '../shared.js'
import { resolveWorkFileNode } from '~/code/tool/node/request.js'
import { NativeOptions } from '~/code/tool/shared/request.js'
import { buildCommandToExtractWithUnarchiver } from '../../extract/archive/command.js'
import {
generateTemporaryDirectoryPath,
removeDirectory,
} from '~/code/tool/node/file'
} from '~/code/tool/node/file.js'
import merge from 'lodash/merge'
import { buildCommandToArchiveWithRar } from '../../archive/command'
import kink from '~/code/tool/shared/kink'
import { testConvertArchive } from './shared'
import { buildCommandToArchiveWithRar } from '../../archive/command.js'
import kink from '~/code/tool/shared/kink.js'
import { testConvertArchive } from './shared.js'

export async function convertArchiveNode(
source: ConvertArchiveNodeInput,
Expand Down
6 changes: 3 additions & 3 deletions code/action/convert/archive/shared.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ArchiveFormat } from '~/code/type/shared'
import { testConvertFileInputOutput } from '../shared'
import { getConfig } from '~/code/tool/shared/config'
import { ArchiveFormat } from '~/code/type/shared/index.js'
import { testConvertFileInputOutput } from '../shared.js'
import { getConfig } from '~/code/tool/shared/config.js'

export function testConvertArchive(input: any) {
if (!testConvertFileInputOutput(input)) {
Expand Down
2 changes: 1 addition & 1 deletion code/action/convert/archive/source.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Form } from '@termsurf/form'
import { buildConvertForms } from '~/code/tool/shared/source'
import { buildConvertForms } from '~/code/tool/shared/source.js'

const convert_archive_forms = buildConvertForms(
'convert_archive',
Expand Down
2 changes: 1 addition & 1 deletion code/action/convert/data/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import escapeSqlString from 'sql-escape-string'
import {
unflattenObject,
flattenObjectSafe,
} from '~/code/tool/shared/object'
} from '~/code/tool/shared/object.js'
import isInteger from 'lodash/isInteger'
import sortKeys from 'json-keys-sort'

Expand Down
Loading

0 comments on commit 8abbb03

Please sign in to comment.