@opalesce/core 0.0.0 → 0.0.1
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/LICENSE +21 -0
- package/README.md +16 -12
- package/package.json +2 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Max Sharov
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ The CLI discovers the config, reads the input, calls `run` once, and writes succ
|
|
|
42
42
|
Call `run` explicitly when another program already owns input loading and artifact persistence:
|
|
43
43
|
|
|
44
44
|
```ts
|
|
45
|
-
import {
|
|
45
|
+
import { defineConfig, definePlugin, run, type Input } from "@opalesce/core";
|
|
46
46
|
|
|
47
47
|
const input = {
|
|
48
48
|
asyncapi: "3.1.0",
|
|
@@ -62,7 +62,7 @@ const versionFile = definePlugin((options: { readonly path: string }) => ({
|
|
|
62
62
|
},
|
|
63
63
|
}));
|
|
64
64
|
|
|
65
|
-
const config =
|
|
65
|
+
const config = defineConfig({
|
|
66
66
|
input,
|
|
67
67
|
plugins: [versionFile({ path: "metadata/version.txt" })],
|
|
68
68
|
});
|
|
@@ -233,7 +233,7 @@ These failures use `PluginConfigurationError` and occur before Core parses the i
|
|
|
233
233
|
Service tokens allow one plugin to provide a typed in-memory capability to another plugin without adding untyped fields to a global context.
|
|
234
234
|
|
|
235
235
|
```ts
|
|
236
|
-
import { createServiceToken,
|
|
236
|
+
import { createServiceToken, defineConfig, definePlugin, run } from "@opalesce/core";
|
|
237
237
|
|
|
238
238
|
interface DocumentInfo {
|
|
239
239
|
readonly asyncapiVersion: string;
|
|
@@ -264,7 +264,7 @@ const documentInfoFile = definePlugin(() => ({
|
|
|
264
264
|
}));
|
|
265
265
|
|
|
266
266
|
const result = await run(
|
|
267
|
-
|
|
267
|
+
defineConfig({
|
|
268
268
|
input,
|
|
269
269
|
plugins: [documentInfoFile(), documentInfoProvider()],
|
|
270
270
|
}),
|
|
@@ -320,8 +320,12 @@ Core returns artifacts but does not write them. A facade or storage layer owns o
|
|
|
320
320
|
## Error Handling
|
|
321
321
|
|
|
322
322
|
```ts
|
|
323
|
-
import {
|
|
324
|
-
|
|
323
|
+
import {
|
|
324
|
+
AsyncAPIParseError,
|
|
325
|
+
PluginConfigurationError,
|
|
326
|
+
PluginExecutionError,
|
|
327
|
+
run,
|
|
328
|
+
} from "@opalesce/core";
|
|
325
329
|
|
|
326
330
|
try {
|
|
327
331
|
await run(config);
|
|
@@ -398,11 +402,11 @@ The workspace pins pnpm through the root `packageManager` field. For manual setu
|
|
|
398
402
|
|
|
399
403
|
## Stack
|
|
400
404
|
|
|
401
|
-
| Area | Version source files
|
|
402
|
-
| ----------------------------------------- |
|
|
403
|
-
| Runtime dependencies and package metadata | [`package.json`](./package.json)
|
|
404
|
-
| Development environment | [`../../flake.nix`](../../flake.nix)
|
|
405
|
-
| Workspace command aliases | [`../../justfile`](../../justfile)
|
|
405
|
+
| Area | Version source files |
|
|
406
|
+
| ----------------------------------------- | ------------------------------------ |
|
|
407
|
+
| Runtime dependencies and package metadata | [`package.json`](./package.json) |
|
|
408
|
+
| Development environment | [`../../flake.nix`](../../flake.nix) |
|
|
409
|
+
| Workspace command aliases | [`../../justfile`](../../justfile) |
|
|
406
410
|
|
|
407
411
|
## Development Commands
|
|
408
412
|
|
|
@@ -421,4 +425,4 @@ The package tests cover parser option forwarding, lifecycle ordering, dependency
|
|
|
421
425
|
|
|
422
426
|
## License
|
|
423
427
|
|
|
424
|
-
|
|
428
|
+
Licensed under the [MIT License](./LICENSE).
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opalesce/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.1",
|
|
4
4
|
"description": "AsyncAPI parsing and plugin orchestration engine for Opalesce",
|
|
5
|
+
"license": "MIT",
|
|
5
6
|
"repository": {
|
|
6
7
|
"type": "git",
|
|
7
8
|
"url": "git+https://github.com/ravecat/opalesce.git",
|