@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,6 +1,6 @@
|
|
|
1
1
|
import { NormalizedFullOptions, RenderOptions } from '../liquid-options';
|
|
2
2
|
import { Scope } from './scope';
|
|
3
|
-
|
|
3
|
+
type PropertyKey = string | number;
|
|
4
4
|
export declare class Context {
|
|
5
5
|
/**
|
|
6
6
|
* insert a Context-level empty scope,
|
|
@@ -27,6 +27,7 @@ export declare class Context {
|
|
|
27
27
|
* Throw when accessing undefined variable?
|
|
28
28
|
*/
|
|
29
29
|
strictVariables: boolean;
|
|
30
|
+
ownPropertyOnly: boolean;
|
|
30
31
|
constructor(env?: object, opts?: NormalizedFullOptions, renderOptions?: RenderOptions);
|
|
31
32
|
getRegister(key: string): any;
|
|
32
33
|
setRegister(key: string, value: any): any;
|
|
@@ -34,15 +35,16 @@ export declare class Context {
|
|
|
34
35
|
restoreRegister(keyValues: [string, any][]): void;
|
|
35
36
|
getAll(): Scope;
|
|
36
37
|
/**
|
|
37
|
-
* @deprecated use `_get()` instead
|
|
38
|
+
* @deprecated use `_get()` or `getSync()` instead
|
|
38
39
|
*/
|
|
39
40
|
get(paths: PropertyKey[]): unknown;
|
|
41
|
+
getSync(paths: PropertyKey[]): unknown;
|
|
40
42
|
_get(paths: PropertyKey[]): IterableIterator<unknown>;
|
|
41
43
|
/**
|
|
42
44
|
* @deprecated use `_get()` instead
|
|
43
45
|
*/
|
|
44
46
|
getFromScope(scope: unknown, paths: PropertyKey[] | string): IterableIterator<unknown>;
|
|
45
|
-
_getFromScope(scope: unknown, paths: PropertyKey[] | string): IterableIterator<unknown>;
|
|
47
|
+
_getFromScope(scope: unknown, paths: PropertyKey[] | string, strictVariables?: boolean): IterableIterator<unknown>;
|
|
46
48
|
push(ctx: object): number;
|
|
47
49
|
pop(): Scope | undefined;
|
|
48
50
|
bottom(): Scope;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Drop } from '../drop/drop';
|
|
2
|
-
|
|
3
|
-
[key: string]: any;
|
|
2
|
+
interface ScopeObject extends Record<string, any> {
|
|
4
3
|
toLiquid?: () => any;
|
|
5
4
|
}
|
|
6
|
-
export
|
|
5
|
+
export type Scope = ScopeObject | Drop;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FilterImpl } from '../template';
|
|
2
|
+
import { Scope } from '../context';
|
|
3
|
+
export declare const join: (v: any[], arg: string) => any;
|
|
4
|
+
export declare const last: (v: any) => any;
|
|
5
|
+
export declare const first: (v: any) => any;
|
|
6
|
+
export declare const reverse: (v: any[]) => any;
|
|
7
|
+
export declare function sort<T>(this: FilterImpl, arr: T[], property?: string): IterableIterator<unknown>;
|
|
8
|
+
export declare function sort_natural<T>(input: T[], property?: string): any[];
|
|
9
|
+
export declare const size: (v: string | any[]) => number;
|
|
10
|
+
export declare function map(this: FilterImpl, arr: Scope[], property: string): IterableIterator<unknown>;
|
|
11
|
+
export declare function sum(this: FilterImpl, arr: Scope[], property?: string): IterableIterator<unknown>;
|
|
12
|
+
export declare function compact<T>(this: FilterImpl, arr: T[]): any[];
|
|
13
|
+
export declare function concat<T1, T2>(v: T1[], arg?: T2[]): (T1 | T2)[];
|
|
14
|
+
export declare function push<T>(v: T[], arg: T): T[];
|
|
15
|
+
export declare function unshift<T>(v: T[], arg: T): T[];
|
|
16
|
+
export declare function pop<T>(v: T[]): T[];
|
|
17
|
+
export declare function shift<T>(v: T[]): T[];
|
|
18
|
+
export declare function slice<T>(v: T[] | string, begin: number, length?: number): T[] | string;
|
|
19
|
+
export declare function where<T extends object>(this: FilterImpl, arr: T[], property: string, expected?: any): IterableIterator<unknown>;
|
|
20
|
+
export declare function where_exp<T extends object>(this: FilterImpl, arr: T[], itemName: string, exp: string): IterableIterator<unknown>;
|
|
21
|
+
export declare function group_by<T extends object>(arr: T[], property: string): IterableIterator<unknown>;
|
|
22
|
+
export declare function group_by_exp<T extends object>(this: FilterImpl, arr: T[], itemName: string, exp: string): IterableIterator<unknown>;
|
|
23
|
+
export declare function find<T extends object>(this: FilterImpl, arr: T[], property: string, expected: string): IterableIterator<unknown>;
|
|
24
|
+
export declare function find_exp<T extends object>(this: FilterImpl, arr: T[], itemName: string, exp: string): IterableIterator<unknown>;
|
|
25
|
+
export declare function uniq<T>(arr: T[]): T[];
|
|
26
|
+
export declare function sample<T>(v: T[] | string, count?: number): T | string | (T | string)[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FilterImpl } from '../template';
|
|
2
|
+
export declare function date(this: FilterImpl, v: string | Date, format?: string, timezoneOffset?: number | string): string | Date;
|
|
3
|
+
export declare function date_to_xmlschema(this: FilterImpl, v: string | Date): string | Date;
|
|
4
|
+
export declare function date_to_rfc822(this: FilterImpl, v: string | Date): string | Date;
|
|
5
|
+
export declare function date_to_string(this: FilterImpl, v: string | Date, type?: string, style?: string): string | Date;
|
|
6
|
+
export declare function date_to_long_string(this: FilterImpl, v: string | Date, type?: string, style?: string): string | Date;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function escape(str: string): string;
|
|
2
|
+
export declare function xml_escape(str: string): string;
|
|
3
|
+
export declare function escape_once(str: string): string;
|
|
4
|
+
export declare function newline_to_br(v: string): string;
|
|
5
|
+
export declare function strip_html(v: string): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const abs: (x: number) => any;
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const at_least: (...args: number[]) => any;
|
|
3
|
+
export declare const at_most: (...args: number[]) => any;
|
|
4
4
|
export declare const ceil: (x: number) => any;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const divided_by: (dividend: number, divisor: number, integerArithmetic?: any) => any;
|
|
6
6
|
export declare const floor: (x: number) => any;
|
|
7
7
|
export declare const minus: (v: number, arg: number) => any;
|
|
8
8
|
export declare const modulo: (v: number, arg: number) => any;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { identify } from '../util/underscore';
|
|
2
|
+
import { FilterImpl } from '../template';
|
|
3
|
+
declare function defaultFilter<T1 extends boolean, T2>(this: FilterImpl, value: T1, defaultValue: T2, ...args: Array<[string, any]>): T1 | T2;
|
|
4
|
+
declare function json(value: any, space?: number): string;
|
|
5
|
+
declare function inspect(value: any, space?: number): string;
|
|
6
|
+
declare function to_integer(value: any): number;
|
|
7
|
+
declare const _default: {
|
|
8
|
+
default: typeof defaultFilter;
|
|
9
|
+
raw: {
|
|
10
|
+
raw: boolean;
|
|
11
|
+
handler: typeof identify;
|
|
12
|
+
};
|
|
13
|
+
jsonify: typeof json;
|
|
14
|
+
to_integer: typeof to_integer;
|
|
15
|
+
json: typeof json;
|
|
16
|
+
inspect: typeof inspect;
|
|
17
|
+
};
|
|
18
|
+
export default _default;
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String related filters
|
|
3
|
+
*
|
|
4
|
+
* * prefer stringify() to String() since `undefined`, `null` should eval ''
|
|
5
|
+
*/
|
|
1
6
|
export declare function append(v: string, arg: string): string;
|
|
2
7
|
export declare function prepend(v: string, arg: string): string;
|
|
3
8
|
export declare function lstrip(v: string, chars?: string): string;
|
|
4
9
|
export declare function downcase(v: string): string;
|
|
5
10
|
export declare function upcase(str: string): string;
|
|
6
11
|
export declare function remove(v: string, arg: string): string;
|
|
7
|
-
export declare function
|
|
12
|
+
export declare function remove_first(v: string, l: string): string;
|
|
13
|
+
export declare function remove_last(v: string, l: string): string;
|
|
8
14
|
export declare function rstrip(str: string, chars?: string): string;
|
|
9
15
|
export declare function split(v: string, arg: string): string[];
|
|
10
16
|
export declare function strip(v: string, chars?: string): string;
|
|
11
|
-
export declare function
|
|
17
|
+
export declare function strip_newlines(v: string): string;
|
|
12
18
|
export declare function capitalize(str: string): string;
|
|
13
19
|
export declare function replace(v: string, pattern: string, replacement: string): string;
|
|
14
|
-
export declare function
|
|
20
|
+
export declare function replace_first(v: string, arg1: string, arg2: string): string;
|
|
21
|
+
export declare function replace_last(v: string, arg1: string, arg2: string): string;
|
|
15
22
|
export declare function truncate(v: string, l?: number, o?: string): string;
|
|
16
23
|
export declare function truncatewords(v: string, words?: number, o?: string): string;
|
|
24
|
+
export declare function normalize_whitespace(v: string): string;
|
|
25
|
+
export declare function number_of_words(input: string, mode?: 'cjk' | 'auto'): number;
|
|
26
|
+
export declare function array_to_sentence_string(array: unknown[], connector?: string): unknown;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const url_decode: (x: string) => string;
|
|
2
|
+
export declare const url_encode: (x: string) => string;
|
|
3
|
+
export declare const cgi_escape: (x: string) => string;
|
|
4
|
+
export declare const uri_escape: (x: string) => string;
|
|
5
|
+
declare const rSlugifyReplacers: {
|
|
6
|
+
raw: RegExp;
|
|
7
|
+
default: RegExp;
|
|
8
|
+
pretty: RegExp;
|
|
9
|
+
ascii: RegExp;
|
|
10
|
+
latin: RegExp;
|
|
11
|
+
none: null;
|
|
12
|
+
};
|
|
13
|
+
export declare function slugify(str: string, mode?: keyof typeof rSlugifyReplacers, cased?: boolean): string;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
export declare const requireResolve: RequireResolve;
|
|
2
|
+
export declare const requireResolve: NodeJS.RequireResolve;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const version = "[VI]{version}[/VI]";
|
|
2
|
+
export * as TypeGuards from './util/type-guards';
|
|
3
|
+
export { toValue, TimezoneDate, createTrie, Trie, toPromise, toValueSync, assert, LiquidError, ParseError, RenderError, UndefinedVariableError, TokenizationError, AssertionError } from './util';
|
|
4
|
+
export { Drop } from './drop';
|
|
5
|
+
export { Emitter } from './emitters';
|
|
6
|
+
export { defaultOperators, Operators, evalToken, evalQuotedToken, Expression, isFalsy, isTruthy } from './render';
|
|
7
|
+
export { Context, Scope } from './context';
|
|
8
|
+
export { Value, Hash, Template, FilterImplOptions, Tag, Filter, Output } from './template';
|
|
9
|
+
export { Token, TopLevelToken, TagToken, ValueToken } from './tokens';
|
|
10
|
+
export { TokenKind, Tokenizer, ParseStream } from './parser';
|
|
11
|
+
export { filters } from './filters';
|
|
12
|
+
export * from './tags';
|
|
13
|
+
export { defaultOptions, LiquidOptions } from './liquid-options';
|
|
14
|
+
export { FS } from './fs';
|
|
15
|
+
export { Liquid } from './liquid';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { LiquidCache } from './cache
|
|
2
|
-
import { FS } from './fs
|
|
3
|
-
import { Operators } from './render
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare type OutputEscapeOption = 'escape' | 'json' | OutputEscape;
|
|
1
|
+
import { LiquidCache } from './cache';
|
|
2
|
+
import { FS, LookupType } from './fs';
|
|
3
|
+
import { Operators } from './render';
|
|
4
|
+
type OutputEscape = (value: any) => string;
|
|
5
|
+
type OutputEscapeOption = 'escape' | 'json' | OutputEscape;
|
|
7
6
|
export interface LiquidOptions {
|
|
8
7
|
/** A directory or an array of directories from where to resolve layout and include templates, and the filename passed to `.renderFile()`. If it's an array, the files are looked up in the order they occur in the array. Defaults to `["."]` */
|
|
9
8
|
root?: string | string[];
|
|
@@ -31,8 +30,10 @@ export interface LiquidOptions {
|
|
|
31
30
|
ownPropertyOnly?: boolean;
|
|
32
31
|
/** Modifies the behavior of `strictVariables`. If set, a single undefined variable will *not* cause an exception in the context of the `if`/`elsif`/`unless` tag and the `default` filter. Instead, it will evaluate to `false` and `null`, respectively. Irrelevant if `strictVariables` is not set. Defaults to `false`. **/
|
|
33
32
|
lenientIf?: boolean;
|
|
34
|
-
/** JavaScript timezoneOffset for `date` filter, default to local time. That means if you're in Australia (UTC+10), it'll default to
|
|
35
|
-
timezoneOffset?: number;
|
|
33
|
+
/** JavaScript timezone name or timezoneOffset for `date` filter, default to local time. That means if you're in Australia (UTC+10), it'll default to `-600` or `Australia/Lindeman` */
|
|
34
|
+
timezoneOffset?: number | string;
|
|
35
|
+
/** Default date format to use if the date filter doesn't include a format. Defaults to `%A, %B %-e, %Y at %-l:%M %P %z`. */
|
|
36
|
+
dateFormat?: string;
|
|
36
37
|
/** Strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (`{% %}`) until `\n` (inclusive). Defaults to `false`. */
|
|
37
38
|
trimTagRight?: boolean;
|
|
38
39
|
/** Similar to `trimTagRight`, whereas the `\n` is exclusive. Defaults to `false`. See Whitespace Control for details. */
|
|
@@ -84,13 +85,15 @@ export interface RenderOptions {
|
|
|
84
85
|
*/
|
|
85
86
|
ownPropertyOnly?: boolean;
|
|
86
87
|
}
|
|
88
|
+
export interface RenderFileOptions extends RenderOptions {
|
|
89
|
+
lookupType?: LookupType;
|
|
90
|
+
}
|
|
87
91
|
interface NormalizedOptions extends LiquidOptions {
|
|
88
92
|
root?: string[];
|
|
89
93
|
partials?: string[];
|
|
90
94
|
layouts?: string[];
|
|
91
95
|
cache?: LiquidCache;
|
|
92
96
|
outputEscape?: OutputEscape;
|
|
93
|
-
operatorsTrie?: Trie;
|
|
94
97
|
}
|
|
95
98
|
export interface NormalizedFullOptions extends NormalizedOptions {
|
|
96
99
|
root: string[];
|
|
@@ -107,6 +110,7 @@ export interface NormalizedFullOptions extends NormalizedOptions {
|
|
|
107
110
|
strictVariables: boolean;
|
|
108
111
|
ownPropertyOnly: boolean;
|
|
109
112
|
lenientIf: boolean;
|
|
113
|
+
dateFormat: string;
|
|
110
114
|
trimTagRight: boolean;
|
|
111
115
|
trimTagLeft: boolean;
|
|
112
116
|
trimOutputRight: boolean;
|
|
@@ -120,7 +124,6 @@ export interface NormalizedFullOptions extends NormalizedOptions {
|
|
|
120
124
|
globals: object;
|
|
121
125
|
keepOutputType: boolean;
|
|
122
126
|
operators: Operators;
|
|
123
|
-
operatorsTrie: Trie;
|
|
124
127
|
}
|
|
125
128
|
export declare const defaultOptions: NormalizedFullOptions;
|
|
126
129
|
export declare function normalize(options: LiquidOptions): NormalizedFullOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|