@atlaspack/rust 2.13.2-dev.3689 → 3.0.1-canary.3710
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 +10 -15
- package/index.js +5 -2
- package/index.js.flow +21 -19
- package/package.json +3 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -45,6 +45,9 @@ export interface AtlaspackNapiOptions {
|
|
|
45
45
|
threads?: number
|
|
46
46
|
napiWorkerPool: object
|
|
47
47
|
}
|
|
48
|
+
export declare function atlaspackNapiCreate(napiOptions: AtlaspackNapiOptions, lmdb: LMDB): object
|
|
49
|
+
export declare function atlaspackNapiBuildAssetGraph(atlaspackNapi: AtlaspackNapi): object
|
|
50
|
+
export declare function atlaspackNapiRespondToFsEvents(atlaspackNapi: AtlaspackNapi, options: object): object
|
|
48
51
|
export declare function createDependencyId(params: unknown): string
|
|
49
52
|
export declare function createEnvironmentId(params: unknown): string
|
|
50
53
|
export declare function getAvailableThreads(): number
|
|
@@ -111,18 +114,15 @@ export interface JsInvalidations {
|
|
|
111
114
|
invalidateOnFileCreate: Array<FilePathCreateInvalidation | FileNameCreateInvalidation | GlobCreateInvalidation>
|
|
112
115
|
invalidateOnStartup: boolean
|
|
113
116
|
}
|
|
117
|
+
export interface Replacement {
|
|
118
|
+
from: string
|
|
119
|
+
to: string
|
|
120
|
+
}
|
|
121
|
+
export declare function performStringReplacements(input: string, replacements: Array<Replacement>): string
|
|
114
122
|
export declare function transform(opts: object): unknown
|
|
115
123
|
export declare function transformAsync(opts: object): object
|
|
116
|
-
export declare function getVcsStateSnapshot(path: string, excludePatterns: Array<string>):
|
|
117
|
-
export
|
|
118
|
-
path: string
|
|
119
|
-
changeType: string
|
|
120
|
-
}
|
|
121
|
-
export interface NodeVcsFile {
|
|
122
|
-
path: string
|
|
123
|
-
hash: string
|
|
124
|
-
}
|
|
125
|
-
export declare function getEventsSince(repoPath: string, vcsStateSnapshot: unknown, newRev?: string | undefined | null): Array<NodeChangeEvent>
|
|
124
|
+
export declare function getVcsStateSnapshot(path: string, excludePatterns: Array<string>): object
|
|
125
|
+
export declare function getEventsSince(repoPath: string, vcsStateSnapshot: unknown, newRev?: string | undefined | null): object
|
|
126
126
|
export type LMDB = Lmdb
|
|
127
127
|
export class Lmdb {
|
|
128
128
|
constructor(options: LmdbOptions)
|
|
@@ -161,11 +161,6 @@ export class AtlaspackTracer {
|
|
|
161
161
|
enter(label: string): SpanId
|
|
162
162
|
exit(id: SpanId): void
|
|
163
163
|
}
|
|
164
|
-
export class AtlaspackNapi {
|
|
165
|
-
static create(napiOptions: AtlaspackNapiOptions, lmdb: LMDB): AtlaspackNapi
|
|
166
|
-
buildAssetGraph(): object
|
|
167
|
-
respondToFsEvents(options: object): object
|
|
168
|
-
}
|
|
169
164
|
export class Resolver {
|
|
170
165
|
constructor(projectRoot: string, options: FileSystem)
|
|
171
166
|
resolve(options: ResolveOptions): ResolveResult
|
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,
|
|
313
|
+
const { initTracingSubscriber, Lmdb, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, AtlaspackTracer, createAssetId, atlaspackNapiCreate, atlaspackNapiBuildAssetGraph, atlaspackNapiRespondToFsEvents, createDependencyId, createEnvironmentId, getAvailableThreads, initializeMonitoring, closeMonitoring, newNodejsWorker, runInlineRequiresOptimizer, Resolver, performStringReplacements, transform, transformAsync, getVcsStateSnapshot, getEventsSince } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.initTracingSubscriber = initTracingSubscriber
|
|
316
316
|
module.exports.Lmdb = Lmdb
|
|
@@ -323,7 +323,9 @@ module.exports.Hash = Hash
|
|
|
323
323
|
module.exports.optimizeImage = optimizeImage
|
|
324
324
|
module.exports.AtlaspackTracer = AtlaspackTracer
|
|
325
325
|
module.exports.createAssetId = createAssetId
|
|
326
|
-
module.exports.
|
|
326
|
+
module.exports.atlaspackNapiCreate = atlaspackNapiCreate
|
|
327
|
+
module.exports.atlaspackNapiBuildAssetGraph = atlaspackNapiBuildAssetGraph
|
|
328
|
+
module.exports.atlaspackNapiRespondToFsEvents = atlaspackNapiRespondToFsEvents
|
|
327
329
|
module.exports.createDependencyId = createDependencyId
|
|
328
330
|
module.exports.createEnvironmentId = createEnvironmentId
|
|
329
331
|
module.exports.getAvailableThreads = getAvailableThreads
|
|
@@ -332,6 +334,7 @@ module.exports.closeMonitoring = closeMonitoring
|
|
|
332
334
|
module.exports.newNodejsWorker = newNodejsWorker
|
|
333
335
|
module.exports.runInlineRequiresOptimizer = runInlineRequiresOptimizer
|
|
334
336
|
module.exports.Resolver = Resolver
|
|
337
|
+
module.exports.performStringReplacements = performStringReplacements
|
|
335
338
|
module.exports.transform = transform
|
|
336
339
|
module.exports.transformAsync = transformAsync
|
|
337
340
|
module.exports.getVcsStateSnapshot = getVcsStateSnapshot
|
package/index.js.flow
CHANGED
|
@@ -68,26 +68,18 @@ export type AtlaspackNapiOptions = {|
|
|
|
68
68
|
threads?: number,
|
|
69
69
|
|};
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
testingTempFsReadToString(path: string): string;
|
|
78
|
-
testingTempFsIsDir(path: string): boolean;
|
|
79
|
-
testingTempFsIsFile(path: string): boolean;
|
|
80
|
-
testingRpcPing(): void;
|
|
81
|
-
}
|
|
71
|
+
// AtlaspackNapi
|
|
72
|
+
export type AtlaspackNapi = {||};
|
|
73
|
+
declare export function atlaspackNapiCreate(options: AtlaspackNapiOptions, lmdb: mixed): Promise<AtlaspackNapi>;
|
|
74
|
+
declare export function atlaspackNapiBuildAssetGraph(atlaspack: AtlaspackNapi): Promise<any>;
|
|
75
|
+
declare export function atlaspackNapiRespondToFsEvents(atlaspack: AtlaspackNapi, events: WatchEvents): boolean;
|
|
76
|
+
// AtlaspackNapi
|
|
82
77
|
|
|
83
78
|
declare export function getAvailableThreads(): number;
|
|
84
79
|
|
|
85
|
-
declare export function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
): void;
|
|
89
|
-
|
|
90
|
-
declare export function newNodejsWorker(delegate: any): Transferable;
|
|
80
|
+
declare export function newNodejsWorker(
|
|
81
|
+
delegate: any,
|
|
82
|
+
): Transferable;
|
|
91
83
|
|
|
92
84
|
declare export function initializeMonitoring(): void;
|
|
93
85
|
declare export function closeMonitoring(): void;
|
|
@@ -316,6 +308,16 @@ export interface LmdbEntry {
|
|
|
316
308
|
value: Buffer;
|
|
317
309
|
}
|
|
318
310
|
|
|
311
|
+
export type StringReplacement = {|
|
|
312
|
+
from: string,
|
|
313
|
+
to: string,
|
|
314
|
+
|};
|
|
315
|
+
|
|
316
|
+
declare export function performStringReplacements(
|
|
317
|
+
input: string,
|
|
318
|
+
replacements: Array<StringReplacement>,
|
|
319
|
+
): string;
|
|
320
|
+
|
|
319
321
|
declare export class Lmdb {
|
|
320
322
|
constructor(options: LmdbOptions): Lmdb;
|
|
321
323
|
get(key: string): Promise<Buffer | null | void>;
|
|
@@ -366,7 +368,7 @@ export interface VCSState {
|
|
|
366
368
|
declare export function getVcsStateSnapshot(
|
|
367
369
|
path: string,
|
|
368
370
|
excludePatterns: Array<string>,
|
|
369
|
-
): VCSState
|
|
371
|
+
): Promise<VCSState>;
|
|
370
372
|
export interface NodeChangeEvent {
|
|
371
373
|
path: string;
|
|
372
374
|
changeType: 'update' | 'create' | 'delete';
|
|
@@ -376,7 +378,7 @@ declare export function getEventsSince(
|
|
|
376
378
|
repoPath: string,
|
|
377
379
|
oldRev: string,
|
|
378
380
|
newRev?: string | void | null,
|
|
379
|
-
): Array<NodeChangeEvent
|
|
381
|
+
): Promise<Array<NodeChangeEvent>>;
|
|
380
382
|
|
|
381
383
|
declare export function createAssetId(params: mixed): string;
|
|
382
384
|
declare export function createDependencyId(params: mixed): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/rust",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1-canary.3710+d874396ab",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -37,5 +37,6 @@
|
|
|
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
|
-
"
|
|
40
|
+
"type": "commonjs",
|
|
41
|
+
"gitHead": "d874396ab648d0d5505d66c7eb73e1748f1eaf68"
|
|
41
42
|
}
|