@atlaspack/rust 2.12.1-dev.3502 → 2.12.1-dev.3565
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/atlaspack-node-bindings.darwin-arm64.node +0 -0
- package/atlaspack-node-bindings.darwin-x64.node +0 -0
- package/atlaspack-node-bindings.linux-arm-gnueabihf.node +0 -0
- package/atlaspack-node-bindings.linux-arm64-gnu.node +0 -0
- package/atlaspack-node-bindings.linux-x64-gnu.node +0 -0
- package/index.d.ts +24 -19
- package/index.js +2 -1
- package/index.js.flow +6 -0
- package/package.json +2 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -26,18 +26,18 @@ export interface LmdbOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
mapSize?: number
|
|
28
28
|
}
|
|
29
|
-
export function initTracingSubscriber(): void
|
|
29
|
+
export declare function initTracingSubscriber(): void
|
|
30
30
|
export interface Entry {
|
|
31
31
|
key: string
|
|
32
32
|
value: Buffer
|
|
33
33
|
}
|
|
34
|
-
export function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null
|
|
35
|
-
export function findFirstFile(names: Array<string>): string | null
|
|
36
|
-
export function findNodeModule(module: string, from: string): string | null
|
|
37
|
-
export function hashString(s: string): string
|
|
38
|
-
export function hashBuffer(buf: Buffer): string
|
|
39
|
-
export function optimizeImage(kind: string, buf: Buffer): Buffer
|
|
40
|
-
export function createAssetId(params: unknown): string
|
|
34
|
+
export declare function findAncestorFile(filenames: Array<string>, from: string, root: string): string | null
|
|
35
|
+
export declare function findFirstFile(names: Array<string>): string | null
|
|
36
|
+
export declare function findNodeModule(module: string, from: string): string | null
|
|
37
|
+
export declare function hashString(s: string): string
|
|
38
|
+
export declare function hashBuffer(buf: Buffer): string
|
|
39
|
+
export declare function optimizeImage(kind: string, buf: Buffer): Buffer
|
|
40
|
+
export declare function createAssetId(params: unknown): string
|
|
41
41
|
export interface AtlaspackNapiBuildOptions {
|
|
42
42
|
registerWorker: (...args: any[]) => any
|
|
43
43
|
}
|
|
@@ -51,10 +51,10 @@ export interface AtlaspackNapiOptions {
|
|
|
51
51
|
packageManager?: object
|
|
52
52
|
threads?: number
|
|
53
53
|
}
|
|
54
|
-
export function createDependencyId(params: unknown): string
|
|
55
|
-
export function createEnvironmentId(params: unknown): string
|
|
56
|
-
export function initializeMonitoring(): void
|
|
57
|
-
export function closeMonitoring(): void
|
|
54
|
+
export declare function createDependencyId(params: unknown): string
|
|
55
|
+
export declare function createEnvironmentId(params: unknown): string
|
|
56
|
+
export declare function initializeMonitoring(): void
|
|
57
|
+
export declare function closeMonitoring(): void
|
|
58
58
|
/**
|
|
59
59
|
* This function is run in the Nodejs worker context upon initialization
|
|
60
60
|
* to notify the main thread that a Nodejs worker thread has started
|
|
@@ -77,7 +77,7 @@ export function closeMonitoring(): void
|
|
|
77
77
|
* -- Transf.transform -->
|
|
78
78
|
* <--- Array<Asset> -----
|
|
79
79
|
*/
|
|
80
|
-
export function registerWorker(channel: JsTransferable, worker: object): void
|
|
80
|
+
export declare function registerWorker(channel: JsTransferable, worker: object): void
|
|
81
81
|
export interface InlineRequiresOptimizerInput {
|
|
82
82
|
code: string
|
|
83
83
|
sourceMaps: boolean
|
|
@@ -87,7 +87,7 @@ export interface InlineRequiresOptimizerResult {
|
|
|
87
87
|
code: string
|
|
88
88
|
sourceMap?: string
|
|
89
89
|
}
|
|
90
|
-
export function runInlineRequiresOptimizer(input: InlineRequiresOptimizerInput): InlineRequiresOptimizerResult
|
|
90
|
+
export declare function runInlineRequiresOptimizer(input: InlineRequiresOptimizerInput): InlineRequiresOptimizerResult
|
|
91
91
|
export interface JsFileSystemOptions {
|
|
92
92
|
canonicalize: (...args: any[]) => any
|
|
93
93
|
read: (...args: any[]) => any
|
|
@@ -136,10 +136,10 @@ export interface JsInvalidations {
|
|
|
136
136
|
invalidateOnFileCreate: Array<FilePathCreateInvalidation | FileNameCreateInvalidation | GlobCreateInvalidation>
|
|
137
137
|
invalidateOnStartup: boolean
|
|
138
138
|
}
|
|
139
|
-
export function transform(opts: object): unknown
|
|
140
|
-
export function transformAsync(opts: object): object
|
|
141
|
-
export function getVcsStateSnapshot(path: string, excludePatterns: Array<string>): unknown
|
|
142
|
-
export function getEventsSince(repoPath: string, oldRev: string, newRev?: string | undefined | null): Array<string>
|
|
139
|
+
export declare function transform(opts: object): unknown
|
|
140
|
+
export declare function transformAsync(opts: object): object
|
|
141
|
+
export declare function getVcsStateSnapshot(path: string, excludePatterns: Array<string>): unknown
|
|
142
|
+
export declare function getEventsSince(repoPath: string, oldRev: string, newRev?: string | undefined | null): Array<string>
|
|
143
143
|
export type LMDB = Lmdb
|
|
144
144
|
export class Lmdb {
|
|
145
145
|
constructor(options: LmdbOptions)
|
|
@@ -173,9 +173,14 @@ export class Hash {
|
|
|
173
173
|
writeBuffer(buf: Buffer): void
|
|
174
174
|
finish(): string
|
|
175
175
|
}
|
|
176
|
+
export class AtlaspackTracer {
|
|
177
|
+
constructor()
|
|
178
|
+
enter(label: string): SpanId
|
|
179
|
+
exit(id: SpanId): void
|
|
180
|
+
}
|
|
176
181
|
export class AtlaspackNapi {
|
|
177
182
|
nodeWorkerCount: number
|
|
178
|
-
static create(napiOptions: AtlaspackNapiOptions, lmdb
|
|
183
|
+
static create(napiOptions: AtlaspackNapiOptions, lmdb: LMDB): AtlaspackNapi
|
|
179
184
|
buildAssetGraph(options: AtlaspackNapiBuildOptions): object
|
|
180
185
|
}
|
|
181
186
|
export class Resolver {
|
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, createAssetId, AtlaspackNapi, createDependencyId, createEnvironmentId, initializeMonitoring, closeMonitoring, registerWorker, runInlineRequiresOptimizer, Resolver, transform, transformAsync, getVcsStateSnapshot, getEventsSince } = nativeBinding
|
|
313
|
+
const { initTracingSubscriber, Lmdb, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, AtlaspackTracer, createAssetId, AtlaspackNapi, createDependencyId, createEnvironmentId, initializeMonitoring, closeMonitoring, registerWorker, runInlineRequiresOptimizer, Resolver, transform, transformAsync, getVcsStateSnapshot, getEventsSince } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.initTracingSubscriber = initTracingSubscriber
|
|
316
316
|
module.exports.Lmdb = Lmdb
|
|
@@ -321,6 +321,7 @@ module.exports.hashString = hashString
|
|
|
321
321
|
module.exports.hashBuffer = hashBuffer
|
|
322
322
|
module.exports.Hash = Hash
|
|
323
323
|
module.exports.optimizeImage = optimizeImage
|
|
324
|
+
module.exports.AtlaspackTracer = AtlaspackTracer
|
|
324
325
|
module.exports.createAssetId = createAssetId
|
|
325
326
|
module.exports.AtlaspackNapi = AtlaspackNapi
|
|
326
327
|
module.exports.createDependencyId = createDependencyId
|
package/index.js.flow
CHANGED
|
@@ -395,3 +395,9 @@ export type Resolution =
|
|
|
395
395
|
| {|type: 'External'|}
|
|
396
396
|
| {|type: 'Empty'|}
|
|
397
397
|
| {|type: 'Global', value: string|};
|
|
398
|
+
|
|
399
|
+
declare export class AtlaspackTracer {
|
|
400
|
+
constructor(): AtlaspackTracer;
|
|
401
|
+
enter(label: string): number;
|
|
402
|
+
exit(id: number): void;
|
|
403
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/rust",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3565+b31bc6b33",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"wasm:build": "cargo build -p atlaspack-node-bindings --target wasm32-unknown-unknown && cp ../../../target/wasm32-unknown-unknown/debug/atlaspack_node_bindings.wasm .",
|
|
38
38
|
"wasm:build-release": "CARGO_PROFILE_RELEASE_LTO=true cargo build -p atlaspack-node-bindings --target wasm32-unknown-unknown --release && wasm-opt --strip-debug -O ../../../target/wasm32-unknown-unknown/release/atlaspack_node_bindings.wasm -o atlaspack_node_bindings.wasm"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "b31bc6b33de40c158b9f4d8ff177238be0de409d"
|
|
41
41
|
}
|