@luna-park/plugin 2.3.0 → 2.4.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/dist/extractor.d.mts +1 -1
- package/dist/{index-Dz0vJvpL.d.mts → index-kGM_G99G.d.mts} +2 -1
- package/dist/index.d.mts +29 -8
- package/dist/index.mjs +186 -99
- package/package.json +1 -1
package/dist/extractor.d.mts
CHANGED
|
@@ -43,7 +43,6 @@ declare enum EVarType {
|
|
|
43
43
|
void = "void"
|
|
44
44
|
}
|
|
45
45
|
type TProperties = Record<string, TSchema>;
|
|
46
|
-
/** Schema options, augmentable by the packages that own each option with `declare module "@luna-park/logicnodes"`. Other keys are free for plugin inputs. */
|
|
47
46
|
interface TSchemaOptions {
|
|
48
47
|
[key: string]: unknown;
|
|
49
48
|
access?: TSchema<TObject>;
|
|
@@ -63,8 +62,10 @@ interface TSchemaOptions {
|
|
|
63
62
|
multiplier?: number;
|
|
64
63
|
notNull?: boolean;
|
|
65
64
|
onDelete?: string;
|
|
65
|
+
parent?: string;
|
|
66
66
|
readonly?: boolean;
|
|
67
67
|
search?: boolean;
|
|
68
|
+
secret?: boolean;
|
|
68
69
|
step?: number;
|
|
69
70
|
suffix?: string;
|
|
70
71
|
template?: Array<TSchema>;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as TVector, a as LogicUtil, c as TInterfaceConstantValue, d as TSchema, f as TVoid, g as MaybePromise, h as DeepPartial, i as LogicType, l as TLogicNode, m as CVector, n as ELogicType, o as Static, p as makeLogicNode, r as EVarType, s as TInterfaceConfig, t as ELogicScope, u as TObject } from "./index-
|
|
1
|
+
import { _ as TVector, a as LogicUtil, c as TInterfaceConstantValue, d as TSchema, f as TVoid, g as MaybePromise, h as DeepPartial, i as LogicType, l as TLogicNode, m as CVector, n as ELogicType, o as Static, p as makeLogicNode, r as EVarType, s as TInterfaceConfig, t as ELogicScope, u as TObject } from "./index-kGM_G99G.mjs";
|
|
2
2
|
import { Component, ComputedRef, Directive } from "vue";
|
|
3
3
|
import "@sinclair/typebox";
|
|
4
4
|
import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
@@ -372,10 +372,9 @@ type TLayoutContentOf<TElement extends TLayoutElementType, TVariable, TChild> =
|
|
|
372
372
|
*/
|
|
373
373
|
type TLayoutStyleRulesExport = Record<string, Record<string, TMaybeDynamicVariableExport>>;
|
|
374
374
|
type TLayoutStyleRules = Record<string, Record<string, TMaybeDynamicVariable>>;
|
|
375
|
-
type
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
};
|
|
375
|
+
type TLayoutStylePseudo = "active" | "focus-visible" | "hover";
|
|
376
|
+
type TLayoutStyleState = "default" | TLayoutStylePseudo;
|
|
377
|
+
type TLayoutStyleStatesOf<TRules> = Partial<Record<TLayoutStyleState, TRules>>;
|
|
379
378
|
type TLayoutStyleStatesExport = TLayoutStyleStatesOf<TLayoutStyleRulesExport>;
|
|
380
379
|
type TLayoutStyleStates = TLayoutStyleStatesOf<TLayoutStyleRules>;
|
|
381
380
|
type TLayoutStyleOf<TStates> = {
|
|
@@ -440,6 +439,7 @@ type TComponentOptions = {
|
|
|
440
439
|
type: EComponentType;
|
|
441
440
|
path: string;
|
|
442
441
|
preview: EComponentPreview;
|
|
442
|
+
previewBackground?: string;
|
|
443
443
|
previewSize?: string;
|
|
444
444
|
seo?: TPageSeo;
|
|
445
445
|
};
|
|
@@ -679,12 +679,21 @@ type TApplicationToken = {
|
|
|
679
679
|
name: string;
|
|
680
680
|
value: string;
|
|
681
681
|
};
|
|
682
|
+
declare enum EColorTokenRole {
|
|
683
|
+
Background = "background",
|
|
684
|
+
Content = "content"
|
|
685
|
+
}
|
|
686
|
+
type TApplicationColorToken = TApplicationToken & {
|
|
687
|
+
role?: EColorTokenRole;
|
|
688
|
+
};
|
|
682
689
|
type TApplicationFontToken = TApplicationToken & {
|
|
683
690
|
cdn?: string;
|
|
684
691
|
default?: boolean;
|
|
692
|
+
italic?: boolean;
|
|
693
|
+
weights?: Array<number>;
|
|
685
694
|
};
|
|
686
695
|
type TApplicationTokens = {
|
|
687
|
-
colors: Array<
|
|
696
|
+
colors: Array<TApplicationColorToken>;
|
|
688
697
|
fonts: Array<TApplicationFontToken>;
|
|
689
698
|
lengths: Array<TApplicationToken>;
|
|
690
699
|
};
|
|
@@ -736,12 +745,14 @@ type TApplicationConfig = {
|
|
|
736
745
|
strategy: EResponsiveStrategy;
|
|
737
746
|
};
|
|
738
747
|
web: {
|
|
748
|
+
favicon?: TApplicationFavicon;
|
|
739
749
|
history: EHistoryMode;
|
|
740
750
|
pwa: boolean;
|
|
741
751
|
pwaConfig?: TApplicationPwaConfig;
|
|
742
752
|
seo?: TApplicationSeoConfig;
|
|
743
753
|
};
|
|
744
754
|
};
|
|
755
|
+
type TApplicationFavicon = string | Pick<TDynamicVariableExport, "_dynamic" | "access" | "type">;
|
|
745
756
|
type TApplicationSeoConfig = {
|
|
746
757
|
description: string;
|
|
747
758
|
image: string;
|
|
@@ -1024,6 +1035,7 @@ type TDBCondition = {
|
|
|
1024
1035
|
type: "column";
|
|
1025
1036
|
target: Array<string>;
|
|
1026
1037
|
});
|
|
1038
|
+
declare function getPluginSecretEnvName(pluginId: string, name: string): string;
|
|
1027
1039
|
export declare enum EPluginHooks {
|
|
1028
1040
|
BackendMiddleware = "backend/middleware",
|
|
1029
1041
|
BackendInputNode = "backend/input-node",
|
|
@@ -1173,8 +1185,9 @@ type TBasePlugin<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
|
1173
1185
|
name: string;
|
|
1174
1186
|
windows?: Record<string, Component>;
|
|
1175
1187
|
workspace?: {
|
|
1188
|
+
openOnClick?: boolean;
|
|
1176
1189
|
preview?: Component;
|
|
1177
|
-
sections
|
|
1190
|
+
sections?: Array<TPluginWorkspaceSection>;
|
|
1178
1191
|
};
|
|
1179
1192
|
};
|
|
1180
1193
|
type TPluginGuide = {
|
|
@@ -1210,6 +1223,7 @@ type TEnv<TConfig extends TSchema = TSchema, TInternals = unknown> = {
|
|
|
1210
1223
|
internals: TInternals;
|
|
1211
1224
|
log: (message: string, severity?: "info" | "warning" | "error") => void;
|
|
1212
1225
|
mode: "build" | "editor";
|
|
1226
|
+
secrets?: TSecrets;
|
|
1213
1227
|
};
|
|
1214
1228
|
type THost = {
|
|
1215
1229
|
readonly available: boolean;
|
|
@@ -1222,6 +1236,13 @@ type THost = {
|
|
|
1222
1236
|
removeFile: (path: string) => Promise<void>;
|
|
1223
1237
|
writeFile: (path: string, data: Uint8Array) => Promise<void>;
|
|
1224
1238
|
};
|
|
1239
|
+
type TSecrets = {
|
|
1240
|
+
readonly available: boolean;
|
|
1241
|
+
get: (name: string) => Promise<string | undefined>;
|
|
1242
|
+
list: () => Promise<Array<string>>;
|
|
1243
|
+
remove: (name: string) => Promise<void>;
|
|
1244
|
+
set: (name: string, value: string) => Promise<void>;
|
|
1245
|
+
};
|
|
1225
1246
|
type TOption<TParams = unknown, TResult = unknown> = TResult | ((env: TParams) => Promise<TResult> | TResult);
|
|
1226
1247
|
export declare function makePlugin<TConfig extends TSchema, TInternal>(plugin: TPlugin<TConfig, TInternal>): TPlugin<TConfig, TInternal>;
|
|
1227
1248
|
export declare function makeComponent<TProps extends Record<string, TSchema>>(component: TComponent<TProps>): TComponent<TProps>;
|
|
@@ -1229,4 +1250,4 @@ export declare function loadPlugin<TConfig extends TSchema, TInternal>(plugin: T
|
|
|
1229
1250
|
export declare function sortPlugins<T extends Pick<TBasePlugin, "dependencies" | "id">>(plugins: Array<T>): Array<T>;
|
|
1230
1251
|
export declare function getPluginApi<TApi = unknown>(plugin: Pick<TBasePlugin, "api" | "config" | "id"> | undefined, env: Partial<TEnv>): Promise<TApi | undefined>;
|
|
1231
1252
|
export declare function getPluginParam<T>(target: TOption<TEnv, T>, env: Partial<TEnv>): Promise<T>;
|
|
1232
|
-
export { EDBCondition, EDBOperation, EElementType, ELogicScope, ELogicType, ETokenType, EVarType, _default as LSettingsStoryWrapper, LogicType, LogicUtil, type Static, type TAnyLogic, type TAnyLogicExport, type TApplication, type TApplicationExport, type TBasePlugin, type TComponent, type TDBCondition, type TDBOperation, type TElementPanel, type TElementPanelAction, type TElementPanelProps, type TEnv, type TFile, type TFileComponent, type TFileComponentExport, type TFileConfig, type TFileConfigExport, type TFileCron, type TFileCronExport, type TFileDatabase, type TFileDatabaseExport, type TFileExport, type TFileMedia, type TFileMediaExport, type TFileRoute, type TFileRouteExport, type TFileScript, type TFileScriptExport, type TFileStore, type TFileStoreExport, type TFileText, type TFileTextExport, type TFileType, type TFileTypeExport, type TFolder, type TFolderExport, type THookParams, type THost, type TInterface, type TInterfaceEditorProps, type TLayoutSchema, type TLayoutSchemaExport, type TLogic, type TLogicExport, type TLogicMain, type TLogicMainExport, type TLogicNode, type TOption, type TPanels, type TPlugin, type TPluginElement, type TPluginGuide, type TPluginWorkspaceSection, type TProxyPlugin, type TRouteGuard, type TSchema, type TSlot, type TTemplate, type TToken, makeLogicNode };
|
|
1253
|
+
export { EDBCondition, EDBOperation, EElementType, ELogicScope, ELogicType, ETokenType, EVarType, _default as LSettingsStoryWrapper, LogicType, LogicUtil, type Static, type TAnyLogic, type TAnyLogicExport, type TApplication, type TApplicationExport, type TBasePlugin, type TComponent, type TDBCondition, type TDBOperation, type TElementPanel, type TElementPanelAction, type TElementPanelProps, type TEnv, type TFile, type TFileComponent, type TFileComponentExport, type TFileConfig, type TFileConfigExport, type TFileCron, type TFileCronExport, type TFileDatabase, type TFileDatabaseExport, type TFileExport, type TFileMedia, type TFileMediaExport, type TFileRoute, type TFileRouteExport, type TFileScript, type TFileScriptExport, type TFileStore, type TFileStoreExport, type TFileText, type TFileTextExport, type TFileType, type TFileTypeExport, type TFolder, type TFolderExport, type THookParams, type THost, type TInterface, type TInterfaceEditorProps, type TLayoutSchema, type TLayoutSchemaExport, type TLogic, type TLogicExport, type TLogicMain, type TLogicMainExport, type TLogicNode, type TOption, type TPanels, type TPlugin, type TPluginElement, type TPluginGuide, type TPluginWorkspaceSection, type TProxyPlugin, type TRouteGuard, type TSchema, type TSecrets, type TSlot, type TTemplate, type TToken, getPluginSecretEnvName, makeLogicNode };
|
package/dist/index.mjs
CHANGED
|
@@ -62,7 +62,7 @@ defineServerTier("economy", "small", 20, ["cx23"], {
|
|
|
62
62
|
diskGb: 320,
|
|
63
63
|
memoryGb: 16
|
|
64
64
|
});
|
|
65
|
-
// ../shared/dist/types-
|
|
65
|
+
// ../shared/dist/types-Ck0zcB88.mjs
|
|
66
66
|
const TypeDate = Type.String({ format: "date-time" });
|
|
67
67
|
var app_exports$1 = /* @__PURE__ */ __exportAll({
|
|
68
68
|
app: () => app,
|
|
@@ -170,6 +170,10 @@ const user = Type.Object({
|
|
|
170
170
|
bio: Type.String(),
|
|
171
171
|
referral: Type.String()
|
|
172
172
|
}),
|
|
173
|
+
private: Type.Object({
|
|
174
|
+
firstName: Type.String({ maxLength: 80 }),
|
|
175
|
+
lastName: Type.String({ maxLength: 80 })
|
|
176
|
+
}),
|
|
173
177
|
public: Type.Object({
|
|
174
178
|
company: Type.String(),
|
|
175
179
|
location: Type.String(),
|
|
@@ -183,6 +187,7 @@ const user = Type.Object({
|
|
|
183
187
|
twitter: Type.String()
|
|
184
188
|
})
|
|
185
189
|
}),
|
|
190
|
+
roles: Type.Optional(Type.Array(Type.String())),
|
|
186
191
|
settings: Type.Object({
|
|
187
192
|
newsletter: Type.Boolean(),
|
|
188
193
|
onboarding: Type.Boolean()
|
|
@@ -306,9 +311,9 @@ let EDBCondition = /* @__PURE__ */ function(EDBCondition) {
|
|
|
306
311
|
}({});
|
|
307
312
|
var app_exports = /* @__PURE__ */ __exportAll({
|
|
308
313
|
edit: () => edit$1,
|
|
309
|
-
get: () => get$
|
|
314
|
+
get: () => get$4
|
|
310
315
|
});
|
|
311
|
-
const get$
|
|
316
|
+
const get$4 = {
|
|
312
317
|
type: "get",
|
|
313
318
|
params: Type.Object({ id: Type.String() }),
|
|
314
319
|
response: { 200: Type.Object({
|
|
@@ -389,11 +394,11 @@ const client = {
|
|
|
389
394
|
url: "/auth/client"
|
|
390
395
|
};
|
|
391
396
|
var challenge_exports = /* @__PURE__ */ __exportAll({
|
|
392
|
-
get: () => get$
|
|
397
|
+
get: () => get$3,
|
|
393
398
|
update: () => update$2
|
|
394
399
|
});
|
|
395
400
|
const progression = Type.Object({ done: Type.Array(Type.String()) });
|
|
396
|
-
const get$
|
|
401
|
+
const get$3 = {
|
|
397
402
|
type: "get",
|
|
398
403
|
response: { 200: progression },
|
|
399
404
|
url: "/challenge"
|
|
@@ -486,7 +491,7 @@ const environmentParams = Type.Object({
|
|
|
486
491
|
appId: Type.String({ format: "uuid" }),
|
|
487
492
|
environment: environmentKind
|
|
488
493
|
});
|
|
489
|
-
const messageResponse = Type.Object({ message: Type.String() });
|
|
494
|
+
const messageResponse$1 = Type.Object({ message: Type.String() });
|
|
490
495
|
const registerDesktop = {
|
|
491
496
|
type: "post",
|
|
492
497
|
body: Type.Object({
|
|
@@ -536,14 +541,6 @@ const listServers = {
|
|
|
536
541
|
response: { 200: Type.Array(Type.Object({
|
|
537
542
|
id: Type.String({ format: "uuid" }),
|
|
538
543
|
name: Type.String(),
|
|
539
|
-
displayName: Type.Union([Type.String(), Type.Null()]),
|
|
540
|
-
ipv6: Type.Union([Type.String(), Type.Null()]),
|
|
541
|
-
maintenanceHour: Type.Integer(),
|
|
542
|
-
ownerMail: Type.Union([Type.String(), Type.Null()]),
|
|
543
|
-
readyAt: Type.Union([Type.String(), Type.Null()]),
|
|
544
|
-
role: Type.Union([Type.Literal("member"), Type.Literal("owner")]),
|
|
545
|
-
status: Type.String(),
|
|
546
|
-
url: Type.Union([Type.String(), Type.Null()]),
|
|
547
544
|
capacity: Type.Object({
|
|
548
545
|
disk: Type.Union([Type.Object({
|
|
549
546
|
free: Type.Number(),
|
|
@@ -552,6 +549,7 @@ const listServers = {
|
|
|
552
549
|
environments: Type.Integer(),
|
|
553
550
|
maxEnvironments: Type.Union([Type.Integer(), Type.Null()])
|
|
554
551
|
}),
|
|
552
|
+
displayName: Type.Union([Type.String(), Type.Null()]),
|
|
555
553
|
ipv4: Type.Union([Type.String(), Type.Null()]),
|
|
556
554
|
ipv4Requested: Type.Boolean(),
|
|
557
555
|
ipv4Status: Type.Union([
|
|
@@ -559,7 +557,14 @@ const listServers = {
|
|
|
559
557
|
Type.Literal("detaching"),
|
|
560
558
|
Type.Null()
|
|
561
559
|
]),
|
|
562
|
-
|
|
560
|
+
ipv6: Type.Union([Type.String(), Type.Null()]),
|
|
561
|
+
maintenanceHour: Type.Integer(),
|
|
562
|
+
ownerMail: Type.Union([Type.String(), Type.Null()]),
|
|
563
|
+
readyAt: Type.Union([Type.String(), Type.Null()]),
|
|
564
|
+
role: Type.Union([Type.Literal("member"), Type.Literal("owner")]),
|
|
565
|
+
status: Type.String(),
|
|
566
|
+
tier: Type.Union([Type.String(), Type.Null()]),
|
|
567
|
+
url: Type.Union([Type.String(), Type.Null()])
|
|
563
568
|
})) },
|
|
564
569
|
url: "/deploy/servers"
|
|
565
570
|
};
|
|
@@ -587,7 +592,7 @@ const removeServerMember = {
|
|
|
587
592
|
serverId: Type.String({ format: "uuid" }),
|
|
588
593
|
userId: Type.String({ format: "uuid" })
|
|
589
594
|
}),
|
|
590
|
-
response: { 200: messageResponse },
|
|
595
|
+
response: { 200: messageResponse$1 },
|
|
591
596
|
url: "/deploy/servers/:serverId/members/:userId"
|
|
592
597
|
};
|
|
593
598
|
const monitoringLink = {
|
|
@@ -659,7 +664,7 @@ const addDomain = {
|
|
|
659
664
|
const removeDomain = {
|
|
660
665
|
type: "delete",
|
|
661
666
|
params: domainParams,
|
|
662
|
-
response: { 200: messageResponse },
|
|
667
|
+
response: { 200: messageResponse$1 },
|
|
663
668
|
url: "/deploy/:appId/:environment/domains/:domainId"
|
|
664
669
|
};
|
|
665
670
|
const verifyDomain = {
|
|
@@ -698,13 +703,13 @@ const setEnvironmentAccess = {
|
|
|
698
703
|
type: "put",
|
|
699
704
|
body: Type.Object({ isPrivate: Type.Boolean() }),
|
|
700
705
|
params: environmentParams,
|
|
701
|
-
response: { 200: messageResponse },
|
|
706
|
+
response: { 200: messageResponse$1 },
|
|
702
707
|
url: "/deploy/:appId/:environment/access"
|
|
703
708
|
};
|
|
704
709
|
const revokeEnvironmentLinks = {
|
|
705
710
|
type: "post",
|
|
706
711
|
params: environmentParams,
|
|
707
|
-
response: { 200: messageResponse },
|
|
712
|
+
response: { 200: messageResponse$1 },
|
|
708
713
|
url: "/deploy/:appId/:environment/revoke-links"
|
|
709
714
|
};
|
|
710
715
|
const events = {
|
|
@@ -733,7 +738,7 @@ const setVariables = {
|
|
|
733
738
|
type: "put",
|
|
734
739
|
body: Type.Object({ variables: Type.String({ maxLength: 65536 }) }),
|
|
735
740
|
params: environmentParams,
|
|
736
|
-
response: { 200: messageResponse },
|
|
741
|
+
response: { 200: messageResponse$1 },
|
|
737
742
|
url: "/deploy/:appId/:environment/variables"
|
|
738
743
|
};
|
|
739
744
|
const rollback = {
|
|
@@ -757,20 +762,20 @@ const promote = {
|
|
|
757
762
|
const destroyEnvironment = {
|
|
758
763
|
type: "delete",
|
|
759
764
|
params: environmentParams,
|
|
760
|
-
response: { 200: messageResponse },
|
|
765
|
+
response: { 200: messageResponse$1 },
|
|
761
766
|
url: "/deploy/:appId/:environment"
|
|
762
767
|
};
|
|
763
768
|
const destroyApplication = {
|
|
764
769
|
type: "delete",
|
|
765
770
|
params: Type.Object({ appId: Type.String({ format: "uuid" }) }),
|
|
766
|
-
response: { 200: messageResponse },
|
|
771
|
+
response: { 200: messageResponse$1 },
|
|
767
772
|
url: "/deploy/:appId"
|
|
768
773
|
};
|
|
769
774
|
const setAutoUpdate = {
|
|
770
775
|
type: "put",
|
|
771
776
|
body: Type.Object({ enabled: Type.Boolean() }),
|
|
772
777
|
params: Type.Object({ appId: Type.String({ format: "uuid" }) }),
|
|
773
|
-
response: { 200: messageResponse },
|
|
778
|
+
response: { 200: messageResponse$1 },
|
|
774
779
|
url: "/deploy/:appId/auto-update"
|
|
775
780
|
};
|
|
776
781
|
const updateServer = {
|
|
@@ -780,14 +785,14 @@ const updateServer = {
|
|
|
780
785
|
minimum: 0
|
|
781
786
|
}) }),
|
|
782
787
|
params: Type.Object({ serverId: Type.String({ format: "uuid" }) }),
|
|
783
|
-
response: { 200: messageResponse },
|
|
788
|
+
response: { 200: messageResponse$1 },
|
|
784
789
|
url: "/deploy/servers/:serverId"
|
|
785
790
|
};
|
|
786
791
|
const setServerIpv4 = {
|
|
787
792
|
type: "put",
|
|
788
793
|
body: Type.Object({ enabled: Type.Boolean() }),
|
|
789
794
|
params: serverParams,
|
|
790
|
-
response: { 200: messageResponse },
|
|
795
|
+
response: { 200: messageResponse$1 },
|
|
791
796
|
url: "/deploy/servers/:serverId/ipv4"
|
|
792
797
|
};
|
|
793
798
|
const listServerAlerts = {
|
|
@@ -916,8 +921,8 @@ const versions = {
|
|
|
916
921
|
url: "/desktop/release/versions"
|
|
917
922
|
};
|
|
918
923
|
var file_exports = /* @__PURE__ */ __exportAll({
|
|
919
|
-
list: () => list$
|
|
920
|
-
remove: () => remove$
|
|
924
|
+
list: () => list$3,
|
|
925
|
+
remove: () => remove$2,
|
|
921
926
|
status: () => status,
|
|
922
927
|
upload: () => upload
|
|
923
928
|
});
|
|
@@ -938,13 +943,13 @@ const upload = {
|
|
|
938
943
|
}) },
|
|
939
944
|
url: "/file/upload"
|
|
940
945
|
};
|
|
941
|
-
const remove$
|
|
946
|
+
const remove$2 = {
|
|
942
947
|
type: "post",
|
|
943
948
|
body: Type.Object({ target: Type.String() }),
|
|
944
949
|
response: { 200: Type.Object({ message: Type.String() }) },
|
|
945
950
|
url: "/file/remove"
|
|
946
951
|
};
|
|
947
|
-
const list$
|
|
952
|
+
const list$3 = {
|
|
948
953
|
type: "get",
|
|
949
954
|
querystring: Type.Object({
|
|
950
955
|
limit: Type.Optional(Type.String()),
|
|
@@ -991,7 +996,7 @@ var license_exports = /* @__PURE__ */ __exportAll({
|
|
|
991
996
|
check: () => check,
|
|
992
997
|
connect: () => connect,
|
|
993
998
|
link: () => link,
|
|
994
|
-
list: () => list$
|
|
999
|
+
list: () => list$2,
|
|
995
1000
|
reset: () => reset
|
|
996
1001
|
});
|
|
997
1002
|
const TypeMachineFingerprint = Type.String({ pattern: "^v1:[0-9a-f]{64}$" });
|
|
@@ -1029,7 +1034,7 @@ const check = {
|
|
|
1029
1034
|
}) },
|
|
1030
1035
|
url: "/license/check"
|
|
1031
1036
|
};
|
|
1032
|
-
const list$
|
|
1037
|
+
const list$2 = {
|
|
1033
1038
|
type: "get",
|
|
1034
1039
|
response: { 200: Type.Array(Type.Object({
|
|
1035
1040
|
id: Type.String(),
|
|
@@ -1142,20 +1147,14 @@ const listServerSubscriptions = {
|
|
|
1142
1147
|
var project_exports = /* @__PURE__ */ __exportAll({
|
|
1143
1148
|
create: () => create,
|
|
1144
1149
|
edit: () => edit,
|
|
1145
|
-
list: () => list,
|
|
1146
|
-
remove: () => remove,
|
|
1150
|
+
list: () => list$1,
|
|
1151
|
+
remove: () => remove$1,
|
|
1147
1152
|
star: () => star
|
|
1148
1153
|
});
|
|
1149
1154
|
const create = {
|
|
1150
1155
|
type: "post",
|
|
1151
1156
|
body: Type.Object({
|
|
1152
1157
|
icon: Type.String(),
|
|
1153
|
-
template: Type.Union([
|
|
1154
|
-
Type.Literal("default"),
|
|
1155
|
-
Type.Literal("landing"),
|
|
1156
|
-
Type.Literal("nuxt"),
|
|
1157
|
-
Type.Literal("testing")
|
|
1158
|
-
]),
|
|
1159
1158
|
title: Type.String()
|
|
1160
1159
|
}),
|
|
1161
1160
|
response: { 200: Type.Object({
|
|
@@ -1164,7 +1163,7 @@ const create = {
|
|
|
1164
1163
|
}) },
|
|
1165
1164
|
url: "/project/create"
|
|
1166
1165
|
};
|
|
1167
|
-
const list = {
|
|
1166
|
+
const list$1 = {
|
|
1168
1167
|
type: "get",
|
|
1169
1168
|
params: Type.Object({ type: Type.Union([
|
|
1170
1169
|
Type.Literal("mine"),
|
|
@@ -1181,7 +1180,7 @@ const list = {
|
|
|
1181
1180
|
response: { 200: Type.Object({ projects: Type.Array(types.publicProject) }) },
|
|
1182
1181
|
url: "/project/list/:type"
|
|
1183
1182
|
};
|
|
1184
|
-
const remove = {
|
|
1183
|
+
const remove$1 = {
|
|
1185
1184
|
type: "delete",
|
|
1186
1185
|
params: Type.Object({ id: Type.String() }),
|
|
1187
1186
|
response: { 200: Type.Object({ message: Type.String() }) },
|
|
@@ -1204,10 +1203,10 @@ const star = {
|
|
|
1204
1203
|
};
|
|
1205
1204
|
var script_exports = /* @__PURE__ */ __exportAll({
|
|
1206
1205
|
compile: () => compile,
|
|
1207
|
-
get: () => get$
|
|
1206
|
+
get: () => get$2,
|
|
1208
1207
|
update: () => update$1
|
|
1209
1208
|
});
|
|
1210
|
-
const get$
|
|
1209
|
+
const get$2 = {
|
|
1211
1210
|
type: "get",
|
|
1212
1211
|
params: Type.Object({
|
|
1213
1212
|
id: Type.String(),
|
|
@@ -1235,6 +1234,55 @@ const update$1 = {
|
|
|
1235
1234
|
response: { 200: Type.Object({ message: Type.String() }) },
|
|
1236
1235
|
url: "/script/:id/:script/update"
|
|
1237
1236
|
};
|
|
1237
|
+
var secret_exports = /* @__PURE__ */ __exportAll({
|
|
1238
|
+
get: () => get$1,
|
|
1239
|
+
list: () => list,
|
|
1240
|
+
remove: () => remove,
|
|
1241
|
+
set: () => set
|
|
1242
|
+
});
|
|
1243
|
+
const projectParams = Type.Object({ id: Type.String() });
|
|
1244
|
+
const secretQuery = Type.Object({
|
|
1245
|
+
name: Type.String({
|
|
1246
|
+
maxLength: 128,
|
|
1247
|
+
pattern: "^[A-Za-z_][A-Za-z0-9_]*$"
|
|
1248
|
+
}),
|
|
1249
|
+
scope: Type.String({
|
|
1250
|
+
maxLength: 128,
|
|
1251
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9_-]*(/[A-Za-z0-9][A-Za-z0-9_-]*)?$"
|
|
1252
|
+
})
|
|
1253
|
+
});
|
|
1254
|
+
const messageResponse = Type.Object({ message: Type.String() });
|
|
1255
|
+
const list = {
|
|
1256
|
+
type: "get",
|
|
1257
|
+
params: projectParams,
|
|
1258
|
+
response: { 200: Type.Object({ secrets: Type.Array(Type.Object({
|
|
1259
|
+
name: Type.String(),
|
|
1260
|
+
scope: Type.String()
|
|
1261
|
+
})) }) },
|
|
1262
|
+
url: "/project/:id/secrets"
|
|
1263
|
+
};
|
|
1264
|
+
const get$1 = {
|
|
1265
|
+
type: "get",
|
|
1266
|
+
params: projectParams,
|
|
1267
|
+
querystring: secretQuery,
|
|
1268
|
+
response: { 200: Type.Object({ value: Type.String() }) },
|
|
1269
|
+
url: "/project/:id/secret"
|
|
1270
|
+
};
|
|
1271
|
+
const set = {
|
|
1272
|
+
type: "put",
|
|
1273
|
+
body: Type.Object({ value: Type.String({ maxLength: 65536 }) }),
|
|
1274
|
+
params: projectParams,
|
|
1275
|
+
querystring: secretQuery,
|
|
1276
|
+
response: { 200: messageResponse },
|
|
1277
|
+
url: "/project/:id/secret"
|
|
1278
|
+
};
|
|
1279
|
+
const remove = {
|
|
1280
|
+
type: "delete",
|
|
1281
|
+
params: projectParams,
|
|
1282
|
+
querystring: secretQuery,
|
|
1283
|
+
response: { 200: messageResponse },
|
|
1284
|
+
url: "/project/:id/secret"
|
|
1285
|
+
};
|
|
1238
1286
|
var turnstile_exports = /* @__PURE__ */ __exportAll({ tick: () => tick });
|
|
1239
1287
|
const shortText = Type.String({ maxLength: 256 });
|
|
1240
1288
|
const longText = Type.String({ maxLength: 5e4 });
|
|
@@ -1261,9 +1309,6 @@ function tickEvent(scope, data) {
|
|
|
1261
1309
|
scope: Type.Literal(scope)
|
|
1262
1310
|
});
|
|
1263
1311
|
}
|
|
1264
|
-
/**
|
|
1265
|
-
* Validated by `scope` only: with the server's `removeAdditional`, a plain union strips the fields of later events while trying earlier ones
|
|
1266
|
-
*/
|
|
1267
1312
|
const tickEvents = Type.Union([
|
|
1268
1313
|
tickEvent("page", {
|
|
1269
1314
|
event: Type.Literal("view"),
|
|
@@ -1278,6 +1323,17 @@ const tickEvents = Type.Union([
|
|
|
1278
1323
|
event: Type.Literal("arrive"),
|
|
1279
1324
|
subject: shortText
|
|
1280
1325
|
}),
|
|
1326
|
+
tickEvent("landing", {
|
|
1327
|
+
event: Type.Union([
|
|
1328
|
+
Type.Literal("start"),
|
|
1329
|
+
Type.Literal("download"),
|
|
1330
|
+
Type.Literal("video"),
|
|
1331
|
+
Type.Literal("template"),
|
|
1332
|
+
Type.Literal("edit"),
|
|
1333
|
+
Type.Literal("compare")
|
|
1334
|
+
]),
|
|
1335
|
+
subject: Type.Optional(shortText)
|
|
1336
|
+
}),
|
|
1281
1337
|
tickEvent("challenge", {
|
|
1282
1338
|
attempt: Type.Optional(Type.Integer({
|
|
1283
1339
|
maximum: 1e4,
|
|
@@ -1434,6 +1490,7 @@ const routes = {
|
|
|
1434
1490
|
payment: payment_exports,
|
|
1435
1491
|
project: project_exports,
|
|
1436
1492
|
script: script_exports,
|
|
1493
|
+
secret: secret_exports,
|
|
1437
1494
|
turnstile: turnstile_exports,
|
|
1438
1495
|
user: user_exports
|
|
1439
1496
|
};
|
|
@@ -1496,7 +1553,18 @@ const primitives = [
|
|
|
1496
1553
|
EVarType.unknown
|
|
1497
1554
|
];
|
|
1498
1555
|
const ordered = [EVarType.number, EVarType.string];
|
|
1499
|
-
comparison("===", 8, primitives, (input, [arg]) => input === arg), comparison("!==", 8, primitives, (input, [arg]) => input !== arg), comparison(">", 9, ordered, (input, [arg]) => input > arg), comparison(">=", 9, ordered, (input, [arg]) => input >= arg), comparison("<", 9, ordered, (input, [arg]) => input < arg), comparison("<=", 9, ordered, (input, [arg]) => input <= arg), binary("&&", 4, [EVarType.boolean], (input, [arg]) => Boolean(input && arg)), binary("||", 3, primitives, (input, [arg]) => input || arg), binary("+", 11, [EVarType.number, EVarType.string], (input, [arg]) => input + arg
|
|
1556
|
+
comparison("===", 8, primitives, (input, [arg]) => input === arg), comparison("!==", 8, primitives, (input, [arg]) => input !== arg), comparison(">", 9, ordered, (input, [arg]) => input > arg), comparison(">=", 9, ordered, (input, [arg]) => input >= arg), comparison("<", 9, ordered, (input, [arg]) => input < arg), comparison("<=", 9, ordered, (input, [arg]) => input <= arg), binary("&&", 4, [EVarType.boolean], (input, [arg]) => Boolean(input && arg)), binary("||", 3, primitives, (input, [arg]) => input || arg), binary("+", 11, [EVarType.number, EVarType.string], (input, [arg]) => input + arg, (input, [arg]) => {
|
|
1557
|
+
return [input, arg].some((schema) => isSchemaType(schema, EVarType.string)) ? LogicType.string() : strip(input);
|
|
1558
|
+
}), binary("-", 11, [EVarType.number], (input, [arg]) => input - arg), binary("*", 12, [EVarType.number], (input, [arg]) => input * arg), binary("/", 12, [EVarType.number], (input, [arg]) => input / arg), binary("%", 12, [EVarType.number], (input, [arg]) => input % arg), EVarType.boolean, EVarType.number, EVarType.unknown, LogicType.string(), EVarType.boolean, EVarType.string, EVarType.unknown, LogicType.number(), EVarType.number, EVarType.string, EVarType.unknown, LogicType.boolean();
|
|
1559
|
+
function getSecretEnvName(scope, name) {
|
|
1560
|
+
return `${scope}_${name}`.replaceAll(/[^a-zA-Z0-9]+/g, "_").toUpperCase();
|
|
1561
|
+
}
|
|
1562
|
+
function getPluginSecretScope(pluginId) {
|
|
1563
|
+
return `plugin/${pluginId}`;
|
|
1564
|
+
}
|
|
1565
|
+
function getPluginSecretEnvName(pluginId, name) {
|
|
1566
|
+
return getSecretEnvName(getPluginSecretScope(pluginId), name);
|
|
1567
|
+
}
|
|
1500
1568
|
// src/types/hooks.ts
|
|
1501
1569
|
let EPluginHooks = /* @__PURE__ */ function(EPluginHooks) {
|
|
1502
1570
|
EPluginHooks["BackendMiddleware"] = "backend/middleware";
|
|
@@ -1569,55 +1637,7 @@ const baseEvent = LogicType.object({
|
|
|
1569
1637
|
target: LogicType.interface("HTMLElement")
|
|
1570
1638
|
});
|
|
1571
1639
|
LogicType.object({ ...baseEvent.properties }, { name: "Event" });
|
|
1572
|
-
LogicType.object({
|
|
1573
|
-
...baseEvent.properties,
|
|
1574
|
-
data: LogicType.string({
|
|
1575
|
-
description: "Value of the character inserted",
|
|
1576
|
-
example: "a"
|
|
1577
|
-
}),
|
|
1578
|
-
inputType: LogicType.string({
|
|
1579
|
-
description: "Type of change",
|
|
1580
|
-
example: "insertText"
|
|
1581
|
-
})
|
|
1582
|
-
}, { name: "Input Event" }), LogicType.object({
|
|
1583
|
-
...baseEvent.properties,
|
|
1584
|
-
altKey: LogicType.boolean({
|
|
1585
|
-
description: "Alt key was pressed",
|
|
1586
|
-
example: false
|
|
1587
|
-
}),
|
|
1588
|
-
charCode: LogicType.number({
|
|
1589
|
-
description: "Unicode value of a character key pressed",
|
|
1590
|
-
example: 97
|
|
1591
|
-
}),
|
|
1592
|
-
code: LogicType.string({
|
|
1593
|
-
description: "Physical key code",
|
|
1594
|
-
example: "KeyA"
|
|
1595
|
-
}),
|
|
1596
|
-
ctrlKey: LogicType.boolean({
|
|
1597
|
-
description: "Ctrl key was pressed",
|
|
1598
|
-
example: false
|
|
1599
|
-
}),
|
|
1600
|
-
key: LogicType.string({
|
|
1601
|
-
description: "Value of a key or keys pressed by the user",
|
|
1602
|
-
example: "a"
|
|
1603
|
-
}),
|
|
1604
|
-
keyCode: LogicType.number({
|
|
1605
|
-
description: "Unicode value of a non-character key",
|
|
1606
|
-
example: 65
|
|
1607
|
-
}),
|
|
1608
|
-
metaKey: LogicType.boolean({
|
|
1609
|
-
description: "Meta key was pressed",
|
|
1610
|
-
example: false
|
|
1611
|
-
}),
|
|
1612
|
-
repeat: LogicType.boolean({
|
|
1613
|
-
description: "Key is being held down and repeating",
|
|
1614
|
-
example: false
|
|
1615
|
-
}),
|
|
1616
|
-
shiftKey: LogicType.boolean({
|
|
1617
|
-
description: "Shift key was pressed",
|
|
1618
|
-
example: false
|
|
1619
|
-
})
|
|
1620
|
-
}, { name: "Keyboard Event" }), LogicType.object({
|
|
1640
|
+
const mouseEvent = LogicType.object({
|
|
1621
1641
|
...baseEvent.properties,
|
|
1622
1642
|
altKey: LogicType.boolean({
|
|
1623
1643
|
description: "Alt key was pressed",
|
|
@@ -1679,7 +1699,74 @@ LogicType.object({
|
|
|
1679
1699
|
description: "Shift key was pressed",
|
|
1680
1700
|
example: false
|
|
1681
1701
|
})
|
|
1682
|
-
}, { name: "Mouse Event" })
|
|
1702
|
+
}, { name: "Mouse Event" });
|
|
1703
|
+
LogicType.object({
|
|
1704
|
+
...baseEvent.properties,
|
|
1705
|
+
data: LogicType.string({
|
|
1706
|
+
description: "Value of the character inserted",
|
|
1707
|
+
example: "a"
|
|
1708
|
+
}),
|
|
1709
|
+
inputType: LogicType.string({
|
|
1710
|
+
description: "Type of change",
|
|
1711
|
+
example: "insertText"
|
|
1712
|
+
})
|
|
1713
|
+
}, { name: "Input Event" }), LogicType.object({
|
|
1714
|
+
...baseEvent.properties,
|
|
1715
|
+
altKey: LogicType.boolean({
|
|
1716
|
+
description: "Alt key was pressed",
|
|
1717
|
+
example: false
|
|
1718
|
+
}),
|
|
1719
|
+
charCode: LogicType.number({
|
|
1720
|
+
description: "Unicode value of a character key pressed",
|
|
1721
|
+
example: 97
|
|
1722
|
+
}),
|
|
1723
|
+
code: LogicType.string({
|
|
1724
|
+
description: "Physical key code",
|
|
1725
|
+
example: "KeyA"
|
|
1726
|
+
}),
|
|
1727
|
+
ctrlKey: LogicType.boolean({
|
|
1728
|
+
description: "Ctrl key was pressed",
|
|
1729
|
+
example: false
|
|
1730
|
+
}),
|
|
1731
|
+
key: LogicType.string({
|
|
1732
|
+
description: "Value of a key or keys pressed by the user",
|
|
1733
|
+
example: "a"
|
|
1734
|
+
}),
|
|
1735
|
+
keyCode: LogicType.number({
|
|
1736
|
+
description: "Unicode value of a non-character key",
|
|
1737
|
+
example: 65
|
|
1738
|
+
}),
|
|
1739
|
+
metaKey: LogicType.boolean({
|
|
1740
|
+
description: "Meta key was pressed",
|
|
1741
|
+
example: false
|
|
1742
|
+
}),
|
|
1743
|
+
repeat: LogicType.boolean({
|
|
1744
|
+
description: "Key is being held down and repeating",
|
|
1745
|
+
example: false
|
|
1746
|
+
}),
|
|
1747
|
+
shiftKey: LogicType.boolean({
|
|
1748
|
+
description: "Shift key was pressed",
|
|
1749
|
+
example: false
|
|
1750
|
+
})
|
|
1751
|
+
}, { name: "Keyboard Event" }), LogicType.object({
|
|
1752
|
+
...mouseEvent.properties,
|
|
1753
|
+
isPrimary: LogicType.boolean({
|
|
1754
|
+
description: "Pointer is the primary one of its type (first finger, main mouse)",
|
|
1755
|
+
example: true
|
|
1756
|
+
}),
|
|
1757
|
+
pointerId: LogicType.number({
|
|
1758
|
+
description: "Unique ID of the pointer causing the event",
|
|
1759
|
+
example: 1
|
|
1760
|
+
}),
|
|
1761
|
+
pointerType: LogicType.string({
|
|
1762
|
+
description: "Device type: mouse, pen or touch",
|
|
1763
|
+
example: "mouse"
|
|
1764
|
+
}),
|
|
1765
|
+
pressure: LogicType.number({
|
|
1766
|
+
description: "Normalized pressure, from 0 to 1",
|
|
1767
|
+
example: .5
|
|
1768
|
+
})
|
|
1769
|
+
}, { name: "Pointer Event" }), LogicType.object({
|
|
1683
1770
|
...baseEvent.properties,
|
|
1684
1771
|
submitter: LogicType.interface("HTMLElement", { description: "Button that submitted the form" })
|
|
1685
1772
|
}, { name: "Submit Event" }), LogicType.object({
|
|
@@ -1712,7 +1799,7 @@ let ETokenType = /* @__PURE__ */ function(ETokenType) {
|
|
|
1712
1799
|
return ETokenType;
|
|
1713
1800
|
}({});
|
|
1714
1801
|
function buildGridSpan(value) {
|
|
1715
|
-
return
|
|
1802
|
+
return typeof value === "number" ? `span ${value}` : value;
|
|
1716
1803
|
}
|
|
1717
1804
|
LogicType.object({
|
|
1718
1805
|
background: LogicType.object({
|
|
@@ -2529,4 +2616,4 @@ async function getPluginParam(target, env) {
|
|
|
2529
2616
|
});
|
|
2530
2617
|
return target;
|
|
2531
2618
|
}
|
|
2532
|
-
export { EDBCondition, EDBOperation, EElementType, EInjectionKey, ELogicScope, ELogicType, EPluginHooks, ETokenType, EVarType, LSettingsStoryWrapper_default as LSettingsStoryWrapper, LogicType, LogicUtil, getPluginApi, getPluginParam, loadPlugin, makeComponent, makeLogicNode, makePlugin, sortPlugins };
|
|
2619
|
+
export { EDBCondition, EDBOperation, EElementType, EInjectionKey, ELogicScope, ELogicType, EPluginHooks, ETokenType, EVarType, LSettingsStoryWrapper_default as LSettingsStoryWrapper, LogicType, LogicUtil, getPluginApi, getPluginParam, getPluginSecretEnvName, loadPlugin, makeComponent, makeLogicNode, makePlugin, sortPlugins };
|