@atlaspack/rust 3.2.1-canary.0 → 3.2.1-canary.100
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 +15 -2
- package/index.darwin-arm64.node +0 -0
- package/index.darwin-x64.node +0 -0
- package/index.js +6 -1
- package/index.js.flow +67 -28
- package/index.linux-arm64-gnu.node +0 -0
- package/index.linux-x64-gnu.node +0 -0
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -46,6 +46,14 @@ export declare function atlaspackNapiBuildAssetGraph(atlaspackNapi: AtlaspackNap
|
|
|
46
46
|
export declare function atlaspackNapiRespondToFsEvents(atlaspackNapi: AtlaspackNapi, options: object): object
|
|
47
47
|
export declare function createDependencyId(params: unknown): string
|
|
48
48
|
export declare function createEnvironmentId(params: unknown): string
|
|
49
|
+
/** Overwrite all environments with a new set of environments */
|
|
50
|
+
export declare function setAllEnvironments(environments: unknown): void
|
|
51
|
+
/** Get an array of all environments */
|
|
52
|
+
export declare function getAllEnvironments(): Array<unknown>
|
|
53
|
+
/** Get environment by ID */
|
|
54
|
+
export declare function getEnvironment(id: string): unknown
|
|
55
|
+
/** Add an environment to the global manager */
|
|
56
|
+
export declare function addEnvironment(environment: unknown): void
|
|
49
57
|
export declare function getAvailableThreads(): number
|
|
50
58
|
export declare function initializeMonitoring(): void
|
|
51
59
|
export declare function closeMonitoring(): void
|
|
@@ -61,6 +69,8 @@ export interface InlineRequiresOptimizerResult {
|
|
|
61
69
|
sourceMap?: string
|
|
62
70
|
}
|
|
63
71
|
export declare function runInlineRequiresOptimizer(input: InlineRequiresOptimizerInput): InlineRequiresOptimizerResult
|
|
72
|
+
/** Runs in the rayon thread pool */
|
|
73
|
+
export declare function runInlineRequiresOptimizerAsync(input: InlineRequiresOptimizerInput): object
|
|
64
74
|
export interface JsFileSystemOptions {
|
|
65
75
|
canonicalize: (...args: any[]) => any
|
|
66
76
|
read: (...args: any[]) => any
|
|
@@ -124,6 +134,7 @@ export class Lmdb {
|
|
|
124
134
|
constructor(options: LmdbOptions)
|
|
125
135
|
get(key: string): Promise<Buffer | null | undefined>
|
|
126
136
|
hasSync(key: string): boolean
|
|
137
|
+
keysSync(skip: number, limit: number): Array<string>
|
|
127
138
|
getSync(key: string): Buffer | null
|
|
128
139
|
getManySync(keys: Array<string>): Array<Buffer | undefined | null>
|
|
129
140
|
putMany(entries: Array<Entry>): Promise<void>
|
|
@@ -134,10 +145,12 @@ export class Lmdb {
|
|
|
134
145
|
commitReadTransaction(): void
|
|
135
146
|
startWriteTransaction(): Promise<void>
|
|
136
147
|
commitWriteTransaction(): Promise<void>
|
|
137
|
-
|
|
148
|
+
/** Compact the database to the target path */
|
|
149
|
+
compact(targetPath: string): void
|
|
138
150
|
constructor(options: LMDBOptions)
|
|
139
151
|
get(key: string): Promise<Buffer | null | undefined>
|
|
140
152
|
hasSync(key: string): boolean
|
|
153
|
+
keysSync(skip: number, limit: number): Array<string>
|
|
141
154
|
getSync(key: string): Buffer | null
|
|
142
155
|
getManySync(keys: Array<string>): Array<Buffer | undefined | null>
|
|
143
156
|
putMany(entries: Array<Entry>): Promise<void>
|
|
@@ -148,7 +161,7 @@ export class Lmdb {
|
|
|
148
161
|
commitReadTransaction(): void
|
|
149
162
|
startWriteTransaction(): Promise<void>
|
|
150
163
|
commitWriteTransaction(): Promise<void>
|
|
151
|
-
|
|
164
|
+
compact(targetPath: string): void
|
|
152
165
|
}
|
|
153
166
|
export class Hash {
|
|
154
167
|
constructor()
|
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, getAvailableThreads, initializeMonitoring, closeMonitoring, newNodejsWorker, runInlineRequiresOptimizer, Resolver, performStringReplacements, transform, transformAsync, getVcsStateSnapshot, getEventsSince } = 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, newNodejsWorker, runInlineRequiresOptimizer, runInlineRequiresOptimizerAsync, Resolver, performStringReplacements, transform, transformAsync, getVcsStateSnapshot, getEventsSince } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.initTracingSubscriber = initTracingSubscriber
|
|
316
316
|
module.exports.Lmdb = Lmdb
|
|
@@ -328,11 +328,16 @@ module.exports.atlaspackNapiBuildAssetGraph = atlaspackNapiBuildAssetGraph
|
|
|
328
328
|
module.exports.atlaspackNapiRespondToFsEvents = atlaspackNapiRespondToFsEvents
|
|
329
329
|
module.exports.createDependencyId = createDependencyId
|
|
330
330
|
module.exports.createEnvironmentId = createEnvironmentId
|
|
331
|
+
module.exports.setAllEnvironments = setAllEnvironments
|
|
332
|
+
module.exports.getAllEnvironments = getAllEnvironments
|
|
333
|
+
module.exports.getEnvironment = getEnvironment
|
|
334
|
+
module.exports.addEnvironment = addEnvironment
|
|
331
335
|
module.exports.getAvailableThreads = getAvailableThreads
|
|
332
336
|
module.exports.initializeMonitoring = initializeMonitoring
|
|
333
337
|
module.exports.closeMonitoring = closeMonitoring
|
|
334
338
|
module.exports.newNodejsWorker = newNodejsWorker
|
|
335
339
|
module.exports.runInlineRequiresOptimizer = runInlineRequiresOptimizer
|
|
340
|
+
module.exports.runInlineRequiresOptimizerAsync = runInlineRequiresOptimizerAsync
|
|
336
341
|
module.exports.Resolver = Resolver
|
|
337
342
|
module.exports.performStringReplacements = performStringReplacements
|
|
338
343
|
module.exports.transform = transform
|
package/index.js.flow
CHANGED
|
@@ -137,39 +137,49 @@ declare export class Hash {
|
|
|
137
137
|
finish(): string;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
export type Engines = {
|
|
141
|
-
atlaspack?: string,
|
|
142
|
-
browsers?: string | string[],
|
|
143
|
-
electron?: string,
|
|
144
|
-
node?: string,
|
|
145
|
-
|
|
140
|
+
export type Engines = {
|
|
141
|
+
+atlaspack?: string,
|
|
142
|
+
+browsers?: string | string[],
|
|
143
|
+
+electron?: string,
|
|
144
|
+
+node?: string,
|
|
145
|
+
+parcel?: string,
|
|
146
|
+
...
|
|
147
|
+
};
|
|
146
148
|
|
|
147
149
|
export type Environment = {|
|
|
148
|
-
context:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
150
|
+
+context:
|
|
151
|
+
| 'browser'
|
|
152
|
+
| 'node'
|
|
153
|
+
| 'electron-main'
|
|
154
|
+
| 'electron-renderer'
|
|
155
|
+
| 'web-worker'
|
|
156
|
+
| 'worklet'
|
|
157
|
+
| 'service-worker',
|
|
158
|
+
+engines: Engines,
|
|
159
|
+
+includeNodeModules: IncludeNodeModules,
|
|
160
|
+
+isLibrary: boolean,
|
|
161
|
+
+loc: ?SourceLocation,
|
|
162
|
+
+outputFormat: 'esmodule' | 'commonjs' | 'global',
|
|
163
|
+
+shouldScopeHoist: boolean,
|
|
164
|
+
+shouldOptimize: boolean,
|
|
165
|
+
+sourceMap: ?{|
|
|
166
|
+
+inline?: boolean,
|
|
167
|
+
+inlineSources?: boolean,
|
|
168
|
+
+sourceRoot?: string,
|
|
160
169
|
|},
|
|
161
|
-
sourceType:
|
|
170
|
+
+sourceType: 'script' | 'module',
|
|
171
|
+
+unstableSingleFileOutput: boolean,
|
|
162
172
|
|};
|
|
163
173
|
|
|
164
174
|
export type SourceLocation = {|
|
|
165
|
-
filePath:
|
|
166
|
-
start: {|
|
|
167
|
-
line: number,
|
|
168
|
-
column: number,
|
|
175
|
+
+filePath: ProjectPath,
|
|
176
|
+
+start: {|
|
|
177
|
+
+line: number,
|
|
178
|
+
+column: number,
|
|
169
179
|
|},
|
|
170
|
-
end: {|
|
|
171
|
-
line: number,
|
|
172
|
-
column: number,
|
|
180
|
+
+end: {|
|
|
181
|
+
+line: number,
|
|
182
|
+
+column: number,
|
|
173
183
|
|},
|
|
174
184
|
|};
|
|
175
185
|
|
|
@@ -327,6 +337,7 @@ declare export function performStringReplacements(
|
|
|
327
337
|
declare export class Lmdb {
|
|
328
338
|
constructor(options: LmdbOptions): Lmdb;
|
|
329
339
|
get(key: string): Promise<Buffer | null | void>;
|
|
340
|
+
keysSync(skip: number, limit: number): Array<string>;
|
|
330
341
|
hasSync(key: string): boolean;
|
|
331
342
|
getSync(key: string): Buffer | null;
|
|
332
343
|
getManySync(keys: Array<string>): Array<Buffer | void | null>;
|
|
@@ -338,7 +349,7 @@ declare export class Lmdb {
|
|
|
338
349
|
startWriteTransaction(): Promise<void>;
|
|
339
350
|
commitWriteTransaction(): Promise<void>;
|
|
340
351
|
delete(key: string): Promise<void>;
|
|
341
|
-
|
|
352
|
+
compact(targetPath: string): void;
|
|
342
353
|
}
|
|
343
354
|
|
|
344
355
|
export interface InlineRequiresOptimizerInput {
|
|
@@ -355,9 +366,13 @@ declare export function runInlineRequiresOptimizer(
|
|
|
355
366
|
input: InlineRequiresOptimizerInput,
|
|
356
367
|
): InlineRequiresOptimizerResult;
|
|
357
368
|
|
|
369
|
+
declare export function runInlineRequiresOptimizerAsync(
|
|
370
|
+
input: InlineRequiresOptimizerInput,
|
|
371
|
+
): Promise<InlineRequiresOptimizerResult>;
|
|
372
|
+
|
|
358
373
|
export interface VCSFile {
|
|
359
374
|
path: string;
|
|
360
|
-
hash
|
|
375
|
+
hash?: string | null;
|
|
361
376
|
}
|
|
362
377
|
|
|
363
378
|
export interface YarnState {
|
|
@@ -371,6 +386,8 @@ export interface VCSState {
|
|
|
371
386
|
// Files that have been modified since the last commit
|
|
372
387
|
dirtyFiles: VCSFile[];
|
|
373
388
|
yarnStates: YarnState[];
|
|
389
|
+
dirtyFilesExecutionTime: number;
|
|
390
|
+
yarnStatesExecutionTime: number;
|
|
374
391
|
}
|
|
375
392
|
|
|
376
393
|
declare export function getVcsStateSnapshot(
|
|
@@ -429,3 +446,25 @@ declare export class AtlaspackTracer {
|
|
|
429
446
|
enter(label: string): number;
|
|
430
447
|
exit(id: number): void;
|
|
431
448
|
}
|
|
449
|
+
|
|
450
|
+
declare export function setAllEnvironments(
|
|
451
|
+
environments: Array<{|
|
|
452
|
+
...Environment,
|
|
453
|
+
id: string,
|
|
454
|
+
|}>,
|
|
455
|
+
): void;
|
|
456
|
+
|
|
457
|
+
declare export function getAllEnvironments(): Array<{|
|
|
458
|
+
...Environment,
|
|
459
|
+
id: string,
|
|
460
|
+
|}>;
|
|
461
|
+
|
|
462
|
+
declare export function getEnvironment(id: string): {|
|
|
463
|
+
...Environment,
|
|
464
|
+
id: string,
|
|
465
|
+
|};
|
|
466
|
+
|
|
467
|
+
declare export function addEnvironment(environment: {|
|
|
468
|
+
...Environment,
|
|
469
|
+
id: string,
|
|
470
|
+
|}): void;
|
|
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.2.1-canary.
|
|
3
|
+
"version": "3.2.1-canary.100+f609bf49f",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"test": "mocha"
|
|
35
35
|
},
|
|
36
36
|
"type": "commonjs",
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "f609bf49ffa3984c0ff81d4853a5c850aaee5fce"
|
|
38
38
|
}
|