@skeptools/skep-organization-project 0.0.14 → 0.0.15
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/.jsii +2047 -5
- package/API.md +2084 -1758
- package/lib/index.js +7 -3
- package/lib/skep-organization-project.js +6 -6
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1134 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +27 -0
- package/node_modules/commander/lib/argument.js +147 -0
- package/node_modules/commander/lib/command.js +2179 -0
- package/node_modules/commander/lib/error.js +45 -0
- package/node_modules/commander/lib/help.js +464 -0
- package/node_modules/commander/lib/option.js +331 -0
- package/node_modules/commander/lib/suggestSimilar.js +100 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +80 -0
- package/node_modules/commander/typings/index.d.ts +889 -0
- package/node_modules/liquidjs/README.md +125 -72
- package/node_modules/liquidjs/bin/liquid.js +128 -13
- package/node_modules/liquidjs/dist/build/fs-impl-browser.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/{emitters → build}/streamed-emitter-browser.d.ts +1 -1
- package/node_modules/liquidjs/dist/build/streamed-emitter-browser.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/cache/cache.d.ts +1 -1
- package/node_modules/liquidjs/dist/cache/index.d.ts +2 -0
- package/node_modules/liquidjs/dist/cache/lru.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/context/block-mode.d.ts +1 -2
- package/node_modules/liquidjs/dist/context/context.d.ts +5 -3
- package/node_modules/liquidjs/dist/context/context.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/context/index.d.ts +3 -0
- package/node_modules/liquidjs/dist/context/scope.d.ts +3 -3
- package/node_modules/liquidjs/dist/drop/blank-drop.d.ts +1 -1
- package/node_modules/liquidjs/dist/drop/index.d.ts +7 -0
- package/node_modules/liquidjs/dist/emitters/index.d.ts +4 -0
- package/node_modules/liquidjs/dist/emitters/keeping-type-emitter.d.ts +1 -1
- package/node_modules/liquidjs/dist/filters/array.d.ts +26 -0
- package/node_modules/liquidjs/dist/filters/date.d.ts +6 -0
- package/node_modules/liquidjs/dist/filters/html.d.ts +5 -0
- package/node_modules/liquidjs/dist/filters/index.d.ts +2 -0
- package/node_modules/liquidjs/dist/{builtin/filters → filters}/math.d.ts +3 -3
- package/node_modules/liquidjs/dist/filters/misc.d.ts +18 -0
- package/node_modules/liquidjs/dist/{builtin/filters → filters}/string.d.ts +13 -3
- package/node_modules/liquidjs/dist/filters/url.d.ts +14 -0
- package/node_modules/liquidjs/dist/fs/fs-impl.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/fs/index.d.ts +2 -0
- package/node_modules/liquidjs/dist/fs/loader.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/fs/node-require.d.ts +1 -1
- package/node_modules/liquidjs/dist/index.d.ts +15 -0
- package/node_modules/liquidjs/dist/liquid-options.d.ts +13 -10
- package/node_modules/liquidjs/dist/liquid-options.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/liquid.browser.esm.js +2836 -2359
- package/node_modules/liquidjs/dist/liquid.browser.min.js +1 -1
- package/node_modules/liquidjs/dist/liquid.browser.min.js.map +1 -1
- package/node_modules/liquidjs/dist/liquid.browser.umd.js +3921 -3156
- package/node_modules/liquidjs/dist/liquid.browser.umd.js.map +1 -1
- package/node_modules/liquidjs/dist/liquid.d.ts +22 -26
- package/node_modules/liquidjs/dist/liquid.node.cjs.js +3289 -4062
- package/node_modules/liquidjs/dist/liquid.node.esm.js +2841 -2372
- package/node_modules/liquidjs/dist/parser/filter-arg.d.ts +2 -2
- package/node_modules/liquidjs/dist/parser/index.d.ts +4 -0
- package/node_modules/liquidjs/dist/parser/parse-stream.d.ts +3 -4
- package/node_modules/liquidjs/dist/parser/parse-stream.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/parser/parser.d.ts +6 -9
- package/node_modules/liquidjs/dist/parser/token-kind.d.ts +1 -0
- package/node_modules/liquidjs/dist/parser/tokenizer.d.ts +21 -25
- package/node_modules/liquidjs/dist/parser/tokenizer.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/parser/whitespace-ctrl.d.ts +1 -1
- package/node_modules/liquidjs/dist/render/boolean.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/render/expression.d.ts +4 -8
- package/node_modules/liquidjs/dist/render/expression.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/render/index.d.ts +4 -0
- package/node_modules/liquidjs/dist/render/operator.d.ts +6 -4
- package/node_modules/liquidjs/dist/render/render.d.ts +3 -3
- package/node_modules/liquidjs/dist/render/render.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/render/string.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/tags/assign.d.ts +7 -0
- package/node_modules/liquidjs/dist/tags/block.d.ts +8 -0
- package/node_modules/liquidjs/dist/tags/break.d.ts +4 -0
- package/node_modules/liquidjs/dist/tags/capture.d.ts +8 -0
- package/node_modules/liquidjs/dist/tags/case.d.ts +11 -0
- package/node_modules/liquidjs/dist/tags/comment.d.ts +5 -0
- package/node_modules/liquidjs/dist/tags/continue.d.ts +4 -0
- package/node_modules/liquidjs/dist/tags/cycle.d.ts +7 -0
- package/node_modules/liquidjs/dist/tags/decrement.d.ts +6 -0
- package/node_modules/liquidjs/dist/tags/echo.d.ts +6 -0
- package/node_modules/liquidjs/dist/tags/for.d.ts +10 -0
- package/node_modules/liquidjs/dist/tags/if.d.ts +10 -0
- package/node_modules/liquidjs/dist/tags/include.d.ts +7 -0
- package/node_modules/liquidjs/dist/tags/increment.d.ts +6 -0
- package/node_modules/liquidjs/dist/tags/index.d.ts +24 -0
- package/node_modules/liquidjs/dist/tags/inline-comment.d.ts +5 -0
- package/node_modules/liquidjs/dist/tags/layout.d.ts +9 -0
- package/node_modules/liquidjs/dist/tags/liquid.d.ts +6 -0
- package/node_modules/liquidjs/dist/tags/raw.d.ts +6 -0
- package/node_modules/liquidjs/dist/tags/render.d.ts +17 -0
- package/node_modules/liquidjs/dist/tags/tablerow.d.ts +9 -0
- package/node_modules/liquidjs/dist/tags/unless.d.ts +11 -0
- package/node_modules/liquidjs/dist/template/filter-impl-options.d.ts +12 -0
- package/node_modules/liquidjs/dist/template/filter.d.ts +13 -0
- package/node_modules/liquidjs/dist/template/filter.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/template/{tag/hash.d.ts → hash.d.ts} +6 -6
- package/node_modules/liquidjs/dist/template/hash.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/template/html.d.ts +4 -5
- package/node_modules/liquidjs/dist/template/index.d.ts +10 -0
- package/node_modules/liquidjs/dist/template/output.d.ts +3 -3
- package/node_modules/liquidjs/dist/template/output.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/template/tag-options-adapter.d.ts +10 -0
- package/node_modules/liquidjs/dist/template/tag.d.ts +18 -0
- package/node_modules/liquidjs/dist/template/value.d.ts +8 -6
- package/node_modules/liquidjs/dist/template/value.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/tokens/delimited-token.d.ts +4 -3
- package/node_modules/liquidjs/dist/tokens/filtered-value-token.d.ts +17 -0
- package/node_modules/liquidjs/dist/tokens/index.d.ts +18 -0
- package/node_modules/liquidjs/dist/tokens/liquid-tag-token.d.ts +5 -0
- package/node_modules/liquidjs/dist/tokens/literal-token.d.ts +2 -0
- package/node_modules/liquidjs/dist/tokens/number-token.d.ts +6 -4
- package/node_modules/liquidjs/dist/tokens/operator-token.d.ts +18 -1
- package/node_modules/liquidjs/dist/tokens/property-access-token.d.ts +7 -4
- package/node_modules/liquidjs/dist/tokens/quoted-token.d.ts +1 -0
- package/node_modules/liquidjs/dist/tokens/tag-token.d.ts +4 -2
- package/node_modules/liquidjs/dist/tokens/token.d.ts +1 -1
- package/node_modules/liquidjs/dist/tokens/top-level-token.d.ts +4 -0
- package/node_modules/liquidjs/dist/tokens/value-token.d.ts +2 -1
- package/node_modules/liquidjs/dist/util/assert.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/async.d.ts +0 -1
- package/node_modules/liquidjs/dist/util/async.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/character.d.ts +3 -1
- package/node_modules/liquidjs/dist/util/error.d.ts +3 -2
- package/node_modules/liquidjs/dist/util/index.d.ts +11 -0
- package/node_modules/liquidjs/dist/util/liquid-date.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/literal.d.ts +3 -3
- package/node_modules/liquidjs/dist/util/operator-trie.d.ts +13 -4
- package/node_modules/liquidjs/dist/util/strftime.d.ts +1 -1
- package/node_modules/liquidjs/dist/util/strftime.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/timezone-date.d.ts +6 -1
- package/node_modules/liquidjs/dist/util/timezone-date.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/type-guards.d.ts +1 -11
- package/node_modules/liquidjs/dist/util/underscore.d.ts +6 -8
- package/node_modules/liquidjs/dist/util/underscore.spec.d.ts +1 -0
- package/node_modules/liquidjs/package.json +33 -37
- package/package.json +29 -28
- package/.gitattributes +0 -23
- package/.projenrc.ts +0 -31
- package/node_modules/liquidjs/CHANGELOG.md +0 -1015
- package/node_modules/liquidjs/dist/builtin/filters/array.d.ts +0 -15
- package/node_modules/liquidjs/dist/builtin/filters/date.d.ts +0 -2
- package/node_modules/liquidjs/dist/builtin/filters/html.d.ts +0 -4
- package/node_modules/liquidjs/dist/builtin/filters/index.d.ts +0 -7
- package/node_modules/liquidjs/dist/builtin/filters/misc.d.ts +0 -5
- package/node_modules/liquidjs/dist/builtin/filters/url.d.ts +0 -2
- package/node_modules/liquidjs/dist/builtin/tags/assign.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/block.d.ts +0 -8
- package/node_modules/liquidjs/dist/builtin/tags/break.d.ts +0 -5
- package/node_modules/liquidjs/dist/builtin/tags/capture.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/case.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/comment.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/continue.d.ts +0 -5
- package/node_modules/liquidjs/dist/builtin/tags/cycle.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/decrement.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/echo.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/for.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/if.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/include.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/increment.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/index.d.ts +0 -5
- package/node_modules/liquidjs/dist/builtin/tags/inline-comment.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/layout.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/liquid.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/raw.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/render.d.ts +0 -13
- package/node_modules/liquidjs/dist/builtin/tags/tablerow.d.ts +0 -3
- package/node_modules/liquidjs/dist/builtin/tags/unless.d.ts +0 -3
- package/node_modules/liquidjs/dist/parser/match-operator.d.ts +0 -2
- package/node_modules/liquidjs/dist/template/filter/filter-impl-options.d.ts +0 -4
- package/node_modules/liquidjs/dist/template/filter/filter-impl.d.ts +0 -6
- package/node_modules/liquidjs/dist/template/filter/filter-map.d.ts +0 -13
- package/node_modules/liquidjs/dist/template/filter/filter.d.ts +0 -12
- package/node_modules/liquidjs/dist/template/tag/tag-impl-options.d.ts +0 -10
- package/node_modules/liquidjs/dist/template/tag/tag-impl.d.ts +0 -6
- package/node_modules/liquidjs/dist/template/tag/tag-map.d.ts +0 -6
- package/node_modules/liquidjs/dist/template/tag/tag.d.ts +0 -10
- package/node_modules/liquidjs/dist/tokens/toplevel-token.d.ts +0 -4
- package/node_modules/liquidjs/dist/types.d.ts +0 -30
- package/node_modules/liquidjs/dist/util/collection.d.ts +0 -2
- /package/node_modules/liquidjs/dist/{fs/browser.d.ts → build/fs-impl-browser.d.ts} +0 -0
- /package/node_modules/liquidjs/dist/fs/{node.d.ts → fs-impl.d.ts} +0 -0
- /package/node_modules/liquidjs/dist/{parser/parse-string-literal.d.ts → render/string.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ValueToken } from '../tokens/value-token';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type KeyValuePair = [string?, ValueToken?];
|
|
3
|
+
export type FilterArg = ValueToken | KeyValuePair;
|
|
4
4
|
export declare function isKeyValuePair(arr: FilterArg): arr is KeyValuePair;
|
|
5
5
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Token } from '../tokens
|
|
2
|
-
import { Template } from '../template
|
|
3
|
-
|
|
4
|
-
declare type ParseToken<T extends Token> = ((token: T, remainTokens: T[]) => Template);
|
|
1
|
+
import { Token, TopLevelToken } from '../tokens';
|
|
2
|
+
import { Template } from '../template';
|
|
3
|
+
type ParseToken<T extends Token> = ((token: T, remainTokens: T[]) => Template);
|
|
5
4
|
export declare class ParseStream<T extends Token = TopLevelToken> {
|
|
6
5
|
private tokens;
|
|
7
6
|
private handlers;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { Liquid } from '../liquid';
|
|
2
1
|
import { ParseStream } from './parse-stream';
|
|
3
|
-
import {
|
|
4
|
-
import { Output } from '../template
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import { LookupType } from '../fs/loader';
|
|
9
|
-
export default class Parser {
|
|
2
|
+
import { TopLevelToken } from '../tokens';
|
|
3
|
+
import { Template, Output, HTML } from '../template';
|
|
4
|
+
import { LookupType } from '../fs';
|
|
5
|
+
import type { Liquid } from '../liquid';
|
|
6
|
+
export declare class Parser {
|
|
10
7
|
parseFile: (file: string, sync?: boolean, type?: LookupType, currentFile?: string) => Generator<unknown, Template[], Template[] | string>;
|
|
11
8
|
private liquid;
|
|
12
9
|
private fs;
|
|
@@ -15,7 +12,7 @@ export default class Parser {
|
|
|
15
12
|
constructor(liquid: Liquid);
|
|
16
13
|
parse(html: string, filepath?: string): Template[];
|
|
17
14
|
parseTokens(tokens: TopLevelToken[]): Template[];
|
|
18
|
-
parseToken(token: TopLevelToken, remainTokens: TopLevelToken[]): Tag | Output | HTML;
|
|
15
|
+
parseToken(token: TopLevelToken, remainTokens: TopLevelToken[]): import("../template").Tag | Output | HTML;
|
|
19
16
|
parseStream(tokens: TopLevelToken[]): ParseStream<TopLevelToken>;
|
|
20
17
|
private _parseFileCached;
|
|
21
18
|
private _parseFile;
|
|
@@ -1,32 +1,22 @@
|
|
|
1
|
-
import { IdentifierToken } from '../tokens
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { FilterArg } from './filter-arg';
|
|
5
|
-
import { FilterToken } from '../tokens/filter-token';
|
|
6
|
-
import { HashToken } from '../tokens/hash-token';
|
|
7
|
-
import { QuotedToken } from '../tokens/quoted-token';
|
|
8
|
-
import { HTMLToken } from '../tokens/html-token';
|
|
9
|
-
import { TagToken } from '../tokens/tag-token';
|
|
10
|
-
import { Token } from '../tokens/token';
|
|
11
|
-
import { RangeToken } from '../tokens/range-token';
|
|
12
|
-
import { ValueToken } from '../tokens/value-token';
|
|
13
|
-
import { OutputToken } from '../tokens/output-token';
|
|
14
|
-
import { TokenizationError } from '../util/error';
|
|
1
|
+
import { FilteredValueToken, TagToken, HTMLToken, HashToken, QuotedToken, LiquidTagToken, OutputToken, ValueToken, Token, RangeToken, FilterToken, TopLevelToken, OperatorToken, LiteralToken, IdentifierToken, NumberToken } from '../tokens';
|
|
2
|
+
import { Trie, TokenizationError } from '../util';
|
|
3
|
+
import { Operators, Expression } from '../render';
|
|
15
4
|
import { NormalizedFullOptions } from '../liquid-options';
|
|
16
|
-
import {
|
|
17
|
-
import { Expression } from '../render/expression';
|
|
18
|
-
import { LiquidTagToken } from '../tokens/liquid-tag-token';
|
|
5
|
+
import { FilterArg } from './filter-arg';
|
|
19
6
|
export declare class Tokenizer {
|
|
20
7
|
input: string;
|
|
21
|
-
|
|
22
|
-
file: string;
|
|
8
|
+
file?: string | undefined;
|
|
23
9
|
p: number;
|
|
24
10
|
N: number;
|
|
25
11
|
private rawBeginAt;
|
|
26
|
-
|
|
12
|
+
private opTrie;
|
|
13
|
+
private literalTrie;
|
|
14
|
+
constructor(input: string, operators?: Operators, file?: string | undefined, range?: [number, number]);
|
|
27
15
|
readExpression(): Expression;
|
|
28
16
|
readExpressionTokens(): IterableIterator<Token>;
|
|
29
17
|
readOperator(): OperatorToken | undefined;
|
|
18
|
+
matchTrie<T>(trie: Trie<T>): number;
|
|
19
|
+
readFilteredValue(): FilteredValueToken;
|
|
30
20
|
readFilters(): FilterToken[];
|
|
31
21
|
readFilter(): FilterToken | null;
|
|
32
22
|
readFilterArg(): FilterArg | undefined;
|
|
@@ -34,26 +24,32 @@ export declare class Tokenizer {
|
|
|
34
24
|
readTopLevelToken(options: NormalizedFullOptions): TopLevelToken;
|
|
35
25
|
readHTMLToken(stopStrings: string[]): HTMLToken;
|
|
36
26
|
readTagToken(options?: NormalizedFullOptions): TagToken;
|
|
37
|
-
readToDelimiter(delimiter: string): number;
|
|
27
|
+
readToDelimiter(delimiter: string, respectQuoted?: boolean): number;
|
|
38
28
|
readOutputToken(options?: NormalizedFullOptions): OutputToken;
|
|
39
29
|
readEndrawOrRawContent(options: NormalizedFullOptions): HTMLToken | TagToken;
|
|
40
30
|
readLiquidTagTokens(options?: NormalizedFullOptions): LiquidTagToken[];
|
|
41
|
-
readLiquidTagToken(options: NormalizedFullOptions): LiquidTagToken;
|
|
42
|
-
|
|
31
|
+
readLiquidTagToken(options: NormalizedFullOptions): LiquidTagToken | undefined;
|
|
32
|
+
error(msg: string, pos?: number): TokenizationError;
|
|
33
|
+
assert(pred: unknown, msg: string | (() => string), pos?: number): void;
|
|
43
34
|
snapshot(begin?: number): string;
|
|
44
35
|
/**
|
|
45
|
-
* @deprecated
|
|
36
|
+
* @deprecated use #readIdentifier instead
|
|
46
37
|
*/
|
|
47
38
|
readWord(): IdentifierToken;
|
|
48
39
|
readIdentifier(): IdentifierToken;
|
|
40
|
+
readNonEmptyIdentifier(): IdentifierToken | undefined;
|
|
49
41
|
readTagName(): string;
|
|
50
42
|
readHashes(jekyllStyle?: boolean): HashToken[];
|
|
51
43
|
readHash(jekyllStyle?: boolean): HashToken | undefined;
|
|
52
44
|
remaining(): string;
|
|
53
|
-
advance(
|
|
45
|
+
advance(step?: number): void;
|
|
54
46
|
end(): boolean;
|
|
55
47
|
readTo(end: string): number;
|
|
56
48
|
readValue(): ValueToken | undefined;
|
|
49
|
+
readScopeValue(): ValueToken | undefined;
|
|
50
|
+
private readProperties;
|
|
51
|
+
readNumber(): NumberToken | undefined;
|
|
52
|
+
readLiteral(): LiteralToken | undefined;
|
|
57
53
|
readRange(): RangeToken | undefined;
|
|
58
54
|
readValueOrThrow(): ValueToken;
|
|
59
55
|
readQuoted(): QuotedToken | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { QuotedToken } from '../tokens
|
|
2
|
-
import {
|
|
3
|
-
import { Context } from '../context/context';
|
|
1
|
+
import { QuotedToken, Token } from '../tokens';
|
|
2
|
+
import type { Context } from '../context';
|
|
4
3
|
export declare class Expression {
|
|
5
4
|
private postfix;
|
|
6
5
|
constructor(tokens: IterableIterator<Token>);
|
|
7
6
|
evaluate(ctx: Context, lenient?: boolean): Generator<unknown, unknown, unknown>;
|
|
7
|
+
valid(): boolean;
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
* @deprecated use `_evalToken` instead
|
|
11
|
-
*/
|
|
12
|
-
export declare function evalToken(token: Token | undefined, ctx: Context, lenient?: boolean): Generator<never, any, unknown>;
|
|
13
|
-
export declare function _evalToken(token: Token | undefined, ctx: Context, lenient?: boolean): IterableIterator<unknown>;
|
|
9
|
+
export declare function evalToken(token: Token | undefined, ctx: Context, lenient?: boolean): IterableIterator<unknown>;
|
|
14
10
|
export declare function evalQuotedToken(token: QuotedToken): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Context } from '../context
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Context } from '../context';
|
|
2
|
+
export type UnaryOperatorHandler = (operand: any, ctx: Context) => boolean;
|
|
3
|
+
export type BinaryOperatorHandler = (lhs: any, rhs: any, ctx: Context) => boolean;
|
|
4
|
+
export type OperatorHandler = UnaryOperatorHandler | BinaryOperatorHandler;
|
|
5
|
+
export type Operators = Record<string, OperatorHandler>;
|
|
5
6
|
export declare const defaultOperators: Operators;
|
|
7
|
+
export declare function equals(lhs: any, rhs: any): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Context } from '../context
|
|
3
|
-
import { Template } from '../template
|
|
4
|
-
import { Emitter } from '../emitters
|
|
2
|
+
import { Context } from '../context';
|
|
3
|
+
import { Template } from '../template';
|
|
4
|
+
import { Emitter } from '../emitters';
|
|
5
5
|
export declare class Render {
|
|
6
6
|
renderTemplatesToNodeStream(templates: Template[], ctx: Context): NodeJS.ReadableStream;
|
|
7
7
|
renderTemplates(templates: Template[], ctx: Context, emitter?: Emitter): IterableIterator<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Liquid, TopLevelToken, TagToken, Context, Tag } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
private key;
|
|
4
|
+
private value;
|
|
5
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
6
|
+
render(ctx: Context): Generator<unknown, void, unknown>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Liquid, TagToken, TopLevelToken, Template, Context, Emitter, Tag } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
block: string;
|
|
4
|
+
templates: Template[];
|
|
5
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
6
|
+
render(ctx: Context, emitter: Emitter): Generator<any, void, unknown>;
|
|
7
|
+
private getBlockRender;
|
|
8
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Liquid, Tag, Template, Context, TagToken, TopLevelToken } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
variable: string;
|
|
4
|
+
templates: Template[];
|
|
5
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
6
|
+
render(ctx: Context): Generator<unknown, void, string>;
|
|
7
|
+
private readVariableName;
|
|
8
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ValueToken, Liquid, Value, Emitter, TagToken, TopLevelToken, Context, Template, Tag } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
value: Value;
|
|
4
|
+
branches: {
|
|
5
|
+
values: ValueToken[];
|
|
6
|
+
templates: Template[];
|
|
7
|
+
}[];
|
|
8
|
+
elseTemplates: Template[];
|
|
9
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
10
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TopLevelToken, Liquid, Emitter, TagToken, Context, Tag } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
private candidates;
|
|
4
|
+
private group?;
|
|
5
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
6
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Liquid, TopLevelToken, Emitter, TagToken, Context, Tag } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
private value?;
|
|
4
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
5
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Hash, ValueToken, Liquid, Tag, Emitter, TagToken, TopLevelToken, Context, Template } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
variable: string;
|
|
4
|
+
collection: ValueToken;
|
|
5
|
+
hash: Hash;
|
|
6
|
+
templates: Template[];
|
|
7
|
+
elseTemplates: Template[];
|
|
8
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
9
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void | string, Template[]>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Liquid, Tag, Value, Emitter, TagToken, TopLevelToken, Context, Template } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
branches: {
|
|
4
|
+
value: Value;
|
|
5
|
+
templates: Template[];
|
|
6
|
+
}[];
|
|
7
|
+
elseTemplates: Template[];
|
|
8
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
9
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void, string>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TopLevelToken, Liquid, Tag, Emitter, TagToken, Context } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
private withVar?;
|
|
4
|
+
private hash;
|
|
5
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
6
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import AssignTag from './assign';
|
|
2
|
+
import ForTag from './for';
|
|
3
|
+
import CaptureTag from './capture';
|
|
4
|
+
import CaseTag from './case';
|
|
5
|
+
import CommentTag from './comment';
|
|
6
|
+
import IncludeTag from './include';
|
|
7
|
+
import RenderTag from './render';
|
|
8
|
+
import DecrementTag from './decrement';
|
|
9
|
+
import CycleTag from './cycle';
|
|
10
|
+
import IfTag from './if';
|
|
11
|
+
import IncrementTag from './increment';
|
|
12
|
+
import LayoutTag from './layout';
|
|
13
|
+
import BlockTag from './block';
|
|
14
|
+
import RawTag from './raw';
|
|
15
|
+
import TablerowTag from './tablerow';
|
|
16
|
+
import UnlessTag from './unless';
|
|
17
|
+
import BreakTag from './break';
|
|
18
|
+
import ContinueTag from './continue';
|
|
19
|
+
import EchoTag from './echo';
|
|
20
|
+
import LiquidTag from './liquid';
|
|
21
|
+
import InlineCommentTag from './inline-comment';
|
|
22
|
+
import type { TagClass } from '../template/tag';
|
|
23
|
+
export declare const tags: Record<string, TagClass>;
|
|
24
|
+
export { AssignTag, ForTag, CaptureTag, CaseTag, CommentTag, IncludeTag, RenderTag, DecrementTag, IncrementTag, CycleTag, IfTag, LayoutTag, BlockTag, RawTag, TablerowTag, UnlessTag, BreakTag, ContinueTag, EchoTag, LiquidTag, InlineCommentTag };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Template, Liquid, Tag, Emitter, Hash, TagToken, TopLevelToken, Context } from '..';
|
|
2
|
+
import { ParsedFileName } from './render';
|
|
3
|
+
export default class extends Tag {
|
|
4
|
+
args: Hash;
|
|
5
|
+
templates: Template[];
|
|
6
|
+
file?: ParsedFileName;
|
|
7
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
8
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Template, Emitter, Liquid, TopLevelToken, TagToken, Context, Tag } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
templates: Template[];
|
|
4
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
5
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TopLevelToken, Liquid, Token, Template, Tokenizer, Emitter, TagToken, Context, Tag } from '..';
|
|
2
|
+
export type ParsedFileName = Template[] | Token | string | undefined;
|
|
3
|
+
export default class extends Tag {
|
|
4
|
+
private file;
|
|
5
|
+
private currentFile?;
|
|
6
|
+
private hash;
|
|
7
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
8
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @return null for "none",
|
|
12
|
+
* @return Template[] for quoted with tags and/or filters
|
|
13
|
+
* @return Token for expression (not quoted)
|
|
14
|
+
* @throws TypeError if cannot read next token
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseFilePath(tokenizer: Tokenizer, liquid: Liquid): ParsedFileName;
|
|
17
|
+
export declare function renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): IterableIterator<unknown>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ValueToken, Liquid, Tag, Emitter, Hash, TagToken, TopLevelToken, Context, Template } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
variable: string;
|
|
4
|
+
args: Hash;
|
|
5
|
+
templates: Template[];
|
|
6
|
+
collection: ValueToken;
|
|
7
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
8
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Liquid, Tag, Value, TopLevelToken, Template, Emitter, Context, TagToken } from '..';
|
|
2
|
+
export default class extends Tag {
|
|
3
|
+
branches: {
|
|
4
|
+
value: Value;
|
|
5
|
+
test: (val: any, ctx: Context) => boolean;
|
|
6
|
+
templates: Template[];
|
|
7
|
+
}[];
|
|
8
|
+
elseTemplates: Template[];
|
|
9
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
10
|
+
render(ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Context } from '../context';
|
|
2
|
+
import type { Liquid } from '../liquid';
|
|
3
|
+
export interface FilterImpl {
|
|
4
|
+
context: Context;
|
|
5
|
+
liquid: Liquid;
|
|
6
|
+
}
|
|
7
|
+
export type FilterHandler = (this: FilterImpl, value: any, ...args: any[]) => any;
|
|
8
|
+
export interface FilterOptions {
|
|
9
|
+
handler: FilterHandler;
|
|
10
|
+
raw: boolean;
|
|
11
|
+
}
|
|
12
|
+
export type FilterImplOptions = FilterHandler | FilterOptions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Context } from '../context';
|
|
2
|
+
import { FilterImplOptions } from './filter-impl-options';
|
|
3
|
+
import { FilterArg } from '../parser/filter-arg';
|
|
4
|
+
import { Liquid } from '../liquid';
|
|
5
|
+
export declare class Filter {
|
|
6
|
+
name: string;
|
|
7
|
+
args: FilterArg[];
|
|
8
|
+
readonly raw: boolean;
|
|
9
|
+
private handler;
|
|
10
|
+
private liquid;
|
|
11
|
+
constructor(name: string, options: FilterImplOptions | undefined, args: FilterArg[], liquid: Liquid);
|
|
12
|
+
render(value: any, context: Context): IterableIterator<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Context } from '
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
import { Context } from '../context/context';
|
|
2
|
+
import { Token } from '../tokens/token';
|
|
3
|
+
type HashValueTokens = Record<string, Token | undefined>;
|
|
5
4
|
/**
|
|
6
5
|
* Key-Value Pairs Representing Tag Arguments
|
|
7
6
|
* Example:
|
|
@@ -11,7 +10,8 @@ export interface HashValue {
|
|
|
11
10
|
* hash['reversed'] === undefined
|
|
12
11
|
*/
|
|
13
12
|
export declare class Hash {
|
|
14
|
-
hash:
|
|
13
|
+
hash: HashValueTokens;
|
|
15
14
|
constructor(markup: string, jekyllStyle?: boolean);
|
|
16
|
-
render(ctx: Context): Generator<unknown,
|
|
15
|
+
render(ctx: Context): Generator<unknown, Record<string, any>, unknown>;
|
|
17
16
|
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { TemplateImpl } from '../template
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Emitter } from '../emitters/emitter';
|
|
1
|
+
import { TemplateImpl, Template } from '../template';
|
|
2
|
+
import { HTMLToken } from '../tokens';
|
|
3
|
+
import { Context } from '../context';
|
|
4
|
+
import { Emitter } from '../emitters';
|
|
6
5
|
export declare class HTML extends TemplateImpl<HTMLToken> implements Template {
|
|
7
6
|
private str;
|
|
8
7
|
constructor(token: HTMLToken);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './template';
|
|
2
|
+
export * from './template-impl';
|
|
3
|
+
export * from './tag';
|
|
4
|
+
export * from './tag-options-adapter';
|
|
5
|
+
export * from './filter';
|
|
6
|
+
export * from './filter-impl-options';
|
|
7
|
+
export * from './hash';
|
|
8
|
+
export * from './value';
|
|
9
|
+
export * from './output';
|
|
10
|
+
export * from './html';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Template } from '../template
|
|
1
|
+
import { Value } from './value';
|
|
2
|
+
import { Template, TemplateImpl } from '../template';
|
|
3
3
|
import { Context } from '../context/context';
|
|
4
4
|
import { Emitter } from '../emitters/emitter';
|
|
5
5
|
import { OutputToken } from '../tokens/output-token';
|
|
6
6
|
import { Liquid } from '../liquid';
|
|
7
7
|
export declare class Output extends TemplateImpl<OutputToken> implements Template {
|
|
8
|
-
|
|
8
|
+
value: Value;
|
|
9
9
|
constructor(token: OutputToken, liquid: Liquid);
|
|
10
10
|
render(ctx: Context, emitter: Emitter): IterableIterator<unknown>;
|
|
11
11
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tag, TagClass, TagRenderReturn } from './tag';
|
|
2
|
+
import { TagToken, TopLevelToken } from '../tokens';
|
|
3
|
+
import { Emitter } from '../emitters';
|
|
4
|
+
import { Context } from '../context';
|
|
5
|
+
export interface TagImplOptions {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
parse?: (this: Tag & TagImplOptions, token: TagToken, remainingTokens: TopLevelToken[]) => void;
|
|
8
|
+
render: (this: Tag & TagImplOptions, ctx: Context, emitter: Emitter, hash: Record<string, any>) => TagRenderReturn;
|
|
9
|
+
}
|
|
10
|
+
export declare function createTagClass(options: TagImplOptions): TagClass;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TemplateImpl } from './template-impl';
|
|
2
|
+
import type { Emitter } from '../emitters/emitter';
|
|
3
|
+
import type { Tokenizer } from '../parser';
|
|
4
|
+
import type { Context } from '../context/context';
|
|
5
|
+
import type { TopLevelToken, TagToken } from '../tokens';
|
|
6
|
+
import type { Template } from './template';
|
|
7
|
+
import type { Liquid } from '../liquid';
|
|
8
|
+
export type TagRenderReturn = Generator<unknown, unknown, unknown> | Promise<unknown> | unknown;
|
|
9
|
+
export declare abstract class Tag extends TemplateImpl<TagToken> implements Template {
|
|
10
|
+
name: string;
|
|
11
|
+
liquid: Liquid;
|
|
12
|
+
protected tokenizer: Tokenizer;
|
|
13
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
14
|
+
abstract render(ctx: Context, emitter: Emitter): TagRenderReturn;
|
|
15
|
+
}
|
|
16
|
+
export interface TagClass {
|
|
17
|
+
new (token: TagToken, tokens: TopLevelToken[], liquid: Liquid): Tag;
|
|
18
|
+
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Liquid } from '../liquid';
|
|
1
|
+
import { Filter } from './filter';
|
|
2
|
+
import { Expression } from '../render';
|
|
3
|
+
import type { FilteredValueToken } from '../tokens';
|
|
4
|
+
import type { Liquid } from '../liquid';
|
|
5
|
+
import type { Context } from '../context';
|
|
5
6
|
export declare class Value {
|
|
6
7
|
readonly filters: Filter[];
|
|
7
8
|
readonly initial: Expression;
|
|
8
9
|
/**
|
|
9
10
|
* @param str the value to be valuated, eg.: "foobar" | truncate: 3
|
|
10
11
|
*/
|
|
11
|
-
constructor(
|
|
12
|
-
value(ctx: Context, lenient
|
|
12
|
+
constructor(input: string | FilteredValueToken, liquid: Liquid);
|
|
13
|
+
value(ctx: Context, lenient?: boolean): Generator<unknown, unknown, unknown>;
|
|
14
|
+
private getFilter;
|
|
13
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Token } from './token';
|
|
2
|
-
import { TokenKind } from '../parser
|
|
2
|
+
import { TokenKind } from '../parser';
|
|
3
3
|
export declare abstract class DelimitedToken extends Token {
|
|
4
4
|
trimLeft: boolean;
|
|
5
5
|
trimRight: boolean;
|
|
6
|
-
|
|
7
|
-
constructor(kind: TokenKind,
|
|
6
|
+
contentRange: [number, number];
|
|
7
|
+
constructor(kind: TokenKind, [contentBegin, contentEnd]: [number, number], input: string, begin: number, end: number, trimLeft: boolean, trimRight: boolean, file?: string);
|
|
8
|
+
get content(): string;
|
|
8
9
|
}
|