@moyarich/console-addon-session 0.0.0-stage → 0.2.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 +38 -2
- package/dist/index.cjs +130 -0
- package/dist/index.d.cts +40 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +130 -0
- package/package.json +59 -4
package/README.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @moyarich/console-addon-session
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Save and restore Console sessions. Work with versioned snapshots of structured messages and terminal entries, including dropped-history counts.
|
|
4
|
+
|
|
5
|
+
[Documentation and live examples](https://moyarich.github.io/console/)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @moyarich/console @moyarich/console-addon-session
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Configure the `@moyarich` scope and authenticate with GitHub Packages as described in the [installation guide](../../../README.md#installation).
|
|
14
|
+
|
|
15
|
+
Required peer dependencies: `@moyarich/console@^0.2.0`.
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { Console } from "@moyarich/console";
|
|
21
|
+
import { createConsoleSessionAddon } from "@moyarich/console-addon-session";
|
|
22
|
+
|
|
23
|
+
const addons = [createConsoleSessionAddon()];
|
|
24
|
+
|
|
25
|
+
// Pass your application's structured messages to Console.
|
|
26
|
+
<Console messages={messages} addons={addons} />;
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
The addon is optional and can be combined with other Console addons. The host application remains responsible for supplying and retaining messages.
|
|
30
|
+
|
|
31
|
+
## Learn more
|
|
32
|
+
|
|
33
|
+
Explore [runnable package examples](./examples) and the [Console documentation](https://moyarich.github.io/console/) for available settings and integration patterns.
|
|
34
|
+
|
|
35
|
+
Review the [changelog](./CHANGELOG.md) for changes by version and [package metadata](./package.json) for dependency requirements.
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
MIT
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const console = require("@moyarich/console");
|
|
4
|
+
const CONSOLE_SESSION_TYPE = "MOYARICH_CONSOLE_SESSION";
|
|
5
|
+
const CONSOLE_SESSION_VERSION = 1;
|
|
6
|
+
function createConsoleSession(input) {
|
|
7
|
+
const droppedCount = input.droppedCount ?? 0;
|
|
8
|
+
if (!Number.isSafeInteger(droppedCount) || droppedCount < 0)
|
|
9
|
+
throw new RangeError("Invalid droppedCount");
|
|
10
|
+
return input.mode === "console" ? {
|
|
11
|
+
type: CONSOLE_SESSION_TYPE,
|
|
12
|
+
version: CONSOLE_SESSION_VERSION,
|
|
13
|
+
mode: "console",
|
|
14
|
+
droppedCount,
|
|
15
|
+
messages: input.messages.map(console.serializeConsoleMessage)
|
|
16
|
+
} : {
|
|
17
|
+
type: CONSOLE_SESSION_TYPE,
|
|
18
|
+
version: CONSOLE_SESSION_VERSION,
|
|
19
|
+
mode: "terminal",
|
|
20
|
+
droppedCount,
|
|
21
|
+
entries: input.entries.map(
|
|
22
|
+
(entry) => typeof entry === "string" ? entry : {
|
|
23
|
+
data: entry.data,
|
|
24
|
+
...entry.id !== void 0 ? { id: entry.id } : {},
|
|
25
|
+
...entry.stream !== void 0 ? { stream: entry.stream } : {},
|
|
26
|
+
...entry.metadata !== void 0 ? {
|
|
27
|
+
metadata: console.serializeConsoleValue(entry.metadata)
|
|
28
|
+
} : {}
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function stringifyConsoleSession(session) {
|
|
34
|
+
return JSON.stringify(session);
|
|
35
|
+
}
|
|
36
|
+
function parseConsoleSession(serialized) {
|
|
37
|
+
const input = typeof serialized === "string" ? JSON.parse(serialized) : serialized;
|
|
38
|
+
if (!input || typeof input !== "object")
|
|
39
|
+
throw new TypeError("Invalid console session");
|
|
40
|
+
const record = input;
|
|
41
|
+
if (record.type !== CONSOLE_SESSION_TYPE)
|
|
42
|
+
throw new TypeError("Invalid console session type");
|
|
43
|
+
if (record.version !== CONSOLE_SESSION_VERSION)
|
|
44
|
+
throw new RangeError("Unsupported console session version");
|
|
45
|
+
if (!Number.isSafeInteger(record.droppedCount) || record.droppedCount < 0)
|
|
46
|
+
throw new TypeError("Invalid dropped history");
|
|
47
|
+
if (record.mode === "console") {
|
|
48
|
+
if (!Array.isArray(record.messages))
|
|
49
|
+
throw new TypeError("Missing console messages");
|
|
50
|
+
for (const message of record.messages) {
|
|
51
|
+
if (!message || typeof message !== "object" || typeof message.method !== "string" || !Array.isArray(message.data) || !Number.isSafeInteger(message.depth) || message.depth < 0)
|
|
52
|
+
throw new TypeError("Invalid console message");
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
type: CONSOLE_SESSION_TYPE,
|
|
56
|
+
version: 1,
|
|
57
|
+
mode: "console",
|
|
58
|
+
droppedCount: record.droppedCount,
|
|
59
|
+
messages: record.messages.map(console.deserializeConsoleMessage)
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
if (record.mode === "terminal") {
|
|
63
|
+
if (!Array.isArray(record.entries) || !record.entries.every(
|
|
64
|
+
(entry) => typeof entry === "string" || entry && typeof entry === "object" && typeof entry.data === "string" && (entry.id === void 0 || typeof entry.id === "string") && (entry.stream === void 0 || entry.stream === "stdout" || entry.stream === "stderr") && (entry.metadata === void 0 || entry.metadata !== null && typeof entry.metadata === "object" && !Array.isArray(entry.metadata))
|
|
65
|
+
))
|
|
66
|
+
throw new TypeError("Invalid terminal entries");
|
|
67
|
+
return {
|
|
68
|
+
type: CONSOLE_SESSION_TYPE,
|
|
69
|
+
version: 1,
|
|
70
|
+
mode: "terminal",
|
|
71
|
+
droppedCount: record.droppedCount,
|
|
72
|
+
entries: record.entries.map(
|
|
73
|
+
(entry) => typeof entry === "string" ? entry : {
|
|
74
|
+
...entry,
|
|
75
|
+
...entry.metadata !== void 0 ? {
|
|
76
|
+
metadata: console.deserializeConsoleValue(entry.metadata)
|
|
77
|
+
} : {}
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
throw new TypeError("Unsupported console session mode");
|
|
83
|
+
}
|
|
84
|
+
const CONSOLE_SESSION_ADDON_ID = "@moyarich/console-addon-session";
|
|
85
|
+
const consoleSessionService = console.createConsoleServiceToken(
|
|
86
|
+
CONSOLE_SESSION_ADDON_ID + ".service"
|
|
87
|
+
);
|
|
88
|
+
function createConsoleSessionAddon() {
|
|
89
|
+
let data;
|
|
90
|
+
const service = {
|
|
91
|
+
capture(droppedCount = 0) {
|
|
92
|
+
const snapshot = data?.getSnapshot();
|
|
93
|
+
if (!snapshot) throw new Error("Console session addon is not active");
|
|
94
|
+
return snapshot.mode === "console" ? createConsoleSession({
|
|
95
|
+
mode: "console",
|
|
96
|
+
messages: snapshot.all,
|
|
97
|
+
droppedCount
|
|
98
|
+
}) : createConsoleSession({
|
|
99
|
+
mode: "terminal",
|
|
100
|
+
entries: snapshot.rawEntries,
|
|
101
|
+
droppedCount
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
save(droppedCount = 0) {
|
|
105
|
+
return stringifyConsoleSession(service.capture(droppedCount));
|
|
106
|
+
},
|
|
107
|
+
restore(serialized) {
|
|
108
|
+
return parseConsoleSession(serialized);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
id: CONSOLE_SESSION_ADDON_ID,
|
|
113
|
+
service,
|
|
114
|
+
activate(host) {
|
|
115
|
+
data = host.services.get(console.consoleServices.data);
|
|
116
|
+
host.services.provide(consoleSessionService, service);
|
|
117
|
+
return () => {
|
|
118
|
+
data = void 0;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
exports.CONSOLE_SESSION_ADDON_ID = CONSOLE_SESSION_ADDON_ID;
|
|
124
|
+
exports.CONSOLE_SESSION_TYPE = CONSOLE_SESSION_TYPE;
|
|
125
|
+
exports.CONSOLE_SESSION_VERSION = CONSOLE_SESSION_VERSION;
|
|
126
|
+
exports.consoleSessionService = consoleSessionService;
|
|
127
|
+
exports.createConsoleSession = createConsoleSession;
|
|
128
|
+
exports.createConsoleSessionAddon = createConsoleSessionAddon;
|
|
129
|
+
exports.parseConsoleSession = parseConsoleSession;
|
|
130
|
+
exports.stringifyConsoleSession = stringifyConsoleSession;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ConsoleAddon } from "@moyarich/console";
|
|
2
|
+
import { type ConsoleMessageData, type ConsoleStdoutEntry } from "@moyarich/console";
|
|
3
|
+
export declare const CONSOLE_SESSION_TYPE: "MOYARICH_CONSOLE_SESSION";
|
|
4
|
+
export declare const CONSOLE_SESSION_VERSION: 1;
|
|
5
|
+
export type ConsoleSession = {
|
|
6
|
+
readonly type: typeof CONSOLE_SESSION_TYPE;
|
|
7
|
+
readonly version: 1;
|
|
8
|
+
readonly mode: "console";
|
|
9
|
+
readonly messages: readonly ConsoleMessageData[];
|
|
10
|
+
readonly droppedCount: number;
|
|
11
|
+
} | {
|
|
12
|
+
readonly type: typeof CONSOLE_SESSION_TYPE;
|
|
13
|
+
readonly version: 1;
|
|
14
|
+
readonly mode: "terminal";
|
|
15
|
+
readonly entries: readonly (ConsoleStdoutEntry | string)[];
|
|
16
|
+
readonly droppedCount: number;
|
|
17
|
+
};
|
|
18
|
+
export declare function createConsoleSession(input: {
|
|
19
|
+
mode: "console";
|
|
20
|
+
messages: readonly ConsoleMessageData[];
|
|
21
|
+
droppedCount?: number;
|
|
22
|
+
} | {
|
|
23
|
+
mode: "terminal";
|
|
24
|
+
entries: readonly (ConsoleStdoutEntry | string)[];
|
|
25
|
+
droppedCount?: number;
|
|
26
|
+
}): ConsoleSession;
|
|
27
|
+
export declare function stringifyConsoleSession(session: ConsoleSession): string;
|
|
28
|
+
export declare function parseConsoleSession(serialized: string | unknown): ConsoleSession;
|
|
29
|
+
/** Read-only session snapshot facade exposed while the addon is active. */
|
|
30
|
+
export interface ConsoleSessionService {
|
|
31
|
+
capture(droppedCount?: number): ConsoleSession;
|
|
32
|
+
save(droppedCount?: number): string;
|
|
33
|
+
restore(serialized: string): ConsoleSession;
|
|
34
|
+
}
|
|
35
|
+
export declare const CONSOLE_SESSION_ADDON_ID = "@moyarich/console-addon-session";
|
|
36
|
+
export declare const consoleSessionService: import("@moyarich/console-core").ConsoleServiceToken<ConsoleSessionService>;
|
|
37
|
+
/** The host owns applying a restored session to source messages; the addon never mutates capture state. */
|
|
38
|
+
export declare function createConsoleSessionAddon(): ConsoleAddon & {
|
|
39
|
+
service: ConsoleSessionService;
|
|
40
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ConsoleAddon } from "@moyarich/console";
|
|
2
|
+
import { type ConsoleMessageData, type ConsoleStdoutEntry } from "@moyarich/console";
|
|
3
|
+
export declare const CONSOLE_SESSION_TYPE: "MOYARICH_CONSOLE_SESSION";
|
|
4
|
+
export declare const CONSOLE_SESSION_VERSION: 1;
|
|
5
|
+
export type ConsoleSession = {
|
|
6
|
+
readonly type: typeof CONSOLE_SESSION_TYPE;
|
|
7
|
+
readonly version: 1;
|
|
8
|
+
readonly mode: "console";
|
|
9
|
+
readonly messages: readonly ConsoleMessageData[];
|
|
10
|
+
readonly droppedCount: number;
|
|
11
|
+
} | {
|
|
12
|
+
readonly type: typeof CONSOLE_SESSION_TYPE;
|
|
13
|
+
readonly version: 1;
|
|
14
|
+
readonly mode: "terminal";
|
|
15
|
+
readonly entries: readonly (ConsoleStdoutEntry | string)[];
|
|
16
|
+
readonly droppedCount: number;
|
|
17
|
+
};
|
|
18
|
+
export declare function createConsoleSession(input: {
|
|
19
|
+
mode: "console";
|
|
20
|
+
messages: readonly ConsoleMessageData[];
|
|
21
|
+
droppedCount?: number;
|
|
22
|
+
} | {
|
|
23
|
+
mode: "terminal";
|
|
24
|
+
entries: readonly (ConsoleStdoutEntry | string)[];
|
|
25
|
+
droppedCount?: number;
|
|
26
|
+
}): ConsoleSession;
|
|
27
|
+
export declare function stringifyConsoleSession(session: ConsoleSession): string;
|
|
28
|
+
export declare function parseConsoleSession(serialized: string | unknown): ConsoleSession;
|
|
29
|
+
/** Read-only session snapshot facade exposed while the addon is active. */
|
|
30
|
+
export interface ConsoleSessionService {
|
|
31
|
+
capture(droppedCount?: number): ConsoleSession;
|
|
32
|
+
save(droppedCount?: number): string;
|
|
33
|
+
restore(serialized: string): ConsoleSession;
|
|
34
|
+
}
|
|
35
|
+
export declare const CONSOLE_SESSION_ADDON_ID = "@moyarich/console-addon-session";
|
|
36
|
+
export declare const consoleSessionService: import("@moyarich/console-core").ConsoleServiceToken<ConsoleSessionService>;
|
|
37
|
+
/** The host owns applying a restored session to source messages; the addon never mutates capture state. */
|
|
38
|
+
export declare function createConsoleSessionAddon(): ConsoleAddon & {
|
|
39
|
+
service: ConsoleSessionService;
|
|
40
|
+
};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { createConsoleServiceToken, serializeConsoleMessage, serializeConsoleValue, deserializeConsoleMessage, deserializeConsoleValue, consoleServices } from "@moyarich/console";
|
|
2
|
+
const CONSOLE_SESSION_TYPE = "MOYARICH_CONSOLE_SESSION";
|
|
3
|
+
const CONSOLE_SESSION_VERSION = 1;
|
|
4
|
+
function createConsoleSession(input) {
|
|
5
|
+
const droppedCount = input.droppedCount ?? 0;
|
|
6
|
+
if (!Number.isSafeInteger(droppedCount) || droppedCount < 0)
|
|
7
|
+
throw new RangeError("Invalid droppedCount");
|
|
8
|
+
return input.mode === "console" ? {
|
|
9
|
+
type: CONSOLE_SESSION_TYPE,
|
|
10
|
+
version: CONSOLE_SESSION_VERSION,
|
|
11
|
+
mode: "console",
|
|
12
|
+
droppedCount,
|
|
13
|
+
messages: input.messages.map(serializeConsoleMessage)
|
|
14
|
+
} : {
|
|
15
|
+
type: CONSOLE_SESSION_TYPE,
|
|
16
|
+
version: CONSOLE_SESSION_VERSION,
|
|
17
|
+
mode: "terminal",
|
|
18
|
+
droppedCount,
|
|
19
|
+
entries: input.entries.map(
|
|
20
|
+
(entry) => typeof entry === "string" ? entry : {
|
|
21
|
+
data: entry.data,
|
|
22
|
+
...entry.id !== void 0 ? { id: entry.id } : {},
|
|
23
|
+
...entry.stream !== void 0 ? { stream: entry.stream } : {},
|
|
24
|
+
...entry.metadata !== void 0 ? {
|
|
25
|
+
metadata: serializeConsoleValue(entry.metadata)
|
|
26
|
+
} : {}
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function stringifyConsoleSession(session) {
|
|
32
|
+
return JSON.stringify(session);
|
|
33
|
+
}
|
|
34
|
+
function parseConsoleSession(serialized) {
|
|
35
|
+
const input = typeof serialized === "string" ? JSON.parse(serialized) : serialized;
|
|
36
|
+
if (!input || typeof input !== "object")
|
|
37
|
+
throw new TypeError("Invalid console session");
|
|
38
|
+
const record = input;
|
|
39
|
+
if (record.type !== CONSOLE_SESSION_TYPE)
|
|
40
|
+
throw new TypeError("Invalid console session type");
|
|
41
|
+
if (record.version !== CONSOLE_SESSION_VERSION)
|
|
42
|
+
throw new RangeError("Unsupported console session version");
|
|
43
|
+
if (!Number.isSafeInteger(record.droppedCount) || record.droppedCount < 0)
|
|
44
|
+
throw new TypeError("Invalid dropped history");
|
|
45
|
+
if (record.mode === "console") {
|
|
46
|
+
if (!Array.isArray(record.messages))
|
|
47
|
+
throw new TypeError("Missing console messages");
|
|
48
|
+
for (const message of record.messages) {
|
|
49
|
+
if (!message || typeof message !== "object" || typeof message.method !== "string" || !Array.isArray(message.data) || !Number.isSafeInteger(message.depth) || message.depth < 0)
|
|
50
|
+
throw new TypeError("Invalid console message");
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
type: CONSOLE_SESSION_TYPE,
|
|
54
|
+
version: 1,
|
|
55
|
+
mode: "console",
|
|
56
|
+
droppedCount: record.droppedCount,
|
|
57
|
+
messages: record.messages.map(deserializeConsoleMessage)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
if (record.mode === "terminal") {
|
|
61
|
+
if (!Array.isArray(record.entries) || !record.entries.every(
|
|
62
|
+
(entry) => typeof entry === "string" || entry && typeof entry === "object" && typeof entry.data === "string" && (entry.id === void 0 || typeof entry.id === "string") && (entry.stream === void 0 || entry.stream === "stdout" || entry.stream === "stderr") && (entry.metadata === void 0 || entry.metadata !== null && typeof entry.metadata === "object" && !Array.isArray(entry.metadata))
|
|
63
|
+
))
|
|
64
|
+
throw new TypeError("Invalid terminal entries");
|
|
65
|
+
return {
|
|
66
|
+
type: CONSOLE_SESSION_TYPE,
|
|
67
|
+
version: 1,
|
|
68
|
+
mode: "terminal",
|
|
69
|
+
droppedCount: record.droppedCount,
|
|
70
|
+
entries: record.entries.map(
|
|
71
|
+
(entry) => typeof entry === "string" ? entry : {
|
|
72
|
+
...entry,
|
|
73
|
+
...entry.metadata !== void 0 ? {
|
|
74
|
+
metadata: deserializeConsoleValue(entry.metadata)
|
|
75
|
+
} : {}
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
throw new TypeError("Unsupported console session mode");
|
|
81
|
+
}
|
|
82
|
+
const CONSOLE_SESSION_ADDON_ID = "@moyarich/console-addon-session";
|
|
83
|
+
const consoleSessionService = createConsoleServiceToken(
|
|
84
|
+
CONSOLE_SESSION_ADDON_ID + ".service"
|
|
85
|
+
);
|
|
86
|
+
function createConsoleSessionAddon() {
|
|
87
|
+
let data;
|
|
88
|
+
const service = {
|
|
89
|
+
capture(droppedCount = 0) {
|
|
90
|
+
const snapshot = data?.getSnapshot();
|
|
91
|
+
if (!snapshot) throw new Error("Console session addon is not active");
|
|
92
|
+
return snapshot.mode === "console" ? createConsoleSession({
|
|
93
|
+
mode: "console",
|
|
94
|
+
messages: snapshot.all,
|
|
95
|
+
droppedCount
|
|
96
|
+
}) : createConsoleSession({
|
|
97
|
+
mode: "terminal",
|
|
98
|
+
entries: snapshot.rawEntries,
|
|
99
|
+
droppedCount
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
save(droppedCount = 0) {
|
|
103
|
+
return stringifyConsoleSession(service.capture(droppedCount));
|
|
104
|
+
},
|
|
105
|
+
restore(serialized) {
|
|
106
|
+
return parseConsoleSession(serialized);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
return {
|
|
110
|
+
id: CONSOLE_SESSION_ADDON_ID,
|
|
111
|
+
service,
|
|
112
|
+
activate(host) {
|
|
113
|
+
data = host.services.get(consoleServices.data);
|
|
114
|
+
host.services.provide(consoleSessionService, service);
|
|
115
|
+
return () => {
|
|
116
|
+
data = void 0;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export {
|
|
122
|
+
CONSOLE_SESSION_ADDON_ID,
|
|
123
|
+
CONSOLE_SESSION_TYPE,
|
|
124
|
+
CONSOLE_SESSION_VERSION,
|
|
125
|
+
consoleSessionService,
|
|
126
|
+
createConsoleSession,
|
|
127
|
+
createConsoleSessionAddon,
|
|
128
|
+
parseConsoleSession,
|
|
129
|
+
stringifyConsoleSession
|
|
130
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moyarich/console-addon-session",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Versioned Console session snapshot and restore helpers",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./dist/index.d.cts",
|
|
18
|
+
"default": "./dist/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"registry": "https://npm.pkg.github.com"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "vite build && tsc -p tsconfig.build.json && node ../../../scripts/prepare-cjs-types.mjs",
|
|
30
|
+
"typecheck": "tsc --noEmit"
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@moyarich/console": "^0.2.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@moyarich/console": "0.2.0",
|
|
37
|
+
"typescript": "^5.9.2",
|
|
38
|
+
"vite": "^7.1.5"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/moyarich/console.git",
|
|
43
|
+
"directory": "packages/addons/session"
|
|
44
|
+
},
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/moyarich/console/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/moyarich/console#readme",
|
|
49
|
+
"keywords": [
|
|
50
|
+
"console",
|
|
51
|
+
"addon",
|
|
52
|
+
"session",
|
|
53
|
+
"persistence"
|
|
54
|
+
],
|
|
55
|
+
"publisher": "moyarich",
|
|
56
|
+
"author": "Moya Richards",
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=24"
|
|
59
|
+
},
|
|
60
|
+
"private": false
|
|
61
|
+
}
|