@celljs/kit 4.3.0 → 4.4.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/lib/types.d.ts +20 -9
- package/lib/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/types.ts +22 -9
package/lib/types.d.ts
CHANGED
|
@@ -45,25 +45,36 @@ export interface TargetModel {
|
|
|
45
45
|
staticModules: ModuleRef[];
|
|
46
46
|
modules: ModuleRef[];
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* server
|
|
48
|
+
* Application configuration (docs/design/config.md). Backend: every key, values keep `${...}` for
|
|
49
|
+
* runtime evaluation, and `paths.public` (default `public`, relative to the output directory) is
|
|
50
|
+
* resolved by the server at startup. Frontend: only the keys the schemas mark public, evaluated.
|
|
51
51
|
*/
|
|
52
52
|
config: Record<string, unknown>;
|
|
53
|
+
/** Backend: schema types of keys whose value is an expression, which evaluation converts to. */
|
|
54
|
+
configTypes?: Record<string, 'number' | 'integer' | 'boolean'>;
|
|
53
55
|
/**
|
|
54
|
-
* `
|
|
55
|
-
*
|
|
56
|
-
*
|
|
56
|
+
* `CELL_*` variables of the environment the project was loaded in. Frontend overrides are already
|
|
57
|
+
* applied before the public keys are picked; the server applies them at startup, so for the backend
|
|
58
|
+
* this tells what the same environment would change. Values are left out.
|
|
57
59
|
*/
|
|
58
60
|
envOverrides: EnvOverrideReport;
|
|
61
|
+
/** Frontend: the pages of `src/browser/pages`, in file order (docs: Frontend and RPC). */
|
|
62
|
+
routes?: PageRoute[];
|
|
59
63
|
}
|
|
60
|
-
/**
|
|
64
|
+
/** A page of `src/browser/pages`: `users/[id].tsx` is `/users/:id`. */
|
|
65
|
+
export interface PageRoute {
|
|
66
|
+
/** Path of the route, below `react.path`: `/`, `/users/:id`, `/docs/*`. */
|
|
67
|
+
path: string;
|
|
68
|
+
/** The page, relative to the project root; its default export is the component. */
|
|
69
|
+
file: string;
|
|
70
|
+
/** The `_layout` files around it, outermost first, relative to the project root. */
|
|
71
|
+
layouts: string[];
|
|
72
|
+
}
|
|
73
|
+
/** Configuration overrides from environment variables (`CELL_SERVER__PORT=8080` → `server.port`). */
|
|
61
74
|
export interface EnvOverrideReport {
|
|
62
|
-
/** `shadows`: the key under `cell` with the same first name that the variable does not set (reach it with `CELL_<TARGET>__CELL__...`). */
|
|
63
75
|
applied: {
|
|
64
76
|
variable: string;
|
|
65
77
|
path: string;
|
|
66
|
-
shadows?: string;
|
|
67
78
|
}[];
|
|
68
79
|
/** Variables with the prefix that match no key or whose value does not fit the key's type. */
|
|
69
80
|
problems: {
|
package/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,MAAM,MAAM,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;AAE5C,kGAAkG;AAClG,MAAM,WAAW,iBAAiB;IAC9B,iGAAiG;IACjG,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5C,8DAA8D;IAC9D,aAAa,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IAClD,6FAA6F;IAC7F,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,iGAAiG;IACjG,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,uGAAuG;IACvG,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,+FAA+F;IAC/F,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wGAAwG;AACxG,MAAM,WAAW,SAAS;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,M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AAM,CAAC;QAAC,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACrF"}
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -49,23 +49,36 @@ export interface TargetModel {
|
|
|
49
49
|
staticModules: ModuleRef[];
|
|
50
50
|
modules: ModuleRef[];
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* server
|
|
52
|
+
* Application configuration (docs/design/config.md). Backend: every key, values keep `${...}` for
|
|
53
|
+
* runtime evaluation, and `paths.public` (default `public`, relative to the output directory) is
|
|
54
|
+
* resolved by the server at startup. Frontend: only the keys the schemas mark public, evaluated.
|
|
55
55
|
*/
|
|
56
56
|
config: Record<string, unknown>;
|
|
57
|
+
/** Backend: schema types of keys whose value is an expression, which evaluation converts to. */
|
|
58
|
+
configTypes?: Record<string, 'number' | 'integer' | 'boolean'>;
|
|
57
59
|
/**
|
|
58
|
-
* `
|
|
59
|
-
*
|
|
60
|
-
*
|
|
60
|
+
* `CELL_*` variables of the environment the project was loaded in. Frontend overrides are already
|
|
61
|
+
* applied before the public keys are picked; the server applies them at startup, so for the backend
|
|
62
|
+
* this tells what the same environment would change. Values are left out.
|
|
61
63
|
*/
|
|
62
64
|
envOverrides: EnvOverrideReport;
|
|
65
|
+
/** Frontend: the pages of `src/browser/pages`, in file order (docs: Frontend and RPC). */
|
|
66
|
+
routes?: PageRoute[];
|
|
63
67
|
}
|
|
64
68
|
|
|
65
|
-
/**
|
|
69
|
+
/** A page of `src/browser/pages`: `users/[id].tsx` is `/users/:id`. */
|
|
70
|
+
export interface PageRoute {
|
|
71
|
+
/** Path of the route, below `react.path`: `/`, `/users/:id`, `/docs/*`. */
|
|
72
|
+
path: string;
|
|
73
|
+
/** The page, relative to the project root; its default export is the component. */
|
|
74
|
+
file: string;
|
|
75
|
+
/** The `_layout` files around it, outermost first, relative to the project root. */
|
|
76
|
+
layouts: string[];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Configuration overrides from environment variables (`CELL_SERVER__PORT=8080` → `server.port`). */
|
|
66
80
|
export interface EnvOverrideReport {
|
|
67
|
-
|
|
68
|
-
applied: { variable: string; path: string; shadows?: string }[];
|
|
81
|
+
applied: { variable: string; path: string }[];
|
|
69
82
|
/** Variables with the prefix that match no key or whose value does not fit the key's type. */
|
|
70
83
|
problems: { variable: string; message: string }[];
|
|
71
84
|
}
|