@napi-rs/cli 2.15.2 → 3.0.0-alpha.0
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/README.md +17 -78
- package/cli.mjs +12 -0
- package/dist/api/artifacts.d.ts +2 -0
- package/dist/api/artifacts.js +50 -0
- package/dist/api/build.d.ts +14 -0
- package/dist/api/build.js +404 -0
- package/dist/api/create-npm-dirs.d.ts +2 -0
- package/dist/api/create-npm-dirs.js +63 -0
- package/dist/api/new.d.ts +4 -0
- package/dist/api/new.js +154 -0
- package/dist/api/pre-publish.d.ts +2 -0
- package/dist/api/pre-publish.js +157 -0
- package/dist/api/rename.d.ts +2 -0
- package/dist/api/rename.js +28 -0
- package/dist/api/templates/.gitignore.d.ts +1 -0
- package/dist/api/templates/.gitignore.js +198 -0
- package/dist/api/templates/.npmignore.d.ts +1 -0
- package/dist/api/templates/.npmignore.js +14 -0
- package/dist/api/templates/build.rs.d.ts +1 -0
- package/dist/api/templates/build.rs.js +4 -0
- package/dist/api/templates/cargo.toml.d.ts +6 -0
- package/dist/api/templates/cargo.toml.js +25 -0
- package/dist/api/templates/ci-template.d.ts +1 -0
- package/dist/api/templates/ci-template.js +566 -0
- package/dist/api/templates/ci.yml.d.ts +1 -0
- package/dist/api/templates/ci.yml.js +92 -0
- package/dist/api/templates/index.d.ts +8 -0
- package/dist/api/templates/index.js +8 -0
- package/dist/api/templates/js-binding.d.ts +1 -0
- package/dist/api/templates/js-binding.js +124 -0
- package/dist/api/templates/lib.rs.d.ts +1 -0
- package/dist/api/templates/lib.rs.js +10 -0
- package/dist/api/templates/package.json.d.ts +8 -0
- package/dist/api/templates/package.json.js +30 -0
- package/dist/api/universalize.d.ts +2 -0
- package/dist/api/universalize.js +38 -0
- package/dist/api/version.d.ts +2 -0
- package/dist/api/version.js +16 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +25 -0
- package/dist/commands/artifacts.d.ts +6 -0
- package/dist/commands/artifacts.js +19 -0
- package/dist/commands/build.d.ts +6 -0
- package/dist/commands/build.js +34 -0
- package/dist/commands/create-npm-dirs.d.ts +4 -0
- package/dist/commands/create-npm-dirs.js +7 -0
- package/dist/commands/help.d.ts +10 -0
- package/dist/commands/help.js +12 -0
- package/dist/commands/new.d.ts +12 -0
- package/dist/commands/new.js +112 -0
- package/dist/commands/pre-publish.d.ts +4 -0
- package/dist/commands/pre-publish.js +8 -0
- package/dist/commands/rename.d.ts +4 -0
- package/dist/commands/rename.js +7 -0
- package/dist/commands/universalize.d.ts +4 -0
- package/dist/commands/universalize.js +7 -0
- package/dist/commands/version.d.ts +4 -0
- package/dist/commands/version.js +7 -0
- package/dist/def/artifacts.d.ts +50 -0
- package/dist/def/artifacts.js +38 -0
- package/dist/def/build.d.ts +150 -0
- package/dist/def/build.js +105 -0
- package/dist/def/commands/artifacts.d.ts +15 -0
- package/dist/def/commands/artifacts.js +29 -0
- package/dist/def/commands/build.d.ts +53 -0
- package/dist/def/commands/build.js +105 -0
- package/dist/def/commands/create-npm-dirs.d.ts +15 -0
- package/dist/def/commands/create-npm-dirs.js +29 -0
- package/dist/def/commands/new.d.ts +27 -0
- package/dist/def/commands/new.js +53 -0
- package/dist/def/commands/pre-publish.d.ts +23 -0
- package/dist/def/commands/pre-publish.js +45 -0
- package/dist/def/commands/rename.d.ts +25 -0
- package/dist/def/commands/rename.js +49 -0
- package/dist/def/commands/universalize.d.ts +13 -0
- package/dist/def/commands/universalize.js +25 -0
- package/dist/def/commands/version.d.ts +13 -0
- package/dist/def/commands/version.js +25 -0
- package/dist/def/create-npm-dirs.d.ts +50 -0
- package/dist/def/create-npm-dirs.js +38 -0
- package/dist/def/new.d.ts +106 -0
- package/dist/def/new.js +66 -0
- package/dist/def/options/artifacts.d.ts +35 -0
- package/dist/def/options/artifacts.js +11 -0
- package/dist/def/options/build.d.ts +97 -0
- package/dist/def/options/build.js +3 -0
- package/dist/def/options/create-npm-dirs.d.ts +35 -0
- package/dist/def/options/create-npm-dirs.js +11 -0
- package/dist/def/options/new.d.ts +79 -0
- package/dist/def/options/new.js +15 -0
- package/dist/def/options/pre-publish.d.ts +65 -0
- package/dist/def/options/pre-publish.js +13 -0
- package/dist/def/options/rename.d.ts +75 -0
- package/dist/def/options/rename.js +11 -0
- package/dist/def/options/universalize.d.ts +28 -0
- package/dist/def/options/universalize.js +10 -0
- package/dist/def/options/version.d.ts +28 -0
- package/dist/def/options/version.js +10 -0
- package/dist/def/pre-publish.d.ts +88 -0
- package/dist/def/pre-publish.js +56 -0
- package/dist/def/rename.d.ts +100 -0
- package/dist/def/rename.js +58 -0
- package/dist/def/universalize.d.ts +41 -0
- package/dist/def/universalize.js +33 -0
- package/dist/def/version.d.ts +41 -0
- package/dist/def/version.js +33 -0
- package/dist/index.cjs +20641 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +30 -0
- package/dist/utils/__tests__/target.spec.d.ts +1 -0
- package/dist/utils/__tests__/target.spec.js +10 -0
- package/dist/utils/__tests__/typegen.spec.d.ts +1 -0
- package/dist/utils/__tests__/typegen.spec.js +37 -0
- package/dist/utils/__tests__/version.spec.d.ts +1 -0
- package/dist/utils/__tests__/version.spec.js +5 -0
- package/dist/utils/cargo.d.ts +1 -0
- package/dist/utils/cargo.js +33 -0
- package/dist/utils/ci.d.ts +11 -0
- package/dist/utils/ci.js +86 -0
- package/dist/utils/config.d.ts +65 -0
- package/dist/utils/config.js +42 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.js +9 -0
- package/dist/utils/log.d.ts +10 -0
- package/dist/utils/log.js +14 -0
- package/dist/utils/metadata.d.ts +24 -0
- package/dist/utils/metadata.js +19 -0
- package/dist/utils/misc.d.ts +13 -0
- package/dist/utils/misc.js +35 -0
- package/dist/utils/target.d.ts +30 -0
- package/dist/utils/target.js +109 -0
- package/dist/utils/typegen.d.ts +3 -0
- package/dist/utils/typegen.js +158 -0
- package/dist/utils/version.d.ts +11 -0
- package/dist/utils/version.js +59 -0
- package/package.json +63 -27
- package/src/api/artifacts.ts +93 -0
- package/src/api/build.ts +549 -0
- package/src/api/create-npm-dirs.ts +105 -0
- package/src/api/new.ts +206 -0
- package/src/api/pre-publish.ts +216 -0
- package/src/api/rename.ts +51 -0
- package/src/api/templates/.gitignore.ts +198 -0
- package/src/api/templates/.npmignore.ts +14 -0
- package/src/api/templates/build.rs.ts +4 -0
- package/src/api/templates/cargo.toml.ts +35 -0
- package/src/api/templates/ci-template.ts +566 -0
- package/src/api/templates/ci.yml.ts +116 -0
- package/src/api/templates/index.ts +8 -0
- package/src/api/templates/js-binding.ts +130 -0
- package/src/api/templates/lib.rs.ts +10 -0
- package/src/api/templates/package.json.ts +44 -0
- package/src/api/universalize.ts +76 -0
- package/src/api/version.ts +26 -0
- package/src/cli.ts +29 -0
- package/src/commands/artifacts.ts +23 -0
- package/src/commands/build.ts +42 -0
- package/src/commands/create-npm-dirs.ts +8 -0
- package/src/commands/help.ts +13 -0
- package/src/commands/new.ts +138 -0
- package/src/commands/pre-publish.ts +9 -0
- package/src/commands/rename.ts +8 -0
- package/src/commands/universalize.ts +8 -0
- package/src/commands/version.ts +8 -0
- package/src/def/artifacts.ts +79 -0
- package/src/def/build.ts +242 -0
- package/src/def/create-npm-dirs.ts +79 -0
- package/src/def/new.ts +144 -0
- package/src/def/pre-publish.ts +120 -0
- package/src/def/rename.ts +122 -0
- package/src/def/universalize.ts +66 -0
- package/src/def/version.ts +65 -0
- package/src/index.ts +31 -0
- package/src/utils/__tests__/__fixtures__/napi_type_def +201 -0
- package/src/utils/__tests__/__snapshots__/target.spec.ts.md +110 -0
- package/src/utils/__tests__/__snapshots__/target.spec.ts.snap +0 -0
- package/src/utils/__tests__/__snapshots__/typegen.spec.ts.md +618 -0
- package/src/utils/__tests__/__snapshots__/typegen.spec.ts.snap +0 -0
- package/src/utils/__tests__/__snapshots__/version.spec.ts.md +20 -0
- package/src/utils/__tests__/__snapshots__/version.spec.ts.snap +0 -0
- package/src/utils/__tests__/target.spec.ts +19 -0
- package/src/utils/__tests__/typegen.spec.ts +49 -0
- package/src/utils/__tests__/version.spec.ts +13 -0
- package/src/utils/cargo.ts +35 -0
- package/src/utils/ci.ts +102 -0
- package/src/utils/config.ts +123 -0
- package/src/utils/index.ts +9 -0
- package/src/utils/log.ts +34 -0
- package/src/utils/metadata.ts +59 -0
- package/src/utils/misc.ts +45 -0
- package/src/utils/target.ts +145 -0
- package/src/utils/typegen.ts +193 -0
- package/src/utils/version.ts +76 -0
- package/scripts/index.js +0 -153779
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// This file is generated by codegen/index.ts
|
|
2
|
+
// Do not edit this file manually
|
|
3
|
+
import { Command, Option } from 'clipanion'
|
|
4
|
+
|
|
5
|
+
export abstract class BaseUniversalizeCommand extends Command {
|
|
6
|
+
static paths = [['universalize']]
|
|
7
|
+
|
|
8
|
+
static usage = Command.Usage({
|
|
9
|
+
description: 'Combile built binaries into one universal binary',
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
cwd = Option.String('--cwd', process.cwd(), {
|
|
13
|
+
description:
|
|
14
|
+
'The working directory of where napi command will be executed in, all other paths options are relative to this path',
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
packageJsonPath = Option.String('--package-json-path', 'package.json', {
|
|
18
|
+
description: 'Path to `package.json`',
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
outputDir = Option.String('--output-dir,-o', './', {
|
|
22
|
+
description:
|
|
23
|
+
'Path to the folder where all built `.node` files put, same as `--output-dir` of build command',
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
getOptions() {
|
|
27
|
+
return {
|
|
28
|
+
cwd: this.cwd,
|
|
29
|
+
packageJsonPath: this.packageJsonPath,
|
|
30
|
+
outputDir: this.outputDir,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Combile built binaries into one universal binary
|
|
37
|
+
*/
|
|
38
|
+
export interface UniversalizeOptions {
|
|
39
|
+
/**
|
|
40
|
+
* The working directory of where napi command will be executed in, all other paths options are relative to this path
|
|
41
|
+
*
|
|
42
|
+
* @default process.cwd()
|
|
43
|
+
*/
|
|
44
|
+
cwd?: string
|
|
45
|
+
/**
|
|
46
|
+
* Path to `package.json`
|
|
47
|
+
*
|
|
48
|
+
* @default 'package.json'
|
|
49
|
+
*/
|
|
50
|
+
packageJsonPath?: string
|
|
51
|
+
/**
|
|
52
|
+
* Path to the folder where all built `.node` files put, same as `--output-dir` of build command
|
|
53
|
+
*
|
|
54
|
+
* @default './'
|
|
55
|
+
*/
|
|
56
|
+
outputDir?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function applyDefaultUniversalizeOptions(options: UniversalizeOptions) {
|
|
60
|
+
return {
|
|
61
|
+
cwd: process.cwd(),
|
|
62
|
+
packageJsonPath: 'package.json',
|
|
63
|
+
outputDir: './',
|
|
64
|
+
...options,
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// This file is generated by codegen/index.ts
|
|
2
|
+
// Do not edit this file manually
|
|
3
|
+
import { Command, Option } from 'clipanion'
|
|
4
|
+
|
|
5
|
+
export abstract class BaseVersionCommand extends Command {
|
|
6
|
+
static paths = [['version']]
|
|
7
|
+
|
|
8
|
+
static usage = Command.Usage({
|
|
9
|
+
description: 'Update version in created npm packages',
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
cwd = Option.String('--cwd', process.cwd(), {
|
|
13
|
+
description:
|
|
14
|
+
'The working directory of where napi command will be executed in, all other paths options are relative to this path',
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
packageJsonPath = Option.String('--package-json-path', 'package.json', {
|
|
18
|
+
description: 'Path to `package.json`',
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
npmDir = Option.String('--npm-dir', 'npm', {
|
|
22
|
+
description: 'Path to the folder where the npm packages put',
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
getOptions() {
|
|
26
|
+
return {
|
|
27
|
+
cwd: this.cwd,
|
|
28
|
+
packageJsonPath: this.packageJsonPath,
|
|
29
|
+
npmDir: this.npmDir,
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Update version in created npm packages
|
|
36
|
+
*/
|
|
37
|
+
export interface VersionOptions {
|
|
38
|
+
/**
|
|
39
|
+
* The working directory of where napi command will be executed in, all other paths options are relative to this path
|
|
40
|
+
*
|
|
41
|
+
* @default process.cwd()
|
|
42
|
+
*/
|
|
43
|
+
cwd?: string
|
|
44
|
+
/**
|
|
45
|
+
* Path to `package.json`
|
|
46
|
+
*
|
|
47
|
+
* @default 'package.json'
|
|
48
|
+
*/
|
|
49
|
+
packageJsonPath?: string
|
|
50
|
+
/**
|
|
51
|
+
* Path to the folder where the npm packages put
|
|
52
|
+
*
|
|
53
|
+
* @default 'npm'
|
|
54
|
+
*/
|
|
55
|
+
npmDir?: string
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function applyDefaultVersionOptions(options: VersionOptions) {
|
|
59
|
+
return {
|
|
60
|
+
cwd: process.cwd(),
|
|
61
|
+
packageJsonPath: 'package.json',
|
|
62
|
+
npmDir: 'npm',
|
|
63
|
+
...options,
|
|
64
|
+
}
|
|
65
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { collectArtifacts } from './api/artifacts.js'
|
|
2
|
+
import { buildProject } from './api/build.js'
|
|
3
|
+
import { createNpmDirs } from './api/create-npm-dirs.js'
|
|
4
|
+
import { newProject } from './api/new.js'
|
|
5
|
+
import { prePublish } from './api/pre-publish.js'
|
|
6
|
+
import { renameProject } from './api/rename.js'
|
|
7
|
+
import { universalizeBinaries } from './api/universalize.js'
|
|
8
|
+
import { version } from './api/version.js'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @usage
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* const cli = new NapiCli()
|
|
16
|
+
*
|
|
17
|
+
* cli.build({
|
|
18
|
+
* cwd: '/path/to/your/project',
|
|
19
|
+
* })
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export class NapiCli {
|
|
23
|
+
artifacts = collectArtifacts
|
|
24
|
+
new = newProject
|
|
25
|
+
build = buildProject
|
|
26
|
+
createNpmDirs = createNpmDirs
|
|
27
|
+
prePublish = prePublish
|
|
28
|
+
rename = renameProject
|
|
29
|
+
universalize = universalizeBinaries
|
|
30
|
+
version = version
|
|
31
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
{"kind": "const", "name": "DEFAULT_COST", "js_doc": "/** This is a const */\n", "def": "export const DEFAULT_COST: number", "original_name": "DEFAULT_COST"}
|
|
2
|
+
{"kind": "fn", "name": "getWords", "js_doc": "", "def": "export function getWords(): Array<string>"}
|
|
3
|
+
{"kind": "fn", "name": "getNums", "js_doc": "/** Gets some numbers */\n", "def": "export function getNums(): Array<number>"}
|
|
4
|
+
{"kind": "fn", "name": "sumNums", "js_doc": "", "def": "export function sumNums(nums: Array<number>): number"}
|
|
5
|
+
{"kind": "fn", "name": "toJsObj", "js_doc": "", "def": "export function toJsObj(): object"}
|
|
6
|
+
{"kind": "fn", "name": "getNumArr", "js_doc": "", "def": "export function getNumArr(): number[]"}
|
|
7
|
+
{"kind": "fn", "name": "getNestedNumArr", "js_doc": "", "def": "export function getNestedNumArr(): number[][][]"}
|
|
8
|
+
{"kind": "fn", "name": "readFileAsync", "js_doc": "", "def": "export function readFileAsync(path: string): Promise<Buffer>"}
|
|
9
|
+
{"kind": "fn", "name": "asyncMultiTwo", "js_doc": "", "def": "export function asyncMultiTwo(arg: number): Promise<number>"}
|
|
10
|
+
{"kind": "fn", "name": "bigintAdd", "js_doc": "", "def": "export function bigintAdd(a: bigint, b: bigint): bigint"}
|
|
11
|
+
{"kind": "fn", "name": "createBigInt", "js_doc": "", "def": "export function createBigInt(): bigint"}
|
|
12
|
+
{"kind": "fn", "name": "createBigIntI64", "js_doc": "", "def": "export function createBigIntI64(): bigint"}
|
|
13
|
+
{"kind": "fn", "name": "bigintGetU64AsString", "js_doc": "", "def": "export function bigintGetU64AsString(bi: bigint): string"}
|
|
14
|
+
{"kind": "fn", "name": "bigintFromI64", "js_doc": "", "def": "export function bigintFromI64(): bigint"}
|
|
15
|
+
{"kind": "fn", "name": "bigintFromI128", "js_doc": "", "def": "export function bigintFromI128(): bigint"}
|
|
16
|
+
{"kind": "fn", "name": "getCwd", "js_doc": "", "def": "export function getCwd(callback: (arg0: string) => void): void"}
|
|
17
|
+
{"kind": "fn", "name": "optionEnd", "js_doc": "", "def": "export function optionEnd(callback: (arg0: string, arg1?: string | undefined | null) => void): void"}
|
|
18
|
+
{"kind": "fn", "name": "optionStart", "js_doc": "", "def": "export function optionStart(callback: (arg0: string | undefined | null, arg1: string) => void): void"}
|
|
19
|
+
{"kind": "fn", "name": "optionStartEnd", "js_doc": "", "def": "export function optionStartEnd(callback: (arg0: string | undefined | null, arg1: string, arg2?: string | undefined | null) => void): void"}
|
|
20
|
+
{"kind": "fn", "name": "optionOnly", "js_doc": "", "def": "export function optionOnly(callback: (arg0?: string | undefined | null) => void): void"}
|
|
21
|
+
{"kind": "fn", "name": "readFile", "js_doc": "/** napi = { version = 2, features = [\"serde-json\"] } */\n", "def": "export function readFile(callback: (arg0: Error | undefined, arg1?: string | undefined | null) => void): void"}
|
|
22
|
+
{"kind": "fn", "name": "returnJsFunction", "js_doc": "", "def": "export function returnJsFunction(): (...args: any[]) => any"}
|
|
23
|
+
{"kind": "fn", "name": "callbackReturnPromise", "js_doc": "", "def": "export function callbackReturnPromise<T>(functionInput: () => T | Promise<T>, callback: (err: Error | null, result: T) => void): T | Promise<T>"}
|
|
24
|
+
{"kind": "fn", "name": "captureErrorInCallback", "js_doc": "", "def": "export function captureErrorInCallback(cb1: () => void, cb2: (arg0: Error) => void): void"}
|
|
25
|
+
{"kind": "struct", "name": "Animal", "js_doc": "/**\n * `constructor` option for `struct` requires all fields to be public,\n * otherwise tag impl fn as constructor\n * #[napi(constructor)]\n */\n", "def": "/** Kind of animal */\nreadonly kind: Kind", "original_name": "Animal"}
|
|
26
|
+
{"kind": "impl", "name": "Animal", "js_doc": "", "def": "/** This is the constructor */\n constructor(kind: Kind, name: string)\n/** This is a factory method */\nstatic withKind(kind: Kind): Animal\nget name(): string\nset name(name: string)\nget type(): Kind\nset type(kind: Kind)\n/**\n * This is a\n * multi-line comment\n * with an emoji \uD83D\uDE80\n */\n whoami(): string\n/** This is static... */\nstatic getDogKind(): Kind\n/**\n * Here are some characters and character sequences\n * that should be escaped correctly:\n * \\[]{}/\\:\"\"{\n * }\n */\n returnOtherClass(): Dog\n returnOtherClassWithCustomConstructor(): Bird\n overrideIndividualArgOnMethod(normalTy: string, overriddenTy: {n: string}): Bird"}
|
|
27
|
+
{"kind": "struct", "name": "Dog", "js_doc": "", "def": "name: string\nconstructor(name: string)", "original_name": "Dog"}
|
|
28
|
+
{"kind": "struct", "name": "Bird", "js_doc": "", "def": "name: string", "original_name": "Bird"}
|
|
29
|
+
{"kind": "impl", "name": "Bird", "js_doc": "", "def": " constructor(name: string)\n getCount(): number\n getNameAsync(): Promise<string>"}
|
|
30
|
+
{"kind": "struct", "name": "Blake2BHasher", "js_doc": "/** Smoking test for type generation */\n", "def": "", "original_name": "Blake2bHasher"}
|
|
31
|
+
{"kind": "impl", "name": "Blake2BHasher", "js_doc": "", "def": "static withKey(key: Blake2bKey): Blake2BHasher"}
|
|
32
|
+
{"kind": "impl", "name": "Blake2BHasher", "js_doc": "", "def": " update(data: Buffer): void"}
|
|
33
|
+
{"kind": "struct", "name": "Blake2BKey", "js_doc": "", "def": "", "original_name": "Blake2bKey"}
|
|
34
|
+
{"kind": "struct", "name": "Context", "js_doc": "", "def": "maybeNeed?: boolean\nbuffer: Uint8Array", "original_name": "Context"}
|
|
35
|
+
{"kind": "impl", "name": "Context", "js_doc": "", "def": " constructor()\nstatic withData(data: string): Context\nstatic withBuffer(buf: Uint8Array): Context\n method(): string"}
|
|
36
|
+
{"kind": "struct", "name": "AnimalWithDefaultConstructor", "js_doc": "", "def": "name: string\nkind: number\nconstructor(name: string, kind: number)", "original_name": "AnimalWithDefaultConstructor"}
|
|
37
|
+
{"kind": "struct", "name": "NinjaTurtle", "js_doc": "", "def": "name: string", "original_name": "NinjaTurtle"}
|
|
38
|
+
{"kind": "impl", "name": "NinjaTurtle", "js_doc": "", "def": "static isInstanceOf(value: unknown): boolean\n/** Create your ninja turtle! \uD83D\uDC22 */\nstatic newRaph(): NinjaTurtle\n getMaskColor(): string\n getName(): string\n returnThis(this: this): this"}
|
|
39
|
+
{"kind": "struct", "name": "Assets", "js_doc": "", "def": "", "original_name": "JsAssets"}
|
|
40
|
+
{"kind": "impl", "name": "Assets", "js_doc": "", "def": " constructor()\n get(id: number): JsAsset | null"}
|
|
41
|
+
{"kind": "struct", "name": "Asset", "js_doc": "", "def": "", "original_name": "JsAsset"}
|
|
42
|
+
{"kind": "impl", "name": "Asset", "js_doc": "", "def": " constructor()\nget filePath(): number"}
|
|
43
|
+
{"kind": "struct", "name": "Optional", "js_doc": "", "def": "", "original_name": "Optional"}
|
|
44
|
+
{"kind": "impl", "name": "Optional", "js_doc": "", "def": "static optionEnd(required: string, optional?: string | undefined | null): string\nstatic optionStart(optional: string | undefined | null, required: string): string\nstatic optionStartEnd(optional1: string | undefined | null, required: string, optional2?: string | undefined | null): string\nstatic optionOnly(optional?: string | undefined | null): string"}
|
|
45
|
+
{"kind": "interface", "name": "ObjectFieldClassInstance", "js_doc": "", "def": "bird: Bird", "original_name": "ObjectFieldClassInstance"}
|
|
46
|
+
{"kind": "fn", "name": "createObjectWithClassField", "js_doc": "", "def": "export function createObjectWithClassField(): ObjectFieldClassInstance"}
|
|
47
|
+
{"kind": "fn", "name": "receiveObjectWithClassField", "js_doc": "", "def": "export function receiveObjectWithClassField(object: ObjectFieldClassInstance): Bird"}
|
|
48
|
+
{"kind": "struct", "name": "NotWritableClass", "js_doc": "", "def": "name: string\nconstructor(name: string)", "original_name": "NotWritableClass"}
|
|
49
|
+
{"kind": "impl", "name": "NotWritableClass", "js_doc": "", "def": " setName(name: string): void"}
|
|
50
|
+
{"kind": "struct", "name": "CustomFinalize", "js_doc": "", "def": "", "original_name": "CustomFinalize"}
|
|
51
|
+
{"kind": "impl", "name": "CustomFinalize", "js_doc": "", "def": " constructor(width: number, height: number)"}
|
|
52
|
+
{"kind": "struct", "name": "Width", "js_doc": "", "def": "value: number\nconstructor(value: number)", "original_name": "Width"}
|
|
53
|
+
{"kind": "fn", "name": "plusOne", "js_doc": "", "def": "export function plusOne(this: Width): number"}
|
|
54
|
+
{"kind": "struct", "name": "ClassWithFactory", "js_doc": "", "def": "name: string", "original_name": "ClassWithFactory"}
|
|
55
|
+
{"kind": "impl", "name": "ClassWithFactory", "js_doc": "", "def": "static withName(name: string): ClassWithFactory\n setName(name: string): this"}
|
|
56
|
+
{"kind": "fn", "name": "dateToNumber", "js_doc": "", "def": "export function dateToNumber(input: Date): number"}
|
|
57
|
+
{"kind": "fn", "name": "chronoDateToMillis", "js_doc": "", "def": "export function chronoDateToMillis(input: Date): number"}
|
|
58
|
+
{"kind": "fn", "name": "chronoDateAdd1Minute", "js_doc": "", "def": "export function chronoDateAdd1Minute(input: Date): Date"}
|
|
59
|
+
{"kind": "interface", "name": "Dates", "js_doc": "", "def": "start: Date\nend?: Date", "original_name": "Dates"}
|
|
60
|
+
{"kind": "fn", "name": "eitherStringOrNumber", "js_doc": "", "def": "export function eitherStringOrNumber(input: string | number): number"}
|
|
61
|
+
{"kind": "fn", "name": "returnEither", "js_doc": "", "def": "export function returnEither(input: number): string | number"}
|
|
62
|
+
{"kind": "fn", "name": "either3", "js_doc": "", "def": "export function either3(input: string | number | boolean): number"}
|
|
63
|
+
{"kind": "interface", "name": "Obj", "js_doc": "", "def": "v: string | number", "original_name": "Obj"}
|
|
64
|
+
{"kind": "fn", "name": "either4", "js_doc": "", "def": "export function either4(input: string | number | boolean | Obj): number"}
|
|
65
|
+
{"kind": "struct", "name": "JsClassForEither", "js_doc": "", "def": "", "original_name": "JsClassForEither"}
|
|
66
|
+
{"kind": "impl", "name": "JsClassForEither", "js_doc": "", "def": " constructor()"}
|
|
67
|
+
{"kind": "struct", "name": "AnotherClassForEither", "js_doc": "", "def": "", "original_name": "AnotherClassForEither"}
|
|
68
|
+
{"kind": "impl", "name": "AnotherClassForEither", "js_doc": "", "def": " constructor()"}
|
|
69
|
+
{"kind": "fn", "name": "receiveClassOrNumber", "js_doc": "", "def": "export function receiveClassOrNumber(either: number | JsClassForEither): number"}
|
|
70
|
+
{"kind": "fn", "name": "receiveMutClassOrNumber", "js_doc": "", "def": "export function receiveMutClassOrNumber(either: number | JsClassForEither): number"}
|
|
71
|
+
{"kind": "fn", "name": "receiveDifferentClass", "js_doc": "", "def": "export function receiveDifferentClass(either: JsClassForEither | AnotherClassForEither): number"}
|
|
72
|
+
{"kind": "fn", "name": "returnEitherClass", "js_doc": "", "def": "export function returnEitherClass(input: number): number | JsClassForEither"}
|
|
73
|
+
{"kind": "fn", "name": "eitherFromOption", "js_doc": "", "def": "export function eitherFromOption(): JsClassForEither | undefined"}
|
|
74
|
+
{"kind": "interface", "name": "A", "js_doc": "", "def": "foo: number", "original_name": "A"}
|
|
75
|
+
{"kind": "interface", "name": "B", "js_doc": "", "def": "bar: number", "original_name": "B"}
|
|
76
|
+
{"kind": "interface", "name": "C", "js_doc": "", "def": "baz: number", "original_name": "C"}
|
|
77
|
+
{"kind": "fn", "name": "eitherFromObjects", "js_doc": "", "def": "export function eitherFromObjects(input: A | B | C): string"}
|
|
78
|
+
{"kind": "fn", "name": "eitherBoolOrFunction", "js_doc": "", "def": "export function eitherBoolOrFunction(input: boolean | ((...args: any[]) => any)): void"}
|
|
79
|
+
{"kind": "fn", "name": "promiseInEither", "js_doc": "", "def": "export function promiseInEither(input: number | Promise<number>): Promise<boolean>"}
|
|
80
|
+
{"kind": "enum", "name": "Kind", "js_doc": "/** default enum values are continuos i32s start from 0 */\n", "def": "/** Barks */\nDog = 0,\n /** Kills birds */\nCat = 1,\n /** Tasty */\nDuck = 2", "original_name": "Kind"}
|
|
81
|
+
{"kind": "enum", "name": "Empty", "js_doc": "", "def": "", "original_name": "Empty"}
|
|
82
|
+
{"kind": "enum", "name": "CustomNumEnum", "js_doc": "/** You could break the step and for an new continuous value. */\n", "def": "One = 1,\n Two = 2,\n Three = 3,\n Four = 4,\n Six = 6,\n Eight = 8,\n Nine = 9,\n Ten = 10", "original_name": "CustomNumEnum"}
|
|
83
|
+
{"kind": "fn", "name": "enumToI32", "js_doc": "", "def": "export function enumToI32(e: CustomNumEnum): number"}
|
|
84
|
+
{"kind": "fn", "name": "throwError", "js_doc": "", "def": "export function throwError(): void"}
|
|
85
|
+
{"kind": "fn", "name": "panic", "js_doc": "", "def": "export function panic(): void"}
|
|
86
|
+
{"kind": "fn", "name": "receiveString", "js_doc": "", "def": "export function receiveString(s: string): string"}
|
|
87
|
+
{"kind": "fn", "name": "customStatusCode", "js_doc": "", "def": "export function customStatusCode(): void"}
|
|
88
|
+
{"kind": "fn", "name": "createExternal", "js_doc": "", "def": "export function createExternal(size: number): ExternalObject<number>"}
|
|
89
|
+
{"kind": "fn", "name": "createExternalString", "js_doc": "", "def": "export function createExternalString(content: string): ExternalObject<string>"}
|
|
90
|
+
{"kind": "fn", "name": "getExternal", "js_doc": "", "def": "export function getExternal(external: ExternalObject<number>): number"}
|
|
91
|
+
{"kind": "fn", "name": "mutateExternal", "js_doc": "", "def": "export function mutateExternal(external: ExternalObject<number>, newVal: number): void"}
|
|
92
|
+
{"kind": "fn", "name": "validateArray", "js_doc": "", "def": "export function validateArray(arr: Array<number>): number"}
|
|
93
|
+
{"kind": "fn", "name": "validateBuffer", "js_doc": "", "def": "export function validateBuffer(b: Buffer): number"}
|
|
94
|
+
{"kind": "fn", "name": "validateTypedArray", "js_doc": "", "def": "export function validateTypedArray(input: Uint8Array): number"}
|
|
95
|
+
{"kind": "fn", "name": "validateBigint", "js_doc": "", "def": "export function validateBigint(input: bigint): bigint"}
|
|
96
|
+
{"kind": "fn", "name": "validateBoolean", "js_doc": "", "def": "export function validateBoolean(i: boolean): boolean"}
|
|
97
|
+
{"kind": "fn", "name": "validateDate", "js_doc": "", "def": "export function validateDate(d: Date): number"}
|
|
98
|
+
{"kind": "fn", "name": "validateDateTime", "js_doc": "", "def": "export function validateDateTime(d: Date): number"}
|
|
99
|
+
{"kind": "fn", "name": "validateExternal", "js_doc": "", "def": "export function validateExternal(e: ExternalObject<number>): number"}
|
|
100
|
+
{"kind": "fn", "name": "validateFunction", "js_doc": "", "def": "export function validateFunction(cb: () => number): number"}
|
|
101
|
+
{"kind": "fn", "name": "validateHashMap", "js_doc": "", "def": "export function validateHashMap(input: Record<string, number>): number"}
|
|
102
|
+
{"kind": "fn", "name": "validateNull", "js_doc": "", "def": "export function validateNull(i: null): boolean"}
|
|
103
|
+
{"kind": "fn", "name": "validateUndefined", "js_doc": "", "def": "export function validateUndefined(i: undefined): boolean"}
|
|
104
|
+
{"kind": "fn", "name": "validateNumber", "js_doc": "", "def": "export function validateNumber(i: number): number"}
|
|
105
|
+
{"kind": "fn", "name": "validatePromise", "js_doc": "", "def": "export function validatePromise(p: Promise<number>): Promise<number>"}
|
|
106
|
+
{"kind": "fn", "name": "validateString", "js_doc": "", "def": "export function validateString(s: string): string"}
|
|
107
|
+
{"kind": "fn", "name": "validateSymbol", "js_doc": "", "def": "export function validateSymbol(s: symbol): boolean"}
|
|
108
|
+
{"kind": "fn", "name": "validateOptional", "js_doc": "", "def": "export function validateOptional(input1?: string | undefined | null, input2?: boolean | undefined | null): boolean"}
|
|
109
|
+
{"kind": "fn", "name": "returnUndefinedIfInvalid", "js_doc": "", "def": "export function returnUndefinedIfInvalid(input: boolean): boolean"}
|
|
110
|
+
{"kind": "fn", "name": "returnUndefinedIfInvalidPromise", "js_doc": "", "def": "export function returnUndefinedIfInvalidPromise(input: Promise<boolean>): Promise<boolean>"}
|
|
111
|
+
{"kind": "fn", "name": "tsRename", "js_doc": "", "def": "export function tsRename(a: { foo: number }): string[]"}
|
|
112
|
+
{"kind": "fn", "name": "overrideIndividualArgOnFunction", "js_doc": "", "def": "export function overrideIndividualArgOnFunction(notOverridden: string, f: () => string, notOverridden2: number): string"}
|
|
113
|
+
{"kind": "fn", "name": "overrideIndividualArgOnFunctionWithCbArg", "js_doc": "", "def": "export function overrideIndividualArgOnFunctionWithCbArg(callback: (town: string, name?: string | undefined | null) => string, notOverridden: number): object"}
|
|
114
|
+
{"kind": "struct", "name": "Fib", "js_doc": "", "def": "", "original_name": "Fib"}
|
|
115
|
+
{"kind": "impl", "name": "Fib", "js_doc": "", "def": "[Symbol.iterator](): Iterator<number, void, number>"}
|
|
116
|
+
{"kind": "impl", "name": "Fib", "js_doc": "", "def": " constructor()"}
|
|
117
|
+
{"kind": "struct", "name": "Fib2", "js_doc": "", "def": "", "original_name": "Fib2"}
|
|
118
|
+
{"kind": "impl", "name": "Fib2", "js_doc": "", "def": "[Symbol.iterator](): Iterator<number, void, number>"}
|
|
119
|
+
{"kind": "impl", "name": "Fib2", "js_doc": "", "def": "static create(seed: number): Fib2"}
|
|
120
|
+
{"kind": "struct", "name": "Fib3", "js_doc": "", "def": "current: number\nnext: number\nconstructor(current: number, next: number)", "original_name": "Fib3"}
|
|
121
|
+
{"kind": "impl", "name": "Fib3", "js_doc": "", "def": "[Symbol.iterator](): Iterator<number, void, number>"}
|
|
122
|
+
{"kind": "const", "name": "ALIGNMENT", "js_doc": "", "def": "export const ALIGNMENT: number", "original_name": "ALIGNMENT", "js_mod": "xxh3"}
|
|
123
|
+
{"kind": "fn", "name": "xxh3_64", "js_doc": "", "def": "export function xxh3_64(input: Buffer): bigint", "js_mod": "xxh3"}
|
|
124
|
+
{"kind": "fn", "name": "xxh128", "js_doc": "/** xxh128 function */\n", "def": "export function xxh128(input: Buffer): bigint", "js_mod": "xxh3"}
|
|
125
|
+
{"kind": "struct", "name": "Xxh3", "js_doc": "/** Xxh3 class */\n", "def": "", "original_name": "Xxh3", "js_mod": "xxh3"}
|
|
126
|
+
{"kind": "impl", "name": "Xxh3", "js_doc": "", "def": " constructor()\n/** update */\n update(input: Buffer): void\n digest(): bigint", "js_mod": "xxh3"}
|
|
127
|
+
{"kind": "fn", "name": "xxh2Plus", "js_doc": "", "def": "export function xxh2Plus(a: number, b: number): number", "js_mod": "xxh2"}
|
|
128
|
+
{"kind": "fn", "name": "xxh3Xxh64Alias", "js_doc": "", "def": "export function xxh3Xxh64Alias(input: Buffer): bigint", "js_mod": "xxh2"}
|
|
129
|
+
{"kind": "fn", "name": "xxh64Alias", "js_doc": "", "def": "export function xxh64Alias(input: Buffer): bigint"}
|
|
130
|
+
{"kind": "fn", "name": "getMapping", "js_doc": "", "def": "export function getMapping(): Record<string, number>"}
|
|
131
|
+
{"kind": "fn", "name": "sumMapping", "js_doc": "", "def": "export function sumMapping(nums: Record<string, number>): number"}
|
|
132
|
+
{"kind": "fn", "name": "mapOption", "js_doc": "", "def": "export function mapOption(val?: number | undefined | null): number | null"}
|
|
133
|
+
{"kind": "fn", "name": "returnNull", "js_doc": "", "def": "export function returnNull(): null"}
|
|
134
|
+
{"kind": "fn", "name": "returnUndefined", "js_doc": "", "def": "export function returnUndefined(): void"}
|
|
135
|
+
{"kind": "fn", "name": "add", "js_doc": "", "def": "export function add(a: number, b: number): number"}
|
|
136
|
+
{"kind": "fn", "name": "fibonacci", "js_doc": "", "def": "export function fibonacci(n: number): number"}
|
|
137
|
+
{"kind": "fn", "name": "listObjKeys", "js_doc": "", "def": "export function listObjKeys(obj: object): Array<string>"}
|
|
138
|
+
{"kind": "fn", "name": "createObj", "js_doc": "", "def": "export function createObj(): object"}
|
|
139
|
+
{"kind": "fn", "name": "getGlobal", "js_doc": "", "def": "export function getGlobal(): typeof global"}
|
|
140
|
+
{"kind": "fn", "name": "getUndefined", "js_doc": "", "def": "export function getUndefined(): void"}
|
|
141
|
+
{"kind": "fn", "name": "getNull", "js_doc": "", "def": "export function getNull(): null"}
|
|
142
|
+
{"kind": "interface", "name": "AllOptionalObject", "js_doc": "", "def": "name?: string\nage?: number", "original_name": "AllOptionalObject"}
|
|
143
|
+
{"kind": "fn", "name": "receiveAllOptionalObject", "js_doc": "", "def": "export function receiveAllOptionalObject(obj?: AllOptionalObject | undefined | null): void"}
|
|
144
|
+
{"kind": "enum", "name": "ALIAS", "js_doc": "", "def": "A = 0,\n B = 1", "original_name": "AliasedEnum"}
|
|
145
|
+
{"kind": "interface", "name": "AliasedStruct", "js_doc": "", "def": "a: ALIAS\nb: number", "original_name": "StructContainsAliasedEnum"}
|
|
146
|
+
{"kind": "fn", "name": "fnReceivedAliased", "js_doc": "", "def": "export function fnReceivedAliased(s: AliasedStruct, e: ALIAS): void"}
|
|
147
|
+
{"kind": "interface", "name": "StrictObject", "js_doc": "", "def": "name: string", "original_name": "StrictObject"}
|
|
148
|
+
{"kind": "fn", "name": "receiveStrictObject", "js_doc": "", "def": "export function receiveStrictObject(strictObject: StrictObject): void"}
|
|
149
|
+
{"kind": "fn", "name": "getStrFromObject", "js_doc": "", "def": "export function getStrFromObject(): void"}
|
|
150
|
+
{"kind": "interface", "name": "TsTypeChanged", "js_doc": "", "def": "typeOverride: object\ntypeOverrideOptional?: object", "original_name": "TsTypeChanged"}
|
|
151
|
+
{"kind": "fn", "name": "createObjWithProperty", "js_doc": "", "def": "export function createObjWithProperty(): { value: ArrayBuffer, get getter(): number }"}
|
|
152
|
+
{"kind": "fn", "name": "getterFromObj", "js_doc": "", "def": "export function getterFromObj(): number"}
|
|
153
|
+
{"kind": "interface", "name": "ObjectOnlyFromJs", "js_doc": "", "def": "count: number\ncallback: (err: Error | null, value: number) => any", "original_name": "ObjectOnlyFromJs"}
|
|
154
|
+
{"kind": "fn", "name": "receiveObjectOnlyFromJs", "js_doc": "", "def": "export function receiveObjectOnlyFromJs(obj: { count: number, callback: (err: Error | null, count: number) => void }): void"}
|
|
155
|
+
{"kind": "fn", "name": "asyncPlus100", "js_doc": "", "def": "export function asyncPlus100(p: Promise<number>): Promise<number>"}
|
|
156
|
+
{"kind": "struct", "name": "JsRepo", "js_doc": "", "def": "", "original_name": "JsRepo"}
|
|
157
|
+
{"kind": "impl", "name": "JsRepo", "js_doc": "", "def": " constructor(dir: string)\n remote(): JsRemote"}
|
|
158
|
+
{"kind": "struct", "name": "JsRemote", "js_doc": "", "def": "", "original_name": "JsRemote"}
|
|
159
|
+
{"kind": "impl", "name": "JsRemote", "js_doc": "", "def": " name(): string"}
|
|
160
|
+
{"kind": "struct", "name": "CssRuleList", "js_doc": "", "def": "", "original_name": "CSSRuleList"}
|
|
161
|
+
{"kind": "impl", "name": "CssRuleList", "js_doc": "", "def": " getRules(): Array<string>\nget parentStyleSheet(): CSSStyleSheet\nget name(): string | null"}
|
|
162
|
+
{"kind": "struct", "name": "CssStyleSheet", "js_doc": "", "def": "", "original_name": "CSSStyleSheet"}
|
|
163
|
+
{"kind": "struct", "name": "AnotherCssStyleSheet", "js_doc": "", "def": "", "original_name": "AnotherCSSStyleSheet"}
|
|
164
|
+
{"kind": "impl", "name": "AnotherCssStyleSheet", "js_doc": "", "def": "get rules(): CssRuleList"}
|
|
165
|
+
{"kind": "impl", "name": "CssStyleSheet", "js_doc": "", "def": " constructor(name: string, rules: Array<string>)\nget rules(): CssRuleList\n anotherCssStyleSheet(): AnotherCssStyleSheet"}
|
|
166
|
+
{"kind": "interface", "name": "PackageJson", "js_doc": "/** This is an interface for package.json */\n", "def": "name: string\n/** The version of the package */\nversion: string\ndependencies?: Record<string, any>\ndevDependencies?: Record<string, any>", "original_name": "PackageJson"}
|
|
167
|
+
{"kind": "fn", "name": "readPackageJson", "js_doc": "", "def": "export function readPackageJson(): PackageJson"}
|
|
168
|
+
{"kind": "fn", "name": "getPackageJsonName", "js_doc": "", "def": "export function getPackageJsonName(packageJson: PackageJson): string"}
|
|
169
|
+
{"kind": "fn", "name": "testSerdeRoundtrip", "js_doc": "", "def": "export function testSerdeRoundtrip(data: any): any"}
|
|
170
|
+
{"kind": "fn", "name": "contains", "js_doc": "", "def": "export function contains(source: string, target: string): boolean"}
|
|
171
|
+
{"kind": "fn", "name": "concatStr", "js_doc": "", "def": "export function concatStr(s: string): string"}
|
|
172
|
+
{"kind": "fn", "name": "concatUtf16", "js_doc": "", "def": "export function concatUtf16(s: string): string"}
|
|
173
|
+
{"kind": "fn", "name": "concatLatin1", "js_doc": "", "def": "export function concatLatin1(s: string): string"}
|
|
174
|
+
{"kind": "fn", "name": "roundtripStr", "js_doc": "", "def": "export function roundtripStr(s: string): string"}
|
|
175
|
+
{"kind": "fn", "name": "setSymbolInObj", "js_doc": "", "def": "export function setSymbolInObj(symbol: symbol): object"}
|
|
176
|
+
{"kind": "fn", "name": "createSymbol", "js_doc": "", "def": "export function createSymbol(): symbol"}
|
|
177
|
+
{"kind": "impl", "name": "DelaySum", "js_doc": "", "def": ""}
|
|
178
|
+
{"kind": "fn", "name": "withoutAbortController", "js_doc": "", "def": "export function withoutAbortController(a: number, b: number): Promise<number>"}
|
|
179
|
+
{"kind": "fn", "name": "withAbortController", "js_doc": "", "def": "export function withAbortController(a: number, b: number, signal: AbortSignal): Promise<number>"}
|
|
180
|
+
{"kind": "fn", "name": "callThreadsafeFunction", "js_doc": "", "def": "export function callThreadsafeFunction(callback: (...args: any[]) => any): void"}
|
|
181
|
+
{"kind": "fn", "name": "threadsafeFunctionThrowError", "js_doc": "", "def": "export function threadsafeFunctionThrowError(cb: (...args: any[]) => any): void"}
|
|
182
|
+
{"kind": "fn", "name": "threadsafeFunctionFatalMode", "js_doc": "", "def": "export function threadsafeFunctionFatalMode(cb: (...args: any[]) => any): void"}
|
|
183
|
+
{"kind": "fn", "name": "threadsafeFunctionFatalModeError", "js_doc": "", "def": "export function threadsafeFunctionFatalModeError(cb: (...args: any[]) => any): void"}
|
|
184
|
+
{"kind": "fn", "name": "threadsafeFunctionClosureCapture", "js_doc": "", "def": "export function threadsafeFunctionClosureCapture(func: (...args: any[]) => any): void"}
|
|
185
|
+
{"kind": "fn", "name": "tsfnCallWithCallback", "js_doc": "", "def": "export function tsfnCallWithCallback(func: (...args: any[]) => any): void"}
|
|
186
|
+
{"kind": "fn", "name": "tsfnAsyncCall", "js_doc": "", "def": "export function tsfnAsyncCall(func: (...args: any[]) => any): Promise<void>"}
|
|
187
|
+
{"kind": "fn", "name": "acceptThreadsafeFunction", "js_doc": "", "def": "export function acceptThreadsafeFunction(func: (err: Error | null, value: number) => any): void"}
|
|
188
|
+
{"kind": "fn", "name": "acceptThreadsafeFunctionFatal", "js_doc": "", "def": "export function acceptThreadsafeFunctionFatal(func: (value: number) => any): void"}
|
|
189
|
+
{"kind": "fn", "name": "acceptThreadsafeFunctionTupleArgs", "js_doc": "", "def": "export function acceptThreadsafeFunctionTupleArgs(func: (err: Error | null, arg0: number, arg1: boolean, arg2: string) => any): void"}
|
|
190
|
+
{"kind": "fn", "name": "getBuffer", "js_doc": "", "def": "export function getBuffer(): Buffer"}
|
|
191
|
+
{"kind": "fn", "name": "appendBuffer", "js_doc": "", "def": "export function appendBuffer(buf: Buffer): Buffer"}
|
|
192
|
+
{"kind": "fn", "name": "getEmptyBuffer", "js_doc": "", "def": "export function getEmptyBuffer(): Buffer"}
|
|
193
|
+
{"kind": "fn", "name": "convertU32Array", "js_doc": "", "def": "export function convertU32Array(input: Uint32Array): Array<number>"}
|
|
194
|
+
{"kind": "fn", "name": "createExternalTypedArray", "js_doc": "", "def": "export function createExternalTypedArray(): Uint32Array"}
|
|
195
|
+
{"kind": "fn", "name": "mutateTypedArray", "js_doc": "", "def": "export function mutateTypedArray(input: Float32Array): void"}
|
|
196
|
+
{"kind": "fn", "name": "derefUint8Array", "js_doc": "", "def": "export function derefUint8Array(a: Uint8Array, b: Uint8ClampedArray): number"}
|
|
197
|
+
{"kind": "fn", "name": "bufferPassThrough", "js_doc": "", "def": "export function bufferPassThrough(buf: Buffer): Promise<Buffer>"}
|
|
198
|
+
{"kind": "fn", "name": "arrayBufferPassThrough", "js_doc": "", "def": "export function arrayBufferPassThrough(buf: Uint8Array): Promise<Uint8Array>"}
|
|
199
|
+
{"kind": "impl", "name": "AsyncBuffer", "js_doc": "", "def": ""}
|
|
200
|
+
{"kind": "fn", "name": "asyncReduceBuffer", "js_doc": "", "def": "export function asyncReduceBuffer(buf: Buffer): Promise<number>"}
|
|
201
|
+
{"kind": "fn", "name": "runScript", "js_doc": "", "def": "export function runScript(script: string): unknown"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Snapshot report for `src/utils/__tests__/target.spec.ts`
|
|
2
|
+
|
|
3
|
+
The actual snapshot is saved in `target.spec.ts.snap`.
|
|
4
|
+
|
|
5
|
+
Generated by [AVA](https://avajs.dev).
|
|
6
|
+
|
|
7
|
+
## should parse triple correctly
|
|
8
|
+
|
|
9
|
+
> Snapshot 1
|
|
10
|
+
|
|
11
|
+
[
|
|
12
|
+
{
|
|
13
|
+
abi: null,
|
|
14
|
+
arch: 'arm64',
|
|
15
|
+
platform: 'darwin',
|
|
16
|
+
platformArchABI: 'darwin-arm64',
|
|
17
|
+
triple: 'aarch64-apple-darwin',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
abi: null,
|
|
21
|
+
arch: 'arm64',
|
|
22
|
+
platform: 'android',
|
|
23
|
+
platformArchABI: 'android-arm64',
|
|
24
|
+
triple: 'aarch64-linux-android',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
abi: 'gnu',
|
|
28
|
+
arch: 'arm64',
|
|
29
|
+
platform: 'linux',
|
|
30
|
+
platformArchABI: 'linux-arm64-gnu',
|
|
31
|
+
triple: 'aarch64-unknown-linux-gnu',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
abi: 'musl',
|
|
35
|
+
arch: 'arm64',
|
|
36
|
+
platform: 'linux',
|
|
37
|
+
platformArchABI: 'linux-arm64-musl',
|
|
38
|
+
triple: 'aarch64-unknown-linux-musl',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
abi: 'msvc',
|
|
42
|
+
arch: 'arm64',
|
|
43
|
+
platform: 'win32',
|
|
44
|
+
platformArchABI: 'win32-arm64-msvc',
|
|
45
|
+
triple: 'aarch64-pc-windows-msvc',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
abi: null,
|
|
49
|
+
arch: 'x64',
|
|
50
|
+
platform: 'darwin',
|
|
51
|
+
platformArchABI: 'darwin-x64',
|
|
52
|
+
triple: 'x86_64-apple-darwin',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
abi: 'msvc',
|
|
56
|
+
arch: 'x64',
|
|
57
|
+
platform: 'win32',
|
|
58
|
+
platformArchABI: 'win32-x64-msvc',
|
|
59
|
+
triple: 'x86_64-pc-windows-msvc',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
abi: 'gnu',
|
|
63
|
+
arch: 'x64',
|
|
64
|
+
platform: 'linux',
|
|
65
|
+
platformArchABI: 'linux-x64-gnu',
|
|
66
|
+
triple: 'x86_64-unknown-linux-gnu',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
abi: 'musl',
|
|
70
|
+
arch: 'x64',
|
|
71
|
+
platform: 'linux',
|
|
72
|
+
platformArchABI: 'linux-x64-musl',
|
|
73
|
+
triple: 'x86_64-unknown-linux-musl',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
abi: null,
|
|
77
|
+
arch: 'x64',
|
|
78
|
+
platform: 'freebsd',
|
|
79
|
+
platformArchABI: 'freebsd-x64',
|
|
80
|
+
triple: 'x86_64-unknown-freebsd',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
abi: 'msvc',
|
|
84
|
+
arch: 'ia32',
|
|
85
|
+
platform: 'win32',
|
|
86
|
+
platformArchABI: 'win32-ia32-msvc',
|
|
87
|
+
triple: 'i686-pc-windows-msvc',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
abi: 'gnueabihf',
|
|
91
|
+
arch: 'arm',
|
|
92
|
+
platform: 'linux',
|
|
93
|
+
platformArchABI: 'linux-arm-gnueabihf',
|
|
94
|
+
triple: 'armv7-unknown-linux-gnueabihf',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
abi: 'eabi',
|
|
98
|
+
arch: 'arm',
|
|
99
|
+
platform: 'android',
|
|
100
|
+
platformArchABI: 'android-arm-eabi',
|
|
101
|
+
triple: 'armv7-linux-androideabi',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
abi: null,
|
|
105
|
+
arch: 'universal',
|
|
106
|
+
platform: 'darwin',
|
|
107
|
+
platformArchABI: 'darwin-universal',
|
|
108
|
+
triple: 'universal-apple-darwin',
|
|
109
|
+
},
|
|
110
|
+
]
|
|
Binary file
|