@power-plant/core 0.0.16 → 0.0.17
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 +1 -1
- package/dist/{config-B_E87BPl.d.cts → config-BpNybJZY.d.cts} +9 -15
- package/dist/config-BpNybJZY.d.cts.map +1 -0
- package/dist/{config-B_E87BPl.d.mts → config-C9Hp8wTC.d.mts} +11 -17
- package/dist/{config-B_E87BPl.d.mts.map → config-C9Hp8wTC.d.mts.map} +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/context-BU2q1sN5.d.cts +105 -0
- package/dist/context-BU2q1sN5.d.cts.map +1 -0
- package/dist/context-BUNCX0E-.d.mts +105 -0
- package/dist/context-BUNCX0E-.d.mts.map +1 -0
- package/dist/context.d.cts +1 -1
- package/dist/context.d.mts +1 -1
- package/dist/define.cjs +1 -1
- package/dist/define.d.cts +1 -1
- package/dist/define.d.mts +1 -1
- package/dist/define.mjs +1 -1
- package/dist/execute-8tWWCCpu.mjs +2 -0
- package/dist/execute-8tWWCCpu.mjs.map +1 -0
- package/dist/execute-D7rill1C.cjs +1 -0
- package/dist/execute.cjs +1 -0
- package/dist/execute.d.cts +87 -0
- package/dist/execute.d.cts.map +1 -0
- package/dist/execute.d.mts +87 -0
- package/dist/execute.d.mts.map +1 -0
- package/dist/execute.mjs +1 -0
- package/dist/execution-BAm3omij.d.cts +61 -0
- package/dist/execution-BAm3omij.d.cts.map +1 -0
- package/dist/execution-d10Z7Dih.d.mts +61 -0
- package/dist/execution-d10Z7Dih.d.mts.map +1 -0
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/index.d.cts +3 -0
- package/dist/helpers/index.d.mts +3 -0
- package/dist/helpers/index.mjs +1 -0
- package/dist/helpers/meta.cjs +1 -0
- package/dist/helpers/meta.d.cts +2 -0
- package/dist/helpers/meta.d.cts.map +1 -0
- package/dist/helpers/meta.d.mts +77 -0
- package/dist/helpers/meta.d.mts.map +1 -0
- package/dist/helpers/meta.mjs +2 -0
- package/dist/helpers/meta.mjs.map +1 -0
- package/dist/{type-checks-BYCnzjxr.d.cts → helpers/type-checks.d.cts} +5 -5
- package/dist/helpers/type-checks.d.cts.map +1 -0
- package/dist/{type-checks-C-wRp-HW.d.mts → helpers/type-checks.d.mts} +5 -5
- package/dist/helpers/type-checks.d.mts.map +1 -0
- package/dist/index-DY4xQ_iJ.d.mts +3 -0
- package/dist/index-it9jCi4L.d.cts +3 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.mts +6 -4
- package/dist/index.mjs +1 -1
- package/dist/meta-CiPl-8rq.d.cts +82 -0
- package/dist/meta-CiPl-8rq.d.cts.map +1 -0
- package/package.json +58 -19
- package/dist/config-B_E87BPl.d.cts.map +0 -1
- package/dist/context-BCW5TgL-.d.mts +0 -183
- package/dist/context-BCW5TgL-.d.mts.map +0 -1
- package/dist/context-C0n9Tore.d.cts +0 -183
- package/dist/context-C0n9Tore.d.cts.map +0 -1
- package/dist/type-checks-BYCnzjxr.d.cts.map +0 -1
- package/dist/type-checks-C-wRp-HW.d.mts.map +0 -1
- package/dist/type-checks.d.cts +0 -2
- package/dist/type-checks.d.mts +0 -2
- package/dist/types/__internal.cjs +0 -0
- package/dist/types/__internal.d.cts +0 -13
- package/dist/types/__internal.d.cts.map +0 -1
- package/dist/types/__internal.d.mts +0 -13
- package/dist/types/__internal.d.mts.map +0 -1
- package/dist/types/__internal.mjs +0 -1
- /package/dist/{type-checks.cjs → helpers/type-checks.cjs} +0 -0
- /package/dist/{type-checks.mjs → helpers/type-checks.mjs} +0 -0
- /package/dist/{type-checks.mjs.map → helpers/type-checks.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@power-plant/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "☢️ Generate anything from a specification",
|
|
6
6
|
"keywords": ["power-plant", "storm-software"],
|
|
@@ -96,35 +96,63 @@
|
|
|
96
96
|
"default": "./dist/define.mjs"
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
|
-
"./
|
|
100
|
-
"./type-checks": {
|
|
99
|
+
"./execute": {
|
|
101
100
|
"require": {
|
|
102
|
-
"types": "./dist/
|
|
103
|
-
"default": "./dist/
|
|
101
|
+
"types": "./dist/execute.d.cts",
|
|
102
|
+
"default": "./dist/execute.cjs"
|
|
104
103
|
},
|
|
105
104
|
"import": {
|
|
106
|
-
"types": "./dist/
|
|
107
|
-
"default": "./dist/
|
|
105
|
+
"types": "./dist/execute.d.mts",
|
|
106
|
+
"default": "./dist/execute.mjs"
|
|
108
107
|
},
|
|
109
108
|
"default": {
|
|
110
|
-
"types": "./dist/
|
|
111
|
-
"default": "./dist/
|
|
109
|
+
"types": "./dist/execute.d.mts",
|
|
110
|
+
"default": "./dist/execute.mjs"
|
|
112
111
|
}
|
|
113
112
|
},
|
|
114
|
-
"./
|
|
113
|
+
"./helpers": {
|
|
115
114
|
"require": {
|
|
116
|
-
"types": "./dist/
|
|
117
|
-
"default": "./dist/
|
|
115
|
+
"types": "./dist/helpers/index.d.cts",
|
|
116
|
+
"default": "./dist/helpers/index.cjs"
|
|
118
117
|
},
|
|
119
118
|
"import": {
|
|
120
|
-
"types": "./dist/
|
|
121
|
-
"default": "./dist/
|
|
119
|
+
"types": "./dist/helpers/index.d.mts",
|
|
120
|
+
"default": "./dist/helpers/index.mjs"
|
|
122
121
|
},
|
|
123
122
|
"default": {
|
|
124
|
-
"types": "./dist/
|
|
125
|
-
"default": "./dist/
|
|
123
|
+
"types": "./dist/helpers/index.d.mts",
|
|
124
|
+
"default": "./dist/helpers/index.mjs"
|
|
126
125
|
}
|
|
127
|
-
}
|
|
126
|
+
},
|
|
127
|
+
"./helpers/meta": {
|
|
128
|
+
"require": {
|
|
129
|
+
"types": "./dist/helpers/meta.d.cts",
|
|
130
|
+
"default": "./dist/helpers/meta.cjs"
|
|
131
|
+
},
|
|
132
|
+
"import": {
|
|
133
|
+
"types": "./dist/helpers/meta.d.mts",
|
|
134
|
+
"default": "./dist/helpers/meta.mjs"
|
|
135
|
+
},
|
|
136
|
+
"default": {
|
|
137
|
+
"types": "./dist/helpers/meta.d.mts",
|
|
138
|
+
"default": "./dist/helpers/meta.mjs"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"./helpers/type-checks": {
|
|
142
|
+
"require": {
|
|
143
|
+
"types": "./dist/helpers/type-checks.d.cts",
|
|
144
|
+
"default": "./dist/helpers/type-checks.cjs"
|
|
145
|
+
},
|
|
146
|
+
"import": {
|
|
147
|
+
"types": "./dist/helpers/type-checks.d.mts",
|
|
148
|
+
"default": "./dist/helpers/type-checks.mjs"
|
|
149
|
+
},
|
|
150
|
+
"default": {
|
|
151
|
+
"types": "./dist/helpers/type-checks.d.mts",
|
|
152
|
+
"default": "./dist/helpers/type-checks.mjs"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"./package.json": "./package.json"
|
|
128
156
|
},
|
|
129
157
|
"main": "./dist/index.cjs",
|
|
130
158
|
"module": "./dist/index.mjs",
|
|
@@ -132,10 +160,21 @@
|
|
|
132
160
|
"typings": "dist/index.d.mts",
|
|
133
161
|
"files": ["dist"],
|
|
134
162
|
"dependencies": {
|
|
135
|
-
"@power-plant/schema": "^0.0.
|
|
163
|
+
"@power-plant/schema": "^0.0.17",
|
|
136
164
|
"@stryke/string-format": "^0.17.37",
|
|
137
165
|
"@stryke/type-checks": "^0.6.28",
|
|
138
166
|
"@stryke/types": "^0.12.23",
|
|
167
|
+
"@stryke/convert": "^0.7.26",
|
|
168
|
+
"@stryke/date": "^0.0.7",
|
|
169
|
+
"@stryke/env": "^0.20.113",
|
|
170
|
+
"@stryke/fs": "^0.33.96",
|
|
171
|
+
"@stryke/helpers": "^0.10.35",
|
|
172
|
+
"@stryke/json": "^0.15.19",
|
|
173
|
+
"@stryke/path": "^0.29.22",
|
|
174
|
+
"@stryke/resolve": "^0.0.11",
|
|
175
|
+
"@stryke/unique-id": "^0.3.107",
|
|
176
|
+
"c12": "^3.3.4",
|
|
177
|
+
"jiti": "^2.7.0",
|
|
139
178
|
"defu": "^6.1.7",
|
|
140
179
|
"unstorage": "^1.17.5"
|
|
141
180
|
},
|
|
@@ -145,5 +184,5 @@
|
|
|
145
184
|
"typescript": "^6.0.3"
|
|
146
185
|
},
|
|
147
186
|
"publishConfig": { "access": "public" },
|
|
148
|
-
"gitHead": "
|
|
187
|
+
"gitHead": "7346b39899095e30744680cd9994a6c229d4f16a"
|
|
149
188
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config-B_E87BPl.d.cts","names":[],"sources":["../src/types/meta.ts","../src/types/schema.ts","../src/types/input.ts","../src/types/generator.ts","../src/types/output.ts","../src/types/settings.ts","../src/types/config.ts"],"mappings":";;;;;;KAkBY;EACQ;EAAkB;EAAgB;;KAE1C;EAAsB;EAAc;;UAE/B;;;;EAIf,OAAO;;UAGQ,mBAAmB;;;;;;;EAOlC;;;;;;;;;EAUA,mBAAmB;;;;EAKnB;;;;;;;EAQA;;;;EAKA;;;;;;;EAQA,aAAa;;;;;;;EAQb;;;;EAKA,QAAQ;;;;KC7DE,kBAAkB,SAC5B;EAAU;EAAe;EAAsB,OAAO;;UAEvC,iBAAiB,eAAe;;;;EAI/C,WAAW,kBAAkB,SAAS,kBAAkB;;;;EAKxD;;;;;UAMe,mBAAmB;;;;EAIlC,QAAQ,mBAAmB,SAAS,iBAAiB;;;;EAKrD,OAAO,iBAAiB;;KAGd,yBACV,UACE,0BAA0B,wBAAwB,2BAClD,UAAU,0BAA0B,wBACpC,oBAAoB;;;;UAOP,OAAO,eAAe,iBAAiB;;;;EAItD,MAAM,iBAAiB;;;;;;;;;KAUb,SAAS,SAAS,OAAO;;;UCxDpB,wBAAwB;;;;EAIvC;;KAGU,cAAc,OAAO,4B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,QAAQ;;;;EAKjB,QAAQ,YAAY,OAAO;;;;EAK3B,SAAS,aAAa,OAAO,UAAU;;UAGxB;EACf;EACA;;KAGU,mBACV,aACA,+BACA,mBAEA,QAAQ,WAAW,OAAO,UAAU,cACjC,WAAW,OAAO,UAAU;KACrB,oBACV,aACA,+BACA,mBAEA,QAAQ,qBACL,QACD,WAAW,OAAO,UAAU,YAC5B,WAAW,OAAO,UAAU;KAEpB,aACV,aACA,+BACA,mBAEA,QAAQ,qBAEN,WAAW,OAAO,UAAU,YAC5B,WAAW,OAAO,UAAU,cAC5B,QACI,WAAW,OAAO,UAAU,YAC5B,WAAW,OAAO,UAAU;KAExB,iBACV,aACA,+BACA,kBAEE,WAAW,OAAO,UAAU,YAC5B,WAAW,OAAO,UAAU,cAC5B,QACI,WAAW,OAAO,UAAU,YAC5B,WAAW,OAAO,UAAU,eAEhC,mBAAmB,OAAO,UAAU,YACpC,oBAAoB,OAAO,UAAU,YACrC,aAAa,OAAO,UAAU"}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { B as SchemaMetaConfig, H as SchemaOf, M as Input, W as MetaConfig, c as Settings, m as GeneratedDocument, s as Logger, u as Output, x as GeneratorMeta } from "./config-B_E87BPl.mjs";
|
|
2
|
-
import { Storage } from "unstorage";
|
|
3
|
-
//#region src/types/execution.d.ts
|
|
4
|
-
interface ExecutionDocumentChunk {
|
|
5
|
-
/**
|
|
6
|
-
* The content of the chunk.
|
|
7
|
-
*/
|
|
8
|
-
content: string;
|
|
9
|
-
/**
|
|
10
|
-
* The metadata of the chunk.
|
|
11
|
-
*/
|
|
12
|
-
meta: MetaConfig;
|
|
13
|
-
}
|
|
14
|
-
interface ExecutionDocument {
|
|
15
|
-
/**
|
|
16
|
-
* The path of the document.
|
|
17
|
-
*/
|
|
18
|
-
path: string;
|
|
19
|
-
/**
|
|
20
|
-
* The language of the document.
|
|
21
|
-
*/
|
|
22
|
-
language?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The chunks of the document.
|
|
25
|
-
*/
|
|
26
|
-
chunks: ExecutionDocumentChunk[];
|
|
27
|
-
/**
|
|
28
|
-
* The metadata of the document.
|
|
29
|
-
*/
|
|
30
|
-
meta: MetaConfig;
|
|
31
|
-
}
|
|
32
|
-
interface ExecutionMeta<TSpec, TOptions extends object> extends MetaConfig {
|
|
33
|
-
/**
|
|
34
|
-
* A unique identifier for the execution, typically used by the backend systems.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* This value will be in the UUID format, which is a 128-bit number represented as a string of hexadecimal digits. It is used to uniquely identify the execution in the backend systems and can be used for tracking and auditing purposes.
|
|
38
|
-
*/
|
|
39
|
-
executionId: string;
|
|
40
|
-
/**
|
|
41
|
-
* The date and time when the execution was performed.
|
|
42
|
-
*/
|
|
43
|
-
executedAt: Date;
|
|
44
|
-
/**
|
|
45
|
-
* The user who performed the execution.
|
|
46
|
-
*/
|
|
47
|
-
executedBy: string;
|
|
48
|
-
/**
|
|
49
|
-
* The specification used to generate the source code during the execution.
|
|
50
|
-
*/
|
|
51
|
-
spec: TSpec;
|
|
52
|
-
/**
|
|
53
|
-
* The metadata of the generator used to execute the source code during the execution.
|
|
54
|
-
*/
|
|
55
|
-
generator: GeneratorMeta<TSpec, TOptions>;
|
|
56
|
-
/**
|
|
57
|
-
* The metadata of the schema used to generate the source code during the execution.
|
|
58
|
-
*/
|
|
59
|
-
schema: SchemaMetaConfig<TSpec>;
|
|
60
|
-
/**
|
|
61
|
-
* The metadata of the input used to generate the source code during the execution.
|
|
62
|
-
*/
|
|
63
|
-
input: MetaConfig;
|
|
64
|
-
/**
|
|
65
|
-
* The metadata of the output used to generate the source code during the execution.
|
|
66
|
-
*/
|
|
67
|
-
output: MetaConfig;
|
|
68
|
-
}
|
|
69
|
-
interface Execution<TSpec, TOptions extends object> {
|
|
70
|
-
/**
|
|
71
|
-
* The documents of the execution, indexed by the document path.
|
|
72
|
-
*/
|
|
73
|
-
documents: Record<string, ExecutionDocument>;
|
|
74
|
-
/**
|
|
75
|
-
* The metadata of the execution.
|
|
76
|
-
*/
|
|
77
|
-
meta: ExecutionMeta<TSpec, TOptions>;
|
|
78
|
-
}
|
|
79
|
-
type ExecutionResult<TSpec, TOptions extends object, TReturns = void> = GeneratedDocument<TSpec, TOptions> & {
|
|
80
|
-
/**
|
|
81
|
-
* The returned value of the generator function.
|
|
82
|
-
*/
|
|
83
|
-
returns?: TReturns;
|
|
84
|
-
};
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region src/types/base.d.ts
|
|
87
|
-
interface Base {
|
|
88
|
-
/**
|
|
89
|
-
* A unique identifier for the model.
|
|
90
|
-
*/
|
|
91
|
-
id: string;
|
|
92
|
-
/**
|
|
93
|
-
* The timestamp when the model was created.
|
|
94
|
-
*/
|
|
95
|
-
createdAt: Date;
|
|
96
|
-
/**
|
|
97
|
-
* The timestamp when the model was last updated.
|
|
98
|
-
*/
|
|
99
|
-
updatedAt: Date;
|
|
100
|
-
/**
|
|
101
|
-
* The description of the model.
|
|
102
|
-
*/
|
|
103
|
-
description?: string;
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region src/types/session.d.ts
|
|
107
|
-
interface Session extends Base {
|
|
108
|
-
/**
|
|
109
|
-
* The device that started the session.
|
|
110
|
-
*/
|
|
111
|
-
device: string;
|
|
112
|
-
/**
|
|
113
|
-
* The user who started the session.
|
|
114
|
-
*/
|
|
115
|
-
user: string;
|
|
116
|
-
/**
|
|
117
|
-
* The executions of the session.
|
|
118
|
-
*/
|
|
119
|
-
executions: Execution<any, any>[];
|
|
120
|
-
}
|
|
121
|
-
//#endregion
|
|
122
|
-
//#region src/types/context.d.ts
|
|
123
|
-
interface SessionContext {
|
|
124
|
-
/**
|
|
125
|
-
* The current working directory.
|
|
126
|
-
*/
|
|
127
|
-
cwd: string;
|
|
128
|
-
/**
|
|
129
|
-
* The settings for the context.
|
|
130
|
-
*/
|
|
131
|
-
settings: Settings;
|
|
132
|
-
/**
|
|
133
|
-
* The Unstorage storage for the context.
|
|
134
|
-
*
|
|
135
|
-
* @remarks
|
|
136
|
-
* This storage can be used to store the input and output of the execution.
|
|
137
|
-
*/
|
|
138
|
-
storage: Storage;
|
|
139
|
-
/**
|
|
140
|
-
* The logger for the context.
|
|
141
|
-
*/
|
|
142
|
-
logger: Logger;
|
|
143
|
-
/**
|
|
144
|
-
* The session for the context.
|
|
145
|
-
*/
|
|
146
|
-
session: Session;
|
|
147
|
-
}
|
|
148
|
-
interface ExecutionContext<TSpec, TOptions extends object, TReturns = void> extends SessionContext, Execution<TSpec, TOptions> {
|
|
149
|
-
/**
|
|
150
|
-
* The options for the execution.
|
|
151
|
-
*/
|
|
152
|
-
options: TOptions;
|
|
153
|
-
/**
|
|
154
|
-
* The specification for the execution.
|
|
155
|
-
*/
|
|
156
|
-
get spec(): TSpec;
|
|
157
|
-
/**
|
|
158
|
-
* The schema for the execution.
|
|
159
|
-
*/
|
|
160
|
-
get schema(): SchemaOf<TSpec>;
|
|
161
|
-
/**
|
|
162
|
-
* The input for the execution.
|
|
163
|
-
*/
|
|
164
|
-
get input(): Input<TSpec, TOptions>;
|
|
165
|
-
/**
|
|
166
|
-
* The output for the execution.
|
|
167
|
-
*/
|
|
168
|
-
get output(): Output<TSpec, TOptions, TReturns>;
|
|
169
|
-
/**
|
|
170
|
-
* The documents that are currently being processed, indexed by the document path.
|
|
171
|
-
*/
|
|
172
|
-
get documents(): Record<string, ExecutionDocument>;
|
|
173
|
-
/**
|
|
174
|
-
* Adds a document to the currently processing documents.
|
|
175
|
-
*
|
|
176
|
-
* @param pathOrDocument - A string representing the path of the document to add, or the document to add.
|
|
177
|
-
* @param document - The document to add (without the path), if {@link pathOrDocument} is a string representing the document path.
|
|
178
|
-
*/
|
|
179
|
-
addDocument: (pathOrDocument: string | ExecutionDocument, document?: Omit<ExecutionDocument, "path">) => void;
|
|
180
|
-
}
|
|
181
|
-
//#endregion
|
|
182
|
-
export { Execution as a, ExecutionMeta as c, Base as i, ExecutionResult as l, SessionContext as n, ExecutionDocument as o, Session as r, ExecutionDocumentChunk as s, ExecutionContext as t };
|
|
183
|
-
//# sourceMappingURL=context-BCW5TgL-.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-BCW5TgL-.d.mts","names":[],"sources":["../src/types/execution.ts","../src/types/base.ts","../src/types/session.ts","../src/types/context.ts"],"mappings":""}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import { B as SchemaMetaConfig, H as SchemaOf, M as Input, W as MetaConfig, c as Settings, m as GeneratedDocument, s as Logger, u as Output, x as GeneratorMeta } from "./config-B_E87BPl.cjs";
|
|
2
|
-
import { Storage } from "unstorage";
|
|
3
|
-
//#region src/types/execution.d.ts
|
|
4
|
-
interface ExecutionDocumentChunk {
|
|
5
|
-
/**
|
|
6
|
-
* The content of the chunk.
|
|
7
|
-
*/
|
|
8
|
-
content: string;
|
|
9
|
-
/**
|
|
10
|
-
* The metadata of the chunk.
|
|
11
|
-
*/
|
|
12
|
-
meta: MetaConfig;
|
|
13
|
-
}
|
|
14
|
-
interface ExecutionDocument {
|
|
15
|
-
/**
|
|
16
|
-
* The path of the document.
|
|
17
|
-
*/
|
|
18
|
-
path: string;
|
|
19
|
-
/**
|
|
20
|
-
* The language of the document.
|
|
21
|
-
*/
|
|
22
|
-
language?: string;
|
|
23
|
-
/**
|
|
24
|
-
* The chunks of the document.
|
|
25
|
-
*/
|
|
26
|
-
chunks: ExecutionDocumentChunk[];
|
|
27
|
-
/**
|
|
28
|
-
* The metadata of the document.
|
|
29
|
-
*/
|
|
30
|
-
meta: MetaConfig;
|
|
31
|
-
}
|
|
32
|
-
interface ExecutionMeta<TSpec, TOptions extends object> extends MetaConfig {
|
|
33
|
-
/**
|
|
34
|
-
* A unique identifier for the execution, typically used by the backend systems.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* This value will be in the UUID format, which is a 128-bit number represented as a string of hexadecimal digits. It is used to uniquely identify the execution in the backend systems and can be used for tracking and auditing purposes.
|
|
38
|
-
*/
|
|
39
|
-
executionId: string;
|
|
40
|
-
/**
|
|
41
|
-
* The date and time when the execution was performed.
|
|
42
|
-
*/
|
|
43
|
-
executedAt: Date;
|
|
44
|
-
/**
|
|
45
|
-
* The user who performed the execution.
|
|
46
|
-
*/
|
|
47
|
-
executedBy: string;
|
|
48
|
-
/**
|
|
49
|
-
* The specification used to generate the source code during the execution.
|
|
50
|
-
*/
|
|
51
|
-
spec: TSpec;
|
|
52
|
-
/**
|
|
53
|
-
* The metadata of the generator used to execute the source code during the execution.
|
|
54
|
-
*/
|
|
55
|
-
generator: GeneratorMeta<TSpec, TOptions>;
|
|
56
|
-
/**
|
|
57
|
-
* The metadata of the schema used to generate the source code during the execution.
|
|
58
|
-
*/
|
|
59
|
-
schema: SchemaMetaConfig<TSpec>;
|
|
60
|
-
/**
|
|
61
|
-
* The metadata of the input used to generate the source code during the execution.
|
|
62
|
-
*/
|
|
63
|
-
input: MetaConfig;
|
|
64
|
-
/**
|
|
65
|
-
* The metadata of the output used to generate the source code during the execution.
|
|
66
|
-
*/
|
|
67
|
-
output: MetaConfig;
|
|
68
|
-
}
|
|
69
|
-
interface Execution<TSpec, TOptions extends object> {
|
|
70
|
-
/**
|
|
71
|
-
* The documents of the execution, indexed by the document path.
|
|
72
|
-
*/
|
|
73
|
-
documents: Record<string, ExecutionDocument>;
|
|
74
|
-
/**
|
|
75
|
-
* The metadata of the execution.
|
|
76
|
-
*/
|
|
77
|
-
meta: ExecutionMeta<TSpec, TOptions>;
|
|
78
|
-
}
|
|
79
|
-
type ExecutionResult<TSpec, TOptions extends object, TReturns = void> = GeneratedDocument<TSpec, TOptions> & {
|
|
80
|
-
/**
|
|
81
|
-
* The returned value of the generator function.
|
|
82
|
-
*/
|
|
83
|
-
returns?: TReturns;
|
|
84
|
-
};
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region src/types/base.d.ts
|
|
87
|
-
interface Base {
|
|
88
|
-
/**
|
|
89
|
-
* A unique identifier for the model.
|
|
90
|
-
*/
|
|
91
|
-
id: string;
|
|
92
|
-
/**
|
|
93
|
-
* The timestamp when the model was created.
|
|
94
|
-
*/
|
|
95
|
-
createdAt: Date;
|
|
96
|
-
/**
|
|
97
|
-
* The timestamp when the model was last updated.
|
|
98
|
-
*/
|
|
99
|
-
updatedAt: Date;
|
|
100
|
-
/**
|
|
101
|
-
* The description of the model.
|
|
102
|
-
*/
|
|
103
|
-
description?: string;
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region src/types/session.d.ts
|
|
107
|
-
interface Session extends Base {
|
|
108
|
-
/**
|
|
109
|
-
* The device that started the session.
|
|
110
|
-
*/
|
|
111
|
-
device: string;
|
|
112
|
-
/**
|
|
113
|
-
* The user who started the session.
|
|
114
|
-
*/
|
|
115
|
-
user: string;
|
|
116
|
-
/**
|
|
117
|
-
* The executions of the session.
|
|
118
|
-
*/
|
|
119
|
-
executions: Execution<any, any>[];
|
|
120
|
-
}
|
|
121
|
-
//#endregion
|
|
122
|
-
//#region src/types/context.d.ts
|
|
123
|
-
interface SessionContext {
|
|
124
|
-
/**
|
|
125
|
-
* The current working directory.
|
|
126
|
-
*/
|
|
127
|
-
cwd: string;
|
|
128
|
-
/**
|
|
129
|
-
* The settings for the context.
|
|
130
|
-
*/
|
|
131
|
-
settings: Settings;
|
|
132
|
-
/**
|
|
133
|
-
* The Unstorage storage for the context.
|
|
134
|
-
*
|
|
135
|
-
* @remarks
|
|
136
|
-
* This storage can be used to store the input and output of the execution.
|
|
137
|
-
*/
|
|
138
|
-
storage: Storage;
|
|
139
|
-
/**
|
|
140
|
-
* The logger for the context.
|
|
141
|
-
*/
|
|
142
|
-
logger: Logger;
|
|
143
|
-
/**
|
|
144
|
-
* The session for the context.
|
|
145
|
-
*/
|
|
146
|
-
session: Session;
|
|
147
|
-
}
|
|
148
|
-
interface ExecutionContext<TSpec, TOptions extends object, TReturns = void> extends SessionContext, Execution<TSpec, TOptions> {
|
|
149
|
-
/**
|
|
150
|
-
* The options for the execution.
|
|
151
|
-
*/
|
|
152
|
-
options: TOptions;
|
|
153
|
-
/**
|
|
154
|
-
* The specification for the execution.
|
|
155
|
-
*/
|
|
156
|
-
get spec(): TSpec;
|
|
157
|
-
/**
|
|
158
|
-
* The schema for the execution.
|
|
159
|
-
*/
|
|
160
|
-
get schema(): SchemaOf<TSpec>;
|
|
161
|
-
/**
|
|
162
|
-
* The input for the execution.
|
|
163
|
-
*/
|
|
164
|
-
get input(): Input<TSpec, TOptions>;
|
|
165
|
-
/**
|
|
166
|
-
* The output for the execution.
|
|
167
|
-
*/
|
|
168
|
-
get output(): Output<TSpec, TOptions, TReturns>;
|
|
169
|
-
/**
|
|
170
|
-
* The documents that are currently being processed, indexed by the document path.
|
|
171
|
-
*/
|
|
172
|
-
get documents(): Record<string, ExecutionDocument>;
|
|
173
|
-
/**
|
|
174
|
-
* Adds a document to the currently processing documents.
|
|
175
|
-
*
|
|
176
|
-
* @param pathOrDocument - A string representing the path of the document to add, or the document to add.
|
|
177
|
-
* @param document - The document to add (without the path), if {@link pathOrDocument} is a string representing the document path.
|
|
178
|
-
*/
|
|
179
|
-
addDocument: (pathOrDocument: string | ExecutionDocument, document?: Omit<ExecutionDocument, "path">) => void;
|
|
180
|
-
}
|
|
181
|
-
//#endregion
|
|
182
|
-
export { Execution as a, ExecutionMeta as c, Base as i, ExecutionResult as l, SessionContext as n, ExecutionDocument as o, Session as r, ExecutionDocumentChunk as s, ExecutionContext as t };
|
|
183
|
-
//# sourceMappingURL=context-C0n9Tore.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-C0n9Tore.d.cts","names":[],"sources":["../src/types/execution.ts","../src/types/base.ts","../src/types/session.ts","../src/types/context.ts"],"mappings":";;;UAsBiB;;;;EAIf;;;;EAKA,MAAM;;UAGS;;;;EAIf;;;;EAKA;;;;EAKA,QAAQ;;;;EAKR,MAAM;;UAGS,cACf,OACA,iCACQ;;;;;;;EAOR;;;;EAKA,YAAY;;;;EAKZ;;;;EAKA,MAAM;;;;EAKN,WAAW,cAAc,OAAO;;;;EAKhC,QAAQ,iBAAiB;;;;EAKzB,OAAO;;;;EAKP,QAAQ;;UAGO,UAAU,OAAO;;;;EAIhC,WAAW,eAAe;;;;EAK1B,MAAM,cAAc,OAAO;;KAGjB,gBACV,OACA,yBACA,mBACE,kBAAkB,OAAO;;;;EAI3B,UAAU;;;;UC1GK;;;;EAIf;;;;EAKA,WAAW;;;;EAKX,WAAW;;;;EAKX;;;;UChBe,gBAAgB;;;;EAI/B;;;;EAKA;;;;EAKA,YAAY;;;;UCTG;;;;EAIf;;;;EAKA,UAAU;;;;;;;EAQV,SAAS;;;;EAKT,QAAQ;;;;EAKR,SAAS;;UAGM,iBACf,OACA,yBACA,yBAEQ,gBAAgB,UAAU,OAAO;;;;EAIzC,SAAS;;;;MAKL,QAAQ;;;;MAKR,UAAU,SAAS;;;;MAKnB,SAAS,MAAM,OAAO;;;;MAKtB,UAAU,OAAO,OAAO,UAAU;;;;MAKlC,aAAa,eAAe;;;;;;;EAQhC,cACE,yBAAyB,mBACzB,WAAW,KAAK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type-checks-BYCnzjxr.d.cts","names":[],"sources":["../src/type-checks.ts"],"mappings":";;;;;;;;;iBAgCgB,wBACd,OACA,yBACA,iBACA,kBAAkB,UAAU,sBAAsB,OAAO,UAAU;;;;;;;iBAcrD,oBAAoB,OAAO,yBACzC,iBACC,SAAS,kBAAkB,OAAO;;;;;;;iBAUrB,qBACd,OACA,yBACA,iBACA,kBAAkB,UAAU,mBAAmB,OAAO,UAAU;;;;;;;iBAYlD,qBAAqB,OACnC,kBACC,UAAU,mBAAmB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type-checks-C-wRp-HW.d.mts","names":[],"sources":["../src/type-checks.ts"],"mappings":""}
|
package/dist/type-checks.d.cts
DELETED
package/dist/type-checks.d.mts
DELETED
|
File without changes
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { H as SchemaOf, M as Input, u as Output } from "../config-B_E87BPl.cjs";
|
|
2
|
-
import { o as ExecutionDocument, t as ExecutionContext } from "../context-C0n9Tore.cjs";
|
|
3
|
-
//#region src/types/__internal.d.ts
|
|
4
|
-
interface Unstable_ExecutionContext<TSpec, TOptions extends object, TReturns = void> extends ExecutionContext<TSpec, TOptions, TReturns> {
|
|
5
|
-
"~spec": TSpec;
|
|
6
|
-
schema: SchemaOf<TSpec>;
|
|
7
|
-
input: Input<TSpec, TOptions>;
|
|
8
|
-
output: Output<TSpec, TOptions, TReturns>;
|
|
9
|
-
documents: Record<string, ExecutionDocument>;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { Unstable_ExecutionContext };
|
|
13
|
-
//# sourceMappingURL=__internal.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"__internal.d.cts","names":[],"sources":["../../src/types/__internal.ts"],"mappings":";;;UAyBiB,0BACf,OACA,yBACA,yBACQ,iBAAiB,OAAO,UAAU;EAC1C,SAAS;EACT,QAAQ,SAAS;EACjB,OAAO,MAAM,OAAO;EACpB,QAAQ,OAAO,OAAO,UAAU;EAChC,WAAW,eAAe"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { H as SchemaOf, M as Input, u as Output } from "../config-B_E87BPl.mjs";
|
|
2
|
-
import { o as ExecutionDocument, t as ExecutionContext } from "../context-BCW5TgL-.mjs";
|
|
3
|
-
//#region src/types/__internal.d.ts
|
|
4
|
-
interface Unstable_ExecutionContext<TSpec, TOptions extends object, TReturns = void> extends ExecutionContext<TSpec, TOptions, TReturns> {
|
|
5
|
-
"~spec": TSpec;
|
|
6
|
-
schema: SchemaOf<TSpec>;
|
|
7
|
-
input: Input<TSpec, TOptions>;
|
|
8
|
-
output: Output<TSpec, TOptions, TReturns>;
|
|
9
|
-
documents: Record<string, ExecutionDocument>;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { Unstable_ExecutionContext };
|
|
13
|
-
//# sourceMappingURL=__internal.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"__internal.d.mts","names":[],"sources":["../../src/types/__internal.ts"],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|