@parcel/rust 2.12.1-canary.3248 → 2.12.1-canary.3250
Sign up to get free protection for your applications and to get access to all the features.
- package/index.d.ts +6 -0
- package/index.js +2 -1
- package/index.js.flow +37 -16
- package/package.json +2 -2
- package/parcel-node-bindings.darwin-arm64.node +0 -0
- package/parcel-node-bindings.darwin-x64.node +0 -0
- package/parcel-node-bindings.linux-arm-gnueabihf.node +0 -0
- package/parcel-node-bindings.linux-arm64-gnu.node +0 -0
- package/parcel-node-bindings.linux-arm64-musl.node +0 -0
- package/parcel-node-bindings.linux-x64-gnu.node +0 -0
- package/parcel-node-bindings.linux-x64-musl.node +0 -0
- package/parcel-node-bindings.win32-x64-msvc.node +0 -0
package/index.d.ts
CHANGED
@@ -71,6 +71,12 @@ export class Hash {
|
|
71
71
|
writeBuffer(buf: Buffer): void
|
72
72
|
finish(): string
|
73
73
|
}
|
74
|
+
export class ParcelNapi {
|
75
|
+
constructor(options: object)
|
76
|
+
testingTempFsReadToString(path: string): Promise<string>
|
77
|
+
testingTempFsIsFile(path: string): Promise<boolean>
|
78
|
+
testingTempFsIsDir(path: string): Promise<boolean>
|
79
|
+
}
|
74
80
|
export class Resolver {
|
75
81
|
constructor(projectRoot: string, options: FileSystem)
|
76
82
|
resolve(options: ResolveOptions): ResolveResult
|
package/index.js
CHANGED
@@ -295,7 +295,7 @@ if (!nativeBinding) {
|
|
295
295
|
throw new Error(`Failed to load native binding`)
|
296
296
|
}
|
297
297
|
|
298
|
-
const { initSentry, closeSentry, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, Resolver, transform, transformAsync } = nativeBinding
|
298
|
+
const { initSentry, closeSentry, findAncestorFile, findFirstFile, findNodeModule, hashString, hashBuffer, Hash, optimizeImage, ParcelNapi, Resolver, transform, transformAsync } = nativeBinding
|
299
299
|
|
300
300
|
module.exports.initSentry = initSentry
|
301
301
|
module.exports.closeSentry = closeSentry
|
@@ -306,6 +306,7 @@ module.exports.hashString = hashString
|
|
306
306
|
module.exports.hashBuffer = hashBuffer
|
307
307
|
module.exports.Hash = Hash
|
308
308
|
module.exports.optimizeImage = optimizeImage
|
309
|
+
module.exports.ParcelNapi = ParcelNapi
|
309
310
|
module.exports.Resolver = Resolver
|
310
311
|
module.exports.transform = transform
|
311
312
|
module.exports.transformAsync = transformAsync
|
package/index.js.flow
CHANGED
@@ -5,27 +5,48 @@ declare export var init: void | (() => void);
|
|
5
5
|
|
6
6
|
export type ProjectPath = any;
|
7
7
|
export interface ConfigRequest {
|
8
|
-
id: string
|
9
|
-
invalidateOnFileChange: Array<ProjectPath
|
10
|
-
invalidateOnConfigKeyChange: Array<any
|
11
|
-
invalidateOnFileCreate: Array<any
|
12
|
-
invalidateOnEnvChange: Array<string
|
13
|
-
invalidateOnOptionChange: Array<string
|
14
|
-
invalidateOnStartup: boolean
|
15
|
-
invalidateOnBuild: boolean
|
8
|
+
id: string;
|
9
|
+
invalidateOnFileChange: Array<ProjectPath>;
|
10
|
+
invalidateOnConfigKeyChange: Array<any>;
|
11
|
+
invalidateOnFileCreate: Array<any>;
|
12
|
+
invalidateOnEnvChange: Array<string>;
|
13
|
+
invalidateOnOptionChange: Array<string>;
|
14
|
+
invalidateOnStartup: boolean;
|
15
|
+
invalidateOnBuild: boolean;
|
16
|
+
}
|
17
|
+
export interface RequestOptions {}
|
18
|
+
|
19
|
+
export interface ParcelNapiOptions {
|
20
|
+
fs?: any;
|
16
21
|
}
|
17
|
-
|
22
|
+
|
23
|
+
declare export class ParcelNapi {
|
24
|
+
constructor(options: ParcelNapiOptions): ParcelNapi;
|
25
|
+
testingTempFsReadToString(path: string): string;
|
26
|
+
testingTempFsIsDir(path: string): boolean;
|
27
|
+
testingTempFsIsFile(path: string): boolean;
|
18
28
|
}
|
19
29
|
|
20
30
|
declare export function initSentry(): void;
|
21
31
|
declare export function closeSentry(): void;
|
22
|
-
declare export function napiRunConfigRequest(
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
declare export function
|
28
|
-
|
32
|
+
declare export function napiRunConfigRequest(
|
33
|
+
configRequest: ConfigRequest,
|
34
|
+
api: any,
|
35
|
+
options: any,
|
36
|
+
): void;
|
37
|
+
declare export function findAncestorFile(
|
38
|
+
filenames: Array<string>,
|
39
|
+
from: string,
|
40
|
+
root: string,
|
41
|
+
): string | null;
|
42
|
+
declare export function findFirstFile(names: Array<string>): string | null;
|
43
|
+
declare export function findNodeModule(
|
44
|
+
module: string,
|
45
|
+
from: string,
|
46
|
+
): string | null;
|
47
|
+
declare export function hashString(s: string): string;
|
48
|
+
declare export function hashBuffer(buf: Buffer): string;
|
49
|
+
declare export function optimizeImage(kind: string, buf: Buffer): Buffer;
|
29
50
|
export interface JsFileSystemOptions {
|
30
51
|
canonicalize: string => string;
|
31
52
|
read: string => Buffer;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parcel/rust",
|
3
|
-
"version": "2.12.1-canary.
|
3
|
+
"version": "2.12.1-canary.3250+abd6c9e6e",
|
4
4
|
"license": "MIT",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -40,5 +40,5 @@
|
|
40
40
|
"wasm:build": "cargo build -p parcel-node-bindings --target wasm32-unknown-unknown && cp ../../../target/wasm32-unknown-unknown/debug/parcel_node_bindings.wasm .",
|
41
41
|
"wasm:build-release": "CARGO_PROFILE_RELEASE_LTO=true cargo build -p parcel-node-bindings --target wasm32-unknown-unknown --release && wasm-opt --strip-debug -O ../../../target/wasm32-unknown-unknown/release/parcel_node_bindings.wasm -o parcel_node_bindings.wasm"
|
42
42
|
},
|
43
|
-
"gitHead": "
|
43
|
+
"gitHead": "abd6c9e6ea83716a9c20d5f5b97ff1db1625fdf4"
|
44
44
|
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|