deploy: v0.12 fix 存档key名

This commit is contained in:
2026-06-24 03:09:02 +00:00
parent 7a08d49fe3
commit e0a5281119
58743 changed files with 7297269 additions and 39505 deletions
+44
View File
@@ -0,0 +1,44 @@
/**
* @this {TokenizeContext}
* @param {Effects} effects
* @param {State} ok
* @param {State} nok
* @param {Acorn | null | undefined} acorn
* @param {AcornOptions | null | undefined} acornOptions
* @param {boolean | null | undefined} addResult
* @param {boolean | undefined} allowLazy
* @param {TokenType} tagType
* @param {TokenType} tagMarkerType
* @param {TokenType} tagClosingMarkerType
* @param {TokenType} tagSelfClosingMarker
* @param {TokenType} tagNameType
* @param {TokenType} tagNamePrimaryType
* @param {TokenType} tagNameMemberMarkerType
* @param {TokenType} tagNameMemberType
* @param {TokenType} tagNamePrefixMarkerType
* @param {TokenType} tagNameLocalType
* @param {TokenType} tagExpressionAttributeType
* @param {TokenType} tagExpressionAttributeMarkerType
* @param {TokenType} tagExpressionAttributeValueType
* @param {TokenType} tagAttributeType
* @param {TokenType} tagAttributeNameType
* @param {TokenType} tagAttributeNamePrimaryType
* @param {TokenType} tagAttributeNamePrefixMarkerType
* @param {TokenType} tagAttributeNameLocalType
* @param {TokenType} tagAttributeInitializerMarkerType
* @param {TokenType} tagAttributeValueLiteralType
* @param {TokenType} tagAttributeValueLiteralMarkerType
* @param {TokenType} tagAttributeValueLiteralValueType
* @param {TokenType} tagAttributeValueExpressionType
* @param {TokenType} tagAttributeValueExpressionMarkerType
* @param {TokenType} tagAttributeValueExpressionValueType
*/
export function factoryTag(this: TokenizeContext, effects: Effects, ok: State, nok: State, acorn: Acorn | null | undefined, acornOptions: AcornOptions | null | undefined, addResult: boolean | null | undefined, allowLazy: boolean | undefined, tagType: TokenType, tagMarkerType: TokenType, tagClosingMarkerType: TokenType, tagSelfClosingMarker: TokenType, tagNameType: TokenType, tagNamePrimaryType: TokenType, tagNameMemberMarkerType: TokenType, tagNameMemberType: TokenType, tagNamePrefixMarkerType: TokenType, tagNameLocalType: TokenType, tagExpressionAttributeType: TokenType, tagExpressionAttributeMarkerType: TokenType, tagExpressionAttributeValueType: TokenType, tagAttributeType: TokenType, tagAttributeNameType: TokenType, tagAttributeNamePrimaryType: TokenType, tagAttributeNamePrefixMarkerType: TokenType, tagAttributeNameLocalType: TokenType, tagAttributeInitializerMarkerType: TokenType, tagAttributeValueLiteralType: TokenType, tagAttributeValueLiteralMarkerType: TokenType, tagAttributeValueLiteralValueType: TokenType, tagAttributeValueExpressionType: TokenType, tagAttributeValueExpressionMarkerType: TokenType, tagAttributeValueExpressionValueType: TokenType): (code: Code) => State | undefined;
import type { Effects } from 'micromark-util-types';
import type { State } from 'micromark-util-types';
import type { Acorn } from 'micromark-util-events-to-acorn';
import type { AcornOptions } from 'micromark-util-events-to-acorn';
import type { TokenType } from 'micromark-util-types';
import type { TokenizeContext } from 'micromark-util-types';
import type { Code } from 'micromark-util-types';
//# sourceMappingURL=factory-tag.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"factory-tag.d.ts","sourceRoot":"","sources":["factory-tag.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,2DAlCW,OAAO,MACP,KAAK,OACL,KAAK,SACL,KAAK,GAAG,IAAI,GAAG,SAAS,gBACxB,YAAY,GAAG,IAAI,GAAG,SAAS,aAC/B,OAAO,GAAG,IAAI,GAAG,SAAS,aAC1B,OAAO,GAAG,SAAS,WACnB,SAAS,iBACT,SAAS,wBACT,SAAS,wBACT,SAAS,eACT,SAAS,sBACT,SAAS,2BACT,SAAS,qBACT,SAAS,2BACT,SAAS,oBACT,SAAS,8BACT,SAAS,oCACT,SAAS,mCACT,SAAS,oBACT,SAAS,wBACT,SAAS,+BACT,SAAS,oCACT,SAAS,6BACT,SAAS,qCACT,SAAS,gCACT,SAAS,sCACT,SAAS,qCACT,SAAS,mCACT,SAAS,yCACT,SAAS,wCACT,SAAS,qCA6gCnB;6BA/jCkE,sBAAsB;2BAAtB,sBAAsB;2BADnD,gCAAgC;kCAAhC,gCAAgC;+BACH,sBAAsB;qCAAtB,sBAAsB;0BAAtB,sBAAsB"}
File diff suppressed because it is too large Load Diff
+15
View File
@@ -0,0 +1,15 @@
/**
* Parse JSX (flow).
*
* @param {Acorn | undefined} acorn
* Acorn parser to use (optional).
* @param {Options} options
* Configuration.
* @returns {Construct}
* Construct.
*/
export function jsxFlow(acorn: Acorn | undefined, options: Options): Construct;
import type { Acorn } from 'micromark-util-events-to-acorn';
import type { Options } from 'micromark-extension-mdx-jsx';
import type { Construct } from 'micromark-util-types';
//# sourceMappingURL=jsx-flow.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"jsx-flow.d.ts","sourceRoot":"","sources":["jsx-flow.js"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AACH,+BAPW,KAAK,GAAG,SAAS,WAEjB,OAAO,GAEL,SAAS,CAiJrB;2BAlKuB,gCAAgC;6BAD9B,6BAA6B;+BAEQ,sBAAsB"}
+165
View File
@@ -0,0 +1,165 @@
/**
* @import {Options} from 'micromark-extension-mdx-jsx'
* @import {Acorn} from 'micromark-util-events-to-acorn'
* @import {Construct, State, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
import {ok as assert} from 'devlop'
import {markdownLineEnding, markdownSpace} from 'micromark-util-character'
import {factorySpace} from 'micromark-factory-space'
import {codes, types} from 'micromark-util-symbol'
import {factoryTag} from './factory-tag.js'
/**
* Parse JSX (flow).
*
* @param {Acorn | undefined} acorn
* Acorn parser to use (optional).
* @param {Options} options
* Configuration.
* @returns {Construct}
* Construct.
*/
export function jsxFlow(acorn, options) {
return {concrete: true, name: 'mdxJsxFlowTag', tokenize: tokenizeJsxFlow}
/**
* MDX JSX (flow).
*
* ```markdown
* > | <A />
* ^^^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeJsxFlow(effects, ok, nok) {
const self = this
return start
/**
* Start of MDX: JSX (flow).
*
* ```markdown
* > | <A />
* ^
* ```
*
* @type {State}
*/
function start(code) {
// To do: in `markdown-rs`, constructs need to parse the indent themselves.
// This should also be introduced in `micromark-js`.
assert(code === codes.lessThan, 'expected `<`')
return before(code)
}
/**
* After optional whitespace, before of MDX JSX (flow).
*
* ```markdown
* > | <A />
* ^
* ```
*
* @type {State}
*/
function before(code) {
return factoryTag.call(
self,
effects,
after,
nok,
acorn,
options.acornOptions,
options.addResult,
false,
'mdxJsxFlowTag',
'mdxJsxFlowTagMarker',
'mdxJsxFlowTagClosingMarker',
'mdxJsxFlowTagSelfClosingMarker',
'mdxJsxFlowTagName',
'mdxJsxFlowTagNamePrimary',
'mdxJsxFlowTagNameMemberMarker',
'mdxJsxFlowTagNameMember',
'mdxJsxFlowTagNamePrefixMarker',
'mdxJsxFlowTagNameLocal',
'mdxJsxFlowTagExpressionAttribute',
'mdxJsxFlowTagExpressionAttributeMarker',
'mdxJsxFlowTagExpressionAttributeValue',
'mdxJsxFlowTagAttribute',
'mdxJsxFlowTagAttributeName',
'mdxJsxFlowTagAttributeNamePrimary',
'mdxJsxFlowTagAttributeNamePrefixMarker',
'mdxJsxFlowTagAttributeNameLocal',
'mdxJsxFlowTagAttributeInitializerMarker',
'mdxJsxFlowTagAttributeValueLiteral',
'mdxJsxFlowTagAttributeValueLiteralMarker',
'mdxJsxFlowTagAttributeValueLiteralValue',
'mdxJsxFlowTagAttributeValueExpression',
'mdxJsxFlowTagAttributeValueExpressionMarker',
'mdxJsxFlowTagAttributeValueExpressionValue'
)(code)
}
/**
* After an MDX JSX (flow) tag.
*
* ```markdown
* > | <A>
* ^
* ```
*
* @type {State}
*/
function after(code) {
return markdownSpace(code)
? factorySpace(effects, end, types.whitespace)(code)
: end(code)
}
/**
* After an MDX JSX (flow) tag, after optional whitespace.
*
* ```markdown
* > | <A> <B>
* ^
* ```
*
* @type {State}
*/
function end(code) {
// We want to allow expressions directly after tags.
// See <https://github.com/micromark/micromark-extension-mdx-expression/blob/d5d92b9/packages/micromark-extension-mdx-expression/dev/lib/syntax.js#L183>
// for more info.
const leftBraceValue = self.parser.constructs.flow[codes.leftCurlyBrace]
/* c8 ignore next 5 -- always a list when normalized. */
const constructs = Array.isArray(leftBraceValue)
? leftBraceValue
: leftBraceValue
? [leftBraceValue]
: []
/** @type {Construct | undefined} */
let expression
for (const construct of constructs) {
if (construct.name === 'mdxFlowExpression') {
expression = construct
break
}
}
// Another tag.
return code === codes.lessThan
? // We cant just say: fine. Lines of blocks have to be parsed until an eol/eof.
start(code)
: code === codes.leftCurlyBrace && expression
? effects.attempt(expression, end, nok)(code)
: code === codes.eof || markdownLineEnding(code)
? ok(code)
: nok(code)
}
}
}
+15
View File
@@ -0,0 +1,15 @@
/**
* Parse JSX (text).
*
* @param {Acorn | undefined} acorn
* Acorn parser to use (optional).
* @param {Options} options
* Configuration.
* @returns {Construct}
* Construct.
*/
export function jsxText(acorn: Acorn | undefined, options: Options): Construct;
import type { Acorn } from 'micromark-util-events-to-acorn';
import type { Options } from 'micromark-extension-mdx-jsx';
import type { Construct } from 'micromark-util-types';
//# sourceMappingURL=jsx-text.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"jsx-text.d.ts","sourceRoot":"","sources":["jsx-text.js"],"names":[],"mappings":"AAQA;;;;;;;;;GASG;AACH,+BAPW,KAAK,GAAG,SAAS,WAEjB,OAAO,GAEL,SAAS,CAsDrB;2BAnEuB,gCAAgC;6BAD9B,6BAA6B;+BAEC,sBAAsB"}
+70
View File
@@ -0,0 +1,70 @@
/**
* @import {Options} from 'micromark-extension-mdx-jsx'
* @import {Acorn} from 'micromark-util-events-to-acorn'
* @import {Construct, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
import {factoryTag} from './factory-tag.js'
/**
* Parse JSX (text).
*
* @param {Acorn | undefined} acorn
* Acorn parser to use (optional).
* @param {Options} options
* Configuration.
* @returns {Construct}
* Construct.
*/
export function jsxText(acorn, options) {
return {name: 'mdxJsxTextTag', tokenize: tokenizeJsxText}
/**
* MDX JSX (text).
*
* ```markdown
* > | a <b />.
* ^^^^^
* ```
*
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeJsxText(effects, ok, nok) {
return factoryTag.call(
this,
effects,
ok,
nok,
acorn,
options.acornOptions,
options.addResult,
true,
'mdxJsxTextTag',
'mdxJsxTextTagMarker',
'mdxJsxTextTagClosingMarker',
'mdxJsxTextTagSelfClosingMarker',
'mdxJsxTextTagName',
'mdxJsxTextTagNamePrimary',
'mdxJsxTextTagNameMemberMarker',
'mdxJsxTextTagNameMember',
'mdxJsxTextTagNamePrefixMarker',
'mdxJsxTextTagNameLocal',
'mdxJsxTextTagExpressionAttribute',
'mdxJsxTextTagExpressionAttributeMarker',
'mdxJsxTextTagExpressionAttributeValue',
'mdxJsxTextTagAttribute',
'mdxJsxTextTagAttributeName',
'mdxJsxTextTagAttributeNamePrimary',
'mdxJsxTextTagAttributeNamePrefixMarker',
'mdxJsxTextTagAttributeNameLocal',
'mdxJsxTextTagAttributeInitializerMarker',
'mdxJsxTextTagAttributeValueLiteral',
'mdxJsxTextTagAttributeValueLiteralMarker',
'mdxJsxTextTagAttributeValueLiteralValue',
'mdxJsxTextTagAttributeValueExpression',
'mdxJsxTextTagAttributeValueExpressionMarker',
'mdxJsxTextTagAttributeValueExpressionValue'
)
}
}
+13
View File
@@ -0,0 +1,13 @@
/**
* Create an extension for `micromark` to enable MDX JSX syntax.
*
* @param {Options | null | undefined} [options]
* Configuration (optional).
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to enable MDX
* JSX syntax.
*/
export function mdxJsx(options?: Options | null | undefined): Extension;
import type { Options } from 'micromark-extension-mdx-jsx';
import type { Extension } from 'micromark-util-types';
//# sourceMappingURL=syntax.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"syntax.d.ts","sourceRoot":"","sources":["syntax.js"],"names":[],"mappings":"AAUA;;;;;;;;GAQG;AACH,iCANW,OAAO,GAAG,IAAI,GAAG,SAAS,GAExB,SAAS,CAwCrB;6BAtDyB,6BAA6B;+BAE3B,sBAAsB"}
+56
View File
@@ -0,0 +1,56 @@
/**
* @import {Options} from 'micromark-extension-mdx-jsx'
* @import {AcornOptions} from 'micromark-util-events-to-acorn'
* @import {Extension} from 'micromark-util-types'
*/
import {codes} from 'micromark-util-symbol'
import {jsxText} from './jsx-text.js'
import {jsxFlow} from './jsx-flow.js'
/**
* Create an extension for `micromark` to enable MDX JSX syntax.
*
* @param {Options | null | undefined} [options]
* Configuration (optional).
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to enable MDX
* JSX syntax.
*/
export function mdxJsx(options) {
const settings = options || {}
const acorn = settings.acorn
/** @type {AcornOptions | undefined} */
let acornOptions
if (acorn) {
if (!acorn.parse || !acorn.parseExpressionAt) {
throw new Error(
'Expected a proper `acorn` instance passed in as `options.acorn`'
)
}
acornOptions = Object.assign(
{ecmaVersion: 2024, sourceType: 'module'},
settings.acornOptions,
{locations: true}
)
} else if (settings.acornOptions || settings.addResult) {
throw new Error('Expected an `acorn` instance passed in as `options.acorn`')
}
return {
flow: {
[codes.lessThan]: jsxFlow(acorn || undefined, {
acornOptions,
addResult: settings.addResult || undefined
})
},
text: {
[codes.lessThan]: jsxText(acorn || undefined, {
acornOptions,
addResult: settings.addResult || undefined
})
}
}
}