@qds.dev/code 0.9.1 → 0.9.7

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.
Files changed (43) hide show
  1. package/lib-types/src/debug.d.ts +1 -0
  2. package/lib-types/src/index.d.ts +2 -0
  3. package/lib-types/src/preview/bundler/bundled-config.d.ts +33 -0
  4. package/lib-types/src/preview/bundler/bundled.d.ts +3 -0
  5. package/lib-types/src/preview/bundler/bundled.unit.d.ts +1 -0
  6. package/lib-types/src/preview/bundler/client-events-listener.d.ts +1 -0
  7. package/lib-types/src/preview/bundler/index.d.ts +34 -0
  8. package/lib-types/src/preview/bundler/repl-bundler-worker.d.ts +30 -0
  9. package/lib-types/src/preview/bundler/repl-ssr-worker.d.ts +27 -0
  10. package/lib-types/src/preview/bundler/rollup-plugins.d.ts +5 -0
  11. package/lib-types/src/preview/bundler/rollup-plugins.unit.d.ts +1 -0
  12. package/lib-types/src/preview/constants.d.ts +5 -0
  13. package/lib-types/src/preview/index.d.ts +19 -0
  14. package/lib-types/src/preview/mocks/browser.d.ts +2 -0
  15. package/lib-types/src/preview/preview-sw.d.ts +20 -0
  16. package/lib-types/src/preview/preview-sw.unit.d.ts +1 -0
  17. package/lib-types/src/preview/register-preview-sw.d.ts +2 -0
  18. package/lib-types/src/preview/register-preview-sw.unit.d.ts +1 -0
  19. package/lib-types/src/preview/repl-editor.d.ts +1 -0
  20. package/lib-types/src/preview/repl-helpers-node.d.ts +4 -0
  21. package/lib-types/src/preview/repl-helpers.unit.d.ts +1 -0
  22. package/lib-types/src/preview/test-extend.d.ts +9 -0
  23. package/lib-types/src/preview/types.d.ts +70 -0
  24. package/lib-types/tsconfig.tsbuildinfo +1 -1
  25. package/package.json +11 -7
  26. package/LICENSE +0 -21
  27. package/lib/node_modules/.pnpm/@emnapi_core@1.7.1/node_modules/@emnapi/core/dist/emnapi-core.esm-bundler.qwik.mjs +0 -5533
  28. package/lib/node_modules/.pnpm/@emnapi_runtime@1.8.1/node_modules/@emnapi/runtime/dist/emnapi.esm-bundler.qwik.mjs +0 -1225
  29. package/lib/node_modules/.pnpm/@emnapi_wasi-threads@1.1.0/node_modules/@emnapi/wasi-threads/dist/wasi-threads.esm-bundler.qwik.mjs +0 -619
  30. package/lib/node_modules/.pnpm/@napi-rs_wasm-runtime@1.1.1/node_modules/@napi-rs/wasm-runtime/dist/fs.qwik.mjs +0 -14854
  31. package/lib/node_modules/.pnpm/@napi-rs_wasm-runtime@1.1.1/node_modules/@napi-rs/wasm-runtime/fs-proxy.qwik.mjs +0 -109
  32. package/lib/node_modules/.pnpm/@napi-rs_wasm-runtime@1.1.1/node_modules/@napi-rs/wasm-runtime/runtime.qwik.mjs +0 -4
  33. package/lib/node_modules/.pnpm/@qwik.dev_core@2.0.0-beta.15_vite@7.1.5_@types_node@24.9.0_jiti@2.6.1_lightningcss@1.30.1_ter_sl453hnfnrysgqsj6ikt4cdmnq/node_modules/@qwik.dev/core/dist/qwikloader.qwik.mjs +0 -152
  34. package/lib/node_modules/.pnpm/@rolldown_browser@1.0.0-beta.59/node_modules/@rolldown/browser/dist/index.browser.qwik.mjs +0 -13
  35. package/lib/node_modules/.pnpm/@rolldown_browser@1.0.0-beta.59/node_modules/@rolldown/browser/dist/normalize-string-or-regex-BB1FWNyl.qwik.mjs +0 -789
  36. package/lib/node_modules/.pnpm/@rolldown_browser@1.0.0-beta.59/node_modules/@rolldown/browser/dist/rolldown-binding.wasi-browser.qwik.mjs +0 -107
  37. package/lib/node_modules/.pnpm/@rolldown_browser@1.0.0-beta.59/node_modules/@rolldown/browser/dist/rolldown-build-Bfw5c2c3.qwik.mjs +0 -4157
  38. package/lib/node_modules/.pnpm/@tybys_wasm-util@0.10.1/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.qwik.mjs +0 -1968
  39. package/lib/node_modules/.pnpm/magic-regexp@0.10.0/node_modules/magic-regexp/dist/index.qwik.mjs +0 -10
  40. package/lib/node_modules/.pnpm/magic-regexp@0.10.0/node_modules/magic-regexp/dist/shared/magic-regexp.DKp_q_HX.qwik.mjs +0 -95
  41. package/lib/node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.qwik.mjs +0 -34
  42. package/lib/vite/repl-plugin.qwik.mjs +0 -31
  43. package/lib-types/src/vite/repl-plugin.d.ts +0 -7
