@luna-park/plugin 1.2.1 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16,7 +16,9 @@ function _sfc_render(y, J) {
16
16
  return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(y.$slots, "default", {}, void 0, !0)]);
17
17
  }
18
18
  var LSettingsStoryWrapper_default = /* @__PURE__ */ __plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-8d6cff07"]]);
19
- let EInjectionKey = /* @__PURE__ */ function(y) {
19
+ let EPluginHooks = /* @__PURE__ */ function(y) {
20
+ return y.BackendMiddleware = "backend/middleware", y.BackendInputNode = "backend/input-node", y;
21
+ }({}), EInjectionKey = /* @__PURE__ */ function(y) {
20
22
  return y.ViteImport = "viteImport", y.VitePlugin = "vitePlugin", y.AppImport = "appImport", y.AppBody = "appBody", y.AppSetup = "appSetup", y.Style = "style", y.ServerImport = "serverImport", y.ServerBody = "serverBody", y;
21
23
  }({}), ETokenType = /* @__PURE__ */ function(y) {
22
24
  return y.Color = "color", y.FontSize = "font-size", y.FontWeight = "font-weight", y.FontFamily = "font-family", y.Length = "length", y.Time = "time", y;
@@ -2183,7 +2185,8 @@ var Type = /* @__PURE__ */ __export$1({
2183
2185
  return J && __defProp(Y, Symbol.toStringTag, { value: "Module" }), Y;
2184
2186
  }, config = {
2185
2187
  backendUrl: "https://luna-park.app",
2186
- hostUrl: "https://host.luna-park.app"
2188
+ hostUrl: "https://host.luna-park.app",
2189
+ webSocketUrl: "wss://luna-park.app"
2187
2190
  }, baseConfig = {
2188
2191
  credentials: "include",
2189
2192
  headers: {
@@ -2478,15 +2481,6 @@ var user = Type.Object({
2478
2481
  }),
2479
2482
  response: { 200: Type.Object({ client_name: Type.String() }) },
2480
2483
  url: "/auth/client"
2481
- }, integrations_exports = /* @__PURE__ */ __export({ googleAuth: () => googleAuth }, 1), googleAuth = {
2482
- type: ERouteType.Get,
2483
- querystring: Type.Object({
2484
- code: Type.Optional(Type.String()),
2485
- scope: Type.Optional(Type.String()),
2486
- state: Type.Optional(Type.String())
2487
- }),
2488
- response: { 200: Type.Object({ token: Type.Optional(Type.String()) }) },
2489
- url: "/integrations/google/auth"
2490
2484
  }, compiler_exports = /* @__PURE__ */ __export({
2491
2485
  build: () => build,
2492
2486
  compile: () => compile$1,
@@ -2570,11 +2564,76 @@ var user = Type.Object({
2570
2564
  version: Type.String()
2571
2565
  }) },
2572
2566
  url: "/desktop/release/latest"
2567
+ }, file_exports = /* @__PURE__ */ __export({
2568
+ list: () => list$3,
2569
+ remove: () => remove$2,
2570
+ status: () => status,
2571
+ upload: () => upload
2572
+ }, 1), upload = {
2573
+ type: ERouteType.Post,
2574
+ body: Type.Object({
2575
+ file: Type.Object({
2576
+ filename: Type.String(),
2577
+ mimetype: Type.String()
2578
+ }),
2579
+ project: Type.Object({ value: Type.String() })
2580
+ }),
2581
+ multipart: !0,
2582
+ response: { 200: Type.Object({
2583
+ name: Type.String(),
2584
+ mimeType: Type.String(),
2585
+ target: Type.String()
2586
+ }) },
2587
+ url: "/file/upload"
2588
+ }, remove$2 = {
2589
+ type: ERouteType.Post,
2590
+ body: Type.Object({ target: Type.String() }),
2591
+ response: { 200: Type.Object({ message: Type.String() }) },
2592
+ url: "/file/remove"
2593
+ }, list$3 = {
2594
+ type: ERouteType.Get,
2595
+ querystring: Type.Object({
2596
+ limit: Type.Optional(Type.String()),
2597
+ search: Type.Optional(Type.String()),
2598
+ skip: Type.Optional(Type.String())
2599
+ }),
2600
+ response: { 200: Type.Object({
2601
+ result: Type.Array(Type.Object({
2602
+ id: Type.String(),
2603
+ name: Type.String(),
2604
+ mimeType: Type.String(),
2605
+ project: Type.Object({
2606
+ id: Type.String(),
2607
+ name: Type.String(),
2608
+ icon: Type.String()
2609
+ }),
2610
+ size: Type.Number(),
2611
+ target: Type.String()
2612
+ })),
2613
+ total: Type.Number()
2614
+ }) },
2615
+ url: "/file/list"
2616
+ }, status = {
2617
+ type: ERouteType.Get,
2618
+ response: { 200: Type.Object({
2619
+ limit: Type.Number(),
2620
+ total: Type.Number()
2621
+ }) },
2622
+ url: "/file/status"
2623
+ }, integrations_exports = /* @__PURE__ */ __export({ googleAuth: () => googleAuth }, 1), googleAuth = {
2624
+ type: ERouteType.Get,
2625
+ querystring: Type.Object({
2626
+ code: Type.Optional(Type.String()),
2627
+ scope: Type.Optional(Type.String()),
2628
+ state: Type.Optional(Type.String())
2629
+ }),
2630
+ response: { 200: Type.Object({ token: Type.Optional(Type.String()) }) },
2631
+ url: "/integrations/google/auth"
2573
2632
  }, keyConfig_exports = /* @__PURE__ */ __export({
2574
2633
  check: () => check$1,
2575
2634
  create: () => create$2,
2576
- list: () => list$3,
2577
- remove: () => remove$2
2635
+ list: () => list$2,
2636
+ remove: () => remove$1
2578
2637
  }, 1), create$2 = {
2579
2638
  type: ERouteType.Post,
2580
2639
  body: Type.Object({ domain: Type.String() }),
@@ -2583,11 +2642,11 @@ var user = Type.Object({
2583
2642
  message: Type.String()
2584
2643
  }) },
2585
2644
  url: "/key-config"
2586
- }, list$3 = {
2645
+ }, list$2 = {
2587
2646
  type: ERouteType.Get,
2588
2647
  response: { 200: Type.Array(types.keyConfig) },
2589
2648
  url: "/key-config"
2590
- }, remove$2 = {
2649
+ }, remove$1 = {
2591
2650
  type: ERouteType.Delete,
2592
2651
  params: Type.Object({ id: Type.String() }),
2593
2652
  response: { 200: Type.Object({ message: Type.String() }) },
@@ -2604,7 +2663,7 @@ var user = Type.Object({
2604
2663
  }, license_exports = /* @__PURE__ */ __export({
2605
2664
  check: () => check,
2606
2665
  link: () => link,
2607
- list: () => list$2,
2666
+ list: () => list$1,
2608
2667
  reset: () => reset
2609
2668
  }, 1), reset = {
2610
2669
  type: ERouteType.Post,
@@ -2634,7 +2693,7 @@ var user = Type.Object({
2634
2693
  version: Type.Optional(Type.String())
2635
2694
  }) },
2636
2695
  url: "/license/check"
2637
- }, list$2 = {
2696
+ }, list$1 = {
2638
2697
  type: ERouteType.Get,
2639
2698
  response: { 200: Type.Array(Type.Object({
2640
2699
  id: Type.String(),
@@ -2694,14 +2753,13 @@ var user = Type.Object({
2694
2753
  }, project_exports = /* @__PURE__ */ __export({
2695
2754
  create: () => create,
2696
2755
  edit: () => edit,
2697
- list: () => list$1,
2756
+ list: () => list,
2698
2757
  proxy: () => proxy,
2699
- remove: () => remove$1,
2758
+ remove: () => remove,
2700
2759
  star: () => star
2701
2760
  }, 1), create = {
2702
2761
  type: ERouteType.Post,
2703
2762
  body: Type.Object({
2704
- title: Type.String(),
2705
2763
  icon: Type.String(),
2706
2764
  template: Type.Union([
2707
2765
  Type.Literal("default"),
@@ -2710,14 +2768,15 @@ var user = Type.Object({
2710
2768
  Type.Literal("backend"),
2711
2769
  Type.Literal("database"),
2712
2770
  Type.Literal("testing")
2713
- ])
2771
+ ]),
2772
+ title: Type.String()
2714
2773
  }),
2715
2774
  response: { 200: Type.Object({
2716
2775
  message: Type.String(),
2717
2776
  project: types.publicProject
2718
2777
  }) },
2719
2778
  url: "/project/create"
2720
- }, list$1 = {
2779
+ }, list = {
2721
2780
  type: ERouteType.Get,
2722
2781
  params: Type.Object({ type: Type.Union([
2723
2782
  Type.Literal("mine"),
@@ -2733,7 +2792,7 @@ var user = Type.Object({
2733
2792
  }),
2734
2793
  response: { 200: Type.Object({ projects: Type.Array(types.publicProject) }) },
2735
2794
  url: "/project/list/:type"
2736
- }, remove$1 = {
2795
+ }, remove = {
2737
2796
  type: ERouteType.Delete,
2738
2797
  params: Type.Object({ id: Type.String() }),
2739
2798
  response: { 200: Type.Object({ message: Type.String() }) },
@@ -2795,62 +2854,6 @@ var user = Type.Object({
2795
2854
  }),
2796
2855
  response: { 200: Type.Object({ message: Type.String() }) },
2797
2856
  url: "/script/:id/:script/update"
2798
- }, file_exports = /* @__PURE__ */ __export({
2799
- list: () => list,
2800
- remove: () => remove,
2801
- status: () => status,
2802
- upload: () => upload
2803
- }, 1), upload = {
2804
- type: ERouteType.Post,
2805
- body: Type.Object({
2806
- file: Type.Object({
2807
- filename: Type.String(),
2808
- mimetype: Type.String()
2809
- }),
2810
- project: Type.Object({ value: Type.String() })
2811
- }),
2812
- multipart: !0,
2813
- response: { 200: Type.Object({
2814
- name: Type.String(),
2815
- mimeType: Type.String(),
2816
- target: Type.String()
2817
- }) },
2818
- url: "/file/upload"
2819
- }, remove = {
2820
- type: ERouteType.Post,
2821
- body: Type.Object({ target: Type.String() }),
2822
- response: { 200: Type.Object({ message: Type.String() }) },
2823
- url: "/file/remove"
2824
- }, list = {
2825
- type: ERouteType.Get,
2826
- querystring: Type.Object({
2827
- limit: Type.Optional(Type.String()),
2828
- search: Type.Optional(Type.String()),
2829
- skip: Type.Optional(Type.String())
2830
- }),
2831
- response: { 200: Type.Object({
2832
- result: Type.Array(Type.Object({
2833
- id: Type.String(),
2834
- name: Type.String(),
2835
- mimeType: Type.String(),
2836
- project: Type.Object({
2837
- id: Type.String(),
2838
- name: Type.String(),
2839
- icon: Type.String()
2840
- }),
2841
- size: Type.Number(),
2842
- target: Type.String()
2843
- })),
2844
- total: Type.Number()
2845
- }) },
2846
- url: "/file/list"
2847
- }, status = {
2848
- type: ERouteType.Get,
2849
- response: { 200: Type.Object({
2850
- limit: Type.Number(),
2851
- total: Type.Number()
2852
- }) },
2853
- url: "/file/status"
2854
2857
  }, turnstile_exports = /* @__PURE__ */ __export({ tick: () => tick }, 1), tick = {
2855
2858
  type: ERouteType.Post,
2856
2859
  body: Type.Object({
@@ -2952,11 +2955,8 @@ async function loadPlugin(y, J) {
2952
2955
  }
2953
2956
  async function getPluginParam(y, J) {
2954
2957
  return typeof y == "function" ? y({
2955
- addFile: J.addFile,
2956
- app: J.app,
2957
- config: J.config,
2958
- internals: J.internals,
2959
- mode: J.mode || "editor"
2958
+ mode: "editor",
2959
+ ...J
2960
2960
  }) : y;
2961
2961
  }
2962
- export { EElementType, EInjectionKey, ELogicScope, ELogicType, ETokenType, EVarType, LSettingsStoryWrapper_default as LSettingsStoryWrapper, LogicType, LogicUtil, getPluginParam, loadPlugin, makeComponent, makeLogicNode, makePlugin };
2962
+ export { EElementType, EInjectionKey, ELogicScope, ELogicType, EPluginHooks, ETokenType, EVarType, LSettingsStoryWrapper_default as LSettingsStoryWrapper, LogicType, LogicUtil, getPluginParam, loadPlugin, makeComponent, makeLogicNode, makePlugin };
package/dist/preview.d.ts CHANGED
@@ -1,7 +1 @@
1
- export declare function startPreviewServer(config: {
2
- dist: string;
3
- externals: Array<string>;
4
- port: number;
5
- }): Promise<void>;
6
-
7
1
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luna-park/plugin",
3
- "version": "1.2.1",
3
+ "version": "1.3.1",
4
4
  "private": false,
5
5
  "description": "Plugin helper for Luna Park.",
6
6
  "homepage": "https://luna-park.app",
@@ -39,31 +39,31 @@
39
39
  "@fastify/cors": "^11.2.0",
40
40
  "@fastify/static": "^9.0.0",
41
41
  "@fortawesome/fontawesome-svg-core": "^7.2.0",
42
- "@luna-park/eslint-config": "^1.1.1",
43
- "@microsoft/api-extractor": "^7.56.3",
44
- "@vitejs/plugin-vue": "^6.0.4",
45
- "@vitest/ui": "^4.0.18",
46
- "eslint": "^10.0.0",
47
- "fastify": "^5.7.4",
48
- "rimraf": "^6.1.2",
49
- "typescript": "^5.9.3",
50
- "typescript-eslint": "^8.55.0",
42
+ "@luna-park/eslint-config": "^1.2.4",
43
+ "@microsoft/api-extractor": "^7.57.7",
44
+ "@vitejs/plugin-vue": "^6.0.5",
45
+ "@vitest/ui": "^4.1.2",
46
+ "eslint": "^10.1.0",
47
+ "fastify": "^5.8.4",
48
+ "rimraf": "^6.1.3",
49
+ "typescript": "^6.0.2",
50
+ "typescript-eslint": "^8.58.0",
51
51
  "unplugin-dts": "1.0.0-beta.6",
52
- "vite": "^7.3.1",
53
- "vitest": "^4.0.18",
54
- "vue": "^3.5.28",
52
+ "vite": "npm:rolldown-vite@7.3.1",
53
+ "vitest": "^4.1.2",
54
+ "vue": "^3.5.31",
55
+ "@luna-park/shared": "^1.0.0",
55
56
  "@luna-park/logicnodes": "^2.0.0",
56
- "@luna-park/utils": "^2.0.0",
57
- "@luna-park/shared": "^1.0.0"
57
+ "@luna-park/utils": "^2.0.0"
58
58
  },
59
59
  "peerDependencies": {
60
- "@fastify/cors": "^11.1.0",
61
- "@fastify/static": "^8.3.0",
62
- "@fortawesome/fontawesome-svg-core": "^7.1.0",
63
- "fastify": "^5.6.2",
60
+ "@fastify/cors": "^11.2.0",
61
+ "@fastify/static": "^9.0.0",
62
+ "@fortawesome/fontawesome-svg-core": "^7.2.0",
63
+ "fastify": "^5.7.4",
64
64
  "typescript": "^5.9.3",
65
- "vite": "^7.2.1",
66
- "vue": "^3.5.23"
65
+ "vite": "^7.3.1",
66
+ "vue": "^3.5.28"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "rimraf dist && vite build",