Skip to content

Commit

Permalink
chore: adjust default/mixed import handling
Browse files Browse the repository at this point in the history
chore: wip

chore: wip
  • Loading branch information
chrisbbreuer committed Nov 27, 2024
1 parent 6b2b8ef commit 197ba16
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 115 deletions.
8 changes: 7 additions & 1 deletion fixtures/input/example/0009.ts → fixtures/input/imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import {
toNamespacedPath,
} from 'node:path'
import process from 'node:process'
import { someUnusedImport, something as dts } from './generate';
import { generate } from '@stacksjs/dtsx'
import forge, { pki, tls } from 'node-forge'
import { runCommandSync } from '@stacksjs/cli'
import { log } from '@stacksjs/logging'

/**
* Returns the path to the `actions` directory. The `actions` directory
Expand Down Expand Up @@ -136,4 +141,5 @@ export const path: Path = {
sep: () => sep,
}

export { basename, delimiter, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep, toNamespacedPath }
export { basename, forge, generate, pki, tls, delimiter, dirname, dts, extname, isAbsolute, join, normalize, relative, resolve, sep, toNamespacedPath }
export default forge
2 changes: 1 addition & 1 deletion fixtures/output/0007.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import forge, { pki, tls } from 'node-forge';
import type { CAOptions, CertificateOptions, GenerateCertReturn, TlsOption } from './types';
import { default as forge, pki, tls } from 'node-forge';

export declare interface Cert {
certificate: string
Expand Down
6 changes: 4 additions & 2 deletions fixtures/output/0009.d.ts → fixtures/output/imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { actionsPath } from '@stacksjs/path';
import forge, { pki, tls } from 'node-forge';
import { generate } from '@stacksjs/dtsx';
import { something as dts } from './generate';

declare type ParsedPath,
relative,
Expand All @@ -17,4 +19,4 @@ export declare function homeDir(path?: string): string;
export declare function libraryEntryPath(type: LibraryType): string;
export declare function examplesPath(type?: 'vue-components' | 'web-components'): string;

export { basename, delimiter, dirname, extname, isAbsolute, join, normalize, relative, resolve, sep, toNamespacedPath }
export { basename, forge, generate, pki, tls, delimiter, dirname, dts, extname, isAbsolute, join, normalize, relative, resolve, sep, toNamespacedPath }
Loading

0 comments on commit 197ba16

Please sign in to comment.