-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bindings/nodejs): Add generated
index.d.ts
(#1664)
* chore(bindings/nodejs): commit index.d.ts Signed-off-by: suyanhanx <suyanhanx@gmail.com> * ci(docs): remove bindings/nodejs build step Signed-off-by: suyanhanx <suyanhanx@gmail.com> --------- Signed-off-by: suyanhanx <suyanhanx@gmail.com>
- Loading branch information
Showing
7 changed files
with
166 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,8 +188,8 @@ Cargo.lock | |
|
||
.pnp.* | ||
.yarn | ||
!.yarn/patches | ||
*.node | ||
docs/ | ||
|
||
generated*.* | ||
index.d.ts |
49 changes: 49 additions & 0 deletions
49
bindings/nodejs/.yarn/patches/@napi-rs-cli-npm-2.14.8-71492d0ade.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
diff --git a/scripts/index.js b/scripts/index.js | ||
index 8db6618cb0f730238369a92a54fa23ad7a7bf6b1..065decd83647df7f195f34f0c2815b253f3dc386 100755 | ||
--- a/scripts/index.js | ||
+++ b/scripts/index.js | ||
@@ -11683,7 +11683,26 @@ function processIntermediateTypeFile(source, target, noDtsHeader) { | ||
}, ''); | ||
const dtsHeader = noDtsHeader | ||
? '' | ||
- : `/* tslint:disable */ | ||
+ : `/* | ||
+ * Licensed to the Apache Software Foundation (ASF) under one | ||
+ * or more contributor license agreements. See the NOTICE file | ||
+ * distributed with this work for additional information | ||
+ * regarding copyright ownership. The ASF licenses this file | ||
+ * to you under the Apache License, Version 2.0 (the | ||
+ * "License"); you may not use this file except in compliance | ||
+ * with the License. You may obtain a copy of the License at | ||
+ * | ||
+ * http://www.apache.org/licenses/LICENSE-2.0 | ||
+ * | ||
+ * Unless required by applicable law or agreed to in writing, | ||
+ * software distributed under the License is distributed on an | ||
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
+ * KIND, either express or implied. See the License for the | ||
+ * specific language governing permissions and limitations | ||
+ * under the License. | ||
+ */ | ||
+ | ||
+/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
/* auto-generated by NAPI-RS */\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
/* auto-generated by NAPI-RS */ | ||
|
||
export class Operator { | ||
constructor(scheme: string, options?: Record<string, string> | undefined | null) | ||
/** Get current path's metadata **without cache** directly. */ | ||
stat(path: string): Promise<Metadata> | ||
/** Get current path's metadata **without cache** directly and synchronously. */ | ||
statSync(path: string): Metadata | ||
/** Create dir with given path. */ | ||
createDir(path: string): Promise<void> | ||
/** Create dir with given path synchronously. */ | ||
createDirSync(path: string): void | ||
/** Write bytes into path. */ | ||
write(path: string, content: Buffer | string): Promise<void> | ||
/** Write bytes into path synchronously. */ | ||
writeSync(path: string, content: Buffer | string): void | ||
/** Read the whole path into a buffer. */ | ||
read(path: string): Promise<Buffer> | ||
/** Read the whole path into a buffer synchronously. */ | ||
readSync(path: string): Buffer | ||
/** List dir in flat way. */ | ||
scan(path: string): Promise<Lister> | ||
/** List dir in flat way synchronously. */ | ||
scanSync(path: string): BlockingLister | ||
/** Delete the given path. */ | ||
delete(path: string): Promise<void> | ||
/** Delete the given path synchronously. */ | ||
deleteSync(path: string): void | ||
/** | ||
* List given path. | ||
* | ||
* This function will create a new handle to list entries. | ||
* | ||
* An error will be returned if given path doesn't end with `/`. | ||
*/ | ||
list(path: string): Promise<Lister> | ||
/** | ||
* List given path synchronously. | ||
* | ||
* This function will create a new handle to list entries. | ||
* | ||
* An error will be returned if given path doesn't end with `/`. | ||
*/ | ||
listSync(path: string): BlockingLister | ||
} | ||
export class Entry { | ||
path(): string | ||
} | ||
export class Metadata { | ||
/** Returns true if the <op.stat> object describes a file system directory. */ | ||
isDirectory(): boolean | ||
/** Returns true if the <op.stat> object describes a regular file. */ | ||
isFile(): boolean | ||
/** Content-Disposition of this object */ | ||
get contentDisposition(): string | null | ||
/** Content Length of this object */ | ||
get contentLength(): bigint | null | ||
/** Content MD5 of this object. */ | ||
get contentMd5(): string | null | ||
/** Content Type of this object. */ | ||
get contentType(): string | null | ||
/** ETag of this object. */ | ||
get etag(): string | null | ||
/** Last Modified of this object.(UTC) */ | ||
get lastModified(): string | null | ||
} | ||
export class Lister { | ||
/** | ||
* # Safety | ||
* | ||
* > &mut self in async napi methods should be marked as unsafe | ||
* | ||
* napi will make sure the function is safe, and we didn't do unsafe | ||
* thing internally. | ||
*/ | ||
next(): Promise<Entry | null> | ||
} | ||
export class BlockingLister { | ||
next(): Entry | null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters