@atlaspack/rust 3.10.0 → 3.12.0
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/index.d.ts +54 -2
- package/index.darwin-arm64.node +0 -0
- package/index.darwin-x64.node +0 -0
- package/index.js +2 -1
- package/index.linux-arm64-gnu.node +0 -0
- package/index.linux-x64-gnu.node +0 -0
- package/package.json +1 -2
- package/types.d.ts +42 -0
package/index.d.ts
CHANGED
|
@@ -74,7 +74,8 @@ export interface InlineRequiresOptimizerResult {
|
|
|
74
74
|
export declare function runInlineRequiresOptimizer(input: InlineRequiresOptimizerInput): InlineRequiresOptimizerResult
|
|
75
75
|
/** Runs in the rayon thread pool */
|
|
76
76
|
export declare function runInlineRequiresOptimizerAsync(input: InlineRequiresOptimizerInput): object
|
|
77
|
-
export interface
|
|
77
|
+
export interface CompiledCssInJsConfig {
|
|
78
|
+
configPath?: string
|
|
78
79
|
importReact?: boolean
|
|
79
80
|
nonce?: string
|
|
80
81
|
importSources?: Array<string>
|
|
@@ -84,22 +85,46 @@ export interface CompiledCssInJsTransformConfig {
|
|
|
84
85
|
processXcss?: boolean
|
|
85
86
|
increaseSpecificity?: boolean
|
|
86
87
|
sortAtRules?: boolean
|
|
88
|
+
sortShorthand?: boolean
|
|
87
89
|
classHashPrefix?: string
|
|
88
90
|
flattenMultipleSelectors?: boolean
|
|
89
91
|
extract?: boolean
|
|
90
92
|
ssr?: boolean
|
|
93
|
+
unsafeReportSafeAssetsForMigration?: boolean
|
|
94
|
+
unsafeUseSafeAssets?: boolean
|
|
91
95
|
}
|
|
92
96
|
export interface CompiledCssInJsPluginInput {
|
|
93
97
|
filename: string
|
|
94
98
|
projectRoot: string
|
|
95
99
|
isSource: boolean
|
|
96
100
|
sourceMaps: boolean
|
|
97
|
-
config:
|
|
101
|
+
config: CompiledCssInJsConfig
|
|
98
102
|
}
|
|
99
103
|
export interface CompiledCssInJsPluginResult {
|
|
100
104
|
code: string
|
|
101
105
|
map?: string
|
|
102
106
|
styleRules: Array<string>
|
|
107
|
+
diagnostics: Array<JsDiagnostic>
|
|
108
|
+
bailOut: boolean
|
|
109
|
+
codeHash: string
|
|
110
|
+
}
|
|
111
|
+
export interface JsSourceLocation {
|
|
112
|
+
startLine: number
|
|
113
|
+
startCol: number
|
|
114
|
+
endLine: number
|
|
115
|
+
endCol: number
|
|
116
|
+
}
|
|
117
|
+
export interface JsCodeHighlight {
|
|
118
|
+
message?: string
|
|
119
|
+
loc: JsSourceLocation
|
|
120
|
+
}
|
|
121
|
+
export interface JsDiagnostic {
|
|
122
|
+
message: string
|
|
123
|
+
codeHighlights?: Array<JsCodeHighlight>
|
|
124
|
+
hints?: Array<string>
|
|
125
|
+
showEnvironment: boolean
|
|
126
|
+
severity: string
|
|
127
|
+
documentationUrl?: string
|
|
103
128
|
}
|
|
104
129
|
export declare function applyCompiledCssInJsPlugin(rawCode: Buffer, input: CompiledCssInJsPluginInput): object
|
|
105
130
|
export interface JsFileSystemOptions {
|
|
@@ -233,3 +258,30 @@ export class Resolver {
|
|
|
233
258
|
getInvalidations(path: string): JsInvalidations
|
|
234
259
|
getInvalidations(path: string): JsInvalidations
|
|
235
260
|
}
|
|
261
|
+
export type JsSourceMap = SourceMap
|
|
262
|
+
export class SourceMap {
|
|
263
|
+
constructor(projectRoot: string, buffer?: Buffer | undefined | null)
|
|
264
|
+
addSource(source: string): number
|
|
265
|
+
getSource(sourceIndex: number): string
|
|
266
|
+
getSources(): Array<string>
|
|
267
|
+
getSourcesContent(): Array<string>
|
|
268
|
+
getSourceIndex(source: string): number
|
|
269
|
+
setSourceContentBySource(source: string, sourceContent: string): void
|
|
270
|
+
getSourceContentBySource(source: string): string
|
|
271
|
+
addName(name: string): number
|
|
272
|
+
getName(nameIndex: number): string
|
|
273
|
+
getNames(): Array<string>
|
|
274
|
+
getNameIndex(name: string): number
|
|
275
|
+
getMappings(): unknown[]
|
|
276
|
+
toBuffer(): Buffer
|
|
277
|
+
addSourceMap(sourcemapObject: SourceMap, lineOffset: number): void
|
|
278
|
+
addVLQMap(vlqMappings: string, sources: Array<string>, sourcesContent: Array<string>, names: Array<string>, lineOffset: number, columnOffset: number): void
|
|
279
|
+
toVLQ(): object
|
|
280
|
+
addIndexedMappings(mappings: JsTypedArray): void
|
|
281
|
+
offsetLines(generatedLine: number, generatedLineOffset: number): void
|
|
282
|
+
offsetColumns(generatedLine: number, generatedColumn: number, generatedColumnOffset: number): void
|
|
283
|
+
addEmptyMap(source: string, sourceContent: string, lineOffset: number): void
|
|
284
|
+
extends(originalSourcemap: SourceMap): void
|
|
285
|
+
findClosestMapping(generatedLine: number, generatedColumn: number): object | null
|
|
286
|
+
getProjectRoot(): string
|
|
287
|
+
}
|
package/index.darwin-arm64.node
CHANGED
|
Binary file
|
package/index.darwin-x64.node
CHANGED
|
Binary file
|
package/index.js
CHANGED
|
@@ -310,7 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { initTracingSubscriber, Lmdb, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, AtlaspackTracer, createAssetId, atlaspackNapiCreate, atlaspackNapiBuildAssetGraph, atlaspackNapiRespondToFsEvents, createDependencyId, createEnvironmentId, setAllEnvironments, getAllEnvironments, getEnvironment, addEnvironment, getAvailableThreads, initializeMonitoring, closeMonitoring, getNativeMemoryStats, resetMemoryTracking, sampleNativeMemory, newNodejsWorker, runInlineRequiresOptimizer, runInlineRequiresOptimizerAsync, applyCompiledCssInJsPlugin, Resolver, performStringReplacements, transform, transformAsync, getVcsStateSnapshot, getEventsSince, applyTokensPlugin } = nativeBinding
|
|
313
|
+
const { initTracingSubscriber, Lmdb, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, AtlaspackTracer, createAssetId, atlaspackNapiCreate, atlaspackNapiBuildAssetGraph, atlaspackNapiRespondToFsEvents, createDependencyId, createEnvironmentId, setAllEnvironments, getAllEnvironments, getEnvironment, addEnvironment, getAvailableThreads, initializeMonitoring, closeMonitoring, getNativeMemoryStats, resetMemoryTracking, sampleNativeMemory, newNodejsWorker, runInlineRequiresOptimizer, runInlineRequiresOptimizerAsync, applyCompiledCssInJsPlugin, Resolver, SourceMap, performStringReplacements, transform, transformAsync, getVcsStateSnapshot, getEventsSince, applyTokensPlugin } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.initTracingSubscriber = initTracingSubscriber
|
|
316
316
|
module.exports.Lmdb = Lmdb
|
|
@@ -343,6 +343,7 @@ module.exports.runInlineRequiresOptimizer = runInlineRequiresOptimizer
|
|
|
343
343
|
module.exports.runInlineRequiresOptimizerAsync = runInlineRequiresOptimizerAsync
|
|
344
344
|
module.exports.applyCompiledCssInJsPlugin = applyCompiledCssInJsPlugin
|
|
345
345
|
module.exports.Resolver = Resolver
|
|
346
|
+
module.exports.SourceMap = SourceMap
|
|
346
347
|
module.exports.performStringReplacements = performStringReplacements
|
|
347
348
|
module.exports.transform = transform
|
|
348
349
|
module.exports.transformAsync = transformAsync
|
|
Binary file
|
package/index.linux-x64-gnu.node
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/rust",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
11
11
|
},
|
|
12
12
|
"main": "index.js",
|
|
13
|
-
"browser": "browser.js",
|
|
14
13
|
"types": "./types.d.ts",
|
|
15
14
|
"napi": {
|
|
16
15
|
"name": "atlaspack-node-bindings",
|
package/types.d.ts
CHANGED
|
@@ -296,3 +296,45 @@ export interface NativeMemoryStats {
|
|
|
296
296
|
virtualMem: DetailedMemoryStats;
|
|
297
297
|
sampleCount: number;
|
|
298
298
|
}
|
|
299
|
+
|
|
300
|
+
export type JsSourceMap = SourceMap;
|
|
301
|
+
export class SourceMap {
|
|
302
|
+
constructor(projectRoot: string, buffer?: Buffer | undefined | null);
|
|
303
|
+
addSource(source: string): number;
|
|
304
|
+
getSource(sourceIndex: number): string;
|
|
305
|
+
getSources(): Array<string>;
|
|
306
|
+
getSourcesContent(): Array<string>;
|
|
307
|
+
getSourceIndex(source: string): number;
|
|
308
|
+
setSourceContentBySource(source: string, sourceContent: string): void;
|
|
309
|
+
getSourceContentBySource(source: string): string;
|
|
310
|
+
addName(name: string): number;
|
|
311
|
+
getName(nameIndex: number): string;
|
|
312
|
+
getNames(): Array<string>;
|
|
313
|
+
getNameIndex(name: string): number;
|
|
314
|
+
getMappings(): unknown[];
|
|
315
|
+
toBuffer(): Buffer;
|
|
316
|
+
addSourceMap(sourcemapObject: SourceMap, lineOffset: number): void;
|
|
317
|
+
addVLQMap(
|
|
318
|
+
vlqMappings: string,
|
|
319
|
+
sources: Array<string>,
|
|
320
|
+
sourcesContent: Array<string>,
|
|
321
|
+
names: Array<string>,
|
|
322
|
+
lineOffset: number,
|
|
323
|
+
columnOffset: number,
|
|
324
|
+
): void;
|
|
325
|
+
toVLQ(): object;
|
|
326
|
+
addIndexedMappings(mappings: JsTypedArray): void;
|
|
327
|
+
offsetLines(generatedLine: number, generatedLineOffset: number): void;
|
|
328
|
+
offsetColumns(
|
|
329
|
+
generatedLine: number,
|
|
330
|
+
generatedColumn: number,
|
|
331
|
+
generatedColumnOffset: number,
|
|
332
|
+
): void;
|
|
333
|
+
addEmptyMap(source: string, sourceContent: string, lineOffset: number): void;
|
|
334
|
+
extends(originalSourcemap: SourceMap): void;
|
|
335
|
+
findClosestMapping(
|
|
336
|
+
generatedLine: number,
|
|
337
|
+
generatedColumn: number,
|
|
338
|
+
): object | null;
|
|
339
|
+
getProjectRoot(): string;
|
|
340
|
+
}
|