@pritzlaff/nano-app 0.0.0-stage → 0.5.2
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/AGENTS.md +66 -0
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/app/app.css +160 -0
- package/app/bundle/nano-ui.js +2554 -0
- package/app/examples/auth/example.auth.js +6 -0
- package/app/examples/auth/nano.json +46 -0
- package/app/examples/chat/example.chat.js +6 -0
- package/app/examples/chat/example.messaging.js +3 -0
- package/app/examples/chat/nano.json +115 -0
- package/app/examples/drift/example.drift.js +3 -0
- package/app/examples/drift/nano.json +31 -0
- package/app/examples/kv/example.kv.js +3 -0
- package/app/examples/nano.json +356 -0
- package/app/examples/originkey/_nano/bundle/nano-ui.js +212 -0
- package/app/examples/originkey/_nano/sandbox/boot.js +1 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-2gg2vg5g.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-5h5dssvv.js +3 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-72b5e6vd.js +17 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-87v2yejk.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-hm29e227.js +7 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-jtgk4ch8.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-mqaje7vc.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-mxgap7rs.js +2 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-qy0mwf7y.js +1 -0
- package/app/examples/originkey/_nano/shared/chunks/nano-core-wanb7xw1.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-class-map.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-decorators.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-directive.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-if-defined.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-ref.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-repeat.js +1 -0
- package/app/examples/originkey/_nano/shared/lit-style-map.js +1 -0
- package/app/examples/originkey/_nano/shared/lit.js +1 -0
- package/app/examples/originkey/_nano/shared/nano-core.js +1 -0
- package/app/examples/originkey/_nano/shared/nano-elements.js +280 -0
- package/app/examples/originkey/_nano/shared/typebox-value.js +1 -0
- package/app/examples/originkey/_nano/shared/typebox.js +1 -0
- package/app/examples/originkey/example.originkey.js +6 -0
- package/app/examples/originkey/frame.html +1 -0
- package/app/examples/originkey/nano.json +50 -0
- package/app/examples/raft/example.raft.js +30 -0
- package/app/examples/raft/nano.json +74 -0
- package/app/examples/slice/nano.json +63 -0
- package/app/examples/slice/shout.js +14 -0
- package/app/examples/template/acme.template.js +20 -0
- package/app/examples/template/index.js +241 -0
- package/app/examples/template/nano.json +35 -0
- package/app/examples/todo/example.todo.js +8 -0
- package/app/examples/todo/nano.json +77 -0
- package/app/examples/typing/nano.json +33 -0
- package/app/favicon.svg +1 -0
- package/app/index.html +152 -0
- package/app/main.js +15908 -0
- package/app/react/index.html +50 -0
- package/app/react/main.js +9 -0
- package/app/sandbox/boot.js +980 -0
- package/app/shared/chunks/nano-core-296y9rgd.js +4321 -0
- package/app/shared/chunks/nano-core-2zz7d74m.js +16 -0
- package/app/shared/chunks/nano-core-35ryhkm1.js +33 -0
- package/app/shared/chunks/nano-core-5a3r312d.js +866 -0
- package/app/shared/chunks/nano-core-89mtxedm.js +186 -0
- package/app/shared/chunks/nano-core-bf13r20v.js +77 -0
- package/app/shared/chunks/nano-core-g3414rnc.js +248 -0
- package/app/shared/chunks/nano-core-hyg0qdwg.js +547 -0
- package/app/shared/chunks/nano-core-sxgrxy03.js +53 -0
- package/app/shared/chunks/nano-core-wg5c961d.js +4564 -0
- package/app/shared/lit-class-map.js +60 -0
- package/app/shared/lit-decorators.js +228 -0
- package/app/shared/lit-directive.js +11 -0
- package/app/shared/lit-if-defined.js +10 -0
- package/app/shared/lit-ref.js +12 -0
- package/app/shared/lit-repeat.js +141 -0
- package/app/shared/lit-style-map.js +67 -0
- package/app/shared/lit.js +47 -0
- package/app/shared/nano-core.js +2516 -0
- package/app/shared/nano-elements.js +1178 -0
- package/app/shared/typebox-value.js +78 -0
- package/app/shared/typebox.js +580 -0
- package/app/shared/versions.json +6 -0
- package/bin/nano-app.ts +34 -0
- package/package.json +22 -4
- package/src/events.ts +11 -0
- package/src/serve.ts +68 -0
- package/src/watch.ts +27 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Assert,
|
|
3
|
+
AssertError,
|
|
4
|
+
Check,
|
|
5
|
+
Clean,
|
|
6
|
+
Clone,
|
|
7
|
+
Convert,
|
|
8
|
+
Create,
|
|
9
|
+
CreateError,
|
|
10
|
+
Decode,
|
|
11
|
+
DecodeError,
|
|
12
|
+
DecodeUnsafe,
|
|
13
|
+
Default,
|
|
14
|
+
Delete,
|
|
15
|
+
Diff,
|
|
16
|
+
Edit,
|
|
17
|
+
Encode,
|
|
18
|
+
EncodeError,
|
|
19
|
+
EncodeUnsafe,
|
|
20
|
+
Equal,
|
|
21
|
+
Errors,
|
|
22
|
+
HasCodec,
|
|
23
|
+
Hash,
|
|
24
|
+
Insert,
|
|
25
|
+
IsOptionalUndefined,
|
|
26
|
+
Parse,
|
|
27
|
+
ParseError,
|
|
28
|
+
Parser,
|
|
29
|
+
Patch,
|
|
30
|
+
Pipeline,
|
|
31
|
+
Repair,
|
|
32
|
+
UnionPrioritySort,
|
|
33
|
+
UnionScoreSelect,
|
|
34
|
+
Update,
|
|
35
|
+
exports_pointer,
|
|
36
|
+
exports_value,
|
|
37
|
+
value_default
|
|
38
|
+
} from "./chunks/nano-core-296y9rgd.js";
|
|
39
|
+
import"./chunks/nano-core-wg5c961d.js";
|
|
40
|
+
import"./chunks/nano-core-2zz7d74m.js";
|
|
41
|
+
export {
|
|
42
|
+
value_default as default,
|
|
43
|
+
exports_value as Value,
|
|
44
|
+
Update,
|
|
45
|
+
UnionScoreSelect,
|
|
46
|
+
UnionPrioritySort,
|
|
47
|
+
Repair,
|
|
48
|
+
exports_pointer as Pointer,
|
|
49
|
+
Pipeline,
|
|
50
|
+
Patch,
|
|
51
|
+
Parser,
|
|
52
|
+
ParseError,
|
|
53
|
+
Parse,
|
|
54
|
+
IsOptionalUndefined,
|
|
55
|
+
Insert,
|
|
56
|
+
Hash,
|
|
57
|
+
HasCodec,
|
|
58
|
+
Errors,
|
|
59
|
+
Equal,
|
|
60
|
+
EncodeUnsafe,
|
|
61
|
+
EncodeError,
|
|
62
|
+
Encode,
|
|
63
|
+
Edit,
|
|
64
|
+
Diff,
|
|
65
|
+
Delete,
|
|
66
|
+
Default,
|
|
67
|
+
DecodeUnsafe,
|
|
68
|
+
DecodeError,
|
|
69
|
+
Decode,
|
|
70
|
+
CreateError,
|
|
71
|
+
Create,
|
|
72
|
+
Convert,
|
|
73
|
+
Clone,
|
|
74
|
+
Clean,
|
|
75
|
+
Check,
|
|
76
|
+
AssertError,
|
|
77
|
+
Assert
|
|
78
|
+
};
|
|
@@ -0,0 +1,580 @@
|
|
|
1
|
+
import {
|
|
2
|
+
build_default,
|
|
3
|
+
exports_typebox
|
|
4
|
+
} from "./chunks/nano-core-g3414rnc.js";
|
|
5
|
+
import {
|
|
6
|
+
AddImmutable,
|
|
7
|
+
AddImmutableDeferred,
|
|
8
|
+
AddOptional,
|
|
9
|
+
AddOptionalDeferred,
|
|
10
|
+
AddReadonly,
|
|
11
|
+
AddReadonlyDeferred,
|
|
12
|
+
Any,
|
|
13
|
+
ArrayOptions,
|
|
14
|
+
BigInt,
|
|
15
|
+
BigIntPattern,
|
|
16
|
+
Boolean,
|
|
17
|
+
Broaden,
|
|
18
|
+
Call,
|
|
19
|
+
CallConstruct,
|
|
20
|
+
Capitalize,
|
|
21
|
+
CapitalizeAction,
|
|
22
|
+
CapitalizeDeferred,
|
|
23
|
+
CapitalizeInstantiate,
|
|
24
|
+
Codec,
|
|
25
|
+
CollapseToObject,
|
|
26
|
+
Compare,
|
|
27
|
+
CompareResultDisjoint,
|
|
28
|
+
CompareResultEqual,
|
|
29
|
+
CompareResultLeftInside,
|
|
30
|
+
CompareResultRightInside,
|
|
31
|
+
Composite,
|
|
32
|
+
Conditional,
|
|
33
|
+
ConditionalAction,
|
|
34
|
+
ConditionalDeferred,
|
|
35
|
+
ConditionalInstantiate,
|
|
36
|
+
Constructor,
|
|
37
|
+
ConstructorOptions,
|
|
38
|
+
ConstructorParameters,
|
|
39
|
+
ConstructorParametersAction,
|
|
40
|
+
ConstructorParametersDeferred,
|
|
41
|
+
ConstructorParametersInstantiate,
|
|
42
|
+
ConvertToIntegerKey,
|
|
43
|
+
Cyclic,
|
|
44
|
+
CyclicCandidates,
|
|
45
|
+
CyclicCheck,
|
|
46
|
+
CyclicDependencies,
|
|
47
|
+
CyclicExtends,
|
|
48
|
+
CyclicOptions,
|
|
49
|
+
CyclicTarget,
|
|
50
|
+
Decode,
|
|
51
|
+
DecodeBuilder,
|
|
52
|
+
Deferred,
|
|
53
|
+
Dependent,
|
|
54
|
+
DependentOptions,
|
|
55
|
+
Distribute,
|
|
56
|
+
Encode,
|
|
57
|
+
EncodeBuilder,
|
|
58
|
+
Enum,
|
|
59
|
+
Evaluate,
|
|
60
|
+
EvaluateAction,
|
|
61
|
+
EvaluateDeferred,
|
|
62
|
+
EvaluateDependent,
|
|
63
|
+
EvaluateEnum,
|
|
64
|
+
EvaluateInstantiate,
|
|
65
|
+
EvaluateIntersect,
|
|
66
|
+
EvaluatePropertyIntersect,
|
|
67
|
+
EvaluatePropertyUnion,
|
|
68
|
+
EvaluateTemplateLiteral,
|
|
69
|
+
EvaluateType,
|
|
70
|
+
EvaluateUnion,
|
|
71
|
+
EvaluateUnionFast,
|
|
72
|
+
Exclude,
|
|
73
|
+
ExcludeAction,
|
|
74
|
+
ExcludeDeferred,
|
|
75
|
+
ExcludeInstantiate,
|
|
76
|
+
Extends,
|
|
77
|
+
Extract,
|
|
78
|
+
ExtractAction,
|
|
79
|
+
ExtractDeferred,
|
|
80
|
+
ExtractInstantiate,
|
|
81
|
+
Flatten,
|
|
82
|
+
FunctionOptions,
|
|
83
|
+
Generic,
|
|
84
|
+
Identifier,
|
|
85
|
+
Immutable,
|
|
86
|
+
Index,
|
|
87
|
+
IndexAction,
|
|
88
|
+
IndexDeferred,
|
|
89
|
+
IndexInstantiate,
|
|
90
|
+
Infer,
|
|
91
|
+
InstanceType,
|
|
92
|
+
InstanceTypeAction,
|
|
93
|
+
InstanceTypeDeferred,
|
|
94
|
+
InstanceTypeInstantiate,
|
|
95
|
+
Instantiate,
|
|
96
|
+
InstantiateCyclic,
|
|
97
|
+
Integer,
|
|
98
|
+
IntegerKey,
|
|
99
|
+
IntegerPattern,
|
|
100
|
+
Interface,
|
|
101
|
+
InterfaceAction,
|
|
102
|
+
InterfaceDeferred,
|
|
103
|
+
InterfaceInstantiate,
|
|
104
|
+
Intersect,
|
|
105
|
+
IntersectOptions,
|
|
106
|
+
InvalidLiteralValue,
|
|
107
|
+
IsAny,
|
|
108
|
+
IsArray,
|
|
109
|
+
IsBigInt,
|
|
110
|
+
IsBoolean,
|
|
111
|
+
IsCall,
|
|
112
|
+
IsCodec,
|
|
113
|
+
IsConstructor,
|
|
114
|
+
IsCyclic,
|
|
115
|
+
IsDeferred,
|
|
116
|
+
IsDependent,
|
|
117
|
+
IsEnum,
|
|
118
|
+
IsEnumValue,
|
|
119
|
+
IsFunction,
|
|
120
|
+
IsGeneric,
|
|
121
|
+
IsIdentifier,
|
|
122
|
+
IsImmutable,
|
|
123
|
+
IsInfer,
|
|
124
|
+
IsInteger,
|
|
125
|
+
IsInterfaceDeferred,
|
|
126
|
+
IsIntersect,
|
|
127
|
+
IsKind,
|
|
128
|
+
IsLiteral,
|
|
129
|
+
IsLiteralBigInt,
|
|
130
|
+
IsLiteralBoolean,
|
|
131
|
+
IsLiteralNumber,
|
|
132
|
+
IsLiteralString,
|
|
133
|
+
IsLiteralValue,
|
|
134
|
+
IsNever,
|
|
135
|
+
IsNull,
|
|
136
|
+
IsNumber,
|
|
137
|
+
IsObject,
|
|
138
|
+
IsOptional,
|
|
139
|
+
IsParameter,
|
|
140
|
+
IsReadonly,
|
|
141
|
+
IsRecord,
|
|
142
|
+
IsRef,
|
|
143
|
+
IsRefine,
|
|
144
|
+
IsRefinement,
|
|
145
|
+
IsRest,
|
|
146
|
+
IsSchema,
|
|
147
|
+
IsString,
|
|
148
|
+
IsSymbol,
|
|
149
|
+
IsTemplateLiteral,
|
|
150
|
+
IsTemplateLiteralDeferred,
|
|
151
|
+
IsTemplateLiteralFinite,
|
|
152
|
+
IsTemplateLiteralPattern,
|
|
153
|
+
IsThis,
|
|
154
|
+
IsTuple,
|
|
155
|
+
IsTypeScriptEnumLike,
|
|
156
|
+
IsUndefined,
|
|
157
|
+
IsUnion,
|
|
158
|
+
IsUnknown,
|
|
159
|
+
IsUnsafe,
|
|
160
|
+
IsVoid,
|
|
161
|
+
KeyOf,
|
|
162
|
+
KeyOfAction,
|
|
163
|
+
KeyOfDeferred,
|
|
164
|
+
KeyOfInstantiate,
|
|
165
|
+
KeysToIndexer,
|
|
166
|
+
Literal,
|
|
167
|
+
LiteralTypeName,
|
|
168
|
+
Lowercase,
|
|
169
|
+
LowercaseAction,
|
|
170
|
+
LowercaseDeferred,
|
|
171
|
+
LowercaseInstantiate,
|
|
172
|
+
Mapped,
|
|
173
|
+
MappedAction,
|
|
174
|
+
MappedDeferred,
|
|
175
|
+
MappedInstantiate,
|
|
176
|
+
Module,
|
|
177
|
+
ModuleDeferred,
|
|
178
|
+
ModuleInstantiate,
|
|
179
|
+
Narrow,
|
|
180
|
+
Never,
|
|
181
|
+
NeverPattern,
|
|
182
|
+
NonNullable,
|
|
183
|
+
NonNullableAction,
|
|
184
|
+
NonNullableDeferred,
|
|
185
|
+
NonNullableInstantiate,
|
|
186
|
+
Null,
|
|
187
|
+
Number,
|
|
188
|
+
NumberKey,
|
|
189
|
+
NumberPattern,
|
|
190
|
+
ObjectOptions,
|
|
191
|
+
Omit,
|
|
192
|
+
OmitAction,
|
|
193
|
+
OmitDeferred,
|
|
194
|
+
OmitInstantiate,
|
|
195
|
+
Optional,
|
|
196
|
+
Parameter,
|
|
197
|
+
Parameters,
|
|
198
|
+
ParametersAction,
|
|
199
|
+
ParametersDeferred,
|
|
200
|
+
ParametersInstantiate,
|
|
201
|
+
ParsePatternIntoTypes,
|
|
202
|
+
ParseTemplateIntoTypes,
|
|
203
|
+
Partial,
|
|
204
|
+
PartialAction,
|
|
205
|
+
PartialDeferred,
|
|
206
|
+
PartialInstantiate,
|
|
207
|
+
Pick,
|
|
208
|
+
PickAction,
|
|
209
|
+
PickDeferred,
|
|
210
|
+
PickInstantiate,
|
|
211
|
+
Priority,
|
|
212
|
+
PropertyKeys,
|
|
213
|
+
PropertyValues,
|
|
214
|
+
Readonly,
|
|
215
|
+
ReadonlyObject,
|
|
216
|
+
ReadonlyObjectAction,
|
|
217
|
+
ReadonlyObjectDeferred,
|
|
218
|
+
ReadonlyObjectInstantiate,
|
|
219
|
+
ReadonlyType,
|
|
220
|
+
Record,
|
|
221
|
+
RecordAction,
|
|
222
|
+
RecordDeferred,
|
|
223
|
+
RecordFromPattern,
|
|
224
|
+
RecordInstantiate,
|
|
225
|
+
RecordKey,
|
|
226
|
+
RecordOptions,
|
|
227
|
+
RecordPattern,
|
|
228
|
+
RecordPatternToType,
|
|
229
|
+
RecordValue,
|
|
230
|
+
Ref,
|
|
231
|
+
RefInstantiate,
|
|
232
|
+
Refine,
|
|
233
|
+
RefineAdd,
|
|
234
|
+
RemoveImmutable,
|
|
235
|
+
RemoveImmutableDeferred,
|
|
236
|
+
RemoveOptional,
|
|
237
|
+
RemoveOptionalDeferred,
|
|
238
|
+
RemoveReadonly,
|
|
239
|
+
RemoveReadonlyDeferred,
|
|
240
|
+
Required,
|
|
241
|
+
RequiredAction,
|
|
242
|
+
RequiredArray,
|
|
243
|
+
RequiredDeferred,
|
|
244
|
+
RequiredInstantiate,
|
|
245
|
+
Rest,
|
|
246
|
+
ReturnType,
|
|
247
|
+
ReturnTypeAction,
|
|
248
|
+
ReturnTypeDeferred,
|
|
249
|
+
ReturnTypeInstantiate,
|
|
250
|
+
Script,
|
|
251
|
+
String,
|
|
252
|
+
StringKey,
|
|
253
|
+
StringPattern,
|
|
254
|
+
Symbol,
|
|
255
|
+
TemplateLiteral,
|
|
256
|
+
TemplateLiteralCreate,
|
|
257
|
+
TemplateLiteralDecode,
|
|
258
|
+
TemplateLiteralDecodeUnsafe,
|
|
259
|
+
TemplateLiteralDeferred,
|
|
260
|
+
TemplateLiteralEncode,
|
|
261
|
+
TemplateLiteralFromString,
|
|
262
|
+
TemplateLiteralFromTypes,
|
|
263
|
+
This,
|
|
264
|
+
Tuple,
|
|
265
|
+
TupleOptions,
|
|
266
|
+
TypeScriptEnumToEnumValues,
|
|
267
|
+
Uncapitalize,
|
|
268
|
+
UncapitalizeAction,
|
|
269
|
+
UncapitalizeDeferred,
|
|
270
|
+
UncapitalizeInstantiate,
|
|
271
|
+
Undefined,
|
|
272
|
+
Union,
|
|
273
|
+
UnionOptions,
|
|
274
|
+
Unknown,
|
|
275
|
+
Unsafe,
|
|
276
|
+
Uppercase,
|
|
277
|
+
UppercaseAction,
|
|
278
|
+
UppercaseDeferred,
|
|
279
|
+
UppercaseInstantiate,
|
|
280
|
+
Void,
|
|
281
|
+
With,
|
|
282
|
+
WithAction,
|
|
283
|
+
WithDeferred,
|
|
284
|
+
WithInstantiate,
|
|
285
|
+
_Array_,
|
|
286
|
+
_Function_,
|
|
287
|
+
_Object_,
|
|
288
|
+
exports_result
|
|
289
|
+
} from "./chunks/nano-core-wg5c961d.js";
|
|
290
|
+
import"./chunks/nano-core-2zz7d74m.js";
|
|
291
|
+
export {
|
|
292
|
+
build_default as default,
|
|
293
|
+
_Object_,
|
|
294
|
+
_Function_,
|
|
295
|
+
_Array_,
|
|
296
|
+
WithInstantiate,
|
|
297
|
+
WithDeferred,
|
|
298
|
+
WithAction,
|
|
299
|
+
With,
|
|
300
|
+
Void,
|
|
301
|
+
UppercaseInstantiate,
|
|
302
|
+
UppercaseDeferred,
|
|
303
|
+
UppercaseAction,
|
|
304
|
+
Uppercase,
|
|
305
|
+
Unsafe,
|
|
306
|
+
Unknown,
|
|
307
|
+
UnionOptions,
|
|
308
|
+
Union,
|
|
309
|
+
Undefined,
|
|
310
|
+
UncapitalizeInstantiate,
|
|
311
|
+
UncapitalizeDeferred,
|
|
312
|
+
UncapitalizeAction,
|
|
313
|
+
Uncapitalize,
|
|
314
|
+
TypeScriptEnumToEnumValues,
|
|
315
|
+
exports_typebox as Type,
|
|
316
|
+
TupleOptions,
|
|
317
|
+
Tuple,
|
|
318
|
+
This,
|
|
319
|
+
TemplateLiteralFromTypes,
|
|
320
|
+
TemplateLiteralFromString,
|
|
321
|
+
TemplateLiteralEncode,
|
|
322
|
+
TemplateLiteralDeferred,
|
|
323
|
+
TemplateLiteralDecodeUnsafe,
|
|
324
|
+
TemplateLiteralDecode,
|
|
325
|
+
TemplateLiteralCreate,
|
|
326
|
+
TemplateLiteral,
|
|
327
|
+
Symbol,
|
|
328
|
+
StringPattern,
|
|
329
|
+
StringKey,
|
|
330
|
+
String,
|
|
331
|
+
Script,
|
|
332
|
+
ReturnTypeInstantiate,
|
|
333
|
+
ReturnTypeDeferred,
|
|
334
|
+
ReturnTypeAction,
|
|
335
|
+
ReturnType,
|
|
336
|
+
Rest,
|
|
337
|
+
RequiredInstantiate,
|
|
338
|
+
RequiredDeferred,
|
|
339
|
+
RequiredArray,
|
|
340
|
+
RequiredAction,
|
|
341
|
+
Required,
|
|
342
|
+
RemoveReadonlyDeferred,
|
|
343
|
+
RemoveReadonly,
|
|
344
|
+
RemoveOptionalDeferred,
|
|
345
|
+
RemoveOptional,
|
|
346
|
+
RemoveImmutableDeferred,
|
|
347
|
+
RemoveImmutable,
|
|
348
|
+
RefineAdd,
|
|
349
|
+
Refine,
|
|
350
|
+
RefInstantiate,
|
|
351
|
+
Ref,
|
|
352
|
+
RecordValue,
|
|
353
|
+
RecordPatternToType,
|
|
354
|
+
RecordPattern,
|
|
355
|
+
RecordOptions,
|
|
356
|
+
RecordKey,
|
|
357
|
+
RecordInstantiate,
|
|
358
|
+
RecordFromPattern,
|
|
359
|
+
RecordDeferred,
|
|
360
|
+
RecordAction,
|
|
361
|
+
Record,
|
|
362
|
+
ReadonlyType,
|
|
363
|
+
ReadonlyObjectInstantiate,
|
|
364
|
+
ReadonlyObjectDeferred,
|
|
365
|
+
ReadonlyObjectAction,
|
|
366
|
+
ReadonlyObject,
|
|
367
|
+
Readonly,
|
|
368
|
+
PropertyValues,
|
|
369
|
+
PropertyKeys,
|
|
370
|
+
Priority,
|
|
371
|
+
PickInstantiate,
|
|
372
|
+
PickDeferred,
|
|
373
|
+
PickAction,
|
|
374
|
+
Pick,
|
|
375
|
+
PartialInstantiate,
|
|
376
|
+
PartialDeferred,
|
|
377
|
+
PartialAction,
|
|
378
|
+
Partial,
|
|
379
|
+
ParseTemplateIntoTypes,
|
|
380
|
+
ParsePatternIntoTypes,
|
|
381
|
+
ParametersInstantiate,
|
|
382
|
+
ParametersDeferred,
|
|
383
|
+
ParametersAction,
|
|
384
|
+
Parameters,
|
|
385
|
+
Parameter,
|
|
386
|
+
Optional,
|
|
387
|
+
OmitInstantiate,
|
|
388
|
+
OmitDeferred,
|
|
389
|
+
OmitAction,
|
|
390
|
+
Omit,
|
|
391
|
+
ObjectOptions,
|
|
392
|
+
_Object_ as Object,
|
|
393
|
+
NumberPattern,
|
|
394
|
+
NumberKey,
|
|
395
|
+
Number,
|
|
396
|
+
Null,
|
|
397
|
+
NonNullableInstantiate,
|
|
398
|
+
NonNullableDeferred,
|
|
399
|
+
NonNullableAction,
|
|
400
|
+
NonNullable,
|
|
401
|
+
NeverPattern,
|
|
402
|
+
Never,
|
|
403
|
+
Narrow,
|
|
404
|
+
ModuleInstantiate,
|
|
405
|
+
ModuleDeferred,
|
|
406
|
+
Module,
|
|
407
|
+
MappedInstantiate,
|
|
408
|
+
MappedDeferred,
|
|
409
|
+
MappedAction,
|
|
410
|
+
Mapped,
|
|
411
|
+
LowercaseInstantiate,
|
|
412
|
+
LowercaseDeferred,
|
|
413
|
+
LowercaseAction,
|
|
414
|
+
Lowercase,
|
|
415
|
+
LiteralTypeName,
|
|
416
|
+
Literal,
|
|
417
|
+
KeysToIndexer,
|
|
418
|
+
KeyOfInstantiate,
|
|
419
|
+
KeyOfDeferred,
|
|
420
|
+
KeyOfAction,
|
|
421
|
+
KeyOf,
|
|
422
|
+
IsVoid,
|
|
423
|
+
IsUnsafe,
|
|
424
|
+
IsUnknown,
|
|
425
|
+
IsUnion,
|
|
426
|
+
IsUndefined,
|
|
427
|
+
IsTypeScriptEnumLike,
|
|
428
|
+
IsTuple,
|
|
429
|
+
IsThis,
|
|
430
|
+
IsTemplateLiteralPattern,
|
|
431
|
+
IsTemplateLiteralFinite,
|
|
432
|
+
IsTemplateLiteralDeferred,
|
|
433
|
+
IsTemplateLiteral,
|
|
434
|
+
IsSymbol,
|
|
435
|
+
IsString,
|
|
436
|
+
IsSchema,
|
|
437
|
+
IsRest,
|
|
438
|
+
IsRefinement,
|
|
439
|
+
IsRefine,
|
|
440
|
+
IsRef,
|
|
441
|
+
IsRecord,
|
|
442
|
+
IsReadonly,
|
|
443
|
+
IsParameter,
|
|
444
|
+
IsOptional,
|
|
445
|
+
IsObject,
|
|
446
|
+
IsNumber,
|
|
447
|
+
IsNull,
|
|
448
|
+
IsNever,
|
|
449
|
+
IsLiteralValue,
|
|
450
|
+
IsLiteralString,
|
|
451
|
+
IsLiteralNumber,
|
|
452
|
+
IsLiteralBoolean,
|
|
453
|
+
IsLiteralBigInt,
|
|
454
|
+
IsLiteral,
|
|
455
|
+
IsKind,
|
|
456
|
+
IsIntersect,
|
|
457
|
+
IsInterfaceDeferred,
|
|
458
|
+
IsInteger,
|
|
459
|
+
IsInfer,
|
|
460
|
+
IsImmutable,
|
|
461
|
+
IsIdentifier,
|
|
462
|
+
IsGeneric,
|
|
463
|
+
IsFunction,
|
|
464
|
+
IsEnumValue,
|
|
465
|
+
IsEnum,
|
|
466
|
+
IsDependent,
|
|
467
|
+
IsDeferred,
|
|
468
|
+
IsCyclic,
|
|
469
|
+
IsConstructor,
|
|
470
|
+
IsCodec,
|
|
471
|
+
IsCall,
|
|
472
|
+
IsBoolean,
|
|
473
|
+
IsBigInt,
|
|
474
|
+
IsArray,
|
|
475
|
+
IsAny,
|
|
476
|
+
InvalidLiteralValue,
|
|
477
|
+
IntersectOptions,
|
|
478
|
+
Intersect,
|
|
479
|
+
InterfaceInstantiate,
|
|
480
|
+
InterfaceDeferred,
|
|
481
|
+
InterfaceAction,
|
|
482
|
+
Interface,
|
|
483
|
+
IntegerPattern,
|
|
484
|
+
IntegerKey,
|
|
485
|
+
Integer,
|
|
486
|
+
InstantiateCyclic,
|
|
487
|
+
Instantiate,
|
|
488
|
+
InstanceTypeInstantiate,
|
|
489
|
+
InstanceTypeDeferred,
|
|
490
|
+
InstanceTypeAction,
|
|
491
|
+
InstanceType,
|
|
492
|
+
Infer,
|
|
493
|
+
IndexInstantiate,
|
|
494
|
+
IndexDeferred,
|
|
495
|
+
IndexAction,
|
|
496
|
+
Index,
|
|
497
|
+
Immutable,
|
|
498
|
+
Identifier,
|
|
499
|
+
Generic,
|
|
500
|
+
FunctionOptions,
|
|
501
|
+
_Function_ as Function,
|
|
502
|
+
Flatten,
|
|
503
|
+
ExtractInstantiate,
|
|
504
|
+
ExtractDeferred,
|
|
505
|
+
ExtractAction,
|
|
506
|
+
Extract,
|
|
507
|
+
exports_result as ExtendsResult,
|
|
508
|
+
Extends,
|
|
509
|
+
ExcludeInstantiate,
|
|
510
|
+
ExcludeDeferred,
|
|
511
|
+
ExcludeAction,
|
|
512
|
+
Exclude,
|
|
513
|
+
EvaluateUnionFast,
|
|
514
|
+
EvaluateUnion,
|
|
515
|
+
EvaluateType,
|
|
516
|
+
EvaluateTemplateLiteral,
|
|
517
|
+
EvaluatePropertyUnion,
|
|
518
|
+
EvaluatePropertyIntersect,
|
|
519
|
+
EvaluateIntersect,
|
|
520
|
+
EvaluateInstantiate,
|
|
521
|
+
EvaluateEnum,
|
|
522
|
+
EvaluateDependent,
|
|
523
|
+
EvaluateDeferred,
|
|
524
|
+
EvaluateAction,
|
|
525
|
+
Evaluate,
|
|
526
|
+
Enum,
|
|
527
|
+
EncodeBuilder,
|
|
528
|
+
Encode,
|
|
529
|
+
Distribute,
|
|
530
|
+
DependentOptions,
|
|
531
|
+
Dependent,
|
|
532
|
+
Deferred,
|
|
533
|
+
DecodeBuilder,
|
|
534
|
+
Decode,
|
|
535
|
+
CyclicTarget,
|
|
536
|
+
CyclicOptions,
|
|
537
|
+
CyclicExtends,
|
|
538
|
+
CyclicDependencies,
|
|
539
|
+
CyclicCheck,
|
|
540
|
+
CyclicCandidates,
|
|
541
|
+
Cyclic,
|
|
542
|
+
ConvertToIntegerKey,
|
|
543
|
+
ConstructorParametersInstantiate,
|
|
544
|
+
ConstructorParametersDeferred,
|
|
545
|
+
ConstructorParametersAction,
|
|
546
|
+
ConstructorParameters,
|
|
547
|
+
ConstructorOptions,
|
|
548
|
+
Constructor,
|
|
549
|
+
ConditionalInstantiate,
|
|
550
|
+
ConditionalDeferred,
|
|
551
|
+
ConditionalAction,
|
|
552
|
+
Conditional,
|
|
553
|
+
Composite,
|
|
554
|
+
CompareResultRightInside,
|
|
555
|
+
CompareResultLeftInside,
|
|
556
|
+
CompareResultEqual,
|
|
557
|
+
CompareResultDisjoint,
|
|
558
|
+
Compare,
|
|
559
|
+
CollapseToObject,
|
|
560
|
+
Codec,
|
|
561
|
+
CapitalizeInstantiate,
|
|
562
|
+
CapitalizeDeferred,
|
|
563
|
+
CapitalizeAction,
|
|
564
|
+
Capitalize,
|
|
565
|
+
CallConstruct,
|
|
566
|
+
Call,
|
|
567
|
+
Broaden,
|
|
568
|
+
Boolean,
|
|
569
|
+
BigIntPattern,
|
|
570
|
+
BigInt,
|
|
571
|
+
ArrayOptions,
|
|
572
|
+
_Array_ as Array,
|
|
573
|
+
Any,
|
|
574
|
+
AddReadonlyDeferred,
|
|
575
|
+
AddReadonly,
|
|
576
|
+
AddOptionalDeferred,
|
|
577
|
+
AddOptional,
|
|
578
|
+
AddImmutableDeferred,
|
|
579
|
+
AddImmutable
|
|
580
|
+
};
|
package/bin/nano-app.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// nano-app <nano.json> [--out dist] [--build "bun run build"]: serve the app and the project on 127.0.0.1, open it.
|
|
3
|
+
// PORT picks the port (default: any free one); NO_OPEN=1 skips opening a browser.
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
5
|
+
import { basename, dirname, resolve } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
import { events } from '../src/events.ts';
|
|
8
|
+
import { handler } from '../src/serve.ts';
|
|
9
|
+
import { watch } from '../src/watch.ts';
|
|
10
|
+
|
|
11
|
+
const { values, positionals } = (await import('node:util')).parseArgs({
|
|
12
|
+
args: Bun.argv.slice(2), allowPositionals: true,
|
|
13
|
+
options: { out: { type: 'string', default: 'dist' }, build: { type: 'string', default: 'bun run build' } },
|
|
14
|
+
});
|
|
15
|
+
const [json] = positionals;
|
|
16
|
+
if (!json) { console.error('Usage: nano-app <nano.json> [--out dist] [--build "bun run build"]'); process.exit(1); }
|
|
17
|
+
const abs = resolve(json);
|
|
18
|
+
if (!existsSync(abs)) { console.error(`nano-app: cannot read ${json}`); process.exit(1); }
|
|
19
|
+
const project = dirname(abs);
|
|
20
|
+
const beside = fileURLToPath(new URL('../app', import.meta.url));
|
|
21
|
+
const app = existsSync(beside) ? beside : fileURLToPath(new URL('../../ui-workspace/public', import.meta.url));
|
|
22
|
+
const ev = events();
|
|
23
|
+
|
|
24
|
+
const server: { port?: number } = Bun.serve({
|
|
25
|
+
hostname: '127.0.0.1', port: Number(process.env['PORT'] ?? 0), idleTimeout: 0,
|
|
26
|
+
fetch: handler({ app, project, out: resolve(project, values.out), file: '/' + basename(abs), port: () => server.port!, events: ev }),
|
|
27
|
+
});
|
|
28
|
+
const { first } = watch(project, values.build.split(/\s+/).filter(Boolean), ev.tell);
|
|
29
|
+
const url = `http://127.0.0.1:${server.port}/`;
|
|
30
|
+
console.log(`Serving ${abs} at ${url} (Ctrl-C to stop)`);
|
|
31
|
+
if (process.env['NO_OPEN'] !== '1') {
|
|
32
|
+
await first; // the page needs ./index.js and the `rebuilt` event: open it after the first build, pass or fail
|
|
33
|
+
try { Bun.spawn([process.platform === 'darwin' ? 'open' : 'xdg-open', url], { stdio: ['ignore', 'ignore', 'ignore'] }).exited.catch(() => {}); } catch { /* no opener */ }
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pritzlaff/nano-app",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.5.2",
|
|
4
|
+
"description": "test-nano: serve the nano app and a project on loopback, save the project's nano.json, rebuild on change.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/aaronp/nano.git",
|
|
10
|
+
"directory": "packages/nano-app"
|
|
11
|
+
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"nano-app": "bin/nano-app.ts"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"bin",
|
|
17
|
+
"src",
|
|
18
|
+
"app",
|
|
19
|
+
"AGENTS.md"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
}
|
|
24
|
+
}
|