rsf-zero 0.2.0 → 0.2.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/cli/build/buildClientFiles.js +1 -1
- package/dist/cli/build/buildServerFiles.js +1 -1
- package/dist/cli/dev/startVite.js +1 -1
- package/dist/cli/dev.js +1 -1
- package/dist/cli/start/createActionRoute.js +1 -1
- package/dist/cli/start.d.ts +2 -2
- package/dist/cli/start.d.ts.map +1 -1
- package/dist/cli/start.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/transform/client/transformTopLevelRsf.js +1 -1
- package/dist/utils/debug.d.ts.map +1 -0
- package/dist/utils/export-types.d.ts +7 -0
- package/dist/utils/export-types.d.ts.map +1 -0
- package/dist/utils/options.d.ts +7 -0
- package/dist/utils/options.d.ts.map +1 -0
- package/package.json +3 -3
- package/dist/debug.d.ts.map +0 -1
- package/dist/export-types.d.ts +0 -5
- package/dist/export-types.d.ts.map +0 -1
- package/dist/options.d.ts +0 -7
- package/dist/options.d.ts.map +0 -1
- /package/dist/{debug.d.ts → utils/debug.d.ts} +0 -0
- /package/dist/{debug.js → utils/debug.js} +0 -0
- /package/dist/{export-types.js → utils/export-types.js} +0 -0
- /package/dist/{options.js → utils/options.js} +0 -0
|
@@ -2,7 +2,7 @@ import path from "path";
|
|
|
2
2
|
import { build as viteBuild } from "vite";
|
|
3
3
|
import viteReact from "@vitejs/plugin-react";
|
|
4
4
|
import { transformRsfForClientPlugin } from "../../transform/client/transformRsfForClientPlugin.js";
|
|
5
|
-
import { debug } from "../../debug.js";
|
|
5
|
+
import { debug } from "../../utils/debug.js";
|
|
6
6
|
export const buildClientFiles = async (rootDir, onActionFound) => {
|
|
7
7
|
let actionCounter = 0; // for logging
|
|
8
8
|
const _onActionFound = (action) => {
|
|
@@ -4,7 +4,7 @@ import { createProgram, flattenDiagnosticMessageText, ModuleKind, } from "typesc
|
|
|
4
4
|
import md5 from "md5";
|
|
5
5
|
import * as os from "node:os";
|
|
6
6
|
import { generateActionRegistryJs, generateActionRegistryTs, generateEmptyActionRegistryJs } from "../../transform/server/generateActionRegistry.js";
|
|
7
|
-
import { debug } from "../../debug.js";
|
|
7
|
+
import { debug } from "../../utils/debug.js";
|
|
8
8
|
export const buildServerFiles = (actions, rootDir) => {
|
|
9
9
|
const serverOutDir = path.join(rootDir, 'dist/server');
|
|
10
10
|
const srcDir = path.join(rootDir, 'src');
|
|
@@ -2,7 +2,7 @@ import { createServer as createViteServer } from "vite";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import viteReact from "@vitejs/plugin-react";
|
|
4
4
|
import { transformRsfForClientPlugin } from "../../transform/client/transformRsfForClientPlugin.js";
|
|
5
|
-
import { debug } from "../../debug.js";
|
|
5
|
+
import { debug } from "../../utils/debug.js";
|
|
6
6
|
export const startVite = async ({ app, onActionFound }) => {
|
|
7
7
|
debug('starting dev vite');
|
|
8
8
|
const vite = await createViteServer({
|
package/dist/cli/dev.js
CHANGED
|
@@ -3,7 +3,7 @@ import morgan from "morgan";
|
|
|
3
3
|
import "dotenv/config";
|
|
4
4
|
import { startVite } from "./dev/startVite.js";
|
|
5
5
|
import { createActionRoute } from "./start/createActionRoute.js";
|
|
6
|
-
import { debug } from "../debug.js";
|
|
6
|
+
import { debug } from "../utils/debug.js";
|
|
7
7
|
export const dev = async () => {
|
|
8
8
|
const app = express();
|
|
9
9
|
const port = 3000;
|
package/dist/cli/start.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "dotenv/config";
|
|
2
|
-
import {
|
|
3
|
-
export declare const start: (options:
|
|
2
|
+
import { RsfZeroConfig } from "../utils/export-types.ts";
|
|
3
|
+
export declare const start: (options: RsfZeroConfig) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=start.d.ts.map
|
package/dist/cli/start.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/cli/start.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,CAAC;AAIvB,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/cli/start.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,CAAC;AAIvB,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAIvD,eAAO,MAAM,KAAK,GAAU,SAAS,aAAa,kBAyBjD,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
|
-
import { debug } from "../debug.js";
|
|
14
|
+
import { debug } from "../utils/debug.js";
|
|
15
15
|
export const start = async (options) => {
|
|
16
16
|
const app = express();
|
|
17
17
|
const port = 3000;
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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
|
+
import { loadOptions } from "./utils/options.js";
|
|
6
6
|
import { banner } from "./cli/utils.js";
|
|
7
7
|
const args = process.argv.slice(2);
|
|
8
8
|
const command = args[0];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as swc from "@swc/core";
|
|
2
2
|
import { isTopLevelRsfFile } from "../isTopLevelRsfFile.js";
|
|
3
|
-
import { debug } from "../../debug.js";
|
|
3
|
+
import { debug } from "../../utils/debug.js";
|
|
4
4
|
import { getActionId } from "../getActionId.js";
|
|
5
5
|
/**
|
|
6
6
|
* Given a file that starts with 'use server', return a transformed client version of that file.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/utils/debug.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,KAAK,GAAI,SAAS,MAAM,EAAE,GAAG,OAAO,GAAG,EAAE,SAErD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-types.d.ts","sourceRoot":"","sources":["../../src/utils/export-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC;CAC9C,CAAA;AAGD,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RsfZeroConfig } from "./export-types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Load RSF options from rsf0-config.js at project root.
|
|
4
|
+
* Returns an empty object if no file is found or on safe failure.
|
|
5
|
+
*/
|
|
6
|
+
export declare function loadOptions(): Promise<RsfZeroConfig>;
|
|
7
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/utils/options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAelD;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,aAAa,CAAC,CAoB1D"}
|
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.2.
|
|
6
|
+
"version": "0.2.1",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/IgorNadj/rsf-zero.git",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"types": "./dist/lib/client.d.ts",
|
|
43
43
|
"default": "./dist/lib/client.js"
|
|
44
44
|
},
|
|
45
|
-
"
|
|
46
|
-
"types": "./dist/export-types.d.ts"
|
|
45
|
+
".": {
|
|
46
|
+
"types": "./dist/utils/export-types.d.ts"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"files": [
|
package/dist/debug.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/export-types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dist/options.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RsfZeroOptions } from "./export-types.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Load RSF options from rsf0-config.js at project root.
|
|
4
|
-
* Returns an empty object if no file is found or on safe failure.
|
|
5
|
-
*/
|
|
6
|
-
export declare function loadOptions(): Promise<RsfZeroOptions>;
|
|
7
|
-
//# sourceMappingURL=options.d.ts.map
|
package/dist/options.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAenD;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,cAAc,CAAC,CAoB3D"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|