rsf-zero 0.1.6 → 0.1.7

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.
Files changed (50) hide show
  1. package/README.md +2 -0
  2. package/dist/cli/build/buildClientFiles.d.ts +3 -0
  3. package/dist/cli/build/buildClientFiles.d.ts.map +1 -0
  4. package/dist/cli/build/buildServerFiles.d.ts +3 -0
  5. package/dist/cli/build/buildServerFiles.d.ts.map +1 -0
  6. package/dist/cli/build.d.ts +2 -0
  7. package/dist/cli/build.d.ts.map +1 -0
  8. package/dist/cli/dev/startVite.d.ts +7 -0
  9. package/dist/cli/dev/startVite.d.ts.map +1 -0
  10. package/dist/cli/dev.d.ts +3 -0
  11. package/dist/cli/dev.d.ts.map +1 -0
  12. package/dist/cli/start/createActionRoute.d.ts +9 -0
  13. package/dist/cli/start/createActionRoute.d.ts.map +1 -0
  14. package/dist/cli/start.d.ts +4 -0
  15. package/dist/cli/start.d.ts.map +1 -0
  16. package/dist/cli/start.js +2 -2
  17. package/dist/cli.d.ts +3 -0
  18. package/dist/cli.d.ts.map +1 -0
  19. package/dist/cli.js +3 -1
  20. package/dist/debug.d.ts +2 -0
  21. package/dist/debug.d.ts.map +1 -0
  22. package/dist/export-types.d.ts +5 -0
  23. package/dist/export-types.d.ts.map +1 -0
  24. package/dist/export-types.js +1 -0
  25. package/dist/lib/client.d.ts +2 -0
  26. package/dist/lib/client.d.ts.map +1 -0
  27. package/dist/options.d.ts +11 -0
  28. package/dist/options.d.ts.map +1 -0
  29. package/dist/options.js +52 -0
  30. package/dist/transform/asRelativeImport.d.ts +13 -0
  31. package/dist/transform/asRelativeImport.d.ts.map +1 -0
  32. package/dist/transform/client/transformRsfForClientPlugin.d.ts +11 -0
  33. package/dist/transform/client/transformRsfForClientPlugin.d.ts.map +1 -0
  34. package/dist/transform/client/transformTopLevelRsf.d.ts +6 -0
  35. package/dist/transform/client/transformTopLevelRsf.d.ts.map +1 -0
  36. package/dist/transform/collectExportNames.d.ts +3 -0
  37. package/dist/transform/collectExportNames.d.ts.map +1 -0
  38. package/dist/transform/extname.d.ts +2 -0
  39. package/dist/transform/extname.d.ts.map +1 -0
  40. package/dist/transform/getActionId.d.ts +2 -0
  41. package/dist/transform/getActionId.d.ts.map +1 -0
  42. package/dist/transform/isTopLevelRsfFile.d.ts +2 -0
  43. package/dist/transform/isTopLevelRsfFile.d.ts.map +1 -0
  44. package/dist/transform/replaceFileExt.d.ts +2 -0
  45. package/dist/transform/replaceFileExt.d.ts.map +1 -0
  46. package/dist/transform/server/generateActionRegistry.d.ts +11 -0
  47. package/dist/transform/server/generateActionRegistry.d.ts.map +1 -0
  48. package/dist/types.d.ts +7 -0
  49. package/dist/types.d.ts.map +1 -0
  50. package/package.json +4 -1
