@moneko/core 3.26.6 → 3.26.8
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/bin/build-app.d.mts +11 -16
- package/lib/bin/build.d.mts +13 -1
- package/lib/bin/build.mjs +1 -1
- package/lib/bin/changelog.d.mts +12 -1
- package/lib/bin/convert.d.mts +14 -0
- package/lib/bin/convert.mjs +1 -0
- package/lib/bin/eslint.d.mts +6 -1
- package/lib/bin/eslint.mjs +2 -1
- package/lib/bin/file.d.mts +2 -0
- package/lib/bin/git-hooks.d.mts +4 -1
- package/lib/bin/git-hooks.mjs +2 -1
- package/lib/bin/help.d.mts +2 -1
- package/lib/bin/index.d.mts +5 -1
- package/lib/bin/lessc.d.mts +10 -1
- package/lib/bin/start.d.mts +4 -1
- package/lib/bin/start.mjs +1 -1
- package/lib/bin/stylelint.d.mts +6 -1
- package/lib/bin/stylelint.mjs +2 -1
- package/lib/bin/utils/bundle-app.d.mts +6 -2
- package/lib/bin/utils/config.d.mts +8 -1
- package/lib/bin/utils/config.mjs +1 -1
- package/lib/bin/utils/setup-swcrc.d.mts +3 -2
- package/lib/bin/utils/setup-swcrc.mjs +1 -1
- package/lib/build/common.d.mts +13 -2
- package/lib/build/common.mjs +1 -1
- package/lib/build/server.d.mts +4 -0
- package/lib/build.d.mts +21 -1
- package/lib/build.mjs +1 -1
- package/lib/commom/diff-object.d.mts +1 -1
- package/lib/commom/esm.d.mts +1 -1
- package/lib/commom/has-pkg.d.mts +1 -0
- package/lib/commom/log.d.mts +4 -0
- package/lib/commom/log.mjs +3 -3
- package/lib/commom/match-path.d.mts +0 -16
- package/lib/commom/net.d.mts +4 -2
- package/lib/commom/os-tmp-dir.d.mts +0 -3
- package/lib/commom/parse-module-meta.d.mts +4 -1
- package/lib/commom/paths.d.mts +21 -39
- package/lib/commom/reactive-object.d.mts +4 -4
- package/lib/commom/require.d.mts +6 -0
- package/lib/commom/rule.d.mts +17 -23
- package/lib/commom/setup-env.d.mts +2 -5
- package/lib/commom/sigint-exit.d.mts +1 -1
- package/lib/common.d.mts +16 -1
- package/lib/config.d.mts +21 -0
- package/lib/config.mjs +1 -1
- package/lib/dev/config.d.mts +11 -1
- package/lib/dev/json-schema.d.mts +72 -3
- package/lib/dev/mock.d.mts +12 -21
- package/lib/dev/proxy.d.mts +4 -4
- package/lib/dev.d.mts +57 -1
- package/lib/dev.mjs +1 -1
- package/lib/index.d.mts +4 -4
- package/lib/loader/css-in-js-minify.d.cts +4 -1
- package/lib/loader/lightning-css/codegen.d.cts +4 -3
- package/lib/loader/lightning-css/loader.cjs +1 -1
- package/lib/loader/lightning-css/loader.d.cts +22 -3
- package/lib/loader/lightning-css/runtime/api.d.cts +3 -1
- package/lib/loader/lightning-css/runtime/get-url.d.cts +4 -1
- package/lib/loader/lightning-css/utils.d.cts +21 -11
- package/lib/loader/mdx.d.cts +3 -2
- package/lib/loader/react-compiler.d.cts +3 -1
- package/lib/loader/solid.d.cts +5 -4
- package/lib/loader/ts-doc.d.cts +6 -2
- package/lib/module.config.d.mts +48 -3
- package/lib/module.config.mjs +2 -2
- package/lib/options/css-extract.d.mts +6 -0
- package/lib/options/html-plugin-option.d.mts +9 -0
- package/lib/options/html-plugin-option.mjs +1 -1
- package/lib/options/js-minify.d.mts +12 -11
- package/lib/options/md-to-html.d.mts +3 -1
- package/lib/options/modify-vars.d.mts +7 -4
- package/lib/options/reslove.d.mts +9 -7
- package/lib/options/split-chunk.d.mts +2 -0
- package/lib/options/swcrc.d.mts +14 -3
- package/lib/plugin/add-entry-attribute.d.mts +3 -11
- package/lib/plugin/copy.d.mts +10 -21
- package/lib/plugin/copy.mjs +1 -1
- package/lib/plugin/done.d.mts +2 -1
- package/lib/plugin/exposes-declararion.d.mts +8 -4
- package/lib/plugin/external-remotes.d.mts +6 -2
- package/lib/plugin/external-remotes.mjs +1 -1
- package/lib/plugin/lightningcss-plugin.d.mts +14 -8
- package/lib/plugin/lightningcss-plugin.mjs +1 -1
- package/lib/plugin/module-federation.d.mts +19 -1
- package/lib/plugin/module-federation.mjs +1 -1
- package/lib/plugin/override-resolve.d.mts +6 -17
- package/lib/plugin/virtual-module.d.mts +18 -6
- package/lib/plugins.config.d.mts +20 -1
- package/lib/plugins.config.mjs +1 -1
- package/lib/polyfills/polyfills.d.mts +6 -2
- package/lib/polyfills/replace-children.d.mts +1 -0
- package/lib/polyfills/targets.d.mts +7 -3
- package/lib/process-env.d.mts +9 -9
- package/lib/process-env.mjs +1 -1
- package/lib/utils/create-types.d.mts +4 -1
- package/lib/utils/dts.d.mts +10 -12
- package/lib/utils/fetch-module-federation-dts.d.mts +4 -1
- package/lib/utils/index.d.mts +3 -26
- package/lib/utils/run.d.mts +2 -1
- package/lib/utils/seo.d.mts +9 -1
- package/lib/utils/svg-to-data-uri.d.mts +58 -1
- package/lib/utils/vts.d.mts +5 -13
- package/lib/vm/coverage.d.mts +38 -1
- package/lib/vm/docs.d.mts +12 -0
- package/lib/vm/docs.mjs +1 -1
- package/lib/vm/example.d.mts +10 -2
- package/lib/vm/generate-doc.d.mts +35 -1
- package/lib/vm/generate-doc.mjs +1 -1
- package/lib/vm/info.d.mts +20 -13
- package/lib/vm/locales.d.mts +24 -0
- package/lib/vm/locales.mjs +2 -2
- package/lib/vm/modules.d.mts +23 -0
- package/lib/vm/routes.d.mts +10 -1
- package/lib/vm/routes.mjs +1 -1
- package/lib/vm/utils.d.mts +5 -1
- package/package.json +11 -13
- package/typings/global.d.ts +4 -0
- package/lib/bin/runlint.d.mts +0 -2
- package/lib/bin/runlint.mjs +0 -2
- package/lib/commom/get-current-time.d.mts +0 -2
- package/lib/commom/get-current-time.mjs +0 -1
- package/lib/polyfills/replace-children.d.ts +0 -1
|
@@ -1,2 +1,59 @@
|
|
|
1
|
-
declare
|
|
1
|
+
declare const shorterNames: {
|
|
2
|
+
readonly aqua: RegExp;
|
|
3
|
+
readonly azure: RegExp;
|
|
4
|
+
readonly beige: RegExp;
|
|
5
|
+
readonly bisque: RegExp;
|
|
6
|
+
readonly black: RegExp;
|
|
7
|
+
readonly blue: RegExp;
|
|
8
|
+
readonly brown: RegExp;
|
|
9
|
+
readonly coral: RegExp;
|
|
10
|
+
readonly cornsilk: RegExp;
|
|
11
|
+
readonly crimson: RegExp;
|
|
12
|
+
readonly cyan: RegExp;
|
|
13
|
+
readonly darkblue: RegExp;
|
|
14
|
+
readonly darkcyan: RegExp;
|
|
15
|
+
readonly darkgrey: RegExp;
|
|
16
|
+
readonly darkred: RegExp;
|
|
17
|
+
readonly deeppink: RegExp;
|
|
18
|
+
readonly dimgrey: RegExp;
|
|
19
|
+
readonly gold: RegExp;
|
|
20
|
+
readonly green: RegExp;
|
|
21
|
+
readonly grey: RegExp;
|
|
22
|
+
readonly honeydew: RegExp;
|
|
23
|
+
readonly hotpink: RegExp;
|
|
24
|
+
readonly indigo: RegExp;
|
|
25
|
+
readonly ivory: RegExp;
|
|
26
|
+
readonly khaki: RegExp;
|
|
27
|
+
readonly lavender: RegExp;
|
|
28
|
+
readonly lime: RegExp;
|
|
29
|
+
readonly linen: RegExp;
|
|
30
|
+
readonly maroon: RegExp;
|
|
31
|
+
readonly moccasin: RegExp;
|
|
32
|
+
readonly navy: RegExp;
|
|
33
|
+
readonly oldlace: RegExp;
|
|
34
|
+
readonly olive: RegExp;
|
|
35
|
+
readonly orange: RegExp;
|
|
36
|
+
readonly orchid: RegExp;
|
|
37
|
+
readonly peru: RegExp;
|
|
38
|
+
readonly pink: RegExp;
|
|
39
|
+
readonly plum: RegExp;
|
|
40
|
+
readonly purple: RegExp;
|
|
41
|
+
readonly red: RegExp;
|
|
42
|
+
readonly salmon: RegExp;
|
|
43
|
+
readonly seagreen: RegExp;
|
|
44
|
+
readonly seashell: RegExp;
|
|
45
|
+
readonly sienna: RegExp;
|
|
46
|
+
readonly silver: RegExp;
|
|
47
|
+
readonly skyblue: RegExp;
|
|
48
|
+
readonly snow: RegExp;
|
|
49
|
+
readonly tan: RegExp;
|
|
50
|
+
readonly teal: RegExp;
|
|
51
|
+
readonly thistle: RegExp;
|
|
52
|
+
readonly tomato: RegExp;
|
|
53
|
+
readonly violet: RegExp;
|
|
54
|
+
readonly wheat: RegExp;
|
|
55
|
+
readonly white: RegExp;
|
|
56
|
+
};
|
|
57
|
+
declare function colorCodeToShorterNames(str: string);
|
|
58
|
+
declare function svgToDataUri(svgString: string);
|
|
2
59
|
export default svgToDataUri;
|
package/lib/utils/vts.d.mts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
+
import { createContext, Script } from 'node:vm';
|
|
2
|
+
import { type Options, transformFileSync } from '@swc/core';
|
|
3
|
+
import require from '../commom/require.mjs';
|
|
4
|
+
import * as monekoCore from '../index.mjs';
|
|
5
|
+
declare const transformOption: Options;
|
|
1
6
|
interface VfsOptions {
|
|
2
7
|
namedExport?: boolean;
|
|
3
8
|
modules: Record<string, any>;
|
|
4
9
|
}
|
|
5
|
-
/**
|
|
6
|
-
* 运行 ts 代码
|
|
7
|
-
* @param {String} filepath 文件名
|
|
8
|
-
* @returns {String} declaration
|
|
9
|
-
* @example
|
|
10
|
-
* // a.ts
|
|
11
|
-
* export default { user: 'admin' } as { user: 'admin' };
|
|
12
|
-
* // b.js
|
|
13
|
-
* const a = vts('fullpath/a.ts');
|
|
14
|
-
*
|
|
15
|
-
* console.log(a); // { user: 'admin' }
|
|
16
|
-
*/
|
|
17
10
|
export declare function vts<T>(filepath: string, options?: VfsOptions): T;
|
|
18
|
-
export {};
|
package/lib/vm/coverage.d.mts
CHANGED
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
import { fileExists, parseXml } from '@moneko/utils';
|
|
2
|
+
import { PACKAGENAME } from '../process-env.mjs';
|
|
3
|
+
type CoverageType = {
|
|
4
|
+
statements: string;
|
|
5
|
+
coveredstatements: string;
|
|
6
|
+
conditionals: string;
|
|
7
|
+
coveredconditionals: string;
|
|
8
|
+
methods: string;
|
|
9
|
+
coveredmethods: string;
|
|
10
|
+
};
|
|
11
|
+
type ProjectCoverageType = {
|
|
12
|
+
elements: string;
|
|
13
|
+
coveredelements: string;
|
|
14
|
+
complexity: string;
|
|
15
|
+
loc: string;
|
|
16
|
+
ncloc: string;
|
|
17
|
+
packages: string;
|
|
18
|
+
files: string;
|
|
19
|
+
classes: string;
|
|
20
|
+
};
|
|
21
|
+
type CoverageResult = {
|
|
22
|
+
coverage: {
|
|
23
|
+
project: {
|
|
24
|
+
metrics: {
|
|
25
|
+
$: object;
|
|
26
|
+
};
|
|
27
|
+
package: {
|
|
28
|
+
$: {
|
|
29
|
+
name: string;
|
|
30
|
+
};
|
|
31
|
+
metrics: {
|
|
32
|
+
$: string;
|
|
33
|
+
};
|
|
34
|
+
}[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
declare function getCoverage(coveragePath: string);
|
|
2
39
|
export default getCoverage;
|
package/lib/vm/docs.d.mts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { relative, sep } from 'node:path';
|
|
2
|
+
import { loadFile, scanFolderSync } from '@moneko/utils';
|
|
3
|
+
import parseModuleMeta, { type ModuleMeta } from '../commom/parse-module-meta.mjs';
|
|
4
|
+
import paths from '../commom/paths.mjs';
|
|
1
5
|
import ReactiveObject from '../commom/reactive-object.mjs';
|
|
6
|
+
import Rule from '../commom/rule.mjs';
|
|
7
|
+
import { CONFIG } from '../config.mjs';
|
|
8
|
+
import { FRAMEWORK, isLibrary, isReact, isSolid } from '../process-env.mjs';
|
|
9
|
+
import generateDoc from './generate-doc.mjs';
|
|
10
|
+
declare const createElement: string;
|
|
11
|
+
declare const FRAMEWORKNAME: string;
|
|
12
|
+
declare const moduleMeta: ModuleMeta;
|
|
2
13
|
export declare const docsModuleName: string;
|
|
3
14
|
export declare const docsModulePkgJson: string;
|
|
4
15
|
export declare const docsModuleMeta: string;
|
|
5
16
|
export declare const docs: ReactiveObject<Record<string, string>>;
|
|
6
17
|
export declare const comment: ReactiveObject<Record<string, string>>;
|
|
18
|
+
declare function commentPath();
|
|
7
19
|
export declare const getCommentPath: (file: string) => string;
|
package/lib/vm/docs.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{relative as e,sep as t}from"node:path";import{loadFile as o,scanFolderSync as m}from"@moneko/utils";import
|
|
1
|
+
import{relative as e,sep as t}from"node:path";import{loadFile as o,scanFolderSync as m}from"@moneko/utils";import a from"../commom/parse-module-meta.mjs";import r from"../commom/paths.mjs";import s from"../commom/reactive-object.mjs";import n from"../commom/rule.mjs";import{CONFIG as l}from"../config.mjs";import{FRAMEWORK as c,isLibrary as p,isReact as i,isSolid as d}from"../process-env.mjs";import f from"./generate-doc.mjs";let u={react:"createElement",solid:"createComponent"}[c],g=a("@app/docs");export const docsModuleName=g.file;export const docsModulePkgJson=g.pkg;export const docsModuleMeta=g.meta;export const docs=new s({[docsModuleName]:"export default {}",[docsModulePkgJson]:docsModuleMeta});export const comment=new s({});export const getCommentPath=function(){let e=/\/(.+?)\.tsx?$/,t=l.alias["@pkg"]?.length;return o=>o.substring(t).replace(/\\/g,"/").replace(e,"@app/comment/$1.md")}();if(p&&!1!==l.htmlPluginOption){let s={},p=`import { ${u}${d?",Dynamic":""} } from "${{react:"react",solid:"solid-js"}[c]}${d?"/web":""}";import SuspenseComp from "@app/suspense";function call_then(res) {return {default: ${i?"() =>":""}${u}(${d?"Dynamic":"'div'"}, {${d?"innerHTML: res.default, component: 'div', class: 'n-md-box' ":"dangerouslySetInnerHTML: {__html:res.default}, className: 'n-md-box'"} })};}`,g=(e,o)=>{if(!e.endsWith("package.json")){let m=e.replace(/@app[/\\]comment[/\\]/,"").split(t),a=m.pop(),r=m.join("/");s[r]||(s[r]={}),o?s[r][a]&&delete s[r][a]:s[r][a]=`rr(() => ${u}(SuspenseComp, { comp: () => import(/* webpackChunkName: '${e}' */ '${e}?raw').then(call_then)}))rr`;let l={};for(let e in s)Object.prototype.hasOwnProperty.call(s,e)&&(l[e]=Object.values(s[e]));docs.setData(docsModuleName,`${p}export default ${JSON.stringify(l).replace(n.extract_func,"$1")}`)}};comment.on("change",(t,o)=>{g(e(r.nodeModules,t),o?.length<0)});let h=m(l.alias["@pkg"],["\\.tsx?$"]).filter(e=>!/(^|\/)\.[^\\/\\.]|\.test\./i.test(e));await Promise.all(h.map(async e=>({data:await o(e),file:e}))).then(e=>{for(let t=0;t<e.length;t++){let o=e[t];if(o.data){let{file:e,pkg:t,meta:m}=a(getCommentPath(o.file));comment.setData(e,f(o.data,o.file)),comment.setData(t,m)}}})}
|
package/lib/vm/example.d.mts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
import { generateExample } from '@moneko/mdx';
|
|
2
|
+
import parseModuleMeta from '../commom/parse-module-meta.mjs';
|
|
3
|
+
import paths from '../commom/paths.mjs';
|
|
1
4
|
import ReactiveObject from '../commom/reactive-object.mjs';
|
|
2
|
-
|
|
5
|
+
import Rule from '../commom/rule.mjs';
|
|
6
|
+
import { CONFIG } from '../config.mjs';
|
|
7
|
+
import { isDev, isLibrary } from '../process-env.mjs';
|
|
8
|
+
import { watchFiles } from './utils.mjs';
|
|
9
|
+
export declare const exampleModuleName: string;
|
|
10
|
+
declare function getExample();
|
|
3
11
|
export declare const examples: ReactiveObject<Record<string, string>>;
|
|
4
|
-
export declare function generatorExample()
|
|
12
|
+
export declare function generatorExample();
|
|
@@ -1 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
import { dirname } from 'node:path';
|
|
2
|
+
import ts, { type EnumDeclaration, type EnumMember, type InterfaceDeclaration, type MethodSignature, type PropertySignature } from 'typescript';
|
|
3
|
+
import { CONFIG } from '../config.mjs';
|
|
4
|
+
import mdToHtml from '../options/md-to-html.mjs';
|
|
5
|
+
declare const ScriptKind: typeof ts.ScriptKind;
|
|
6
|
+
declare const ScriptTarget: typeof ts.ScriptTarget;
|
|
7
|
+
declare const SyntaxKind: typeof ts.SyntaxKind;
|
|
8
|
+
declare const createSourceFile: typeof ts.createSourceFile;
|
|
9
|
+
declare const forEachChild: typeof ts.forEachChild;
|
|
10
|
+
declare const getLeadingCommentRanges: typeof ts.getLeadingCommentRanges;
|
|
11
|
+
declare const isInterfaceDeclaration: typeof ts.isInterfaceDeclaration;
|
|
12
|
+
declare const isQuestionToken: typeof ts.isQuestionToken;
|
|
13
|
+
declare const isPropertySignature: typeof ts.isPropertySignature;
|
|
14
|
+
declare const isFunctionTypeNode: typeof ts.isFunctionTypeNode;
|
|
15
|
+
declare const isUnionTypeNode: typeof ts.isUnionTypeNode;
|
|
16
|
+
declare const isMethodSignature: typeof ts.isMethodSignature;
|
|
17
|
+
declare const allType: Record<string, string>;
|
|
18
|
+
declare function getPropertyComment(propertyNode: InterfaceDeclaration | PropertySignature | EnumMember | EnumDeclaration);
|
|
19
|
+
declare function getDefaultValueFromComment(commentText?: string);
|
|
20
|
+
declare function getVersionFromComment(commentText?: string);
|
|
21
|
+
declare function getExampleComment(commentText?: string);
|
|
22
|
+
declare function getAuthor(commentText?: string);
|
|
23
|
+
declare function getIgnore(commentText?: string);
|
|
24
|
+
declare const regex: RegExp;
|
|
25
|
+
declare function getTypeText(typeText?: string, hasColor?: boolean);
|
|
26
|
+
declare function getMemberValue(memberNode: EnumMember);
|
|
27
|
+
declare function replacePairedSymbols(inputString?: string);
|
|
28
|
+
declare function isFunctionTypeProperty(member: PropertySignature): boolean;
|
|
29
|
+
declare function replaceText(str?: string);
|
|
30
|
+
declare function getBaseInterfaces(interfaceNode: InterfaceDeclaration);
|
|
31
|
+
declare function getComment(comment?: string);
|
|
32
|
+
declare function getMethodText(member: PropertySignature | MethodSignature);
|
|
33
|
+
declare function generateInterfaceDocumentation(node: InterfaceDeclaration);
|
|
34
|
+
declare function generateEnumDocumentation(node: EnumDeclaration);
|
|
35
|
+
export default function generateDoc(content: string, path: string);
|
package/lib/vm/generate-doc.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dirname as e}from"node:path";import t from"typescript";import{CONFIG as n}from"../config.mjs";import
|
|
1
|
+
import{dirname as e}from"node:path";import t from"typescript";import{CONFIG as n}from"../config.mjs";import r from"../options/md-to-html.mjs";let l=t.ScriptKind,o=t.ScriptTarget,i=t.SyntaxKind,a=t.createSourceFile,c=t.forEachChild,s=t.getLeadingCommentRanges,u=t.isInterfaceDeclaration,f=t.isQuestionToken,m=t.isPropertySignature,p=t.isFunctionTypeNode,g=t.isUnionTypeNode,$=t.isMethodSignature,d={};function h(e){let t=s(e.getSourceFile().text,e.pos);if(t){let n=e.getSourceFile().text.slice(t[0].pos,t[0].end).match(/\/\*\*([\s\S]*?)\*\//);if(n)return n[1].replaceAll(/^\s*\* ?/gm,"").replace(/\s+$/,"").trim()}}function b(e){if(!e)return;let t=e.match(/@since\s+([^\n]+)/);return t?t[1].trim():void 0}function y(e){if(!e)return;let t=e.match(/@author (\w+)\s*(?:<([^>]+)>)?/);if(t&&t.length>0){let e=t[1].trim(),n=t[2]?.trim(),r=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(n);return n?r&&(n=`mailto:${n}`):n=`https://github.com/${e}`,`[${e}](${n})`}}function x(e){if(!e)return;let t=e.match(/@ignore\s+([^\n]+)/);return t?t[1].trim():void 0}let A=/(?<!['"])(unknown|any|void|bigint|object|undefined|null|boolean|number|string|symbol)(?!['"])/g;function j(e,t){if(!e)return;let r=e.replaceAll(/\b([A-Z][a-zA-Z0-9]*)\b/g,e=>{if(d[e]){let r=`/${[n.basename,d[e]].join("/").split("/").filter(Boolean).join("/")}`;return t?`[\\color{#009688}{${e}}](${r})`:`[${e}](${r})`}return t?`\\color{#009688}{${e}}`:e});return t&&(r=r.replaceAll(A,e=>`\\color{#009688}{${e}}`)),r}function S(e){if(e)return(function(e){let t;if(!e)return;let n=[];for(;t=/\\color{([^|}]*)\|?([^|}]*)\|?([^|}]*)\|?([^}]*)}{([^}]*)}/g.exec(e);)n.push(t[0]);return e.replaceAll(/[{}[\]()=>]|keyof|typeof|true|false/g,e=>n.some(t=>t.includes(e))?e:`\\color{#569cd6}{${e}}`)})(e)?.replaceAll(/^\s*\|\s*|\s*\|\s*$/gm,"").replaceAll(/\n/g,"<br/>").replaceAll(/\*/g,"\\*").replaceAll(/\|/g,"\\|").replaceAll(/(['"])((?:(?!\1).)*)\1/g,"\\color{#ce9178}{$1$2$1}")}function T(e){if(e)return e.replaceAll(/@example\s*([\s\S]*?)(?=@[a-zA-Z]|\n*$)/g,"").replaceAll(/^@[a-z].+/gm,"").replaceAll(/(\n\s+)+/g,"<br />").replaceAll(/\n/g,"<br />").replaceAll(/(<br \/>)$/g,"")}export default function k(s,A){let k=a(A,s,o.Latest,!0,l.TS),v="";return c(k,r=>{u(r)?v+=function(r){let l=r.name.text;Object.assign(d,{[r.name.text]:e(r.getSourceFile().fileName).replace(n.alias["@pkg"],"")});let o=h(r),a=b(o),c=T(o),s=x(o)?.split("|")||[],u=s.includes("comment"),A=s.includes("initial"),k=s.includes("optional"),v=s.includes("version"),w=s.includes("author"),B=c?`\\color{|4||0.45}{${l}}`:l,z=(function(e){let n=[];if(e.heritageClauses){for(let r of e.heritageClauses)if(r.token===t.SyntaxKind.ExtendsKeyword)for(let e of r.types)n.push(e.getText())}return n})(r)?.map(e=>`<n-tag color="#4c81db" css=".tag{gap:0px;}">${j(S(e))}</n-tag>`),F=[c,B,a&&`\\color{#52c11b|1||0.9}{${a}}`,z.length>0&&`<sub>\`extends\`</sub> ${z.join(" ")}`].filter(Boolean).join(" "),N=`## ${F}`,K=r.members.filter(e=>m(e)&&e.type?.kind!==i.NeverKeyword||$(e)),C=[];if(K.length>0){for(let e=0,t=K.length;e<t;e++){let t=K[e],n=j(S($(t)?`(${t.parameters.map(e=>`${e.name.getText()}: ${e.type?.getText()||"any"}`).join(", ")}): ${t.type?.getText()||"any"}`:t.type?.getText()||"any"),!0),r=h(t),l=S(t.name.getText());!l||l.startsWith("\\color")||($(t)||function(e){if(e.type){if(!g(e.type))return p(e.type);for(let t of e.type.types)if(p(t))return!0}return!1}(t)||n?.includes("=>")?l=`\\color{#f9a913}{${l}}`:/^["'](.+)["']$/.test(l)||(l=`\\color{#4c81db}{${l}}`));let i=t.questionToken&&f(t.questionToken);C.push([l,!k&&`\\color{${i?"#f9a913":"#52c11b"}\\|\\|\\|0.9}{${i?"✘":"✔"}}`,!u&&S(T(r)),n,!A&&S(function(e){if(!e)return;let t=e.match(/@default\s+([^\n]+)/);return t?t[1].trim():void 0}(r)),!v&&S(b(r)),!w&&(y(r)||y(o)),function(e){if(!e)return;let t=e.match(/@example\s*([\s\S]*?)(?=@[a-zA-Z]|\n*$)/);return t?t[1].trim():void 0}(r)])}let e=!1,t=!1,n=!1,r=!1;for(let l=0,o=C.length;l<o;l++){let o=C[l];!u&&o[2]&&(r=!0),!A&&o[4]&&(n=!0),!v&&o[5]&&(t=!0),!w&&o[6]&&(e=!0)}N+="\n";let l=["属性",!k&&"必要",r&&"说明","类型",n&&"默认值",t&&"版本",e&&"作者"].filter(Boolean).join("|");N+=`|${l}|`;let i=[":-",!k&&":-",r&&":-",":-",n&&":-",t&&":-",e&&":-"].filter(Boolean);N+="\n";let a=i.join("|");N+=`|${a}|`;for(let l=0,o=C.length;l<o;l++){let o=C[l];N+="\n";let i=[(o[7]?`<n-popover arrow="true" trigger="click" content=${JSON.stringify(`<n-md css=.n-md-body{margin-bottom:0;padding:0.5rem;background-color:transparent;backdrop-filter:none;box-shadow:none;}>${o[7]}</n-md>`)}><n-button size="small" type="primary" circle="true" style="margin-right:8px;">?</n-button></n-popover>`:"")+(o[0]||"-"),!k&&(o[1]||"-"),r&&(o[2]||"-"),o[3]||"-",n&&(o[4]||"-"),t&&(o[5]||"-"),e&&(o[6]||"-")].filter(Boolean).join("|");N+=`|${i}|`}N+="\n"}return N+"\n"}(r):t.isEnumDeclaration(r)&&(v+=function(r){let l=r.name.text,o=h(r),i=T(o),a=b(o);Object.assign(d,{[r.name.text]:e(r.getSourceFile().fileName).replace(n.alias["@pkg"],"")});let c=i?`\\color{|4||0.45}{${l}}`:l,s=[i,c,a&&`\\color{#52c11b|1||0.9}{${a}}`].filter(Boolean).join(" "),u=x(o)?.split("|")||[],f=u.includes("comment"),m=u.includes("version"),p=u.includes("author"),g=`## ${s}`;if(r.members.length>0){let e=[];for(let n=0,l=r.members.length;n<l;n++){let l=r.members[n],i=S(l.name.getText()),a=h(l),c=S(function(e){let n=e.initializer;if(n&&t.isStringLiteral(n))return` '${n.text}'`}(l)),s=S(b(a)),u=S(T(a));!i||i.startsWith("\\color")||/^["'](.+)["']$/.test(i)||(i=`\\color{#4c81db}{${i}}`),e.push([i,!f&&u,c,!m&&s,!p&&(y(a)||y(o))])}let n=!1,l=!1,i=!1;for(let t=0,r=e.length;t<r;t++){let r=e[t];!f&&r[1]&&(i=!0),!m&&r[3]&&(l=!0),!p&&r[4]&&(n=!0)}g+="\n";let a=["属性",i&&"说明","值",l&&"版本",n&&"作者"].filter(Boolean).join("|");g+=`|${a}|`;let c=[":-",i&&":-",":-",l&&":-",n&&":-"].filter(Boolean);g+="\n";let s=c.join("|");g+=`|${s}|`;for(let t=0,r=e.length;t<r;t++){let r=e[t];g+="\n";let o=[r[0]||"-",i&&(r[1]||"-"),r[2]||"-",l&&(r[3]||"-"),n&&(r[4]||"-")].filter(Boolean).join("|");g+=`|${o}|`}}return g+"\n\n"}(r))}),r(v)}
|
package/lib/vm/info.d.mts
CHANGED
|
@@ -1,16 +1,23 @@
|
|
|
1
|
+
import require from '../commom/require.mjs';
|
|
2
|
+
import { CONFIG } from '../config.mjs';
|
|
3
|
+
import { APPTYPE, author, description, FRAMEWORK, PACKAGENAME, PACKAGEVERSION, repository, SSR } from '../process-env.mjs';
|
|
4
|
+
import { convertToCamelCase } from '../utils/index.mjs';
|
|
5
|
+
declare const framework: string;
|
|
6
|
+
declare const frameworkVersion: string;
|
|
7
|
+
declare const iStr: boolean;
|
|
1
8
|
declare const app: {
|
|
2
|
-
name
|
|
3
|
-
projectName
|
|
4
|
-
ssr
|
|
5
|
-
version
|
|
6
|
-
base
|
|
7
|
-
type
|
|
8
|
-
routerMode
|
|
9
|
-
prefixCls
|
|
10
|
-
theme
|
|
11
|
-
description
|
|
12
|
-
author
|
|
13
|
-
repository
|
|
14
|
-
frameworkVersion
|
|
9
|
+
readonly name;
|
|
10
|
+
readonly projectName;
|
|
11
|
+
readonly ssr;
|
|
12
|
+
readonly version;
|
|
13
|
+
readonly base;
|
|
14
|
+
readonly type;
|
|
15
|
+
readonly routerMode;
|
|
16
|
+
readonly prefixCls;
|
|
17
|
+
readonly theme;
|
|
18
|
+
readonly description;
|
|
19
|
+
readonly author;
|
|
20
|
+
readonly repository;
|
|
21
|
+
readonly frameworkVersion;
|
|
15
22
|
};
|
|
16
23
|
export default app;
|
package/lib/vm/locales.d.mts
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
|
+
import { basename, join } from 'node:path';
|
|
2
|
+
import { directoryExists, scanFolderSync } from '@moneko/utils';
|
|
3
|
+
import { watch } from 'chokidar';
|
|
4
|
+
import log from '../commom/log.mjs';
|
|
5
|
+
import parseModuleMeta, { type ModuleMeta } from '../commom/parse-module-meta.mjs';
|
|
1
6
|
import ReactiveObject from '../commom/reactive-object.mjs';
|
|
7
|
+
import require from '../commom/require.mjs';
|
|
8
|
+
import sigintExit from '../commom/sigint-exit.mjs';
|
|
9
|
+
import { CONFIG } from '../config.mjs';
|
|
10
|
+
import type { Framework } from '../index.mjs';
|
|
11
|
+
import { FRAMEWORK, isDev } from '../process-env.mjs';
|
|
12
|
+
declare const prefixStr: Record<Framework, string>;
|
|
13
|
+
declare const suffixStr: string;
|
|
14
|
+
declare function getStr(lang: Omit<LocaleConfig, 'translation'>[], data: Record<string, LocaleConfig>);
|
|
15
|
+
declare const moduleMeta: ModuleMeta;
|
|
2
16
|
export declare const localesModuleName: string;
|
|
3
17
|
export declare const locales: ReactiveObject<{
|
|
4
18
|
[x: string]: string;
|
|
5
19
|
}>;
|
|
20
|
+
type LocaleConfig = {
|
|
21
|
+
language?: string;
|
|
22
|
+
title: string;
|
|
23
|
+
icon?: string;
|
|
24
|
+
translation: Record<string, string>;
|
|
25
|
+
};
|
|
26
|
+
declare const caches: Record<string, LocaleConfig>;
|
|
27
|
+
declare async function handleFileChange(filePath: string, type: 'change' | 'deleted' | 'added');
|
|
28
|
+
declare function watchDirectory(paths: string, ignored: RegExp[]);
|
|
29
|
+
declare const localsPath: string;
|
package/lib/vm/locales.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{basename as e,join as t}from"node:path";import{directoryExists as o,scanFolderSync as a}from"@moneko/utils";import{watch as l}from"chokidar";import r from"../commom/log.mjs";import n from"../commom/parse-module-meta.mjs";import c from"../commom/reactive-object.mjs";import s from"../commom/require.mjs";import i from"../commom/sigint-exit.mjs";import{CONFIG as m}from"../config.mjs";import{FRAMEWORK as g,isDev as
|
|
2
|
-
export function template(r,n){return r.replace(/\\\${\\w+}/g,function(r){var t=r.slice(2,-1);var e=n[t];return e!==void 0?e.toString():""})}function deepFreeze(o) { const p = Reflect.ownKeys(o);for (const k of p) {const v = o[k];if ((v && typeof v === "object") || typeof v === "function") {deepFreeze(v);}}return Object.freeze(o);}export const locales = ${JSON.stringify(e)};const _res = ${JSON.stringify(t)};const resources = deepFreeze(_res);${u}`}let
|
|
1
|
+
import{basename as e,join as t}from"node:path";import{directoryExists as o,scanFolderSync as a}from"@moneko/utils";import{watch as l}from"chokidar";import r from"../commom/log.mjs";import n from"../commom/parse-module-meta.mjs";import c from"../commom/reactive-object.mjs";import s from"../commom/require.mjs";import i from"../commom/sigint-exit.mjs";import{CONFIG as m}from"../config.mjs";import{FRAMEWORK as g,isDev as p}from"../process-env.mjs";let f={react:'import sso from "shared-store-object";',solid:'import { createEffect, createRoot, getOwner } from "solid-js";import { createStore } from "solid-js/store";'},u={react:'let storageKey="localizable.language",language=localStorage.getItem(storageKey)||"zh_CN",{translation:a,...defaultLocale}=Object.assign({title:"简体中文",language:"zh_CN",translation:{}},resources[language]||resources.zh_CN),localizable=sso({lang:defaultLocale,t:a});export function setLang(a){let{translation:e,...l}=resources[a]||{};e&&(localizable.lang=l,localizable.t=e,localStorage.setItem(storageKey,l.language))}export default localizable;',solid:'let locale=createRoot(()=>{let e="localizable.language",a=localStorage.getItem(e)||"zh_CN",{translation:l,...o}=Object.assign({title:"简体中文",language:"zh_CN",translation:{}},resources[a]||resources.zh_CN),[n,c]=createStore({lang:o,t:l});return createEffect(()=>{let a=resources[n.lang.language]?.translation;a&&(c("t",a),localStorage.setItem(e,n.lang.language))}),{localizable:n,setLocalizable:c,setLang:function(e){let{translation:a,...l}=resources[e]||{};a&&c("lang",l)}}},getOwner());export const setLocalizable=locale.setLocalizable;export const t=locale.localizable.t;export const lang=locale.localizable.lang;export const setLang=locale.setLang;'}[g];function d(e,t){return`${f[g]}
|
|
2
|
+
export function template(r,n){return r.replace(/\\\${\\w+}/g,function(r){var t=r.slice(2,-1);var e=n[t];return e!==void 0?e.toString():""})}function deepFreeze(o) { const p = Reflect.ownKeys(o);for (const k of p) {const v = o[k];if ((v && typeof v === "object") || typeof v === "function") {deepFreeze(v);}}return Object.freeze(o);}export const locales = ${JSON.stringify(e)};const _res = ${JSON.stringify(t)};const resources = deepFreeze(_res);${u}`}let z=n("@app/locales");export const localesModuleName=z.file;export const locales=new c({[localesModuleName]:d([],{}),[z.pkg]:z.meta});let b={};async function h(t,o){let a=e(t).replace(/\.[^.]+$/,"");try{"deleted"===o?delete b[a]:(delete s.cache[t],Object.assign(b,{[a]:s(t).default}));let e=[],l={};for(let t in b)if(Object.prototype.hasOwnProperty.call(b,t)){let{language:o=a,title:r=o,icon:n,translation:c={}}=b[t];e.push({language:o,title:r,icon:n}),l[o]={language:o,title:r,icon:n,translation:c}}locales.setData(localesModuleName,d(e,l)),locales.setData(z.pkg,z.meta)}catch(e){r(e)}}let j=t(m.alias["@"],"./locales");if(o(j)&&!1!==m.htmlPluginOption){let e=a(j,[".ts$"]).filter(e=>!/^\..*|\.d\.ts$/.test(e));await Promise.all(e.map(e=>h(e,"added"))),p&&function(e,t){let o=l(e,{ignored:t,persistent:!0,ignoreInitial:!0});function a(){o.unwatch(e),o.close()}o.on("add",e=>{h(e,"added")}),o.on("change",e=>{h(e,"change")}),o.on("unlink",e=>{h(e,"deleted")}),o.once("ready",()=>{p||a()}),i(a)}(j,[/^\..*/,/!\.ts$/,/\.d\.ts$/])}
|
package/lib/vm/modules.d.mts
CHANGED
|
@@ -1,2 +1,25 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { getAppEntry, getAppFallback, getAppMdxScope, getAppMergeRouter, getAppNormalizeCss, getAppPrefixRouter, getAppRem, getAppSuspense } from '@moneko/mdx';
|
|
3
|
+
import { updateFileSync } from '@moneko/utils';
|
|
4
|
+
import hasPkg from '../commom/has-pkg.mjs';
|
|
5
|
+
import parseModuleMeta from '../commom/parse-module-meta.mjs';
|
|
6
|
+
import paths from '../commom/paths.mjs';
|
|
7
|
+
import Rule from '../commom/rule.mjs';
|
|
8
|
+
import { CONFIG } from '../config.mjs';
|
|
9
|
+
import moduleFederation from '../plugin/module-federation.mjs';
|
|
10
|
+
import { APPTYPE, FRAMEWORK } from '../process-env.mjs';
|
|
11
|
+
import createTypes from '../utils/create-types.mjs';
|
|
12
|
+
import { generateDeclaration } from '../utils/dts.mjs';
|
|
13
|
+
import { node_modules } from '../utils/index.mjs';
|
|
14
|
+
import getCoverage from './coverage.mjs';
|
|
15
|
+
import { docs, docsModuleName } from './docs.mjs';
|
|
16
|
+
import info from './info.mjs';
|
|
17
|
+
import { locales, localesModuleName } from './locales.mjs';
|
|
18
|
+
import { route, routesModuleName } from './routes.mjs';
|
|
19
|
+
declare const mdxScope: string | false;
|
|
1
20
|
declare const normalModules: Record<string, string>;
|
|
21
|
+
declare const appDtsPath: string;
|
|
22
|
+
declare const appDts: string[];
|
|
23
|
+
declare const vmDtsPath: string;
|
|
24
|
+
declare const customVirtualModuleDts: string[];
|
|
2
25
|
export default normalModules;
|
package/lib/vm/routes.d.mts
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
+
import { generateRouter } from '@moneko/mdx';
|
|
2
|
+
import parseModuleMeta, { type ModuleMeta } from '../commom/parse-module-meta.mjs';
|
|
3
|
+
import { routeDir } from '../commom/paths.mjs';
|
|
1
4
|
import ReactiveObject from '../commom/reactive-object.mjs';
|
|
5
|
+
import { CONFIG } from '../config.mjs';
|
|
6
|
+
import { FRAMEWORK, isDev, isLibrary } from '../process-env.mjs';
|
|
7
|
+
import { watchFiles } from './utils.mjs';
|
|
8
|
+
declare const routerAlia: '@pkg' | '@/pages';
|
|
9
|
+
declare const moduleMeta: ModuleMeta;
|
|
2
10
|
export declare const routesModuleName: string;
|
|
3
11
|
export declare const routesModulePkgJson: string;
|
|
4
12
|
export declare const routesModuleMeta: string;
|
|
13
|
+
declare function getRouter();
|
|
5
14
|
export declare const route: ReactiveObject<{
|
|
6
15
|
[x: string]: string;
|
|
7
16
|
}>;
|
|
8
|
-
export declare function generatorRouter()
|
|
17
|
+
export declare function generatorRouter();
|
package/lib/vm/routes.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{generateRouter as o}from"@moneko/mdx";import
|
|
1
|
+
import{generateRouter as o}from"@moneko/mdx";import e from"../commom/parse-module-meta.mjs";import{routeDir as t}from"../commom/paths.mjs";import r from"../commom/reactive-object.mjs";import{CONFIG as m}from"../config.mjs";import{FRAMEWORK as s,isDev as u,isLibrary as n}from"../process-env.mjs";import{watchFiles as p}from"./utils.mjs";let a=n?"@pkg":"@/pages",i=e("@app/routes");export const routesModuleName=i.file;export const routesModulePkgJson=i.pkg;export const routesModuleMeta=i.meta;function l(){return!1===m.htmlPluginOption?"":o(t,`${m.alias["@"]}/router/index.ts`,s,a,n)}export const route=new r({[routesModuleName]:l(),[routesModulePkgJson]:routesModuleMeta});export function generatorRouter(){route.setData(routesModuleName,l())}u&&p(t,n?/(?<!README\.mdx?)$/:/(?<!index\.tsx?)$/,generatorRouter);
|
package/lib/vm/utils.d.mts
CHANGED
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Stats } from 'node:fs';
|
|
2
|
+
import { watch } from 'chokidar';
|
|
3
|
+
import sigintExit from '../commom/sigint-exit.mjs';
|
|
4
|
+
import { empty } from '../utils/index.mjs';
|
|
5
|
+
export declare function watchFiles(root: string, ignored?: RegExp, call?: VoidFunction);
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moneko/core",
|
|
3
|
-
"version": "3.26.
|
|
3
|
+
"version": "3.26.8",
|
|
4
4
|
"description": "core",
|
|
5
5
|
"main": "lib/index.mjs",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"
|
|
9
|
-
"build": "rm -rf ./lib && tsc && swc src -d lib --strip-leading-paths -D && node convert",
|
|
8
|
+
"build": "node build.mjs",
|
|
10
9
|
"prepublishOnly": "npm run build"
|
|
11
10
|
},
|
|
12
11
|
"bin": {
|
|
@@ -20,10 +19,10 @@
|
|
|
20
19
|
"@moneko/mdx": "0.1.42",
|
|
21
20
|
"@moneko/transform-imports": "0.6.1",
|
|
22
21
|
"@moneko/utils": "0.1.19",
|
|
23
|
-
"@swc/cli": "0.5.
|
|
22
|
+
"@swc/cli": "0.5.2",
|
|
24
23
|
"@swc/core": "1.6.13",
|
|
25
24
|
"@typescript/vfs": "1.6.0",
|
|
26
|
-
"browserslist": "4.24.
|
|
25
|
+
"browserslist": "4.24.3",
|
|
27
26
|
"chokidar": "4.0.1",
|
|
28
27
|
"core-js": "3.39.0",
|
|
29
28
|
"core-js-compat": "3.39.0",
|
|
@@ -38,10 +37,10 @@
|
|
|
38
37
|
"multer": "1.4.5-lts.1",
|
|
39
38
|
"style-loader": "4.0.0",
|
|
40
39
|
"swc-loader": "0.2.6",
|
|
41
|
-
"terser-webpack-plugin": "5.3.
|
|
40
|
+
"terser-webpack-plugin": "5.3.11",
|
|
42
41
|
"ts-morph": "24.0.0",
|
|
43
42
|
"typescript": "5.5.4",
|
|
44
|
-
"webpack": "5.
|
|
43
|
+
"webpack": "5.97.1",
|
|
45
44
|
"webpack-bundle-analyzer": "4.10.2",
|
|
46
45
|
"webpack-dev-middleware": "7.4.2",
|
|
47
46
|
"webpack-hot-middleware": "2.26.1",
|
|
@@ -55,12 +54,11 @@
|
|
|
55
54
|
"@types/multer": "1.4.12",
|
|
56
55
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
57
56
|
"@types/webpack-hot-middleware": "2.25.9",
|
|
58
|
-
"eslint-config-neko": "3.0.
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"solid-refresh": "0.7.5"
|
|
57
|
+
"eslint-config-neko": "3.0.2",
|
|
58
|
+
"sass": "1.83.0",
|
|
59
|
+
"sass-loader": "16.0.4",
|
|
60
|
+
"solid-refresh": "0.7.5",
|
|
61
|
+
"stylelint": "^16.11.0"
|
|
64
62
|
},
|
|
65
63
|
"files": [
|
|
66
64
|
"lib",
|
package/typings/global.d.ts
CHANGED
package/lib/bin/runlint.d.mts
DELETED
package/lib/bin/runlint.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{spawnSync as t}from"node:child_process";import{ink as s,print as e}from"@moneko/utils";export const runLint=(o,r,i="inherit")=>{let l=s(r,"cyan");e(`${l}: ${s("Runing...","yellow")}`,!0);let n=t(o,{stdio:i,shell:!0}),u=s(`✨ ${0!==n.status?"Error":"Successfully"}!
|
|
2
|
-
`,0!==n.status?"red":"green");e(`${l}: ${u}`,!0),process.exit(n.status||0)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let t=new Date,e=process.hrtime();export default function(){let[r,a]=process.hrtime(e),n=new Date(t.getTime()+1e3*r+Math.floor(a/1e6)),S=n.getFullYear(),g=String(n.getMonth()+1).padStart(2,"0"),i=String(n.getDate()).padStart(2,"0"),o=String(n.getHours()).padStart(2,"0"),p=String(n.getMinutes()).padStart(2,"0"),d=String(n.getSeconds()).padStart(2,"0"),$=String(Math.floor(a%1e6/1e3)).padStart(3,"0"),l=String(a%1e3).padStart(3,"0");return`${S}-${g}-${i} ${o}:${p}:${d}.${$}${l}`}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare function replaceChildrenPolyfill(...nodes: (string | Node)[]): void;
|