@@ -1,10 +0,0 @@
1
- import { anyOf, char, charNotIn, exactly, maybe, oneOrMore } from "./shared/magic-regexp.DKp_q_HX.qwik.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/magic-regexp@0.10.0/node_modules/magic-regexp/dist/index.mjs
4
- const createRegExp = (...inputs) => {
5
- const flags = inputs.length > 1 && (Array.isArray(inputs[inputs.length - 1]) || inputs[inputs.length - 1] instanceof Set) ? inputs.pop() : void 0;
6
- return new RegExp(exactly(...inputs).toString(), [...flags || ""].join(""));
7
- };
8
-
9
- //#endregion
10
- export { createRegExp };
@@ -1,95 +0,0 @@
1
- //#region ../../node_modules/.pnpm/magic-regexp@0.10.0/node_modules/magic-regexp/dist/shared/magic-regexp.DKp_q_HX.mjs
2
- const NO_WRAP_RE = /^(?:\(.*\)|\\?.)$/;
3
- function wrap(s) {
4
- const v = s.toString();
5
- return NO_WRAP_RE.test(v) ? v : `(?:${v})`;
6
- }
7
- const GROUPED_AS_REPLACE_RE = /^(?:\(\?:(.+)\)|(.+))$/;
8
- const GROUPED_REPLACE_RE = /^(?:\(\?:(.+)\)([?+*]|\{[\d,]+\})?|(.+))$/;
9
- function createInput(s) {
10
- const groupedAsFn = (key) => createInput(`(?<${key}>${`${s}`.replace(GROUPED_AS_REPLACE_RE, "$1$2")})`);
11
- return {
12
- toString: () => s.toString(),
13
- and: Object.assign((...inputs) => createInput(`${s}${exactly(...inputs)}`), { referenceTo: (groupName) => createInput(`${s}\\k<${groupName}>`) }),
14
- or: (...inputs) => createInput(`(?:${s}|${inputs.map((v) => exactly(v)).join("|")})`),
15
- after: (...input) => createInput(`(?<=${exactly(...input)})${s}`),
16
- before: (...input) => createInput(`${s}(?=${exactly(...input)})`),
17
- notAfter: (...input) => createInput(`(?<!${exactly(...input)})${s}`),
18
- notBefore: (...input) => createInput(`${s}(?!${exactly(...input)})`),
19
- times: Object.assign((number) => createInput(`${wrap(s)}{${number}}`), {
20
- any: () => createInput(`${wrap(s)}*`),
21
- atLeast: (min) => createInput(`${wrap(s)}{${min},}`),
22
- atMost: (max) => createInput(`${wrap(s)}{0,${max}}`),
23
- between: (min, max) => createInput(`${wrap(s)}{${min},${max}}`)
24
- }),
25
- optionally: () => createInput(`${wrap(s)}?`),
26
- as: groupedAsFn,
27
- groupedAs: groupedAsFn,
28
- grouped: () => createInput(`${s}`.replace(GROUPED_REPLACE_RE, "($1$3)$2")),
29
- at: {
30
- lineStart: () => createInput(`^${s}`),
31
- lineEnd: () => createInput(`${s}$`)
32
- }
33
- };
34
- }
35
- const ESCAPE_REPLACE_RE = /[.*+?^${}()|[\]\\/]/g;
36
- function createCharInput(raw) {
37
- const input = createInput(`[${raw}]`);
38
- const from = (charFrom, charTo) => createCharInput(`${raw}${escapeCharInput(charFrom)}-${escapeCharInput(charTo)}`);
39
- const orChar = Object.assign((chars) => createCharInput(`${raw}${escapeCharInput(chars)}`), { from });
40
- return Object.assign(input, {
41
- orChar,
42
- from
43
- });
44
- }
45
- function escapeCharInput(raw) {
46
- return raw.replace(/[-\\^\]]/g, "\\$&");
47
- }
48
- const charIn = Object.assign((chars) => {
49
- return createCharInput(escapeCharInput(chars));
50
- }, createCharInput(""));
51
- const charNotIn = Object.assign((chars) => {
52
- return createCharInput(`^${escapeCharInput(chars)}`);
53
- }, createCharInput("^"));
54
- function anyOf(...inputs) {
55
- return createInput(`(?:${inputs.map((a) => exactly(a)).join("|")})`);
56
- }
57
- const char = createInput(".");
58
- const word = createInput("\\b\\w+\\b");
59
- const wordChar = createInput("\\w");
60
- const wordBoundary = createInput("\\b");
61
- const digit = createInput("\\d");
62
- const whitespace = createInput("\\s");
63
- const letter = Object.assign(createInput("[a-zA-Z]"), {
64
- lowercase: createInput("[a-z]"),
65
- uppercase: createInput("[A-Z]")
66
- });
67
- const tab = createInput("\\t");
68
- const linefeed = createInput("\\n");
69
- const carriageReturn = createInput("\\r");
70
- const not = {
71
- word: createInput("\\W+"),
72
- wordChar: createInput("\\W"),
73
- wordBoundary: createInput("\\B"),
74
- digit: createInput("\\D"),
75
- whitespace: createInput("\\S"),
76
- letter: Object.assign(createInput("[^a-zA-Z]"), {
77
- lowercase: createInput("[^a-z]"),
78
- uppercase: createInput("[^A-Z]")
79
- }),
80
- tab: createInput("[^\\t]"),
81
- linefeed: createInput("[^\\n]"),
82
- carriageReturn: createInput("[^\\r]")
83
- };
84
- function maybe(...inputs) {
85
- return createInput(`${wrap(exactly(...inputs))}?`);
86
- }
87
- function exactly(...inputs) {
88
- return createInput(inputs.map((input) => typeof input === "string" ? input.replace(ESCAPE_REPLACE_RE, "\\$&") : input).join(""));
89
- }
90
- function oneOrMore(...inputs) {
91
- return createInput(`${wrap(exactly(...inputs))}+`);
92
- }
93
-
94
- //#endregion
95
- export { anyOf, char, charNotIn, exactly, maybe, oneOrMore };
@@ -1,34 +0,0 @@
1
- //#region ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
2
- /******************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var extendStatics = function(d, b) {
17
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d$1, b$1) {
18
- d$1.__proto__ = b$1;
19
- } || function(d$1, b$1) {
20
- for (var p in b$1) if (Object.prototype.hasOwnProperty.call(b$1, p)) d$1[p] = b$1[p];
21
- };
22
- return extendStatics(d, b);
23
- };
24
- function __extends(d, b) {
25
- if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
26
- extendStatics(d, b);
27
- function __() {
28
- this.constructor = d;
29
- }
30
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
31
- }
32
-
33
- //#endregion
34
- export { __extends };
@@ -1,31 +0,0 @@
1
- import { PREVIEW_CONFIG } from "../preview/constants.qwik.mjs";
2
-
3
- //#region src/vite/repl-plugin.ts
4
- const getReplVitePlugin = (options = {}) => {
5
- const { serviceWorkerScope = PREVIEW_CONFIG.scope, assetsInlineLimit = 0, optimizeDepsExclude = ["@rolldown/browser"] } = options;
6
- const addServiceWorkerHeader = (server) => {
7
- server.middlewares.use((req, res, next) => {
8
- if (req.url?.startsWith(PREVIEW_CONFIG.serviceWorkerPath)) res.setHeader("Service-Worker-Allowed", serviceWorkerScope);
9
- next();
10
- });
11
- };
12
- return {
13
- name: "repl-preview-setup",
14
- config(config) {
15
- const existingExclude = config.optimizeDeps?.exclude ?? [];
16
- return {
17
- build: { assetsInlineLimit: config.build?.assetsInlineLimit ?? assetsInlineLimit },
18
- optimizeDeps: { exclude: Array.from(new Set([...existingExclude, ...optimizeDepsExclude])) }
19
- };
20
- },
21
- configureServer(server) {
22
- addServiceWorkerHeader(server);
23
- },
24
- configurePreviewServer(server) {
25
- addServiceWorkerHeader(server);
26
- }
27
- };
28
- };
29
-
30
- //#endregion
31
- export { getReplVitePlugin };
@@ -1,7 +0,0 @@
1
- import type { Plugin } from "vite";
2
- export interface ReplVitePluginOptions {
3
- serviceWorkerScope?: string;
4
- assetsInlineLimit?: number;
5
- optimizeDepsExclude?: string[];
6
- }
7
- export declare const getReplVitePlugin: (options?: ReplVitePluginOptions) => Plugin;