@qwik.dev/devtools 0.0.3 → 0.0.5
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/LICENSE +21 -0
- package/README.md +49 -30
- package/dist/component/_virtual/_commonjsHelpers.qwik.cjs +6 -0
- package/dist/component/_virtual/_commonjsHelpers.qwik.mjs +6 -0
- package/{lib → dist/component}/devtools.qwik.cjs +19 -20
- package/{lib → dist/component}/devtools.qwik.mjs +11 -12
- package/{lib → dist/component}/index.qwik.cjs +0 -2
- package/dist/component/index.qwik.mjs +4 -0
- package/{lib-types → dist/component/lib-types/devtools/src}/index.d.ts +0 -1
- package/dist/component/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@5.4.10_@types_node@20.14.11__/node_modules/@qwikest/icons/lib/hi.qwik.qwik.cjs +60 -0
- package/dist/component/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@5.4.10_@types_node@20.14.11__/node_modules/@qwikest/icons/lib/hi.qwik.qwik.mjs +60 -0
- package/dist/component/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@5.4.10_@types_node@20.14.11__/node_modules/@qwikest/icons/lib/lu.qwik.qwik.cjs +32 -0
- package/dist/component/node_modules/.pnpm/@qwikest_icons@0.0.13_@builder.io_qwik@1.11.0_vite@5.4.10_@types_node@20.14.11__/node_modules/@qwikest/icons/lib/lu.qwik.qwik.mjs +32 -0
- package/dist/component/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.qwik.cjs +54 -0
- package/dist/component/node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.qwik.mjs +54 -0
- package/dist/component/node_modules/.pnpm/birpc@0.2.19/node_modules/birpc/dist/index.qwik.cjs +128 -0
- package/dist/component/node_modules/.pnpm/birpc@0.2.19/node_modules/birpc/dist/index.qwik.mjs +128 -0
- package/dist/component/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.qwik.cjs +149 -0
- package/dist/component/node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.qwik.mjs +150 -0
- package/dist/component/node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.qwik.cjs +36 -0
- package/dist/component/node_modules/.pnpm/copy-anything@3.0.5/node_modules/copy-anything/dist/index.qwik.mjs +36 -0
- package/dist/component/node_modules/.pnpm/dree@5.1.5/node_modules/dree/bundled/lib/esm/index.esm.qwik.cjs +12 -0
- package/dist/component/node_modules/.pnpm/dree@5.1.5/node_modules/dree/bundled/lib/esm/index.esm.qwik.mjs +12 -0
- package/dist/component/node_modules/.pnpm/is-what@4.1.16/node_modules/is-what/dist/index.qwik.cjs +17 -0
- package/dist/component/node_modules/.pnpm/is-what@4.1.16/node_modules/is-what/dist/index.qwik.mjs +17 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/assert-valid-pattern.qwik.cjs +12 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/assert-valid-pattern.qwik.mjs +12 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/ast.qwik.cjs +513 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/ast.qwik.mjs +513 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/brace-expressions.qwik.cjs +110 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/brace-expressions.qwik.mjs +110 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/escape.qwik.cjs +6 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/escape.qwik.mjs +6 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.qwik.cjs +738 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/index.qwik.mjs +738 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/unescape.qwik.cjs +6 -0
- package/dist/component/node_modules/.pnpm/minimatch@10.0.1/node_modules/minimatch/dist/esm/unescape.qwik.mjs +6 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/accessDeep.qwik.cjs +120 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/accessDeep.qwik.mjs +120 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/class-registry.qwik.cjs +23 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/class-registry.qwik.mjs +23 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/custom-transformer-registry.qwik.cjs +18 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/custom-transformer-registry.qwik.mjs +18 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/double-indexed-kv.qwik.cjs +23 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/double-indexed-kv.qwik.mjs +23 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/index.qwik.cjs +91 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/index.qwik.mjs +91 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/is.qwik.cjs +51 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/is.qwik.mjs +51 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/pathstringifier.qwik.cjs +30 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/pathstringifier.qwik.mjs +30 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/plainer.qwik.cjs +148 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/plainer.qwik.mjs +148 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/registry.qwik.cjs +28 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/registry.qwik.mjs +28 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/transformer.qwik.cjs +203 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/transformer.qwik.mjs +203 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/util.qwik.cjs +47 -0
- package/dist/component/node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/util.qwik.mjs +47 -0
- package/dist/component/node_modules/.pnpm/vite-hot-client@0.2.4_vite@5.4.10_@types_node@20.14.11_/node_modules/vite-hot-client/dist/index.qwik.cjs +35 -0
- package/dist/component/node_modules/.pnpm/vite-hot-client@0.2.4_vite@5.4.10_@types_node@20.14.11_/node_modules/vite-hot-client/dist/index.qwik.mjs +35 -0
- package/{lib/kit → dist/component/packages/kit/src}/client.qwik.cjs +5 -5
- package/{lib/kit → dist/component/packages/kit/src}/client.qwik.mjs +2 -2
- package/{lib/kit → dist/component/packages/kit/src}/context.qwik.cjs +0 -12
- package/{lib/kit → dist/component/packages/kit/src}/context.qwik.mjs +2 -14
- package/{lib/kit → dist/component/packages/kit/src}/globals.qwik.cjs +0 -4
- package/dist/component/packages/kit/src/globals.qwik.mjs +6 -0
- package/dist/plugin/index.cjs +10504 -0
- package/dist/plugin/index.mjs +10492 -0
- package/package.json +34 -41
- package/lib/index.qwik.mjs +0 -6
- package/lib/kit/globals.qwik.mjs +0 -10
- package/lib/kit/server.qwik.cjs +0 -18
- package/lib/kit/server.qwik.mjs +0 -18
- package/lib/plugin/assets/index.qwik.cjs +0 -67
- package/lib/plugin/assets/index.qwik.mjs +0 -67
- package/lib/plugin/index.qwik.cjs +0 -49
- package/lib/plugin/index.qwik.mjs +0 -49
- package/lib/plugin/npm/index.qwik.cjs +0 -19
- package/lib/plugin/npm/index.qwik.mjs +0 -19
- package/lib/plugin/routes/index.qwik.cjs +0 -17
- package/lib/plugin/routes/index.qwik.mjs +0 -17
- package/lib/plugin/rpc/index.qwik.cjs +0 -14
- package/lib/plugin/rpc/index.qwik.mjs +0 -14
- package/lib/utils/location.qwik.cjs +0 -9
- package/lib/utils/location.qwik.mjs +0 -9
- package/lib-types/plugin/assets/index.d.ts +0 -5
- package/lib-types/plugin/components/index.d.ts +0 -0
- package/lib-types/plugin/index.d.ts +0 -2
- package/lib-types/plugin/npm/index.d.ts +0 -5
- package/lib-types/plugin/routes/index.d.ts +0 -5
- package/lib-types/plugin/rpc/index.d.ts +0 -3
- package/lib-types/plugin/types/index.d.ts +0 -5
- package/src/devtools.css +0 -558
- package/src/devtools.tsx +0 -404
- package/src/entry.dev.tsx +0 -17
- package/src/entry.ssr.tsx +0 -25
- package/src/index.ts +0 -2
- package/src/kit/client.ts +0 -21
- package/src/kit/constants.ts +0 -1
- package/src/kit/context.ts +0 -42
- package/src/kit/globals.ts +0 -22
- package/src/kit/index.ts +0 -4
- package/src/kit/server.ts +0 -21
- package/src/kit/shared.ts +0 -11
- package/src/kit/types.ts +0 -48
- package/src/plugin/assets/index.ts +0 -126
- package/src/plugin/components/index.ts +0 -0
- package/src/plugin/index.ts +0 -50
- package/src/plugin/npm/index.ts +0 -24
- package/src/plugin/routes/index.ts +0 -16
- package/src/plugin/rpc/index.ts +0 -14
- package/src/plugin/types/index.ts +0 -6
- package/src/root.tsx +0 -15
- package/src/utils/location.ts +0 -9
- /package/{lib → dist/component}/devtools.css.qwik.cjs +0 -0
- /package/{lib → dist/component}/devtools.css.qwik.mjs +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/devtools.d.ts +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/entry.dev.d.ts +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/entry.ssr.d.ts +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/root.d.ts +0 -0
- /package/{lib-types → dist/component/lib-types/devtools/src}/utils/location.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/client.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/constants.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/context.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/globals.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/index.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/server.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/shared.d.ts +0 -0
- /package/{lib-types/kit → dist/component/lib-types/kit/src}/types.d.ts +0 -0
- /package/{lib/kit → dist/component/packages/kit/src}/constants.qwik.cjs +0 -0
- /package/{lib/kit → dist/component/packages/kit/src}/constants.qwik.mjs +0 -0
- /package/{lib/kit → dist/component/packages/kit/src}/shared.qwik.cjs +0 -0
- /package/{lib/kit → dist/component/packages/kit/src}/shared.qwik.mjs +0 -0
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import fsp from 'node:fs/promises';
|
|
2
|
-
import fg from 'fast-glob';
|
|
3
|
-
import { resolve, relative, join } from 'node:path/posix';
|
|
4
|
-
import { ServerContext } from '../types';
|
|
5
|
-
import { AssetType, AssetInfo } from '../../kit/types';
|
|
6
|
-
|
|
7
|
-
// const defaultAllowedExtensions = [
|
|
8
|
-
// 'png',
|
|
9
|
-
// 'jpg',
|
|
10
|
-
// 'jpeg',
|
|
11
|
-
// 'gif',
|
|
12
|
-
// 'svg',
|
|
13
|
-
// 'webp',
|
|
14
|
-
// 'ico',
|
|
15
|
-
// 'mp4',
|
|
16
|
-
// 'ogg',
|
|
17
|
-
// 'mp3',
|
|
18
|
-
// 'wav',
|
|
19
|
-
// 'mov',
|
|
20
|
-
// 'mkv',
|
|
21
|
-
// 'mpg',
|
|
22
|
-
// 'txt',
|
|
23
|
-
// 'ttf',
|
|
24
|
-
// 'woff',
|
|
25
|
-
// 'woff2',
|
|
26
|
-
// 'eot',
|
|
27
|
-
// 'json',
|
|
28
|
-
// 'js',
|
|
29
|
-
// 'jsx',
|
|
30
|
-
// 'ts',
|
|
31
|
-
// 'tsx',
|
|
32
|
-
// 'md',
|
|
33
|
-
// 'mdx',
|
|
34
|
-
// 'vue',
|
|
35
|
-
// 'webm',
|
|
36
|
-
// ];
|
|
37
|
-
|
|
38
|
-
export function getAssetsFunctions({ config }: ServerContext) {
|
|
39
|
-
let cache: AssetInfo[] | null = null;
|
|
40
|
-
|
|
41
|
-
async function getAssetsFromPublicDir() {
|
|
42
|
-
const dir = resolve(config.root);
|
|
43
|
-
const baseURL = config.base;
|
|
44
|
-
|
|
45
|
-
// publicDir in ResolvedConfig is an absolute path
|
|
46
|
-
const publicDir = config.publicDir;
|
|
47
|
-
const relativePublicDir =
|
|
48
|
-
publicDir === '' ? '' : `${relative(dir, publicDir)}/`;
|
|
49
|
-
|
|
50
|
-
const files = await fg(
|
|
51
|
-
[
|
|
52
|
-
// image
|
|
53
|
-
'**/*.(png|jpg|jpeg|gif|svg|webp|avif|ico|bmp|tiff)',
|
|
54
|
-
// video
|
|
55
|
-
'**/*.(mp4|webm|ogv|mov|avi|flv|wmv|mpg|mpeg|mkv|3gp|3g2|m2ts|vob|ogm|ogx|rm|rmvb|asf|amv|divx|m4v|svi|viv|f4v|f4p|f4a|f4b)',
|
|
56
|
-
// audio
|
|
57
|
-
'**/*.(mp3|wav|ogg|flac|aac|wma|alac|ape|ac3|dts|tta|opus|amr|aiff|au|mid|midi|ra|rm|wv|weba|dss|spx|vox|tak|dsf|dff|dsd|cda)',
|
|
58
|
-
// font
|
|
59
|
-
'**/*.(woff2?|eot|ttf|otf|ttc|pfa|pfb|pfm|afm)',
|
|
60
|
-
// text
|
|
61
|
-
'**/*.(json|json5|jsonc|txt|text|tsx|jsx|md|mdx|mdc|markdown|yaml|yml|toml)',
|
|
62
|
-
// wasm
|
|
63
|
-
'**/*.wasm',
|
|
64
|
-
],
|
|
65
|
-
{
|
|
66
|
-
cwd: publicDir,
|
|
67
|
-
onlyFiles: true,
|
|
68
|
-
caseSensitiveMatch: false,
|
|
69
|
-
ignore: [
|
|
70
|
-
'**/node_modules/**',
|
|
71
|
-
'**/dist/**',
|
|
72
|
-
'**/package-lock.*',
|
|
73
|
-
'**/pnpm-lock.*',
|
|
74
|
-
'**/pnpm-workspace.*',
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
);
|
|
78
|
-
|
|
79
|
-
cache = await Promise.all(
|
|
80
|
-
files.map(async (relativePath) => {
|
|
81
|
-
const filePath = resolve(publicDir, relativePath);
|
|
82
|
-
const stat = await fsp.lstat(filePath);
|
|
83
|
-
// remove public prefix to resolve vite assets warning
|
|
84
|
-
const path = relativePath.replace(relativePublicDir, '');
|
|
85
|
-
return {
|
|
86
|
-
path,
|
|
87
|
-
relativePath,
|
|
88
|
-
publicPath: join(baseURL, path),
|
|
89
|
-
filePath,
|
|
90
|
-
type: guessType(relativePath),
|
|
91
|
-
size: stat.size,
|
|
92
|
-
mtime: stat.mtimeMs,
|
|
93
|
-
};
|
|
94
|
-
}),
|
|
95
|
-
);
|
|
96
|
-
return cache;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return {
|
|
100
|
-
getAssetsFromPublicDir,
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function guessType(path: string): AssetType {
|
|
105
|
-
if (/\.(?:png|jpe?g|jxl|gif|svg|webp|avif|ico|bmp|tiff?)$/i.test(path))
|
|
106
|
-
return 'image';
|
|
107
|
-
if (
|
|
108
|
-
/\.(?:mp4|webm|ogv|mov|avi|flv|wmv|mpg|mpeg|mkv|3gp|3g2|ts|mts|m2ts|vob|ogm|ogx|rm|rmvb|asf|amv|divx|m4v|svi|viv|f4v|f4p|f4a|f4b)$/i.test(
|
|
109
|
-
path,
|
|
110
|
-
)
|
|
111
|
-
)
|
|
112
|
-
return 'video';
|
|
113
|
-
if (
|
|
114
|
-
/\.(?:mp3|wav|ogg|flac|aac|wma|alac|ape|ac3|dts|tta|opus|amr|aiff|au|mid|midi|ra|rm|wv|weba|dss|spx|vox|tak|dsf|dff|dsd|cda)$/i.test(
|
|
115
|
-
path,
|
|
116
|
-
)
|
|
117
|
-
)
|
|
118
|
-
return 'audio';
|
|
119
|
-
if (/\.(?:woff2?|eot|ttf|otf|ttc|pfa|pfb|pfm|afm)/i.test(path)) return 'font';
|
|
120
|
-
if (
|
|
121
|
-
/\.(?:json[5c]?|te?xt|[mc]?[jt]sx?|md[cx]?|markdown|ya?ml|toml)/i.test(path)
|
|
122
|
-
)
|
|
123
|
-
return 'text';
|
|
124
|
-
if (/\.wasm/i.test(path)) return 'wasm';
|
|
125
|
-
return 'other';
|
|
126
|
-
}
|
|
File without changes
|
package/src/plugin/index.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ResolvedConfig, type Plugin } from 'vite';
|
|
2
|
-
import { getServerFunctions } from './rpc';
|
|
3
|
-
import { createServerRpc, setViteServerContext } from '../kit';
|
|
4
|
-
|
|
5
|
-
export function qwikDevtools(): Plugin {
|
|
6
|
-
let _config: ResolvedConfig;
|
|
7
|
-
return {
|
|
8
|
-
name: 'vite-plugin-qwik-devtools',
|
|
9
|
-
apply: 'serve',
|
|
10
|
-
configResolved(viteConfig) {
|
|
11
|
-
_config = viteConfig;
|
|
12
|
-
},
|
|
13
|
-
transform: {
|
|
14
|
-
order: 'pre',
|
|
15
|
-
handler(code, id) {
|
|
16
|
-
// Only transform the root component file
|
|
17
|
-
if (id.endsWith('root.tsx')) {
|
|
18
|
-
// Check if QwikDevtools import already exists
|
|
19
|
-
if (!code.includes('@qwik.dev/devtools')) {
|
|
20
|
-
// Add import for QwikDevtools using the correct package name
|
|
21
|
-
code = `import { QwikDevtools } from '@qwik.dev/devtools';\n${code}`;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Find the closing body tag and inject the QwikDevtools component before it
|
|
25
|
-
const match = code.match(/<body[^>]*>([\s\S]*?)<\/body>/);
|
|
26
|
-
if (match) {
|
|
27
|
-
const bodyContent = match[1];
|
|
28
|
-
const newBodyContent = bodyContent.replace(
|
|
29
|
-
/{!isDev && <ServiceWorkerRegister \/>}/,
|
|
30
|
-
`{!isDev && <ServiceWorkerRegister />}\n {isDev && <QwikDevtools />}`,
|
|
31
|
-
);
|
|
32
|
-
code = code.replace(bodyContent, newBodyContent);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
code,
|
|
37
|
-
map: null,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
configureServer(server) {
|
|
43
|
-
setViteServerContext(server);
|
|
44
|
-
|
|
45
|
-
const rpcFunctions = getServerFunctions({ server, config: _config });
|
|
46
|
-
|
|
47
|
-
createServerRpc(rpcFunctions);
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
}
|
package/src/plugin/npm/index.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ServerContext } from '../types';
|
|
2
|
-
import fsp from 'node:fs/promises';
|
|
3
|
-
import { NpmInfo } from '../../kit/types';
|
|
4
|
-
|
|
5
|
-
export function getNpmFunctions({ config }: ServerContext) {
|
|
6
|
-
return {
|
|
7
|
-
async getQwikPackages(): Promise<NpmInfo> {
|
|
8
|
-
const pathToPackageJson = config.configFileDependencies.find((file) =>
|
|
9
|
-
file.endsWith('package.json'),
|
|
10
|
-
);
|
|
11
|
-
if (!pathToPackageJson) return [];
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
const pkgJson = await fsp.readFile(pathToPackageJson, 'utf-8');
|
|
15
|
-
const pkg = JSON.parse(pkgJson);
|
|
16
|
-
return Object.entries<string>(pkg.devDependencies).filter(([key]) =>
|
|
17
|
-
/@qwik/i.test(key),
|
|
18
|
-
);
|
|
19
|
-
} catch (error) {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RoutesInfo } from '../../kit/types';
|
|
2
|
-
import { ServerContext } from '../types';
|
|
3
|
-
import { scanAsync } from 'dree';
|
|
4
|
-
|
|
5
|
-
export function getRouteFunctions({ config }: ServerContext) {
|
|
6
|
-
const routesDir = `${config.root}/src/routes`;
|
|
7
|
-
return {
|
|
8
|
-
getRoutes: async (): Promise<RoutesInfo> => {
|
|
9
|
-
const routes = await scanAsync(routesDir, {
|
|
10
|
-
extensions: ['tsx'],
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
return routes;
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
package/src/plugin/rpc/index.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ServerFunctions } from '../../kit/types';
|
|
2
|
-
import { getAssetsFunctions } from '../assets';
|
|
3
|
-
import { ServerContext } from '../types';
|
|
4
|
-
import { getRouteFunctions } from '../routes';
|
|
5
|
-
import { getNpmFunctions } from '../npm';
|
|
6
|
-
|
|
7
|
-
export function getServerFunctions(ctx: ServerContext): ServerFunctions {
|
|
8
|
-
return {
|
|
9
|
-
healthCheck: () => true,
|
|
10
|
-
...getAssetsFunctions(ctx),
|
|
11
|
-
...getRouteFunctions(ctx),
|
|
12
|
-
...getNpmFunctions(ctx),
|
|
13
|
-
};
|
|
14
|
-
}
|
package/src/root.tsx
DELETED
package/src/utils/location.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|