@visulima/packem 2.0.0-alpha.30 → 2.0.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/LICENSE.md +475 -1347
- package/dist/builder/typedoc/index.d.ts +4 -4
- package/dist/builder/typedoc/index.js +3 -3
- package/dist/cli/index.js +8 -8
- package/dist/config/index.d.ts +4 -4
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/packem_shared/{default-YwldmWl4.js → default-B2EOH52z.js} +1 -1
- package/dist/packem_shared/default-B_dUKZ_J.js +1 -0
- package/dist/packem_shared/{default-CTae39UA.js → default-Dego_fiC.js} +1 -1
- package/dist/packem_shared/{default-C_x8DHoD.js → default-E4TiWfSK.js} +1 -1
- package/dist/packem_shared/esbuildPlugin-DpLtQGuZ-Bny-e486.js +3 -0
- package/dist/packem_shared/index-8EL_RHKk.js +173 -0
- package/dist/packem_shared/{index-BYO428ZM.d.ts → index-Cjp2s4rr.d.ts} +93 -345
- package/dist/packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo-Cwe3ODMG.js +3 -0
- package/dist/packem_shared/oxcResolvePlugin-Ccef6pyL-D14z9S9i.js +1 -0
- package/dist/packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM-3AmQC7y7.js +6 -0
- package/dist/packem_shared/{types-BXtpQcRr.d.ts → types-0Eba14hg.d.ts} +1 -1
- package/dist/rollup/plugins/esbuild/index.d.ts +4 -4
- package/dist/rollup/plugins/esbuild/index.js +1 -1
- package/dist/rollup/plugins/oxc/isolated-declarations-oxc-transformer.d.ts +3 -3
- package/dist/rollup/plugins/oxc/oxc-transformer.d.ts +3 -3
- package/dist/rollup/plugins/sucrase/index.d.ts +3 -3
- package/dist/rollup/plugins/sucrase/index.js +1 -1
- package/dist/rollup/plugins/swc/isolated-declarations-swc-transformer.d.ts +3 -3
- package/dist/rollup/plugins/swc/swc-plugin.d.ts +3 -3
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.d.ts +3 -3
- package/dist/rollup/plugins/typescript/isolated-declarations-typescript-transformer.js +1 -1
- package/package.json +9 -9
- package/dist/packem_shared/default-Bi3Aj6a9.js +0 -1
- package/dist/packem_shared/esbuildPlugin-BrFhdKJk-C8Y7RuGP.js +0 -3
- package/dist/packem_shared/index-dFhGUj4X.js +0 -180
- package/dist/packem_shared/isolatedDeclarationsTypescriptTransformer-DkuEkofo-BCM0B079.js +0 -3
- package/dist/packem_shared/oxcResolvePlugin-BJpi-eSG-RVsiMbfI.js +0 -1
- package/dist/packem_shared/resolveTypescriptMjsCtsPlugin-DcZrZTmM-DYkwKhiN.js +0 -6
|
@@ -5,356 +5,20 @@ import { RollupNodeResolveOptions } from '@rollup/plugin-node-resolve';
|
|
|
5
5
|
import { RollupReplaceOptions } from '@rollup/plugin-replace';
|
|
6
6
|
import { RollupWasmOptions } from '@rollup/plugin-wasm';
|
|
7
7
|
import { FilterPattern } from '@rollup/pluginutils';
|
|
8
|
-
import { RollupBuild, RollupOptions, RollupWatcher, OutputOptions, Plugin as Plugin$1 } from 'rollup';
|
|
8
|
+
import { RollupBuild, RollupOptions, RollupWatcher, ResolvedId, OutputOptions, Plugin as Plugin$1 } from 'rollup';
|
|
9
9
|
import { Options as Options$4 } from 'rollup-plugin-dts';
|
|
10
10
|
import { NodePolyfillsOptions } from 'rollup-plugin-polyfill-node';
|
|
11
11
|
import { PureAnnotationsOptions } from 'rollup-plugin-pure';
|
|
12
12
|
import { PluginVisualizerOptions } from 'rollup-plugin-visualizer';
|
|
13
|
-
import { SourceMapOptions } from 'magic-string';
|
|
14
|
-
import { MinifierOptions } from 'html-minifier-next';
|
|
15
13
|
import { TransformOptions as TransformOptions$1, Loader, BuildOptions } from 'esbuild';
|
|
16
14
|
import { PackageJson } from '@visulima/package';
|
|
17
|
-
import { AnsiColors
|
|
15
|
+
import { AnsiColors } from '@visulima/colorize';
|
|
16
|
+
import { SourceMapOptions } from 'magic-string';
|
|
17
|
+
import { MinifierOptions } from 'html-minifier-next';
|
|
18
18
|
import { NapiResolveOptions } from 'oxc-resolver';
|
|
19
19
|
import { TransformOptions as TransformOptions$2, JsxOptions } from 'oxc-transform';
|
|
20
20
|
import { Options as Options$5 } from 'sucrase';
|
|
21
21
|
|
|
22
|
-
type AnsiColors = "bgBlack" | "bgBlackBright" | "bgBlue" | "bgBlueBright" | "bgCyan" | "bgCyanBright" | "bgGray" | "bgGreen" | "bgGreenBright" | "bgGrey" | "bgMagenta" | "bgMagentaBright" | "bgRed" | "bgRedBright" | "bgWhite" | "bgWhiteBright" | "bgYellow" | "bgYellowBright" | "black" | "blackBright" | "blue" | "blueBright" | "cyan" | "cyanBright" | "gray" | "green" | "greenBright" | "grey" | "magenta" | "magentaBright" | "red" | "redBright" | "white" | "whiteBright" | "yellow" | "yellowBright";
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
26
|
-
|
|
27
|
-
@category Type
|
|
28
|
-
*/
|
|
29
|
-
type Primitive$1 =
|
|
30
|
-
| null
|
|
31
|
-
| undefined
|
|
32
|
-
| string
|
|
33
|
-
| number
|
|
34
|
-
| boolean
|
|
35
|
-
| symbol
|
|
36
|
-
| bigint;
|
|
37
|
-
|
|
38
|
-
declare global {
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
40
|
-
interface SymbolConstructor {
|
|
41
|
-
readonly observable: symbol;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
|
|
47
|
-
|
|
48
|
-
Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
|
|
49
|
-
|
|
50
|
-
This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
|
|
51
|
-
|
|
52
|
-
@example
|
|
53
|
-
```
|
|
54
|
-
import type {LiteralUnion} from 'type-fest';
|
|
55
|
-
|
|
56
|
-
// Before
|
|
57
|
-
|
|
58
|
-
type Pet = 'dog' | 'cat' | string;
|
|
59
|
-
|
|
60
|
-
const pet: Pet = '';
|
|
61
|
-
// Start typing in your TypeScript-enabled IDE.
|
|
62
|
-
// You **will not** get auto-completion for `dog` and `cat` literals.
|
|
63
|
-
|
|
64
|
-
// After
|
|
65
|
-
|
|
66
|
-
type Pet2 = LiteralUnion<'dog' | 'cat', string>;
|
|
67
|
-
|
|
68
|
-
const pet: Pet2 = '';
|
|
69
|
-
// You **will** get auto-completion for `dog` and `cat` literals.
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
@category Type
|
|
73
|
-
*/
|
|
74
|
-
type LiteralUnion$1<
|
|
75
|
-
LiteralType,
|
|
76
|
-
BaseType extends Primitive$1,
|
|
77
|
-
> = LiteralType | (BaseType & Record<never, never>);
|
|
78
|
-
|
|
79
|
-
declare class InteractiveStreamHook$1 {
|
|
80
|
-
#private;
|
|
81
|
-
static readonly DRAIN = true;
|
|
82
|
-
constructor(stream: NodeJS.WriteStream);
|
|
83
|
-
active(): void;
|
|
84
|
-
erase(count: number): void;
|
|
85
|
-
inactive(separateHistory?: boolean): void;
|
|
86
|
-
renew(): void;
|
|
87
|
-
write(message: string): void;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
type StreamType$1 = "stderr" | "stdout";
|
|
91
|
-
declare class InteractiveManager$1 {
|
|
92
|
-
#private;
|
|
93
|
-
constructor(stdout: InteractiveStreamHook$1, stderr: InteractiveStreamHook$1);
|
|
94
|
-
get lastLength(): number;
|
|
95
|
-
get outside(): number;
|
|
96
|
-
get isHooked(): boolean;
|
|
97
|
-
get isSuspended(): boolean;
|
|
98
|
-
erase(stream: StreamType$1, count?: number): void;
|
|
99
|
-
hook(): boolean;
|
|
100
|
-
resume(stream: StreamType$1, eraseRowCount?: number): void;
|
|
101
|
-
suspend(stream: StreamType$1, erase?: boolean): void;
|
|
102
|
-
unhook(separateHistory?: boolean): boolean;
|
|
103
|
-
update(stream: StreamType$1, rows: string[], from?: number): void;
|
|
104
|
-
private _clear;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
declare global {
|
|
108
|
-
namespace VisulimaPail {
|
|
109
|
-
interface CustomMeta<L> {
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
interface Meta$1<L> extends VisulimaPail.CustomMeta<L> {
|
|
114
|
-
badge: string | undefined;
|
|
115
|
-
context: any[] | undefined;
|
|
116
|
-
date: Date | string;
|
|
117
|
-
error: Error | undefined;
|
|
118
|
-
groups: string[];
|
|
119
|
-
label: string | undefined;
|
|
120
|
-
message: Primitive$1 | ReadonlyArray<unknown> | Record<PropertyKey, unknown>;
|
|
121
|
-
prefix: string | undefined;
|
|
122
|
-
repeated?: number | undefined;
|
|
123
|
-
scope: string[] | undefined;
|
|
124
|
-
suffix: string | undefined;
|
|
125
|
-
traceError: Error | undefined;
|
|
126
|
-
type: {
|
|
127
|
-
level: ExtendedRfc5424LogLevels$1 | L;
|
|
128
|
-
name: string;
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
type ExtendedRfc5424LogLevels$1 = "alert" | "critical" | "debug" | "emergency" | "error" | "informational" | "notice" | "trace" | "warning";
|
|
132
|
-
type DefaultLogTypes$1 = "alert" | "await" | "complete" | "critical" | "debug" | "emergency" | "error" | "info" | "log" | "notice" | "pending" | "start" | "stop" | "success" | "trace" | "wait" | "warn" | "watch";
|
|
133
|
-
interface LoggerFunction$1 {
|
|
134
|
-
(message: Message$1): void;
|
|
135
|
-
(...message: any[]): void;
|
|
136
|
-
}
|
|
137
|
-
interface LoggerConfiguration$1<L extends string> {
|
|
138
|
-
badge?: string;
|
|
139
|
-
color?: AnsiColors | undefined;
|
|
140
|
-
label: string;
|
|
141
|
-
logLevel: LiteralUnion$1<ExtendedRfc5424LogLevels$1, L>;
|
|
142
|
-
}
|
|
143
|
-
type LoggerTypesConfig$1<T extends string, L extends string> = Record<T, Partial<LoggerConfiguration$1<L>>>;
|
|
144
|
-
type ReadonlyMeta$1<L extends string> = Readonly<Meta$1<L>>;
|
|
145
|
-
interface Reporter$1<L extends string> {
|
|
146
|
-
log: (meta: ReadonlyMeta$1<L>) => void;
|
|
147
|
-
}
|
|
148
|
-
interface Processor$1<L extends string> {
|
|
149
|
-
process: (meta: Meta$1<L>) => Meta$1<L>;
|
|
150
|
-
}
|
|
151
|
-
interface ConstructorOptions$1<T extends string, L extends string> {
|
|
152
|
-
disabled?: boolean;
|
|
153
|
-
logLevel?: LiteralUnion$1<ExtendedRfc5424LogLevels$1, L>;
|
|
154
|
-
logLevels?: Partial<Record<ExtendedRfc5424LogLevels$1, number>> & Record<L, number>;
|
|
155
|
-
messages?: {
|
|
156
|
-
timerEnd?: string;
|
|
157
|
-
timerStart?: string;
|
|
158
|
-
};
|
|
159
|
-
processors?: Processor$1<L>[];
|
|
160
|
-
rawReporter?: Reporter$1<L>;
|
|
161
|
-
reporters?: Reporter$1<L>[];
|
|
162
|
-
scope?: string[] | string;
|
|
163
|
-
throttle?: number;
|
|
164
|
-
throttleMin?: number;
|
|
165
|
-
types?: LoggerTypesConfig$1<T, L> & Partial<LoggerTypesConfig$1<DefaultLogTypes$1, L>>;
|
|
166
|
-
}
|
|
167
|
-
interface ServerConstructorOptions$1<T extends string, L extends string> extends ConstructorOptions$1<T, L> {
|
|
168
|
-
interactive?: boolean;
|
|
169
|
-
stderr: NodeJS.WriteStream;
|
|
170
|
-
stdout: NodeJS.WriteStream;
|
|
171
|
-
}
|
|
172
|
-
type Message$1 = {
|
|
173
|
-
context?: any[] | undefined;
|
|
174
|
-
message: any;
|
|
175
|
-
prefix?: string;
|
|
176
|
-
suffix?: string;
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
type Replacer$1 = (number | string)[] | null | undefined | ((key: string, value: unknown) => string | number | boolean | null | object)
|
|
180
|
-
|
|
181
|
-
interface StringifyOptions$1 {
|
|
182
|
-
bigint?: boolean,
|
|
183
|
-
circularValue?: string | null | TypeErrorConstructor | ErrorConstructor,
|
|
184
|
-
deterministic?: boolean | ((a: string, b: string) => number),
|
|
185
|
-
maximumBreadth?: number,
|
|
186
|
-
maximumDepth?: number,
|
|
187
|
-
strict?: boolean,
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
declare function stringify$1(value: undefined | symbol | ((...args: unknown[]) => unknown), replacer?: Replacer$1, space?: string | number): undefined
|
|
191
|
-
declare function stringify$1(value: string | number | unknown[] | null | boolean | object, replacer?: Replacer$1, space?: string | number): string
|
|
192
|
-
declare function stringify$1(value: unknown, replacer?: ((key: string, value: unknown) => unknown) | (number | string)[] | null | undefined, space?: string | number): string | undefined
|
|
193
|
-
|
|
194
|
-
declare namespace stringify$1 {
|
|
195
|
-
export function configure(options: StringifyOptions$1): typeof stringify$1
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
declare class PailBrowserImpl$1<T extends string = string, L extends string = string> {
|
|
199
|
-
protected timersMap: Map<string, number>;
|
|
200
|
-
protected countMap: Map<string, number>;
|
|
201
|
-
protected seqTimers: Set<string>;
|
|
202
|
-
protected readonly lastLog: {
|
|
203
|
-
count?: number;
|
|
204
|
-
object?: Meta$1<L>;
|
|
205
|
-
serialized?: string;
|
|
206
|
-
time?: Date;
|
|
207
|
-
timeout?: ReturnType<typeof setTimeout>;
|
|
208
|
-
};
|
|
209
|
-
protected readonly logLevels: Record<string, number>;
|
|
210
|
-
protected disabled: boolean;
|
|
211
|
-
protected scopeName: string[];
|
|
212
|
-
protected readonly types: LoggerTypesConfig$1<LiteralUnion$1<DefaultLogTypes$1, T>, L>;
|
|
213
|
-
protected readonly longestLabel: string;
|
|
214
|
-
protected readonly processors: Set<Processor$1<L>>;
|
|
215
|
-
protected readonly generalLogLevel: LiteralUnion$1<ExtendedRfc5424LogLevels$1, L>;
|
|
216
|
-
protected reporters: Set<Reporter$1<L>>;
|
|
217
|
-
protected readonly throttle: number;
|
|
218
|
-
protected readonly throttleMin: number;
|
|
219
|
-
protected readonly stringify: typeof stringify$1;
|
|
220
|
-
protected groups: string[];
|
|
221
|
-
protected readonly startTimerMessage: string;
|
|
222
|
-
protected readonly endTimerMessage: string;
|
|
223
|
-
protected rawReporter: Reporter$1<L>;
|
|
224
|
-
constructor(options: ConstructorOptions$1<T, L>);
|
|
225
|
-
wrapConsole(): void;
|
|
226
|
-
restoreConsole(): void;
|
|
227
|
-
wrapException(): void;
|
|
228
|
-
disable(): void;
|
|
229
|
-
enable(): void;
|
|
230
|
-
isEnabled(): boolean;
|
|
231
|
-
scope<N extends string = T>(...name: string[]): PailBrowserType$1<N, L>;
|
|
232
|
-
unscope(): void;
|
|
233
|
-
time(label?: string): void;
|
|
234
|
-
timeLog(label?: string, ...data: unknown[]): void;
|
|
235
|
-
timeEnd(label?: string): void;
|
|
236
|
-
group(label?: string): void;
|
|
237
|
-
groupEnd(): void;
|
|
238
|
-
count(label?: string): void;
|
|
239
|
-
countReset(label?: string): void;
|
|
240
|
-
clear(): void;
|
|
241
|
-
raw(message: string, ...arguments_: unknown[]): void;
|
|
242
|
-
protected extendReporter(reporter: Reporter$1<L>): Reporter$1<L>;
|
|
243
|
-
protected registerReporters(reporters: Reporter$1<L>[]): void;
|
|
244
|
-
private _report;
|
|
245
|
-
private registerProcessors;
|
|
246
|
-
private _normalizeLogLevel;
|
|
247
|
-
private _buildMeta;
|
|
248
|
-
private _logger;
|
|
249
|
-
}
|
|
250
|
-
type PailBrowserType$1<T extends string = string, L extends string = string> = PailBrowserImpl$1<T, L> & Record<DefaultLogTypes$1, LoggerFunction$1> & Record<T, LoggerFunction$1> & (new <TC extends string = string, LC extends string = string>(options?: ConstructorOptions$1<TC, LC>) => PailBrowserType$1<TC, LC>);
|
|
251
|
-
|
|
252
|
-
declare class PailServerImpl$1<T extends string = string, L extends string = string> extends PailBrowserImpl$1<T, L> {
|
|
253
|
-
readonly options: ServerConstructorOptions$1<T, L>;
|
|
254
|
-
protected readonly stdout: NodeJS.WriteStream;
|
|
255
|
-
protected readonly stderr: NodeJS.WriteStream;
|
|
256
|
-
protected interactiveManager: InteractiveManager$1 | undefined;
|
|
257
|
-
protected readonly interactive: boolean;
|
|
258
|
-
constructor(options: ServerConstructorOptions$1<T, L>);
|
|
259
|
-
scope<N extends string = T>(...name: string[]): PailServerType$1<N, L>;
|
|
260
|
-
getInteractiveManager(): InteractiveManager$1 | undefined;
|
|
261
|
-
wrapStd(): void;
|
|
262
|
-
restoreStd(): void;
|
|
263
|
-
wrapAll(): void;
|
|
264
|
-
restoreAll(): void;
|
|
265
|
-
clear(): void;
|
|
266
|
-
protected extendReporter(reporter: Reporter$1<L>): Reporter$1<L>;
|
|
267
|
-
private _wrapStream;
|
|
268
|
-
private _restoreStream;
|
|
269
|
-
}
|
|
270
|
-
type PailServerType$1<T extends string = string, L extends string = string> = PailServerImpl$1<T, L> & Record<DefaultLogTypes$1, LoggerFunction$1> & Record<T, LoggerFunction$1> & (new <TC extends string = string, LC extends string = string>(options?: ServerConstructorOptions$1<TC, LC>) => PailServerType$1<TC, LC>);
|
|
271
|
-
|
|
272
|
-
interface Template {
|
|
273
|
-
parts: TemplatePart[];
|
|
274
|
-
tag?: string;
|
|
275
|
-
}
|
|
276
|
-
interface TemplatePart {
|
|
277
|
-
end: number;
|
|
278
|
-
start: number;
|
|
279
|
-
text: string;
|
|
280
|
-
}
|
|
281
|
-
interface Strategy$1<N = unknown> {
|
|
282
|
-
getRootNode: (source: string, fileName?: string) => N;
|
|
283
|
-
getTaggedTemplateTemplate: (node: N) => unknown;
|
|
284
|
-
getTagText: (node: N) => string;
|
|
285
|
-
getTemplateParts: (node: N) => TemplatePart[];
|
|
286
|
-
isTaggedTemplate: (node: N) => boolean;
|
|
287
|
-
isTemplate: (node: N) => boolean;
|
|
288
|
-
walkNodes: (parent: N, visit: (child: N) => void) => void;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
interface ParseLiteralsOptions {
|
|
292
|
-
fileName?: string;
|
|
293
|
-
strategy?: Partial<Strategy$1<unknown>>;
|
|
294
|
-
}
|
|
295
|
-
declare const parseLiterals: (source: string, options?: ParseLiteralsOptions) => Template[];
|
|
296
|
-
|
|
297
|
-
interface Strategy<O = unknown, C = unknown> {
|
|
298
|
-
combineHTMLStrings: (parts: TemplatePart[], placeholder: string) => string;
|
|
299
|
-
getPlaceholder: (parts: TemplatePart[]) => string;
|
|
300
|
-
minifyCSS?: (css: string, options?: C) => string;
|
|
301
|
-
minifyHTML: (html: string, options?: O) => string | Promise<string>;
|
|
302
|
-
splitHTMLByPlaceholder: (html: string, placeholder: string) => string[];
|
|
303
|
-
}
|
|
304
|
-
declare const defaultMinifyOptions: MinifierOptions;
|
|
305
|
-
|
|
306
|
-
type Options$3 = DefaultOptions | CustomOptions<unknown>;
|
|
307
|
-
interface DefaultOptions extends BaseOptions {
|
|
308
|
-
minifyOptions?: Partial<typeof defaultMinifyOptions>;
|
|
309
|
-
}
|
|
310
|
-
interface CustomOptions<S extends Strategy | unknown> extends BaseOptions {
|
|
311
|
-
minifyOptions?: S extends Strategy<infer O> ? Partial<O> : never;
|
|
312
|
-
strategy: S;
|
|
313
|
-
}
|
|
314
|
-
interface BaseOptions {
|
|
315
|
-
fileName?: string;
|
|
316
|
-
generateSourceMap?: ((ms: MagicStringLike, fileName: string) => SourceMap | undefined) | false;
|
|
317
|
-
MagicString?: new (source: string) => MagicStringLike;
|
|
318
|
-
parseLiterals?: typeof parseLiterals;
|
|
319
|
-
parseLiteralsOptions?: Partial<ParseLiteralsOptions>;
|
|
320
|
-
shouldMinify?: (template: Template) => boolean;
|
|
321
|
-
shouldMinifyCSS?: (template: Template) => boolean;
|
|
322
|
-
validate?: Validation | false;
|
|
323
|
-
}
|
|
324
|
-
interface MagicStringLike {
|
|
325
|
-
generateMap: (options?: Partial<SourceMapOptions>) => SourceMap;
|
|
326
|
-
overwrite: (start: number, end: number, content: string) => unknown;
|
|
327
|
-
toString: () => string;
|
|
328
|
-
}
|
|
329
|
-
interface SourceMap {
|
|
330
|
-
file?: string;
|
|
331
|
-
mappings: string;
|
|
332
|
-
names: string[];
|
|
333
|
-
sources: string[];
|
|
334
|
-
sourcesContent?: string[];
|
|
335
|
-
toString: () => string;
|
|
336
|
-
toUrl: () => string;
|
|
337
|
-
version: number;
|
|
338
|
-
}
|
|
339
|
-
interface Validation {
|
|
340
|
-
ensureHTMLPartsValid: (parts: TemplatePart[], htmlParts: string[]) => void;
|
|
341
|
-
ensurePlaceholderValid: (placeholder: unknown) => void;
|
|
342
|
-
}
|
|
343
|
-
interface Result {
|
|
344
|
-
code: string;
|
|
345
|
-
map: SourceMap | undefined;
|
|
346
|
-
}
|
|
347
|
-
declare function minifyHTMLLiterals(source: string, options?: DefaultOptions): Promise<Result | null>;
|
|
348
|
-
declare function minifyHTMLLiterals<S extends Strategy>(source: string, options?: CustomOptions<S>): Promise<Result | null>;
|
|
349
|
-
|
|
350
|
-
interface MinifyHTMLLiteralsOptions {
|
|
351
|
-
exclude?: FilterPattern;
|
|
352
|
-
failOnError?: boolean;
|
|
353
|
-
include?: FilterPattern;
|
|
354
|
-
minifyHTMLLiterals?: typeof minifyHTMLLiterals;
|
|
355
|
-
options?: Partial<Options$3>;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
22
|
/**
|
|
359
23
|
Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
|
|
360
24
|
|
|
@@ -470,7 +134,7 @@ interface LoggerFunction {
|
|
|
470
134
|
}
|
|
471
135
|
interface LoggerConfiguration<L extends string> {
|
|
472
136
|
badge?: string;
|
|
473
|
-
color?: AnsiColors
|
|
137
|
+
color?: AnsiColors | undefined;
|
|
474
138
|
label: string;
|
|
475
139
|
logLevel: LiteralUnion<ExtendedRfc5424LogLevels, L>;
|
|
476
140
|
}
|
|
@@ -3077,6 +2741,92 @@ interface LicenseOptions {
|
|
|
3077
2741
|
path?: string;
|
|
3078
2742
|
}
|
|
3079
2743
|
|
|
2744
|
+
interface Template {
|
|
2745
|
+
parts: TemplatePart[];
|
|
2746
|
+
tag?: string;
|
|
2747
|
+
}
|
|
2748
|
+
interface TemplatePart {
|
|
2749
|
+
end: number;
|
|
2750
|
+
start: number;
|
|
2751
|
+
text: string;
|
|
2752
|
+
}
|
|
2753
|
+
interface Strategy$1<N = unknown> {
|
|
2754
|
+
getRootNode: (source: string, fileName?: string) => N;
|
|
2755
|
+
getTaggedTemplateTemplate: (node: N) => unknown;
|
|
2756
|
+
getTagText: (node: N) => string;
|
|
2757
|
+
getTemplateParts: (node: N) => TemplatePart[];
|
|
2758
|
+
isTaggedTemplate: (node: N) => boolean;
|
|
2759
|
+
isTemplate: (node: N) => boolean;
|
|
2760
|
+
walkNodes: (parent: N, visit: (child: N) => void) => void;
|
|
2761
|
+
}
|
|
2762
|
+
|
|
2763
|
+
interface ParseLiteralsOptions {
|
|
2764
|
+
fileName?: string;
|
|
2765
|
+
strategy?: Partial<Strategy$1<unknown>>;
|
|
2766
|
+
}
|
|
2767
|
+
declare const parseLiterals: (source: string, options?: ParseLiteralsOptions) => Template[];
|
|
2768
|
+
|
|
2769
|
+
interface Strategy<O = unknown, C = unknown> {
|
|
2770
|
+
combineHTMLStrings: (parts: TemplatePart[], placeholder: string) => string;
|
|
2771
|
+
getPlaceholder: (parts: TemplatePart[]) => string;
|
|
2772
|
+
minifyCSS?: (css: string, options?: C) => string;
|
|
2773
|
+
minifyHTML: (html: string, options?: O) => string | Promise<string>;
|
|
2774
|
+
splitHTMLByPlaceholder: (html: string, placeholder: string) => string[];
|
|
2775
|
+
}
|
|
2776
|
+
declare const defaultMinifyOptions: MinifierOptions;
|
|
2777
|
+
|
|
2778
|
+
type Options$3 = DefaultOptions | CustomOptions<unknown>;
|
|
2779
|
+
interface DefaultOptions extends BaseOptions {
|
|
2780
|
+
minifyOptions?: Partial<typeof defaultMinifyOptions>;
|
|
2781
|
+
}
|
|
2782
|
+
interface CustomOptions<S extends Strategy | unknown> extends BaseOptions {
|
|
2783
|
+
minifyOptions?: S extends Strategy<infer O> ? Partial<O> : never;
|
|
2784
|
+
strategy: S;
|
|
2785
|
+
}
|
|
2786
|
+
interface BaseOptions {
|
|
2787
|
+
fileName?: string;
|
|
2788
|
+
generateSourceMap?: ((ms: MagicStringLike, fileName: string) => SourceMap | undefined) | false;
|
|
2789
|
+
MagicString?: new (source: string) => MagicStringLike;
|
|
2790
|
+
parseLiterals?: typeof parseLiterals;
|
|
2791
|
+
parseLiteralsOptions?: Partial<ParseLiteralsOptions>;
|
|
2792
|
+
shouldMinify?: (template: Template) => boolean;
|
|
2793
|
+
shouldMinifyCSS?: (template: Template) => boolean;
|
|
2794
|
+
validate?: Validation | false;
|
|
2795
|
+
}
|
|
2796
|
+
interface MagicStringLike {
|
|
2797
|
+
generateMap: (options?: Partial<SourceMapOptions>) => SourceMap;
|
|
2798
|
+
overwrite: (start: number, end: number, content: string) => unknown;
|
|
2799
|
+
toString: () => string;
|
|
2800
|
+
}
|
|
2801
|
+
interface SourceMap {
|
|
2802
|
+
file?: string;
|
|
2803
|
+
mappings: string;
|
|
2804
|
+
names: string[];
|
|
2805
|
+
sources: string[];
|
|
2806
|
+
sourcesContent?: string[];
|
|
2807
|
+
toString: () => string;
|
|
2808
|
+
toUrl: () => string;
|
|
2809
|
+
version: number;
|
|
2810
|
+
}
|
|
2811
|
+
interface Validation {
|
|
2812
|
+
ensureHTMLPartsValid: (parts: TemplatePart[], htmlParts: string[]) => void;
|
|
2813
|
+
ensurePlaceholderValid: (placeholder: unknown) => void;
|
|
2814
|
+
}
|
|
2815
|
+
interface Result {
|
|
2816
|
+
code: string;
|
|
2817
|
+
map: SourceMap | undefined;
|
|
2818
|
+
}
|
|
2819
|
+
declare function minifyHTMLLiterals(source: string, options?: DefaultOptions): Promise<Result | null>;
|
|
2820
|
+
declare function minifyHTMLLiterals<S extends Strategy>(source: string, options?: CustomOptions<S>): Promise<Result | null>;
|
|
2821
|
+
|
|
2822
|
+
interface MinifyHTMLLiteralsOptions {
|
|
2823
|
+
exclude?: FilterPattern;
|
|
2824
|
+
failOnError?: boolean;
|
|
2825
|
+
include?: FilterPattern;
|
|
2826
|
+
minifyHTMLLiterals?: typeof minifyHTMLLiterals;
|
|
2827
|
+
options?: Partial<Options$3>;
|
|
2828
|
+
}
|
|
2829
|
+
|
|
3080
2830
|
interface NativeModulesOptions {
|
|
3081
2831
|
nativesDirectory?: string;
|
|
3082
2832
|
}
|
|
@@ -3087,9 +2837,7 @@ interface RawLoaderOptions {
|
|
|
3087
2837
|
}
|
|
3088
2838
|
|
|
3089
2839
|
type Awaitable<T> = T | Promise<T>;
|
|
3090
|
-
type TransformFunction = (id: string, importer: string, rollupResolve: (id: string, importer?: string) => Promise<
|
|
3091
|
-
id: string;
|
|
3092
|
-
}>) => Awaitable<boolean | undefined | void>;
|
|
2840
|
+
type TransformFunction = (id: string, importer: string, rollupResolve: ((id: string, importer?: string) => Promise<ResolvedId | null>)) => Awaitable<boolean | undefined | void>;
|
|
3093
2841
|
interface Options$2 {
|
|
3094
2842
|
builtinNodeModules?: boolean;
|
|
3095
2843
|
cwd?: string;
|
|
@@ -3122,7 +2870,7 @@ interface UrlOptions {
|
|
|
3122
2870
|
|
|
3123
2871
|
type MarkOptional<Type, Keys extends keyof Type> = Type extends Type ? Omit<Type, Keys> & Partial<Pick<Type, Keys>> : never;
|
|
3124
2872
|
type EsbuildPluginConfig = Options$1 & {
|
|
3125
|
-
logger:
|
|
2873
|
+
logger: Console;
|
|
3126
2874
|
};
|
|
3127
2875
|
type OptimizeDepsOptions = {
|
|
3128
2876
|
cwd: string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var m=Object.defineProperty;var l=(e,r)=>m(e,"name",{value:r,configurable:!0});import{transpileDeclaration as f,formatDiagnostics as y,sys as n}from"typescript";var v=Object.defineProperty,d=l((e,r)=>v(e,"name",{value:r,configurable:!0}),"p"),N=Object.defineProperty,C=d((e,r)=>N(e,"name",{value:r,configurable:!0}),"l"),D=Object.defineProperty,t=C((e,r)=>D(e,"name",{value:r,configurable:!0}),"s");const b=t(e=>{const r=e.split(`
|
|
2
|
+
`);return r.at(-1)?.startsWith("//# sourceMappingURL=")?r.slice(0,-1).join(`
|
|
3
|
+
`):e},"stripMapUrl"),M=t(async(e,r,u,o)=>{const s={declarationMap:u,...o?.compilerOptions};let{diagnostics:c,outputText:i,sourceMapText:a}=f(r,{fileName:e,reportDiagnostics:!0,...o,compilerOptions:s});s.declarationMap&&(i=b(i));const g=c?.length?[y(c,{getCanonicalFileName:t(p=>n.useCaseSensitiveFileNames?p:p.toLowerCase(),"getCanonicalFileName"),getCurrentDirectory:t(()=>n.getCurrentDirectory(),"getCurrentDirectory"),getNewLine:t(()=>n.newLine,"getNewLine")})]:[];return a&&(a=JSON.parse(a).mappings),{errors:g,map:a,sourceText:i}},"isolatedDeclarationsTypescriptTransformer");export{M as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var R=Object.defineProperty;var y=(r,e)=>R(r,"name",{value:e,configurable:!0});import{createFilter as S}from"@rollup/pluginutils";import{findPackageJson as j}from"@visulima/package/package-json";import{dirname as n}from"@visulima/path";import{ResolverFactory as k}from"oxc-resolver";var O=Object.defineProperty,M=y((r,e)=>O(r,"name",{value:e,configurable:!0}),"y"),A=Object.defineProperty,J=M((r,e)=>A(r,"name",{value:e,configurable:!0}),"g"),z=Object.defineProperty,u=J((r,e)=>z(r,"name",{value:e,configurable:!0}),"a");let x;const I=new Map,G=u((r,e,h,m)=>{const{ignoreSideEffectsForRoot:E,...s}=r;let c=x;return c||(c=x=new k({...s,roots:[...s.roots??[],e],tsconfig:m?{configFile:m,references:"auto"}:void 0})),{name:"oxc-resolve",resolveId:{async handler(p,l,{isEntry:w}){const v=w||!l?n(p):n(l),{error:g,path:t}=await c.async(v,p);if(g){h.debug(g,{context:[{basedir:e,extensions:s.extensions,id:t}]});return}let f=u(a=>!1,"hasModuleSideEffects");try{const{packageJson:a,path:P}=await j(n(t),{cache:I}),b=n(P);if(!E||e!==b){const i=a.sideEffects;if(typeof i=="boolean")f=u(()=>i,"hasModuleSideEffects");else if(Array.isArray(i)){const F=i.map(d=>d.includes("/")?d:`**/${d}`);f=S(F,void 0,{resolve:b})}}}catch(a){console.debug(a.message,{context:[{basedir:v,caller:"Resolver",error:a,extensions:s.extensions,id:t}]})}const o=await this.resolve(t,l,{skipSelf:!0});if(o)return o.external?!1:o.id!==t?o:{id:t,meta:o.meta,moduleSideEffects:f(t)}},order:"post"}}},"oxcResolvePlugin");export{G as z};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var M=Object.defineProperty;var u=(t,e)=>M(t,"name",{value:e,configurable:!0});import{parse as U}from"@babel/parser";import q from"magic-string";import{findStaticImports as F}from"mlly";import{isAbsolute as L,join as R,dirname as Z,resolve as B}from"@visulima/path";import{isRelative as z}from"@visulima/path/utils";var G=Object.defineProperty,m=u((t,e)=>G(t,"name",{value:e,configurable:!0}),"u$1"),H=Object.defineProperty,h=m((t,e)=>H(t,"name",{value:e,configurable:!0}),"n"),J=Object.defineProperty,x=h((t,e)=>J(t,"name",{value:e,configurable:!0}),"i");let I=class{static{u(this,"y")}static{m(this,"_")}static{h(this,"WalkerBase")}static{x(this,"WalkerBase")}constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:x(()=>this.should_skip=!0,"skip"),remove:x(()=>this.should_remove=!0,"remove"),replace:x(e=>this.replacement=e,"replace")}}replace(e,s,r,n){e&&s&&(r!=null?e[s][r]=n:e[s]=n)}remove(e,s,r){e&&s&&(r!=null?e[s].splice(r,1):delete e[s])}};var K=Object.defineProperty,g=h((t,e)=>K(t,"name",{value:e,configurable:!0}),"c$1");let Q=class extends I{static{u(this,"A")}static{m(this,"x")}static{h(this,"SyncWalker")}static{g(this,"SyncWalker")}constructor(e,s){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:g(()=>this.should_skip=!0,"skip"),remove:g(()=>this.should_remove=!0,"remove"),replace:g(r=>this.replacement=r,"replace")},this.enter=e,this.leave=s}visit(e,s,r,n){if(e){if(this.enter){const i=this.should_skip,o=this.should_remove,l=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const a=this.should_skip,p=this.should_remove;if(this.should_skip=i,this.should_remove=o,this.replacement=l,a)return e;if(p)return null}let c;for(c in e){const i=e[c];if(i&&typeof i=="object")if(Array.isArray(i)){const o=i;for(let l=0;l<o.length;l+=1){const a=o[l];$(a)&&(this.visit(a,e,c,l)||l--)}}else $(i)&&this.visit(i,e,c,null)}if(this.leave){const i=this.replacement,o=this.should_remove;this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const l=this.should_remove;if(this.replacement=i,this.should_remove=o,l)return null}}return e}};function $(t){return t!==null&&typeof t=="object"&&"type"in t&&typeof t.type=="string"}u($,"d$2");m($,"f");h($,"n");g($,"isNode");var V=Object.defineProperty,y=h((t,e)=>V(t,"name",{value:e,configurable:!0}),"c");let X=class extends I{static{u(this,"P")}static{m(this,"j")}static{h(this,"AsyncWalker")}static{y(this,"AsyncWalker")}constructor(e,s){super(),this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:y(()=>this.should_skip=!0,"skip"),remove:y(()=>this.should_remove=!0,"remove"),replace:y(r=>this.replacement=r,"replace")},this.enter=e,this.leave=s}async visit(e,s,r,n){if(e){if(this.enter){const i=this.should_skip,o=this.should_remove,l=this.replacement;this.should_skip=!1,this.should_remove=!1,this.replacement=null,await this.enter.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const a=this.should_skip,p=this.should_remove;if(this.should_skip=i,this.should_remove=o,this.replacement=l,a)return e;if(p)return null}let c;for(c in e){const i=e[c];if(i&&typeof i=="object")if(Array.isArray(i)){const o=i;for(let l=0;l<o.length;l+=1){const a=o[l];b(a)&&(await this.visit(a,e,c,l)||l--)}}else b(i)&&await this.visit(i,e,c,null)}if(this.leave){const i=this.replacement,o=this.should_remove;this.replacement=null,this.should_remove=!1,await this.leave.call(this.context,e,s,r,n),this.replacement&&(e=this.replacement,this.replace(s,r,n,e)),this.should_remove&&this.remove(s,r,n);const l=this.should_remove;if(this.replacement=i,this.should_remove=o,l)return null}}return e}};function b(t){return t!==null&&typeof t=="object"&&"type"in t&&typeof t.type=="string"}u(b,"f$2");m(b,"d");h(b,"a$1");y(b,"isNode");var Y=Object.defineProperty,C=h((t,e)=>Y(t,"name",{value:e,configurable:!0}),"a");function j(t,{enter:e,leave:s}){return new Q(e,s).visit(t,null)}u(j,"k$1");m(j,"A");h(j,"walk");C(j,"walk");async function P(t,{enter:e,leave:s}){return await new X(e,s).visit(t,null)}u(P,"w$3");m(P,"O");h(P,"asyncWalk");C(P,"asyncWalk");var ee=Object.defineProperty,A=u((t,e)=>ee(t,"name",{value:e,configurable:!0}),"l$1"),te=Object.defineProperty,W=A((t,e)=>te(t,"name",{value:e,configurable:!0}),"l"),se=Object.defineProperty,d=W((t,e)=>se(t,"name",{value:e,configurable:!0}),"s");const re=/\/\*[^*]*\*+(?:[^/*][^*]*\*+)*\//g,ie=/MIT License|MIT license|BSD license/,ne=/\n{2,}/g,oe=/\b(\w+)\$\d+\b/g,le=/[-/\\^$*+?.()|[\]{}]/g,ae=d(t=>t.replaceAll(le,String.raw`\$&`),"escapeRegex"),ce=d(t=>[...new Set(t)],"unique"),ue=d(t=>t.replaceAll(re,e=>ie.test(e)?"":e).replaceAll(ne,`
|
|
2
|
+
|
|
3
|
+
`),"cleanUnnecessaryComments"),N=new Map;function w(t,e,{identifierReplacements:s},r){const n=F(t);for(const i in s){const o=n.find(a=>a.specifier===i&&a.imports.includes("{"));if(!o){this.warn(`${e.fileName} does not import "${i}" for replacement`),process.exitCode=1;continue}const l=s[i];for(const a in l){if(!o.imports.includes(a))throw new Error(`${e.fileName} does not import "${a}" from "${i}" for replacement`);const p=l[a],v=ae(a);p.includes(".")&&(t=t.replace(new RegExp(`\\b\\w+\\b as ${v},?\\s?`),"")),t=t.replaceAll(new RegExp(`\\b${v}\\b`,"g"),p)}}const c=ce(Array.from(t.matchAll(oe),i=>i[0]));if(c.length>0){const i=c.map(l=>`
|
|
4
|
+
- ${l}`).join(""),o=e.fileName.replace(/\.[^/.]+$/,"");N.has(o)||r.warn({message:`${e.fileName} contains confusing identifier names${i}
|
|
5
|
+
|
|
6
|
+
To replace these, add them to the "rollup -> patchTypes -> identifierReplacements" option in your packem config.`,prefix:"plugin:patch-types"}),N.set(o,!0)}return t}u(w,"f$1");A(w,"g");W(w,"N");d(w,"replaceConfusingTypeNames");const pe=d((t,e)=>{if(e.leadingComments?.some(s=>s.type==="CommentBlock"&&s.value.includes("@internal"))){const s=t.original[e.end]===","?e.end+1:e.end;return t.remove(e.leadingComments[0].start,s),!0}return!1},"removeInternal");function O(t,e){if(t.includes("@internal")){const s=new q(t),r=U(t,{plugins:["typescript"],sourceType:"module"});if(j(r,{enter(n){pe(s,n)&&this.skip()}}),t=s.toString(),t.includes("@internal"))throw new Error(`${e.fileName} has unhandled @internal declarations`)}return t}u(O,"u");A(O,"h");W(O,"S");d(O,"stripInternalTypes");const He=d((t,e)=>({name:"packem:patch-types",renderChunk(s,r){return s=w.call(this,s,r,t,e),s=O.call(this,s,r),s=ue(s),s}}),"patchTypescriptTypes");var he=Object.defineProperty,fe=u((t,e)=>he(t,"name",{value:e,configurable:!0}),"d$1"),me=Object.defineProperty,de=fe((t,e)=>me(t,"name",{value:e,configurable:!0}),"d"),ve=Object.defineProperty,f=de((t,e)=>ve(t,"name",{value:e,configurable:!0}),"o");const ge=42,ye=f(t=>{let e=!1;for(let s=0;s<t.length;s++)if(t.codePointAt(s)===ge){if(e)return!1;e=!0}return!0},"hasZeroOrOneAsteriskCharacter"),$e=f(t=>{const e=t.indexOf("*");return e===-1?void 0:{prefix:t.slice(0,e),suffix:t.slice(e+1)}},"tryParsePattern"),be=f(({prefix:t,suffix:e},s)=>s.length>=t.length+e.length&&s.startsWith(t)&&s.endsWith(e),"isPatternMatch"),ke=f((t,e,s)=>{let r,n=-1;for(const c of t){const i=e(c);be(i,s)&&i.prefix.length>n&&(n=i.prefix.length,r=c)}return r},"findBestPatternMatch"),_e=f((t,e)=>{const s=[];for(const r of t){if(!ye(r))continue;const n=$e(r);if(n)s.push(n);else if(r===e)return r}return ke(s,r=>r,e)},"matchPatternOrExact"),xe=f((t,e)=>e.substring(t.prefix.length,e.length-t.suffix.length),"matchedText"),je=f(({prefix:t,suffix:e})=>`${t}*${e}`,"patternText"),we=f((t,e,s)=>{let r=Z(e.path);e.config.compilerOptions?.baseUrl&&(r=B(t,e.config.compilerOptions.baseUrl)),s?.debug({message:`Resolved baseUrl to ${r}`,prefix:"plugin:resolve-tsconfig-paths"});const n=e.config.compilerOptions?.paths??{};return Object.keys(n).length===0&&s?.debug({message:"No paths found in tsconfig.json",prefix:"plugin:resolve-tsconfig-paths"}),{paths:n,resolvedBaseUrl:r}},"getTsconfigPaths"),Je=f((t,e,s,r)=>{const{paths:n,resolvedBaseUrl:c}=we(t,e,s),i=Object.keys(n);return{name:"plugin:resolve-tsconfig-paths",async resolveId(o,l,a){if(i.length===0)return;if(o.includes("\0")){s.debug({message:`Skipping resolution of ${o} as it is a virtual module`,prefix:"plugin:resolve-tsconfig-paths"});return}if(o.includes("node_modules")){s.debug({message:`Skipping request as it is inside node_modules ${o}`,prefix:"plugin:resolve-tsconfig-paths"});return}if(!r.resolveAbsolutePath&&L(o)){s.debug({message:`Skipping request as it is an absolute path ${o}`,prefix:"plugin:resolve-tsconfig-paths"});return}if(z(o)){s.debug({message:`Skipping request as it is a relative path ${o}`,prefix:"plugin:resolve-tsconfig-paths"});return}const p=_e(i,o);if(!p){s.debug({message:`moduleName did not match any paths pattern ${o}`,prefix:"plugin:resolve-tsconfig-paths"});return}const v=typeof p=="string"?void 0:xe(p,o),E=typeof p=="string"?p:je(p);for await(const T of n[E]){const k=v?T.replace("*",v):T;if(k.endsWith(".d.ts")||k.endsWith(".d.cts")||k.endsWith(".d.mts"))continue;const S=R(c,k);try{const _=await this.resolve(S,l,{skipSelf:!0,...a});if(_)return _}catch(_){s.debug({context:[_],message:`Failed to resolve ${S} from ${o}`,prefix:"plugin:resolve-tsconfig-paths"})}}}}},"resolveTsconfigPathsPlugin");var Oe=Object.defineProperty,Pe=u((t,e)=>Oe(t,"name",{value:e,configurable:!0}),"f"),Ae=Object.defineProperty,We=Pe((t,e)=>Ae(t,"name",{value:e,configurable:!0}),"a"),Te=Object.defineProperty,D=We((t,e)=>Te(t,"name",{value:e,configurable:!0}),"u");const Se=D((t,e)=>{if(!e)return;const{config:s,path:r}=e;if(!s.compilerOptions)return;const{rootDirs:n}=s.compilerOptions;if(!n)return;const c=[];for(const i of n){if(i.startsWith("."))throw new Error(`Invalid rootDir value '.' in ${r}.`);if(i.startsWith(".."))throw new Error(`Invalid rootDir value '..' in ${r}.`);c.push(B(t,i))}return c},"getRootDirectories"),Ke=D((t,e,s)=>{const r=Se(t,s);return{name:"packem:resolve-tsconfig-root-dirs",async resolveId(n,c,i){if(!(r===void 0||r.length===0)&&n.startsWith("."))for(const o of r){const l=R(o,n),a=await this.resolve(l,c,{skipSelf:!0,...i});if(a)return e.debug({message:`Resolved ${n} to ${a.id} using rootDirs from tsconfig.json.`,prefix:"plugin:resolve-tsconfig-root-dirs"}),a.id}}}},"resolveTsconfigRootDirectories");var Ne=Object.defineProperty,Re=u((t,e)=>Ne(t,"name",{value:e,configurable:!0}),"t"),Be=Object.defineProperty,Ie=Re((t,e)=>Be(t,"name",{value:e,configurable:!0}),"t"),Ce=Object.defineProperty,De=Ie((t,e)=>Ce(t,"name",{value:e,configurable:!0}),"r");const Qe=De(()=>{const t=/\.(?:[mc]?js|jsx)$/;return{name:"packem:resolve-typescript-mjs-cjs",async resolveId(e,s,r){if(t.test(e)&&s)return await this.resolve(e.replace(/js(x?)$/,"ts$1"),s,r)}}},"resolveTypescriptMjsCts");export{He as B,Ke as D,Je as N,Qe as i,j as k};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CheckPackageOptions } from '@arethetypeswrong/core';
|
|
2
|
-
import { B as BuildContext, E as Environment, R as Runtime, I as IsolatedDeclarationsTransformer, F as Format, P as PackemRollupOptions, T as TransformerFn, d as BuildHooks, g as InternalOXCTransformPluginConfig, a as TransformerName, M as Mode } from './index-
|
|
2
|
+
import { B as BuildContext, E as Environment, R as Runtime, I as IsolatedDeclarationsTransformer, F as Format, P as PackemRollupOptions, T as TransformerFn, d as BuildHooks, g as InternalOXCTransformPluginConfig, a as TransformerName, M as Mode } from './index-Cjp2s4rr.js';
|
|
3
3
|
import { StyleOptions } from '@visulima/rollup-plugin-css';
|
|
4
4
|
import { JitiOptions } from 'jiti';
|
|
5
5
|
import { TypeDocOptions } from 'typedoc';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as TransformerFn } from '../../../packem_shared/index-
|
|
2
|
-
export { f as EsbuildPluginConfig } from '../../../packem_shared/index-
|
|
1
|
+
import { T as TransformerFn } from '../../../packem_shared/index-Cjp2s4rr.js';
|
|
2
|
+
export { f as EsbuildPluginConfig } from '../../../packem_shared/index-Cjp2s4rr.js';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -12,11 +12,11 @@ import 'rollup-plugin-dts';
|
|
|
12
12
|
import 'rollup-plugin-polyfill-node';
|
|
13
13
|
import 'rollup-plugin-pure';
|
|
14
14
|
import 'rollup-plugin-visualizer';
|
|
15
|
-
import 'magic-string';
|
|
16
|
-
import 'html-minifier-next';
|
|
17
15
|
import 'esbuild';
|
|
18
16
|
import '@visulima/package';
|
|
19
17
|
import '@visulima/colorize';
|
|
18
|
+
import 'magic-string';
|
|
19
|
+
import 'html-minifier-next';
|
|
20
20
|
import 'oxc-resolver';
|
|
21
21
|
import 'oxc-transform';
|
|
22
22
|
import 'sucrase';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as f}from"../../../packem_shared/esbuildPlugin-
|
|
1
|
+
import{z as f}from"../../../packem_shared/esbuildPlugin-DpLtQGuZ-Bny-e486.js";export{f as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IsolatedDeclarationsOptions } from 'oxc-transform';
|
|
2
|
-
import { e as IsolatedDeclarationsResult, T as TransformerFn } from '../../../packem_shared/index-
|
|
2
|
+
import { e as IsolatedDeclarationsResult, T as TransformerFn } from '../../../packem_shared/index-Cjp2s4rr.js';
|
|
3
3
|
import '@rollup/plugin-alias';
|
|
4
4
|
import '@rollup/plugin-commonjs';
|
|
5
5
|
import '@rollup/plugin-json';
|
|
@@ -12,11 +12,11 @@ import 'rollup-plugin-dts';
|
|
|
12
12
|
import 'rollup-plugin-polyfill-node';
|
|
13
13
|
import 'rollup-plugin-pure';
|
|
14
14
|
import 'rollup-plugin-visualizer';
|
|
15
|
-
import 'magic-string';
|
|
16
|
-
import 'html-minifier-next';
|
|
17
15
|
import 'esbuild';
|
|
18
16
|
import '@visulima/package';
|
|
19
17
|
import '@visulima/colorize';
|
|
18
|
+
import 'magic-string';
|
|
19
|
+
import 'html-minifier-next';
|
|
20
20
|
import 'oxc-resolver';
|
|
21
21
|
import 'sucrase';
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { o as default, default as isolatedDeclarationsOxcTransformer } from './isolated-declarations-oxc-transformer.js';
|
|
2
2
|
import 'oxc-transform';
|
|
3
|
-
import '../../../packem_shared/index-
|
|
3
|
+
import '../../../packem_shared/index-Cjp2s4rr.js';
|
|
4
4
|
import '@rollup/plugin-alias';
|
|
5
5
|
import '@rollup/plugin-commonjs';
|
|
6
6
|
import '@rollup/plugin-json';
|
|
@@ -13,10 +13,10 @@ import 'rollup-plugin-dts';
|
|
|
13
13
|
import 'rollup-plugin-polyfill-node';
|
|
14
14
|
import 'rollup-plugin-pure';
|
|
15
15
|
import 'rollup-plugin-visualizer';
|
|
16
|
-
import 'magic-string';
|
|
17
|
-
import 'html-minifier-next';
|
|
18
16
|
import 'esbuild';
|
|
19
17
|
import '@visulima/package';
|
|
20
18
|
import '@visulima/colorize';
|
|
19
|
+
import 'magic-string';
|
|
20
|
+
import 'html-minifier-next';
|
|
21
21
|
import 'oxc-resolver';
|
|
22
22
|
import 'sucrase';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { h as SucrasePluginConfig, s as default } from '../../../packem_shared/index-
|
|
1
|
+
export { h as SucrasePluginConfig, s as default } from '../../../packem_shared/index-Cjp2s4rr.js';
|
|
2
2
|
import '@rollup/plugin-alias';
|
|
3
3
|
import '@rollup/plugin-commonjs';
|
|
4
4
|
import '@rollup/plugin-json';
|
|
@@ -11,11 +11,11 @@ import 'rollup-plugin-dts';
|
|
|
11
11
|
import 'rollup-plugin-polyfill-node';
|
|
12
12
|
import 'rollup-plugin-pure';
|
|
13
13
|
import 'rollup-plugin-visualizer';
|
|
14
|
-
import 'magic-string';
|
|
15
|
-
import 'html-minifier-next';
|
|
16
14
|
import 'esbuild';
|
|
17
15
|
import '@visulima/package';
|
|
18
16
|
import '@visulima/colorize';
|
|
17
|
+
import 'magic-string';
|
|
18
|
+
import 'html-minifier-next';
|
|
19
19
|
import 'oxc-resolver';
|
|
20
20
|
import 'oxc-transform';
|
|
21
21
|
import 'sucrase';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{sucrasePlugin as r}from"../../../packem_shared/default-
|
|
1
|
+
import{sucrasePlugin as r}from"../../../packem_shared/default-B_dUKZ_J.js";export{r as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as IsolatedDeclarationsResult, T as TransformerFn } from '../../../packem_shared/index-
|
|
1
|
+
import { e as IsolatedDeclarationsResult, T as TransformerFn } from '../../../packem_shared/index-Cjp2s4rr.js';
|
|
2
2
|
import '@rollup/plugin-alias';
|
|
3
3
|
import '@rollup/plugin-commonjs';
|
|
4
4
|
import '@rollup/plugin-json';
|
|
@@ -11,11 +11,11 @@ import 'rollup-plugin-dts';
|
|
|
11
11
|
import 'rollup-plugin-polyfill-node';
|
|
12
12
|
import 'rollup-plugin-pure';
|
|
13
13
|
import 'rollup-plugin-visualizer';
|
|
14
|
-
import 'magic-string';
|
|
15
|
-
import 'html-minifier-next';
|
|
16
14
|
import 'esbuild';
|
|
17
15
|
import '@visulima/package';
|
|
18
16
|
import '@visulima/colorize';
|
|
17
|
+
import 'magic-string';
|
|
18
|
+
import 'html-minifier-next';
|
|
19
19
|
import 'oxc-resolver';
|
|
20
20
|
import 'oxc-transform';
|
|
21
21
|
import 'sucrase';
|