@procedures/optional 0.0.0-stage → 0.62.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/CHANGELOG.md +29 -0
- package/LICENSE +21 -0
- package/README.md +68 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.d.ts +3 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +1620 -0
- package/dist/manifest.js.map +1 -0
- package/dist/module.d.ts +19 -0
- package/dist/module.d.ts.map +1 -0
- package/dist/module.js +23 -0
- package/dist/module.js.map +1 -0
- package/dist/register.d.ts +6 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +8 -0
- package/dist/register.js.map +1 -0
- package/package.json +86 -3
- package/src/index.ts +2 -0
- package/src/manifest.ts +1622 -0
- package/src/module.ts +27 -0
- package/src/register.ts +10 -0
package/src/module.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The procedures of `@mark1russell7/optional` as data. An import of this file registers nothing.
|
|
3
|
+
*
|
|
4
|
+
* The manifest comes from the types of the home: `node scripts/wraps.ts generate` writes
|
|
5
|
+
* `src/manifest.ts`. No procedure is written by hand, so no procedure can drift from its function.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as optional from "@mark1russell7/optional";
|
|
9
|
+
import { registerModules, PROCEDURE_REGISTRY, type ProcedureModule, type ProcedureRegistry } from "@procedures/client";
|
|
10
|
+
import { exportsModule } from "@procedures/compiler";
|
|
11
|
+
import { manifest } from "./manifest.js";
|
|
12
|
+
|
|
13
|
+
/** The manifest of the procedures: the names, the schemas, the effects and each exemption with its reason. */
|
|
14
|
+
export { manifest as optionalManifest };
|
|
15
|
+
|
|
16
|
+
/** The procedures `optional.*`: one for each function of the home with JSON inputs and a JSON output. */
|
|
17
|
+
export const optionalModule: ProcedureModule = exportsModule(manifest, optional, { name: "@procedures/optional" });
|
|
18
|
+
|
|
19
|
+
export default optionalModule;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* This function registers the procedures of `@procedures/optional` in a registry. The default is
|
|
23
|
+
* the global registry.
|
|
24
|
+
*/
|
|
25
|
+
export function registerOptionalProcedures(registry: ProcedureRegistry = PROCEDURE_REGISTRY): void {
|
|
26
|
+
registerModules(registry, [optionalModule]);
|
|
27
|
+
}
|
package/src/register.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Importing this file registers the procedures of @procedures/optional in the global registry:
|
|
3
|
+
* `import "@procedures/optional/register"`. The package root registers nothing.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { registerOptionalProcedures } from "./module.js";
|
|
7
|
+
|
|
8
|
+
export * from "./module.js";
|
|
9
|
+
|
|
10
|
+
registerOptionalProcedures();
|