@atlaspack/rust 2.12.1-dev.3443 → 2.12.1-dev.3478
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.js.flow +190 -29
- package/package.json +2 -2
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js.flow
CHANGED
|
@@ -7,12 +7,14 @@ import type {
|
|
|
7
7
|
PackageManager,
|
|
8
8
|
} from '@atlaspack/types';
|
|
9
9
|
|
|
10
|
-
import {decl} from 'postcss';
|
|
11
|
-
|
|
12
10
|
declare export var init: void | (() => void);
|
|
13
11
|
|
|
14
12
|
export type Transferable = {||};
|
|
15
13
|
|
|
14
|
+
export type JsCallable<Args: $ReadOnlyArray<mixed>, Return> = (
|
|
15
|
+
...Args
|
|
16
|
+
) => Return | Promise<Return>;
|
|
17
|
+
|
|
16
18
|
export type ProjectPath = any;
|
|
17
19
|
export interface ConfigRequest {
|
|
18
20
|
id: string;
|
|
@@ -27,11 +29,12 @@ export interface ConfigRequest {
|
|
|
27
29
|
export interface RequestOptions {}
|
|
28
30
|
|
|
29
31
|
export interface FileSystem {
|
|
30
|
-
canonicalize
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
canonicalize: JsCallable<[FilePath], FilePath>;
|
|
33
|
+
createDirectory: JsCallable<[FilePath], Promise<void>>;
|
|
34
|
+
cwd: JsCallable<[], FilePath>;
|
|
35
|
+
isDir: JsCallable<[FilePath], boolean>;
|
|
36
|
+
isFile: JsCallable<[FilePath], boolean>;
|
|
37
|
+
readFile: JsCallable<[FilePath, Encoding], string>;
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
export type AtlaspackNapiOptions = {|
|
|
@@ -94,25 +97,13 @@ declare export function findNodeModule(
|
|
|
94
97
|
declare export function hashString(s: string): string;
|
|
95
98
|
declare export function hashBuffer(buf: Buffer): string;
|
|
96
99
|
declare export function optimizeImage(kind: string, buf: Buffer): Buffer;
|
|
97
|
-
|
|
98
|
-
canonicalize: string => string;
|
|
99
|
-
read: string => Buffer;
|
|
100
|
-
isFile: string => boolean;
|
|
101
|
-
isDir: string => boolean;
|
|
102
|
-
includeNodeModules?: boolean | Array<string> | {|[string]: boolean|};
|
|
103
|
-
}
|
|
100
|
+
|
|
104
101
|
export interface ResolveOptions {
|
|
105
102
|
filename: string;
|
|
106
103
|
specifierType: string;
|
|
107
104
|
parent: string;
|
|
108
105
|
packageConditions?: Array<string>;
|
|
109
106
|
}
|
|
110
|
-
export type Resolution =
|
|
111
|
-
| {|type: 'Path', value: string|}
|
|
112
|
-
| {|type: 'Builtin', value: string|}
|
|
113
|
-
| {|type: 'External'|}
|
|
114
|
-
| {|type: 'Empty'|}
|
|
115
|
-
| {|type: 'Global', value: string|};
|
|
116
107
|
|
|
117
108
|
export interface ResolveResult {
|
|
118
109
|
resolution: Resolution;
|
|
@@ -135,21 +126,159 @@ declare export class Hash {
|
|
|
135
126
|
writeBuffer(b: Buffer): void;
|
|
136
127
|
finish(): string;
|
|
137
128
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
129
|
+
|
|
130
|
+
export type Engines = {|
|
|
131
|
+
atlaspack?: string,
|
|
132
|
+
browsers?: string | string[],
|
|
133
|
+
electron?: string,
|
|
134
|
+
node?: string,
|
|
135
|
+
|};
|
|
136
|
+
|
|
137
|
+
export type Environment = {|
|
|
138
|
+
context: string,
|
|
139
|
+
engines: Engines,
|
|
140
|
+
includeNodeModules: IncludeNodeModules,
|
|
141
|
+
isLibrary: boolean,
|
|
142
|
+
loc?: SourceLocation,
|
|
143
|
+
outputFormat: string,
|
|
144
|
+
shouldScopeHoist: boolean,
|
|
145
|
+
shouldOptimize: boolean,
|
|
146
|
+
sourceMap?: {|
|
|
147
|
+
inline?: boolean,
|
|
148
|
+
inlineSources?: boolean,
|
|
149
|
+
sourceRoot?: string,
|
|
150
|
+
|},
|
|
151
|
+
sourceType: string,
|
|
152
|
+
|};
|
|
153
|
+
|
|
154
|
+
export type SourceLocation = {|
|
|
155
|
+
filePath: string,
|
|
156
|
+
start: {|
|
|
157
|
+
line: number,
|
|
158
|
+
column: number,
|
|
159
|
+
|},
|
|
160
|
+
end: {|
|
|
161
|
+
line: number,
|
|
162
|
+
column: number,
|
|
163
|
+
|},
|
|
164
|
+
|};
|
|
165
|
+
|
|
166
|
+
export type Symbol = {|
|
|
167
|
+
local: string,
|
|
168
|
+
exported: string,
|
|
169
|
+
loc?: SourceLocation,
|
|
170
|
+
isWeak: boolean,
|
|
171
|
+
isEsmExport: boolean,
|
|
172
|
+
selfReferenced: boolean,
|
|
173
|
+
|};
|
|
174
|
+
|
|
175
|
+
export type Target = {|
|
|
176
|
+
distDir: string,
|
|
177
|
+
distEntry?: string,
|
|
178
|
+
env: Environment,
|
|
179
|
+
loc?: SourceLocation,
|
|
180
|
+
name: string,
|
|
181
|
+
publicUrl: string,
|
|
182
|
+
|};
|
|
183
|
+
|
|
184
|
+
export type Dependency = {|
|
|
185
|
+
bundleBehavior?: number,
|
|
186
|
+
env: Environment,
|
|
187
|
+
loc: SourceLocation,
|
|
188
|
+
meta?: any,
|
|
189
|
+
packageConditions: number[],
|
|
190
|
+
pipeline?: string,
|
|
191
|
+
priority: number,
|
|
192
|
+
range?: string,
|
|
193
|
+
resolveFrom?: string,
|
|
194
|
+
sourceAssetId?: string,
|
|
195
|
+
sourcePath?: string,
|
|
196
|
+
specifier: string,
|
|
197
|
+
specifierType: number,
|
|
198
|
+
sourceAssetType?: string,
|
|
199
|
+
symbols?: Symbol[],
|
|
200
|
+
target?: Target,
|
|
201
|
+
isEntry: boolean,
|
|
202
|
+
isOptional: boolean,
|
|
203
|
+
needsStableName: boolean,
|
|
204
|
+
shouldWrap: boolean,
|
|
205
|
+
isEsm: boolean,
|
|
206
|
+
placeholder?: string,
|
|
207
|
+
|};
|
|
208
|
+
|
|
209
|
+
export type RpcAssetResult = {|
|
|
210
|
+
id: string,
|
|
211
|
+
bundleBehavior: ?number,
|
|
212
|
+
filePath: string,
|
|
213
|
+
type: string,
|
|
214
|
+
code: Array<number>,
|
|
215
|
+
meta: any,
|
|
216
|
+
pipeline?: ?string,
|
|
217
|
+
query?: string,
|
|
218
|
+
symbols?: Symbol[],
|
|
219
|
+
uniqueKey?: ?string,
|
|
220
|
+
sideEffects: boolean,
|
|
221
|
+
isBundleSplittable: boolean,
|
|
222
|
+
isSource: boolean,
|
|
223
|
+
|};
|
|
224
|
+
|
|
225
|
+
export type RpcTransformerOpts = {|
|
|
226
|
+
resolveFrom: string,
|
|
227
|
+
specifier: string,
|
|
228
|
+
options: RpcPluginOptions,
|
|
229
|
+
asset: Asset,
|
|
230
|
+
|};
|
|
231
|
+
|
|
232
|
+
export type RpcHmrOptions = {|
|
|
233
|
+
port?: number,
|
|
234
|
+
host?: string,
|
|
235
|
+
|};
|
|
236
|
+
|
|
237
|
+
export type RpcPluginOptions = {|
|
|
238
|
+
hmrOptions?: RpcHmrOptions,
|
|
239
|
+
projectRoot: string,
|
|
240
|
+
|};
|
|
241
|
+
|
|
242
|
+
export type Asset = {|
|
|
243
|
+
id: string,
|
|
244
|
+
bundleBehavior: number,
|
|
245
|
+
env: Environment,
|
|
246
|
+
filePath: string,
|
|
247
|
+
type: string,
|
|
248
|
+
code: Array<number>,
|
|
249
|
+
meta: any,
|
|
250
|
+
pipeline?: string,
|
|
251
|
+
query?: string,
|
|
252
|
+
stats: {|
|
|
253
|
+
size: number,
|
|
254
|
+
time: number,
|
|
255
|
+
|},
|
|
256
|
+
symbols?: Symbol[],
|
|
257
|
+
uniqueKey?: string,
|
|
258
|
+
sideEffects: boolean,
|
|
259
|
+
isBundleSplittable: boolean,
|
|
260
|
+
isSource: boolean,
|
|
261
|
+
hasCjsExports: boolean,
|
|
262
|
+
staticExports: boolean,
|
|
263
|
+
shouldWrap: boolean,
|
|
264
|
+
hasNodeReplacements: boolean,
|
|
265
|
+
isConstantModule: boolean,
|
|
266
|
+
conditions: Array<{|
|
|
267
|
+
key: string,
|
|
268
|
+
ifTruePlaceholder?: string,
|
|
269
|
+
ifFalsePlaceholder?: string,
|
|
270
|
+
|}>,
|
|
271
|
+
configPath?: string,
|
|
272
|
+
configKeyPath?: string,
|
|
273
|
+
|};
|
|
274
|
+
|
|
147
275
|
declare export class Resolver {
|
|
148
276
|
constructor(projectRoot: string, options: ResolverOptions): Resolver;
|
|
149
277
|
resolve(options: ResolveOptions): ResolveResult;
|
|
150
278
|
resolveAsync(options: ResolveOptions): Promise<ResolveResult>;
|
|
151
279
|
getInvalidations(path: string): JsInvalidations;
|
|
152
280
|
}
|
|
281
|
+
|
|
153
282
|
export interface LmdbOptions {
|
|
154
283
|
/** The database directory path */
|
|
155
284
|
path: string;
|
|
@@ -208,6 +337,38 @@ declare export function createAssetId(params: mixed): string;
|
|
|
208
337
|
declare export function createDependencyId(params: mixed): string;
|
|
209
338
|
declare export function createEnvironmentId(params: mixed): string;
|
|
210
339
|
|
|
340
|
+
export interface ResolverOptions {
|
|
341
|
+
fs?: JsFileSystemOptions;
|
|
342
|
+
includeNodeModules?: IncludeNodeModules;
|
|
343
|
+
conditions?: number;
|
|
344
|
+
moduleDirResolver?: (...args: any[]) => any;
|
|
345
|
+
mode: number;
|
|
346
|
+
entries?: number;
|
|
347
|
+
extensions?: Array<string>;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export interface JsFileSystemOptions {
|
|
351
|
+
canonicalize: (string) => string;
|
|
352
|
+
read: (string) => Buffer;
|
|
353
|
+
isFile: (string) => boolean;
|
|
354
|
+
isDir: (string) => boolean;
|
|
355
|
+
includeNodeModules?: IncludeNodeModules;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
// Types below break IDE highlighting, place them at the bottom of the file
|
|
359
|
+
|
|
360
|
+
export type IncludeNodeModules =
|
|
361
|
+
| boolean
|
|
362
|
+
| Array<string>
|
|
363
|
+
| {|[string]: boolean|};
|
|
364
|
+
|
|
365
|
+
export type Resolution =
|
|
366
|
+
| {|type: 'Path', value: string|}
|
|
367
|
+
| {|type: 'Builtin', value: string|}
|
|
368
|
+
| {|type: 'External'|}
|
|
369
|
+
| {|type: 'Empty'|}
|
|
370
|
+
| {|type: 'Global', value: string|};
|
|
371
|
+
|
|
211
372
|
declare export function replaceHashReferences(
|
|
212
373
|
input: Buffer,
|
|
213
374
|
hashRefToNameHash: {[key: string]: string},
|
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.3478+5fd2da535",
|
|
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": "5fd2da535ecbe096d57e03aec15e80bb1d7601f7"
|
|
41
41
|
}
|