@lite31/invoice-vat 0.0.0-stage → 0.1.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.
Files changed (43) hide show
  1. package/README.md +4 -2
  2. package/interfaces/exports.d.ts +100 -0
  3. package/invoice_vat.core.wasm +0 -0
  4. package/invoice_vat.core10.wasm +0 -0
  5. package/invoice_vat.core11.wasm +0 -0
  6. package/invoice_vat.core12.wasm +0 -0
  7. package/invoice_vat.core13.wasm +0 -0
  8. package/invoice_vat.core14.wasm +0 -0
  9. package/invoice_vat.core15.wasm +0 -0
  10. package/invoice_vat.core16.wasm +0 -0
  11. package/invoice_vat.core17.wasm +0 -0
  12. package/invoice_vat.core18.wasm +0 -0
  13. package/invoice_vat.core19.wasm +0 -0
  14. package/invoice_vat.core2.wasm +0 -0
  15. package/invoice_vat.core20.wasm +0 -0
  16. package/invoice_vat.core21.wasm +0 -0
  17. package/invoice_vat.core22.wasm +0 -0
  18. package/invoice_vat.core23.wasm +0 -0
  19. package/invoice_vat.core24.wasm +0 -0
  20. package/invoice_vat.core25.wasm +0 -0
  21. package/invoice_vat.core26.wasm +0 -0
  22. package/invoice_vat.core27.wasm +0 -0
  23. package/invoice_vat.core28.wasm +0 -0
  24. package/invoice_vat.core29.wasm +0 -0
  25. package/invoice_vat.core3.wasm +0 -0
  26. package/invoice_vat.core30.wasm +0 -0
  27. package/invoice_vat.core31.wasm +0 -0
  28. package/invoice_vat.core32.wasm +0 -0
  29. package/invoice_vat.core33.wasm +0 -0
  30. package/invoice_vat.core34.wasm +0 -0
  31. package/invoice_vat.core35.wasm +0 -0
  32. package/invoice_vat.core36.wasm +0 -0
  33. package/invoice_vat.core37.wasm +0 -0
  34. package/invoice_vat.core38.wasm +0 -0
  35. package/invoice_vat.core4.wasm +0 -0
  36. package/invoice_vat.core5.wasm +0 -0
  37. package/invoice_vat.core6.wasm +0 -0
  38. package/invoice_vat.core7.wasm +0 -0
  39. package/invoice_vat.core8.wasm +0 -0
  40. package/invoice_vat.core9.wasm +0 -0
  41. package/invoice_vat.d.ts +63 -0
  42. package/invoice_vat.js +7009 -0
  43. package/package.json +8 -4
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
- # Temporary Holding Version
1
+ # @lite31/invoice-vat
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `invoice_vat.js` is `jco` 1.40.0 instantiation-mode output for a `componentize-py` 0.25.1 component built with `--stub-wasi`. Its URL-loading fallback was removed, so callers must pass `getCoreModule` and supply every `invoice_vat.core*.wasm` module compiled ahead of time. The component imports nothing and exports `calculate(net: string, rate: string) -> string`.
4
+
5
+ This package exists only to test an Executor worker. It has no support or compatibility promise.
@@ -0,0 +1,100 @@
1
+ /** @module Interface exports **/
2
+ export function init(appName: string, symbols: Symbols, stubWasi: boolean): void;
3
+ export interface Function {
4
+ protocol: string,
5
+ name: string,
6
+ }
7
+ export interface Constructor {
8
+ module: string,
9
+ protocol: string,
10
+ }
11
+ export interface Static {
12
+ module: string,
13
+ protocol: string,
14
+ name: string,
15
+ }
16
+ export type FunctionExportKind = FunctionExportKindFreestanding | FunctionExportKindConstructor | FunctionExportKindMethod | FunctionExportKindStatic;
17
+ export interface FunctionExportKindFreestanding {
18
+ tag: 'freestanding',
19
+ val: Function,
20
+ }
21
+ export interface FunctionExportKindConstructor {
22
+ tag: 'constructor',
23
+ val: Constructor,
24
+ }
25
+ export interface FunctionExportKindMethod {
26
+ tag: 'method',
27
+ val: string,
28
+ }
29
+ export interface FunctionExportKindStatic {
30
+ tag: 'static',
31
+ val: Static,
32
+ }
33
+ export type ReturnStyle = ReturnStyleNone | ReturnStyleNormal | ReturnStyleResult;
34
+ export interface ReturnStyleNone {
35
+ tag: 'none',
36
+ }
37
+ export interface ReturnStyleNormal {
38
+ tag: 'normal',
39
+ }
40
+ export interface ReturnStyleResult {
41
+ tag: 'result',
42
+ }
43
+ export interface FunctionExport {
44
+ kind: FunctionExportKind,
45
+ returnStyle: ReturnStyle,
46
+ }
47
+ export interface Resource {
48
+ "package": string,
49
+ name: string,
50
+ }
51
+ export interface Record {
52
+ "package": string,
53
+ name: string,
54
+ fields: Array<string>,
55
+ }
56
+ export interface Flags {
57
+ "package": string,
58
+ name: string,
59
+ u32Count: number,
60
+ }
61
+ export interface Tuple {
62
+ count: number,
63
+ }
64
+ export interface Case {
65
+ name: string,
66
+ hasPayload: boolean,
67
+ }
68
+ export interface Variant {
69
+ "package": string,
70
+ name: string,
71
+ cases: Array<Case>,
72
+ }
73
+ export interface Enum {
74
+ "package": string,
75
+ name: string,
76
+ count: number,
77
+ }
78
+ /**
79
+ * # Variants
80
+ *
81
+ * ## `"non-nesting"`
82
+ *
83
+ * ## `"nesting"`
84
+ */
85
+ export type OptionKind = "non-nesting" | "nesting";
86
+ export interface ResultRecord {
87
+ hasOk: boolean,
88
+ hasErr: boolean,
89
+ }
90
+ export interface Symbols {
91
+ exports: Array<FunctionExport>,
92
+ resources: Array<Resource>,
93
+ records: Array<Record>,
94
+ flags: Array<Flags>,
95
+ tuples: Array<Tuple>,
96
+ variants: Array<Variant>,
97
+ enums: Array<Enum>,
98
+ options: Array<OptionKind>,
99
+ results: Array<ResultRecord>,
100
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,63 @@
1
+ // world root:component/root
2
+ import type * as Exports from './interfaces/exports.js'; // exports
3
+ export interface ImportObject {
4
+ }
5
+ export interface Root {
6
+ exports: typeof Exports,
7
+ calculate(net: string, rate: string): string,
8
+ }
9
+
10
+ /**
11
+ * Options accepted by `instantiate`.
12
+ */
13
+ export interface InstantiateOptions {
14
+ /** Runtime overrides for this instance. */
15
+ shim?: {
16
+ /** Platform globals used instead of those on `globalThis`. */
17
+ globals?: {
18
+ /**
19
+ * The WebAssembly implementation used by this instance,
20
+ * including by the default `instantiateCore`. Defaults to
21
+ * `globalThis.WebAssembly`.
22
+ */
23
+ WebAssembly?: typeof WebAssembly;
24
+ };
25
+ };
26
+ }
27
+
28
+
29
+ /**
30
+ * Instantiates this component with the provided imports and
31
+ * returns a map of all the exports of the component.
32
+ *
33
+ * This function is intended to be similar to the
34
+ * `WebAssembly.Instantiate` constructor. The second `imports`
35
+ * argument is the "import object" for wasm, except here it
36
+ * uses component-model-layer types instead of core wasm
37
+ * integers/numbers/etc.
38
+ *
39
+ * The first argument to this function, `getCoreModule`, is
40
+ * used to compile core wasm modules within the component.
41
+ * Components are composed of core wasm modules and this callback
42
+ * will be invoked per core wasm module. The caller of this
43
+ * function is responsible for reading the core wasm module
44
+ * identified by `path` and returning its compiled
45
+ * `WebAssembly.Module` object. This would use the
46
+ * `WebAssembly.Module` constructor on the web, for example.
47
+ *
48
+ * The optional `options` argument configures instantiation; see
49
+ * `InstantiateOptions`.
50
+ */
51
+ export function instantiate(
52
+ getCoreModule: (path: string) => WebAssembly.Module,
53
+ imports: ImportObject,
54
+ instantiateCore?: (module: WebAssembly.Module, imports: Record<string, any>) => WebAssembly.Instance,
55
+ options?: InstantiateOptions
56
+ ): Root;
57
+ export function instantiate(
58
+ getCoreModule: (path: string) => WebAssembly.Module | Promise<WebAssembly.Module>,
59
+ imports: ImportObject,
60
+ instantiateCore?: (module: WebAssembly.Module, imports: Record<string, any>) => WebAssembly.Instance | Promise<WebAssembly.Instance>,
61
+ options?: InstantiateOptions
62
+ ): Root | Promise<Root>;
63
+