appstage 0.3.2 → 0.3.6

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.
@@ -0,0 +1,19 @@
1
+ declare module "*.svg" {
2
+ let content: string;
3
+
4
+ export default content;
5
+ }
6
+
7
+ declare module "*.txt" {
8
+ let content: string;
9
+
10
+ export default content;
11
+ }
12
+
13
+ declare module "*.html" {
14
+ let content: string;
15
+
16
+ export default content;
17
+ }
18
+
19
+ declare module "*.css";
package/dist/index.d.ts CHANGED
@@ -1151,3 +1151,15 @@ declare function servePipeableStream(req: Request, res: Response): ({
1151
1151
  }: PipeableStream, error?: unknown) => Promise<void>;
1152
1152
 
1153
1153
  export { Controller, ErrorController, FilesParams, LangParams, LogEventPayload, LogLevel, LogOptions, Middleware, MiddlewareSet, RedirectParams, RenderStatus, ReqCtx, TransformContent, build, cli, createApp, cspNonce, emitLog, files, getEffectiveLocale, getLocales, getServerURL, getStatusMessage, init, injectNonce, lang, log, redirect, renderStatus, requestEvents, serializeState, servePipeableStream, toLanguage, unhandledError, unhandledRoute };
1154
+
1155
+ declare global {
1156
+ namespace Express {
1157
+ interface Request {
1158
+ ctx: ReqCtx;
1159
+ }
1160
+ interface Application {
1161
+ events?: EventEmitter;
1162
+ renderStatus?: RenderStatus;
1163
+ }
1164
+ }
1165
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appstage",
3
- "version": "0.3.2",
3
+ "version": "0.3.6",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -11,7 +11,8 @@
11
11
  },
12
12
  "scripts": {
13
13
  "compile-bin": "esbuild src/scripts/bin.ts --bundle --outfile=dist/bin.js --platform=node --external:esbuild --format=esm",
14
- "preversion": "npx npm-run-all shape compile-bin",
14
+ "postbuild": "node postbuild.ts",
15
+ "preversion": "npx npm-run-all shape compile-bin postbuild",
15
16
  "shape": "npx codeshape",
16
17
  "typecheck": "npx codeshape typecheck"
17
18
  },
package/index.ts DELETED
@@ -1,32 +0,0 @@
1
- export * from "./src/controllers/files.ts";
2
- export * from "./src/controllers/redirect.ts";
3
- export * from "./src/controllers/unhandledError.ts";
4
- export * from "./src/controllers/unhandledRoute.ts";
5
- export * from "./src/lib/lang/getEffectiveLocale.ts";
6
- export * from "./src/lib/lang/getLocales.ts";
7
- export * from "./src/lib/lang/toLanguage.ts";
8
- export * from "./src/lib/logger/LogOptions.ts";
9
- export * from "./src/lib/logger/log.ts";
10
- export * from "./src/middleware/init.ts";
11
- export * from "./src/middleware/lang.ts";
12
- export * from "./src/middleware/requestEvents.ts";
13
- export * from "./src/scripts/build.ts";
14
- export * from "./src/scripts/cli.ts";
15
- export * from "./src/types/Controller.ts";
16
- export * from "./src/types/ErrorController.ts";
17
- export * from "./src/types/LogEventPayload.ts";
18
- export * from "./src/types/LogLevel.ts";
19
- export * from "./src/types/Middleware.ts";
20
- export * from "./src/types/MiddlewareSet.ts";
21
- export * from "./src/types/RenderStatus.ts";
22
- export * from "./src/types/ReqCtx.ts";
23
- export * from "./src/types/TransformContent.ts";
24
- export * from "./src/utils/createApp.ts";
25
- export * from "./src/utils/cspNonce.ts";
26
- export * from "./src/utils/emitLog.ts";
27
- export * from "./src/utils/getServerURL.ts";
28
- export * from "./src/utils/getStatusMessage.ts";
29
- export * from "./src/utils/injectNonce.ts";
30
- export * from "./src/utils/renderStatus.ts";
31
- export * from "./src/utils/serializeState.ts";
32
- export * from "./src/utils/servePipeableStream.ts";
package/tsconfig.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "include": ["./index.ts", "./src"],
3
- "compilerOptions": {
4
- "declaration": true,
5
- "emitDeclarationOnly": true,
6
- "outDir": "dist",
7
- "lib": ["ESNext"],
8
- "types": ["node", "express"],
9
- "target": "ESNext",
10
- "module": "nodenext",
11
- "moduleResolution": "nodenext",
12
- "allowImportingTsExtensions": true,
13
- "resolveJsonModule": true,
14
- "allowSyntheticDefaultImports": true,
15
- "strict": true,
16
- "noUnusedLocals": true,
17
- "noUnusedParameters": true
18
- }
19
- }