package/README.md CHANGED
@@ -44,6 +44,8 @@ See [/example/src/App.tsx](https://github.com/IgorNadj/rsf-zero/tree/main/exampl
44
44
 
45
45
  **RSF Zero** is designed to be a dead simple micro-framework.
46
46
 
47
+ Read the [blog post](https://igornadj.io/blog/2025-08-02-rsf-is-all-you-need/) for the motivation behind it.
48
+
47
49
  🕊 **Minimal**: Add whatever you want on top, nothing bundled that you don't use\
48
50
  🕊 **Simple**: Add `'use server'` to run something on the server, and you're done, nothing new to learn\
49
51
  🕊️ **Done**: Instead, spend your spare time sipping a nice coffee or looking at a bird
@@ -0,0 +1,3 @@
1
+ import { Action } from "../../types.ts";
2
+ export declare const buildClientFiles: (rootDir: string, onActionFound: (action: Action) => {}) => Promise<void>;
3
+ //# sourceMappingURL=buildClientFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildClientFiles.d.ts","sourceRoot":"","sources":["../../../src/cli/build/buildClientFiles.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAItC,eAAO,MAAM,gBAAgB,GAAU,SAAS,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,MAAM,KAAK,EAAE,kBAwB5F,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { Action } from "../../types.ts";
2
+ export declare const buildServerFiles: (actions: Action[], rootDir: string) => void;
3
+ //# sourceMappingURL=buildServerFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildServerFiles.d.ts","sourceRoot":"","sources":["../../../src/cli/build/buildServerFiles.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAWtC,eAAO,MAAM,gBAAgB,GAAI,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,SAuBlE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const build: () => Promise<void>;
2
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/cli/build.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,KAAK,qBAcjB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { Express } from "express";
2
+ import { Action } from "../../types.ts";
3
+ export declare const startVite: ({ app, onActionFound }: {
4
+ app: Express;
5
+ onActionFound: (action: Action) => void;
6
+ }) => Promise<import("vite").ViteDevServer>;
7
+ //# sourceMappingURL=startVite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"startVite.d.ts","sourceRoot":"","sources":["../../../src/cli/dev/startVite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGtC,eAAO,MAAM,SAAS,GAAU,wBAG7B;IACD,GAAG,EAAE,OAAO,CAAC;IACb,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,0CAgCA,CAAC"}
@@ -0,0 +1,3 @@
1
+ import "dotenv/config";
2
+ export declare const dev: () => Promise<void>;
3
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/cli/dev.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,CAAC;AAOvB,eAAO,MAAM,GAAG,qBA4Bf,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { Express } from "express";
2
+ import { Action, ActionRegistry } from "../../types.ts";
3
+ type ReturnType = {
4
+ add: (actionId: Action['id'], actionFn: CallableFunction) => void;
5
+ set: (actionRegistry: ActionRegistry) => void;
6
+ };
7
+ export declare const createActionRoute: (app: Express) => ReturnType;
8
+ export {};
9
+ //# sourceMappingURL=createActionRoute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createActionRoute.d.ts","sourceRoot":"","sources":["../../../src/cli/start/createActionRoute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAC,MAAM,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAC;AAGtD,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClE,GAAG,EAAE,CAAC,cAAc,EAAE,cAAc,KAAK,IAAI,CAAC;CAC/C,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,KAAK,OAAO,KAAG,UAwChD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import "dotenv/config";
2
+ import { RsfZeroOptions } from "../export-types.ts";
3
+ export declare const start: (options: RsfZeroOptions) => Promise<void>;
4
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/cli/start.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,CAAC;AAIvB,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAGlD,eAAO,MAAM,KAAK,GAAU,SAAS,cAAc,kBAyBlD,CAAA"}
package/dist/cli/start.js CHANGED
@@ -11,7 +11,7 @@ import express from "express";
11
11
  import morgan from "morgan";
12
12
  import "dotenv/config";
13
13
  import { createActionRoute } from "./start/createActionRoute.js";
14
- export const start = async () => {
14
+ export const start = async (options) => {
15
15
  const app = express();
16
16
  const port = 3000;
17
17
  app.use(morgan("dev"));
@@ -19,7 +19,7 @@ export const start = async () => {
19
19
  // Client
20
20
  const staticPath = path.join(process.cwd(), 'dist/client/');
21
21
  console.log('Serving static files from:', staticPath);
22
- app.use(express.static('dist/client/'));
22
+ app.use(express.static('dist/client/', options.startStatic ?? {}));
23
23
  // Server
24
24
  // - create action route
25
25
  const { set: setActionRegistry } = createActionRoute(app);
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js CHANGED
@@ -2,8 +2,10 @@
2
2
  import { dev } from "./cli/dev.js";
3
3
  import { build } from "./cli/build.js";
4
4
  import { start } from "./cli/start.js";
5
+ import { loadOptions } from "./options.js";
5
6
  const args = process.argv.slice(2);
6
7
  const command = args[0];
8
+ const options = await loadOptions();
7
9
  if (command === 'dev') {
8
10
  await dev();
9
11
  }
@@ -11,7 +13,7 @@ else if (command === 'build') {
11
13
  await build();
12
14
  }
13
15
  else if (command === 'start') {
14
- await start();
16
+ await start(options);
15
17
  }
16
18
  else {
17
19
  console.log('rsf-zero: Unknown command. Available commands: dev, build, start');
@@ -0,0 +1,2 @@
1
+ export declare const debug: (message: string, ...param: any[]) => void;
2
+ //# sourceMappingURL=debug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,KAAK,GAAI,SAAS,MAAM,EAAE,GAAG,OAAO,GAAG,EAAE,SAErD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type serveStatic from "serve-static";
2
+ export type RsfZeroOptions = {
3
+ startStatic?: serveStatic.ServeStaticOptions;
4
+ };
5
+ //# sourceMappingURL=export-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-types.d.ts","sourceRoot":"","sources":["../src/export-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;CAC9C,CAAA"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const createActionCaller: (actionName: string) => (...args: any[]) => Promise<unknown>;
2
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,MACrC,GAAG,MAAM,GAAG,EAAE,qBAkB7B,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { RsfZeroOptions } from "./export-types.ts";
2
+ /**
3
+ * Locate rsf0-config.js in the current project root (process.cwd()).
4
+ */
5
+ export declare function findOptionsFile(cwd?: string): string | null;
6
+ /**
7
+ * Load RSF options from rsf0-config.js at project root.
8
+ * Returns an empty object if no file is found or on safe failure.
9
+ */
10
+ export declare function loadOptions(): Promise<RsfZeroOptions>;
11
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMnD;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,GAAE,MAAsB,GAAG,MAAM,GAAG,IAAI,CAG1E;AAUD;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,cAAc,CAAC,CAiB3D"}
@@ -0,0 +1,52 @@
1
+ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
+ if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
+ return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
+ });
6
+ }
7
+ return path;
8
+ };
9
+ import fs from 'fs';
10
+ import path from 'path';
11
+ import { pathToFileURL } from 'url';
12
+ import { debug } from "./debug.js";
13
+ const defaultOptions = {
14
+ startStatic: {},
15
+ };
16
+ /**
17
+ * Locate rsf0-config.js in the current project root (process.cwd()).
18
+ */
19
+ export function findOptionsFile(cwd = process.cwd()) {
20
+ const jsPath = path.join(cwd, 'rsf0-config.js');
21
+ return fs.existsSync(jsPath) ? jsPath : null;
22
+ }
23
+ /**
24
+ * Dynamically import a JS module by absolute file path.
25
+ */
26
+ async function importJsModule(absPath) {
27
+ const url = pathToFileURL(absPath).href;
28
+ return import(__rewriteRelativeImportExtension(url));
29
+ }
30
+ /**
31
+ * Load RSF options from rsf0-config.js at project root.
32
+ * Returns an empty object if no file is found or on safe failure.
33
+ */
34
+ export async function loadOptions() {
35
+ const configPath = findOptionsFile();
36
+ if (!configPath)
37
+ return {};
38
+ try {
39
+ const mod = await importJsModule(configPath);
40
+ const options = (mod && (mod.default ?? mod.options ?? mod.rsf ?? mod.config ?? mod));
41
+ if (options && typeof options === 'object') {
42
+ debug('Options loaded: ' + configPath);
43
+ return options;
44
+ }
45
+ return {};
46
+ }
47
+ catch (err) {
48
+ // Fail soft: log a friendly message and continue with defaults
49
+ debug('No options file found at: ' + configPath);
50
+ return defaultOptions;
51
+ }
52
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Converts any import e.g. absolute path to a relative one.
3
+ *
4
+ * Given `/User/x/my-file.ts, /User/x`
5
+ * Returns `./my-file.ts`
6
+ *
7
+ * Given `/User/x/my-file.ts, /User/somewhere-else`
8
+ * Returns `../x/my-file.ts`
9
+ *
10
+ * Can be passed an optional `replaceExtWith` param to replace the extension.
11
+ */
12
+ export declare const asRelativeImport: (targetPath: string, relativeToPath: string, replaceExtWith?: string) => string;
13
+ //# sourceMappingURL=asRelativeImport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asRelativeImport.d.ts","sourceRoot":"","sources":["../../src/transform/asRelativeImport.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,YAAY,MAAM,EAAE,gBAAgB,MAAM,EAAE,iBAAiB,MAAM,WAOnG,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { Plugin } from "vite";
2
+ import { Action } from "../../types.ts";
3
+ /**
4
+ * This plugin sees a file with 'use server' and transforms it to a client-side version.
5
+ *
6
+ * The client-side version has the original code replaced with an API call to the server for that action.
7
+ *
8
+ * This plugin also registers all actions found via the passed onActionFound function.
9
+ */
10
+ export declare const transformRsfForClientPlugin: (onActionFound: (action: Action) => void) => Plugin;
11
+ //# sourceMappingURL=transformRsfForClientPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformRsfForClientPlugin.d.ts","sourceRoot":"","sources":["../../../src/transform/client/transformRsfForClientPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGtC;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GAAI,eAAe,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,KAAI,MAWtF,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Action } from "../../types.ts";
2
+ /**
3
+ * Given a file that starts with 'use server', return a transformed client version of that file.
4
+ */
5
+ export declare const transformTopLevelRsf: (id: string, code: string, onActionFound: (action: Action) => void) => string | undefined;
6
+ //# sourceMappingURL=transformTopLevelRsf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformTopLevelRsf.d.ts","sourceRoot":"","sources":["../../../src/transform/client/transformTopLevelRsf.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAGtC;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAE7B,IAAI,MAAM,EACV,MAAM,MAAM,EACZ,eAAe,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,KACtC,MAAM,GAAG,SA0Db,CAAC"}
@@ -0,0 +1,3 @@
1
+ import * as swc from "@swc/core";
2
+ export declare const collectExportNames: (mod: swc.Module) => Set<string>;
3
+ //# sourceMappingURL=collectExportNames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collectExportNames.d.ts","sourceRoot":"","sources":["../../src/transform/collectExportNames.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,WAAW,CAAC;AAEjC,eAAO,MAAM,kBAAkB,GAAI,KAAK,GAAG,CAAC,MAAM,gBAsBjD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const extname: (filePath: string) => string;
2
+ //# sourceMappingURL=extname.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extname.d.ts","sourceRoot":"","sources":["../../src/transform/extname.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,GAAI,UAAU,MAAM,WASvC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getActionId: (sourceFilePath: string, actionName: string) => string;
2
+ //# sourceMappingURL=getActionId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getActionId.d.ts","sourceRoot":"","sources":["../../src/transform/getActionId.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,GAAI,gBAAgB,MAAM,EAAE,YAAY,MAAM,WAIrE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const isTopLevelRsfFile: (id: string, code: string) => boolean;
2
+ //# sourceMappingURL=isTopLevelRsfFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isTopLevelRsfFile.d.ts","sourceRoot":"","sources":["../../src/transform/isTopLevelRsfFile.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,GAAI,IAAI,MAAM,EAAE,MAAM,MAAM,YAMzD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const replaceFileExt: (path: string, newExt: string) => string;
2
+ //# sourceMappingURL=replaceFileExt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replaceFileExt.d.ts","sourceRoot":"","sources":["../../src/transform/replaceFileExt.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,WAG1D,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { Action } from "../../types.ts";
2
+ /**
3
+ * Create a typescript file that imports all actions. This can then be passed to a tsc to be processed into dist js files.
4
+ */
5
+ export declare const generateActionRegistryTs: (actions: Action[], registryPath: string) => string;
6
+ /**
7
+ * Create a javascript file that imports all actions. This is used by the start command to load action functions when the server starts.
8
+ */
9
+ export declare const generateActionRegistryJs: (actions: Action[], relativeToDir: string) => string;
10
+ export declare const generateEmptyActionRegistryJs: () => string;
11
+ //# sourceMappingURL=generateActionRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateActionRegistry.d.ts","sourceRoot":"","sources":["../../../src/transform/server/generateActionRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAKtC;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,SAAS,MAAM,EAAE,EAAE,cAAc,MAAM,KAAG,MAoBlF,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,GAAI,SAAS,MAAM,EAAE,EAAE,eAAe,MAAM,KAAG,MA2BnF,CAAA;AAED,eAAO,MAAM,6BAA6B,QAAO,MAIhD,CAAA"}
@@ -0,0 +1,7 @@
1
+ export type Action = {
2
+ id: string;
3
+ name: string;
4
+ sourceFilePath: string;
5
+ };
6
+ export type ActionRegistry = Record<Action['id'], CallableFunction>;
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A minimal micro-framework with React Server Functions support",
4
4
  "author": "Igor Nadj",
5
5
  "type": "module",
6
- "version": "0.1.6",
6
+ "version": "0.1.7",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "https://github.com/IgorNadj/rsf-zero.git",
@@ -41,6 +41,9 @@
41
41
  "./client": {
42
42
  "types": "./dist/lib/client.d.ts",
43
43
  "default": "./dist/lib/client.js"
44
+ },
45
+ "./server": {
46
+ "types": "./dist/export-types.d.ts"
44
47
  }
45
48
  },
46
49
  "files": [