@atlaspack/rust 3.0.1-dev.144 → 3.0.1-dev.146
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 +18 -2
- package/index.darwin-arm64.node +0 -0
- package/index.darwin-x64.node +0 -0
- package/index.js +6 -1
- package/index.js.flow +69 -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,7 @@ export interface InlineRequiresOptimizerResult {
|
|
|
61
69
|
sourceMap?: string
|
|
62
70
|
}
|
|
63
71
|
export declare function runInlineRequiresOptimizer(input: InlineRequiresOptimizerInput): InlineRequiresOptimizerResult
|
|
72
|
+
export declare function runInlineRequiresOptimizerAsync(input: InlineRequiresOptimizerInput): object
|
|
64
73
|
export interface JsFileSystemOptions {
|
|
65
74
|
canonicalize: (...args: any[]) => any
|
|
66
75
|
read: (...args: any[]) => any
|
|
@@ -123,28 +132,35 @@ export type LMDB = Lmdb
|
|
|
123
132
|
export class Lmdb {
|
|
124
133
|
constructor(options: LmdbOptions)
|
|
125
134
|
get(key: string): Promise<Buffer | null | undefined>
|
|
135
|
+
hasSync(key: string): boolean
|
|
136
|
+
keysSync(skip: number, limit: number): Array<string>
|
|
126
137
|
getSync(key: string): Buffer | null
|
|
127
138
|
getManySync(keys: Array<string>): Array<Buffer | undefined | null>
|
|
128
139
|
putMany(entries: Array<Entry>): Promise<void>
|
|
129
140
|
put(key: string, data: Buffer): Promise<void>
|
|
130
141
|
putNoConfirm(key: string, data: Buffer): void
|
|
142
|
+
delete(key: string): Promise<void>
|
|
131
143
|
startReadTransaction(): void
|
|
132
144
|
commitReadTransaction(): void
|
|
133
145
|
startWriteTransaction(): Promise<void>
|
|
134
146
|
commitWriteTransaction(): Promise<void>
|
|
135
|
-
|
|
147
|
+
/** Compact the database to the target path */
|
|
148
|
+
compact(targetPath: string): void
|
|
136
149
|
constructor(options: LMDBOptions)
|
|
137
150
|
get(key: string): Promise<Buffer | null | undefined>
|
|
151
|
+
hasSync(key: string): boolean
|
|
152
|
+
keysSync(skip: number, limit: number): Array<string>
|
|
138
153
|
getSync(key: string): Buffer | null
|
|
139
154
|
getManySync(keys: Array<string>): Array<Buffer | undefined | null>
|
|
140
155
|
putMany(entries: Array<Entry>): Promise<void>
|
|
141
156
|
put(key: string, data: Buffer): Promise<void>
|
|
157
|
+
delete(key: string): Promise<void>
|
|
142
158
|
putNoConfirm(key: string, data: Buffer): void
|
|
143
159
|
startReadTransaction(): void
|
|
144
160
|
commitReadTransaction(): void
|
|
145
161
|
startWriteTransaction(): Promise<void>
|
|
146
162
|
commitWriteTransaction(): Promise<void>
|
|
147
|
-
|
|
163
|
+
compact(targetPath: string): void
|
|
148
164
|
}
|
|
149
165
|
export class Hash {
|
|
150
166
|
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
|
@@ -143,39 +143,49 @@ declare export class Hash {
|
|
|
143
143
|
finish(): string;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
export type Engines = {
|
|
147
|
-
atlaspack?: string,
|
|
148
|
-
browsers?: string | string[],
|
|
149
|
-
electron?: string,
|
|
150
|
-
node?: string,
|
|
151
|
-
|
|
146
|
+
export type Engines = {
|
|
147
|
+
+atlaspack?: string,
|
|
148
|
+
+browsers?: string | string[],
|
|
149
|
+
+electron?: string,
|
|
150
|
+
+node?: string,
|
|
151
|
+
+parcel?: string,
|
|
152
|
+
...
|
|
153
|
+
};
|
|
152
154
|
|
|
153
155
|
export type Environment = {|
|
|
154
|
-
context:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
156
|
+
+context:
|
|
157
|
+
| 'browser'
|
|
158
|
+
| 'node'
|
|
159
|
+
| 'electron-main'
|
|
160
|
+
| 'electron-renderer'
|
|
161
|
+
| 'web-worker'
|
|
162
|
+
| 'worklet'
|
|
163
|
+
| 'service-worker',
|
|
164
|
+
+engines: Engines,
|
|
165
|
+
+includeNodeModules: IncludeNodeModules,
|
|
166
|
+
+isLibrary: boolean,
|
|
167
|
+
+loc: ?SourceLocation,
|
|
168
|
+
+outputFormat: 'esmodule' | 'commonjs' | 'global',
|
|
169
|
+
+shouldScopeHoist: boolean,
|
|
170
|
+
+shouldOptimize: boolean,
|
|
171
|
+
+sourceMap: ?{|
|
|
172
|
+
+inline?: boolean,
|
|
173
|
+
+inlineSources?: boolean,
|
|
174
|
+
+sourceRoot?: string,
|
|
166
175
|
|},
|
|
167
|
-
sourceType:
|
|
176
|
+
+sourceType: 'script' | 'module',
|
|
177
|
+
+unstableSingleFileOutput: boolean,
|
|
168
178
|
|};
|
|
169
179
|
|
|
170
180
|
export type SourceLocation = {|
|
|
171
|
-
filePath:
|
|
172
|
-
start: {|
|
|
173
|
-
line: number,
|
|
174
|
-
column: number,
|
|
181
|
+
+filePath: ProjectPath,
|
|
182
|
+
+start: {|
|
|
183
|
+
+line: number,
|
|
184
|
+
+column: number,
|
|
175
185
|
|},
|
|
176
|
-
end: {|
|
|
177
|
-
line: number,
|
|
178
|
-
column: number,
|
|
186
|
+
+end: {|
|
|
187
|
+
+line: number,
|
|
188
|
+
+column: number,
|
|
179
189
|
|},
|
|
180
190
|
|};
|
|
181
191
|
|
|
@@ -333,6 +343,8 @@ declare export function performStringReplacements(
|
|
|
333
343
|
declare export class Lmdb {
|
|
334
344
|
constructor(options: LmdbOptions): Lmdb;
|
|
335
345
|
get(key: string): Promise<Buffer | null | void>;
|
|
346
|
+
keysSync(skip: number, limit: number): Array<string>;
|
|
347
|
+
hasSync(key: string): boolean;
|
|
336
348
|
getSync(key: string): Buffer | null;
|
|
337
349
|
getManySync(keys: Array<string>): Array<Buffer | void | null>;
|
|
338
350
|
putMany(entries: Array<LmdbEntry>): Promise<void>;
|
|
@@ -342,7 +354,8 @@ declare export class Lmdb {
|
|
|
342
354
|
commitReadTransaction(): void;
|
|
343
355
|
startWriteTransaction(): Promise<void>;
|
|
344
356
|
commitWriteTransaction(): Promise<void>;
|
|
345
|
-
|
|
357
|
+
delete(key: string): Promise<void>;
|
|
358
|
+
compact(targetPath: string): void;
|
|
346
359
|
}
|
|
347
360
|
|
|
348
361
|
export interface InlineRequiresOptimizerInput {
|
|
@@ -359,9 +372,13 @@ declare export function runInlineRequiresOptimizer(
|
|
|
359
372
|
input: InlineRequiresOptimizerInput,
|
|
360
373
|
): InlineRequiresOptimizerResult;
|
|
361
374
|
|
|
375
|
+
declare export function runInlineRequiresOptimizerAsync(
|
|
376
|
+
input: InlineRequiresOptimizerInput,
|
|
377
|
+
): Promise<InlineRequiresOptimizerResult>;
|
|
378
|
+
|
|
362
379
|
export interface VCSFile {
|
|
363
380
|
path: string;
|
|
364
|
-
hash
|
|
381
|
+
hash?: string | null;
|
|
365
382
|
}
|
|
366
383
|
|
|
367
384
|
export interface YarnState {
|
|
@@ -375,6 +392,8 @@ export interface VCSState {
|
|
|
375
392
|
// Files that have been modified since the last commit
|
|
376
393
|
dirtyFiles: VCSFile[];
|
|
377
394
|
yarnStates: YarnState[];
|
|
395
|
+
dirtyFilesExecutionTime: number;
|
|
396
|
+
yarnStatesExecutionTime: number;
|
|
378
397
|
}
|
|
379
398
|
|
|
380
399
|
declare export function getVcsStateSnapshot(
|
|
@@ -433,3 +452,25 @@ declare export class AtlaspackTracer {
|
|
|
433
452
|
enter(label: string): number;
|
|
434
453
|
exit(id: number): void;
|
|
435
454
|
}
|
|
455
|
+
|
|
456
|
+
declare export function setAllEnvironments(
|
|
457
|
+
environments: Array<{|
|
|
458
|
+
...Environment,
|
|
459
|
+
id: string,
|
|
460
|
+
|}>,
|
|
461
|
+
): void;
|
|
462
|
+
|
|
463
|
+
declare export function getAllEnvironments(): Array<{|
|
|
464
|
+
...Environment,
|
|
465
|
+
id: string,
|
|
466
|
+
|}>;
|
|
467
|
+
|
|
468
|
+
declare export function getEnvironment(id: string): {|
|
|
469
|
+
...Environment,
|
|
470
|
+
id: string,
|
|
471
|
+
|};
|
|
472
|
+
|
|
473
|
+
declare export function addEnvironment(environment: {|
|
|
474
|
+
...Environment,
|
|
475
|
+
id: string,
|
|
476
|
+
|}): 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.0.1-dev.
|
|
3
|
+
"version": "3.0.1-dev.146+33cba81e9",
|
|
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": "33cba81e98b6eb098014f5a19d7932821b95f075"
|
|
38
38
|
}
|