@shuvi/service 0.0.1-pre.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/api/api.d.ts +75 -0
- package/lib/api/api.js +370 -0
- package/lib/api/index.d.ts +6 -0
- package/lib/api/index.js +4 -0
- package/lib/api/initCoreResource.d.ts +2 -0
- package/lib/api/initCoreResource.js +27 -0
- package/lib/api/paths.d.ts +8 -0
- package/lib/api/paths.js +20 -0
- package/lib/api/plugin.d.ts +6 -0
- package/lib/api/plugin.js +108 -0
- package/lib/api/pluginApi.d.ts +29 -0
- package/lib/api/pluginApi.js +44 -0
- package/lib/api/setupApp.d.ts +2 -0
- package/lib/api/setupApp.js +132 -0
- package/lib/api/types.d.ts +152 -0
- package/lib/api/types.js +2 -0
- package/lib/bundler/bundler.d.ts +33 -0
- package/lib/bundler/bundler.js +293 -0
- package/lib/bundler/config.d.ts +18 -0
- package/lib/bundler/config.js +85 -0
- package/lib/bundler/index.d.ts +2 -0
- package/lib/bundler/index.js +4 -0
- package/lib/bundler/runCompiler.d.ts +7 -0
- package/lib/bundler/runCompiler.js +43 -0
- package/lib/cli/build.d.ts +8 -0
- package/lib/cli/build.js +90 -0
- package/lib/config/index.d.ts +8 -0
- package/lib/config/index.js +50 -0
- package/lib/config/loadDotenvConfig.d.ts +1 -0
- package/lib/config/loadDotenvConfig.js +50 -0
- package/lib/constants.d.ts +14 -0
- package/lib/constants.js +20 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +21 -0
- package/lib/lib/apiRouteHandler.d.ts +80 -0
- package/lib/lib/apiRouteHandler.js +216 -0
- package/lib/lib/apiRoutes.d.ts +11 -0
- package/lib/lib/apiRoutes.js +76 -0
- package/lib/lib/devMiddleware.d.ts +10 -0
- package/lib/lib/devMiddleware.js +81 -0
- package/lib/lib/getPlatform.d.ts +2 -0
- package/lib/lib/getPlatform.js +8 -0
- package/lib/lib/getPublicRuntimeConfig.d.ts +2 -0
- package/lib/lib/getPublicRuntimeConfig.js +14 -0
- package/lib/lib/hotMiddleware.d.ts +31 -0
- package/lib/lib/hotMiddleware.js +123 -0
- package/lib/lib/httpProxyMiddleware.d.ts +7 -0
- package/lib/lib/httpProxyMiddleware.js +49 -0
- package/lib/lib/initRuntime.d.ts +5 -0
- package/lib/lib/initRuntime.js +16 -0
- package/lib/lib/launchEditorMiddleware.d.ts +2 -0
- package/lib/lib/launchEditorMiddleware.js +39 -0
- package/lib/lib/matchRoutes.d.ts +2 -0
- package/lib/lib/matchRoutes.js +8 -0
- package/lib/lib/onDemandRouteManager.d.ts +11 -0
- package/lib/lib/onDemandRouteManager.js +69 -0
- package/lib/lib/renderToHTML.d.ts +10 -0
- package/lib/lib/renderToHTML.js +52 -0
- package/lib/lib/resolveRuntimeCoreFile.d.ts +2 -0
- package/lib/lib/resolveRuntimeCoreFile.js +17 -0
- package/lib/lib/routes.d.ts +12 -0
- package/lib/lib/routes.js +90 -0
- package/lib/lib/runtimeConfig.d.ts +4 -0
- package/lib/lib/runtimeConfig.js +10 -0
- package/lib/lib/serveStatic.d.ts +3 -0
- package/lib/lib/serveStatic.js +24 -0
- package/lib/lib/utils.d.ts +6 -0
- package/lib/lib/utils.js +25 -0
- package/lib/lib/viewTemplate.d.ts +5 -0
- package/lib/lib/viewTemplate.js +16 -0
- package/lib/project/file-manager/errorHandling.d.ts +1 -0
- package/lib/project/file-manager/errorHandling.js +13 -0
- package/lib/project/file-manager/file.d.ts +17 -0
- package/lib/project/file-manager/file.js +146 -0
- package/lib/project/file-manager/fileManager.d.ts +11 -0
- package/lib/project/file-manager/fileManager.js +86 -0
- package/lib/project/file-manager/fileTypes.d.ts +56 -0
- package/lib/project/file-manager/fileTypes.js +2 -0
- package/lib/project/file-manager/index.d.ts +7 -0
- package/lib/project/file-manager/index.js +9 -0
- package/lib/project/file-manager/lifecycle.d.ts +7 -0
- package/lib/project/file-manager/lifecycle.js +42 -0
- package/lib/project/file-manager/mount.d.ts +3 -0
- package/lib/project/file-manager/mount.js +80 -0
- package/lib/project/file-manager/scheduler.d.ts +35 -0
- package/lib/project/file-manager/scheduler.js +169 -0
- package/lib/project/file-manager/utils.d.ts +1 -0
- package/lib/project/file-manager/utils.js +7 -0
- package/lib/project/file-presets/files/core/404.js.d.ts +4 -0
- package/lib/project/file-presets/files/core/404.js.js +9 -0
- package/lib/project/file-presets/files/core/apiRoutes.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/apiRoutes.js.js +5 -0
- package/lib/project/file-presets/files/core/app.js.d.ts +4 -0
- package/lib/project/file-presets/files/core/app.js.js +9 -0
- package/lib/project/file-presets/files/core/client/application.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/client/application.js.js +7 -0
- package/lib/project/file-presets/files/core/client/entry.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/client/entry.js.js +7 -0
- package/lib/project/file-presets/files/core/platform.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/platform.js.js +7 -0
- package/lib/project/file-presets/files/core/plugins.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/plugins.js.js +16 -0
- package/lib/project/file-presets/files/core/polyfill.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/polyfill.js.js +5 -0
- package/lib/project/file-presets/files/core/routes.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/routes.js.js +5 -0
- package/lib/project/file-presets/files/core/runtimeConfig.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/runtimeConfig.js.js +5 -0
- package/lib/project/file-presets/files/core/server/application.js.d.ts +5 -0
- package/lib/project/file-presets/files/core/server/application.js.js +7 -0
- package/lib/project/file-presets/files/core/setRuntimeConfig.js.d.ts +4 -0
- package/lib/project/file-presets/files/core/setRuntimeConfig.js.js +5 -0
- package/lib/project/file-presets/files/entry.client-wrapper.js.d.ts +5 -0
- package/lib/project/file-presets/files/entry.client-wrapper.js.js +5 -0
- package/lib/project/file-presets/files/entry.client.js.d.ts +5 -0
- package/lib/project/file-presets/files/entry.client.js.js +25 -0
- package/lib/project/file-presets/files/entry.server.js.d.ts +5 -0
- package/lib/project/file-presets/files/entry.server.js.js +6 -0
- package/lib/project/file-presets/files/index.d.ts.d.ts +5 -0
- package/lib/project/file-presets/files/index.d.ts.js +6 -0
- package/lib/project/file-presets/files/index.js.d.ts +5 -0
- package/lib/project/file-presets/files/index.js.js +6 -0
- package/lib/project/file-presets/files/main.server.js.d.ts +4 -0
- package/lib/project/file-presets/files/main.server.js.js +13 -0
- package/lib/project/file-presets/files/user/404.js.d.ts +7 -0
- package/lib/project/file-presets/files/user/404.js.js +9 -0
- package/lib/project/file-presets/files/user/app.js.d.ts +7 -0
- package/lib/project/file-presets/files/user/app.js.js +9 -0
- package/lib/project/file-presets/files/user/document.js.d.ts +7 -0
- package/lib/project/file-presets/files/user/document.js.js +9 -0
- package/lib/project/file-presets/files/user/plugin.js.d.ts +7 -0
- package/lib/project/file-presets/files/user/plugin.js.js +9 -0
- package/lib/project/file-presets/files/user/server.js.d.ts +7 -0
- package/lib/project/file-presets/files/user/server.js.js +9 -0
- package/lib/project/file-presets/index.d.ts +2 -0
- package/lib/project/file-presets/index.js +33 -0
- package/lib/project/file-snippets/helpers.d.ts +9 -0
- package/lib/project/file-snippets/helpers.js +72 -0
- package/lib/project/file-snippets/index.d.ts +15 -0
- package/lib/project/file-snippets/index.js +22 -0
- package/lib/project/file-snippets/moduleExportProxy.d.ts +9 -0
- package/lib/project/file-snippets/moduleExportProxy.js +124 -0
- package/lib/project/index.d.ts +3 -0
- package/lib/project/index.js +15 -0
- package/lib/project/projectBuilder.d.ts +36 -0
- package/lib/project/projectBuilder.js +199 -0
- package/lib/project/projectContext.d.ts +66 -0
- package/lib/project/projectContext.js +30 -0
- package/lib/renderer/base.d.ts +22 -0
- package/lib/renderer/base.js +147 -0
- package/lib/renderer/htmlTag.d.ts +4 -0
- package/lib/renderer/htmlTag.js +69 -0
- package/lib/renderer/index.d.ts +11 -0
- package/lib/renderer/index.js +20 -0
- package/lib/renderer/spa.d.ts +10 -0
- package/lib/renderer/spa.js +20 -0
- package/lib/renderer/ssr.d.ts +15 -0
- package/lib/renderer/ssr.js +76 -0
- package/lib/renderer/types.d.ts +14 -0
- package/lib/renderer/types.js +2 -0
- package/lib/route/index.d.ts +1 -0
- package/lib/route/index.js +4 -0
- package/lib/route/parseDynamicPath.d.ts +1 -0
- package/lib/route/parseDynamicPath.js +42 -0
- package/lib/route/route.d.ts +13 -0
- package/lib/route/route.js +161 -0
- package/lib/server/index.d.ts +2 -0
- package/lib/server/index.js +4 -0
- package/lib/server/router.d.ts +14 -0
- package/lib/server/router.js +111 -0
- package/lib/server/server.d.ts +17 -0
- package/lib/server/server.js +139 -0
- package/lib/server/serverTypes.d.ts +9 -0
- package/lib/server/serverTypes.js +2 -0
- package/lib/shuvi/index.d.ts +10 -0
- package/lib/shuvi/index.js +18 -0
- package/lib/shuvi/shuvi.base.d.ts +26 -0
- package/lib/shuvi/shuvi.base.js +152 -0
- package/lib/shuvi/shuvi.dev.d.ts +9 -0
- package/lib/shuvi/shuvi.dev.js +94 -0
- package/lib/shuvi/shuvi.prod.d.ts +6 -0
- package/lib/shuvi/shuvi.prod.js +55 -0
- package/lib/types/bundler.d.ts +1 -0
- package/lib/types/bundler.js +10 -0
- package/lib/types/hooks.d.ts +67 -0
- package/lib/types/hooks.js +2 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.js +12 -0
- package/lib/types/runtime.d.ts +168 -0
- package/lib/types/runtime.js +2 -0
- package/package.json +65 -0
- package/types/app-env.d.ts +66 -0
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@shuvi/service",
|
|
3
|
+
"version": "0.0.1-pre.1",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/shuvijs/shuvi.git",
|
|
7
|
+
"directory": "packages/shuvi"
|
|
8
|
+
},
|
|
9
|
+
"author": "liximomo",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"main": "./lib/index.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"lib",
|
|
14
|
+
"types"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "tsc -p tsconfig.build.json -w",
|
|
18
|
+
"prebuild": "rimraf lib",
|
|
19
|
+
"build": "tsc -p tsconfig.build.json"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">= 12.0.0"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@babel/code-frame": "^7.14.5",
|
|
26
|
+
"@babel/generator": "^7.14.5",
|
|
27
|
+
"@babel/parser": "^7.14.7",
|
|
28
|
+
"@babel/traverse": "^7.14.7",
|
|
29
|
+
"@shuvi/hook": "0.0.1-pre.1",
|
|
30
|
+
"@shuvi/router": "0.0.1-pre.1",
|
|
31
|
+
"@shuvi/runtime-core": "0.0.1-pre.1",
|
|
32
|
+
"@shuvi/shared": "0.0.1-pre.1",
|
|
33
|
+
"@shuvi/toolpack": "0.0.1-pre.1",
|
|
34
|
+
"@shuvi/utils": "0.0.1-pre.1",
|
|
35
|
+
"@types/content-type": "^1.1.5",
|
|
36
|
+
"@types/cookie": "^0.4.1",
|
|
37
|
+
"@types/raw-body": "^2.3.0",
|
|
38
|
+
"@vue/reactivity": "^3.1.4",
|
|
39
|
+
"cli-highlight": "^2.1.9",
|
|
40
|
+
"commander": "5.1.0",
|
|
41
|
+
"content-type": "^1.0.4",
|
|
42
|
+
"cookie": "^0.4.1",
|
|
43
|
+
"cross-spawn": "7.0.3",
|
|
44
|
+
"detect-port": "1.3.0",
|
|
45
|
+
"dotenv": "8.2.0",
|
|
46
|
+
"dotenv-expand": "5.1.0",
|
|
47
|
+
"ejs": "3.1.5",
|
|
48
|
+
"fs-extra": "9.0.1",
|
|
49
|
+
"http-proxy-middleware": "1.0.6",
|
|
50
|
+
"launch-editor": "2.2.1",
|
|
51
|
+
"raw-body": "^2.4.1",
|
|
52
|
+
"send": "0.17.1",
|
|
53
|
+
"webpack": "5.36.0",
|
|
54
|
+
"webpack-dev-middleware": "4.1.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/babel__code-frame": "^7.0.3",
|
|
58
|
+
"@types/cross-spawn": "6.0.1",
|
|
59
|
+
"@types/detect-port": "1.3.0",
|
|
60
|
+
"@types/dotenv": "8.2.0",
|
|
61
|
+
"@types/ejs": "3.0.4",
|
|
62
|
+
"@types/webpack-dev-middleware": "^5.0.2"
|
|
63
|
+
},
|
|
64
|
+
"gitHead": "0bc0bc76e72ca5a339341e8b71d6bb6bb41409e8"
|
|
65
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
/// <reference types="react-dom" />
|
|
4
|
+
|
|
5
|
+
// Extend the NodeJS namespace with Next.js-defined properties
|
|
6
|
+
declare namespace NodeJS {
|
|
7
|
+
interface ProcessEnv {
|
|
8
|
+
readonly NODE_ENV: 'development' | 'production' | 'test';
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.bmp' {
|
|
13
|
+
const src: string;
|
|
14
|
+
export default src;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare module '*.gif' {
|
|
18
|
+
const src: string;
|
|
19
|
+
export default src;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
declare module '*.jpg' {
|
|
23
|
+
const src: string;
|
|
24
|
+
export default src;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
declare module '*.jpeg' {
|
|
28
|
+
const src: string;
|
|
29
|
+
export default src;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare module '*.png' {
|
|
33
|
+
const src: string;
|
|
34
|
+
export default src;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare module '*.webp' {
|
|
38
|
+
const src: string;
|
|
39
|
+
export default src;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare module '*.svg' {
|
|
43
|
+
import * as React from 'react';
|
|
44
|
+
|
|
45
|
+
export const ReactComponent: React.FunctionComponent<
|
|
46
|
+
React.SVGProps<SVGSVGElement> & { title?: string }
|
|
47
|
+
>;
|
|
48
|
+
|
|
49
|
+
const src: string;
|
|
50
|
+
export default src;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
declare module '*.css' {
|
|
54
|
+
const classes: { readonly [key: string]: string };
|
|
55
|
+
export default classes;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare module '*.sass' {
|
|
59
|
+
const classes: { readonly [key: string]: string };
|
|
60
|
+
export default classes;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare module '*.scss' {
|
|
64
|
+
const classes: { readonly [key: string]: string };
|
|
65
|
+
export default classes;
|
|
66
|
+
}
|