@skeptools/skep-organization-project 0.0.18 → 0.0.19
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 +22 -2139
- package/API.md +533 -418
- package/lib/skep-organization-project.js +36 -5
- package/node_modules/liquidjs/README.md +110 -67
- package/node_modules/liquidjs/dist/build/base64-impl-browser.d.ts +2 -0
- package/node_modules/liquidjs/dist/build/base64-impl-browser.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/build/crypto-impl-browser.d.ts +2 -0
- package/node_modules/liquidjs/dist/build/crypto-impl-browser.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/context/context.d.ts +10 -4
- package/node_modules/liquidjs/dist/context/scope.d.ts +2 -2
- package/node_modules/liquidjs/dist/drop/blank-drop.d.ts +1 -1
- package/node_modules/liquidjs/dist/drop/block-drop.d.ts +3 -2
- package/node_modules/liquidjs/dist/drop/comparable.d.ts +11 -5
- package/node_modules/liquidjs/dist/drop/drop.d.ts +3 -1
- package/node_modules/liquidjs/dist/drop/empty-drop.d.ts +1 -1
- package/node_modules/liquidjs/dist/drop/null-drop.d.ts +1 -1
- package/node_modules/liquidjs/dist/filters/array.d.ts +9 -3
- package/node_modules/liquidjs/dist/filters/base64-impl.d.ts +2 -0
- package/node_modules/liquidjs/dist/filters/base64.d.ts +9 -0
- package/node_modules/liquidjs/dist/filters/crypto-impl.d.ts +2 -0
- package/node_modules/liquidjs/dist/filters/crypto.d.ts +8 -0
- package/node_modules/liquidjs/dist/filters/math.d.ts +1 -1
- package/node_modules/liquidjs/dist/filters/misc.d.ts +2 -2
- package/node_modules/liquidjs/dist/filters/string.d.ts +2 -1
- package/node_modules/liquidjs/dist/fs/fs-impl.d.ts +2 -1
- package/node_modules/liquidjs/dist/fs/fs.d.ts +4 -2
- package/node_modules/liquidjs/dist/fs/loader.d.ts +2 -1
- package/node_modules/liquidjs/dist/index.d.ts +8 -3
- package/node_modules/liquidjs/dist/liquid-options.d.ts +8 -2
- 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.mjs +836 -406
- package/node_modules/liquidjs/dist/liquid.browser.umd.js +1683 -788
- package/node_modules/liquidjs/dist/liquid.browser.umd.js.map +1 -1
- package/node_modules/liquidjs/dist/liquid.d.ts +1 -0
- package/node_modules/liquidjs/dist/liquid.node.js +848 -426
- package/node_modules/liquidjs/dist/liquid.node.mjs +849 -422
- package/node_modules/liquidjs/dist/parser/parser.d.ts +1 -0
- package/node_modules/liquidjs/dist/parser/token-kind.d.ts +1 -0
- package/node_modules/liquidjs/dist/parser/tokenizer.d.ts +4 -3
- package/node_modules/liquidjs/dist/render/expression.d.ts +11 -1
- package/node_modules/liquidjs/dist/render/operator.d.ts +11 -4
- package/node_modules/liquidjs/dist/tags/case.d.ts +2 -2
- package/node_modules/liquidjs/dist/tags/for.d.ts +2 -2
- package/node_modules/liquidjs/dist/tags/include.d.ts +2 -0
- package/node_modules/liquidjs/dist/tags/layout.d.ts +1 -0
- package/node_modules/liquidjs/dist/tags/render.d.ts +2 -0
- package/node_modules/liquidjs/dist/tags/tablerow.d.ts +2 -2
- package/node_modules/liquidjs/dist/tokens/literal-token.d.ts +2 -2
- package/node_modules/liquidjs/dist/tokens/operator-token.d.ts +3 -2
- package/node_modules/liquidjs/dist/tokens/property-access-token.d.ts +3 -2
- package/node_modules/liquidjs/dist/tokens/tag-token.d.ts +1 -1
- package/node_modules/liquidjs/dist/tokens/value-token.d.ts +2 -1
- package/node_modules/liquidjs/dist/util/async.d.ts +2 -0
- package/node_modules/liquidjs/dist/util/liquid-date.d.ts +7 -0
- package/node_modules/liquidjs/dist/util/operator-trie.d.ts +4 -8
- package/node_modules/liquidjs/dist/util/strftime.d.ts +2 -1
- package/node_modules/liquidjs/dist/util/type-guards.d.ts +2 -1
- package/node_modules/liquidjs/dist/util/underscore.d.ts +5 -1
- package/node_modules/liquidjs/package.json +20 -14
- package/package.json +47 -41
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { identify } from '../util/underscore';
|
|
2
2
|
import { FilterImpl } from '../template';
|
|
3
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;
|
|
4
|
+
declare function json(this: FilterImpl, value: any, space?: number): string;
|
|
5
|
+
declare function inspect(this: FilterImpl, value: any, space?: number): string;
|
|
6
6
|
declare function to_integer(value: any): number;
|
|
7
7
|
declare const _default: {
|
|
8
8
|
default: typeof defaultFilter;
|
|
@@ -16,6 +16,7 @@ export declare function rstrip(this: FilterImpl, str: string, chars?: string): s
|
|
|
16
16
|
export declare function split(this: FilterImpl, v: string, arg: string): string[];
|
|
17
17
|
export declare function strip(this: FilterImpl, v: string, chars?: string): string;
|
|
18
18
|
export declare function strip_newlines(this: FilterImpl, v: string): string;
|
|
19
|
+
export declare function squish(this: FilterImpl, v: string): string;
|
|
19
20
|
export declare function capitalize(this: FilterImpl, str: string): string;
|
|
20
21
|
export declare function replace(this: FilterImpl, v: string, pattern: string, replacement: string): string;
|
|
21
22
|
export declare function replace_first(this: FilterImpl, v: string, arg1: string, arg2: string): string;
|
|
@@ -24,4 +25,4 @@ export declare function truncate(this: FilterImpl, v: string, l?: number, o?: st
|
|
|
24
25
|
export declare function truncatewords(this: FilterImpl, v: string, words?: number, o?: string): string;
|
|
25
26
|
export declare function normalize_whitespace(this: FilterImpl, v: string): string;
|
|
26
27
|
export declare function number_of_words(this: FilterImpl, input: string, mode?: 'cjk' | 'auto'): number;
|
|
27
|
-
export declare function array_to_sentence_string(this: FilterImpl,
|
|
28
|
+
export declare function array_to_sentence_string(this: FilterImpl, input: unknown, connector?: string): any;
|
|
@@ -5,5 +5,6 @@ export declare function readFileSync(filepath: string): string;
|
|
|
5
5
|
export declare function resolve(root: string, file: string, ext: string): string;
|
|
6
6
|
export declare function fallback(file: string): string | undefined;
|
|
7
7
|
export declare function dirname(filepath: string): string;
|
|
8
|
-
export declare function contains(root: string, file: string): boolean
|
|
8
|
+
export declare function contains(root: string, file: string): Promise<boolean>;
|
|
9
|
+
export declare function containsSync(root: string, file: string): boolean;
|
|
9
10
|
export { sep } from 'path';
|
|
@@ -9,8 +9,10 @@ export interface FS {
|
|
|
9
9
|
readFileSync: (filepath: string) => string;
|
|
10
10
|
/** resolve a file against directory, for given `ext` option */
|
|
11
11
|
resolve: (dir: string, file: string, ext: string) => string;
|
|
12
|
-
/** check if file is contained in `root
|
|
13
|
-
contains?: (root: string, file: string) => boolean
|
|
12
|
+
/** check if file is contained in `root`. Node default fs uses realpath; if omitted, loader assumes contained. */
|
|
13
|
+
contains?: (root: string, file: string) => Promise<boolean>;
|
|
14
|
+
/** sync check if file is contained in `root`, allows both renderSync and render. */
|
|
15
|
+
containsSync?: (root: string, file: string) => boolean;
|
|
14
16
|
/** defaults to "/" */
|
|
15
17
|
sep?: string;
|
|
16
18
|
/** required for relative path resolving */
|
|
@@ -16,9 +16,10 @@ export declare class Loader {
|
|
|
16
16
|
shouldLoadRelative: (referencedFile: string) => boolean;
|
|
17
17
|
private options;
|
|
18
18
|
private contains;
|
|
19
|
+
private exists;
|
|
19
20
|
constructor(options: LoaderOptions);
|
|
20
21
|
lookup(file: string, type: LookupType, sync?: boolean, currentFile?: string): Generator<unknown, string, string>;
|
|
21
|
-
candidates(file: string, dirs: string[], currentFile?: string
|
|
22
|
+
candidates(file: string, dirs: string[], currentFile?: string): Generator<string, void, unknown>;
|
|
22
23
|
private dirname;
|
|
23
24
|
private lookupError;
|
|
24
25
|
}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
export declare const version = "[VI]{version}[/VI]";
|
|
2
2
|
export * as TypeGuards from './util/type-guards';
|
|
3
3
|
export { toValue, createTrie, Trie, toPromise, toValueSync, assert, LiquidError, ParseError, RenderError, UndefinedVariableError, TokenizationError, AssertionError } from './util';
|
|
4
|
+
export type { LiquidErrors } from './util/error';
|
|
4
5
|
export { Drop } from './drop';
|
|
6
|
+
export type { Comparable, ComparableResult } from './drop';
|
|
5
7
|
export { Emitter } from './emitters';
|
|
6
|
-
export { defaultOperators, Operators, evalToken, evalQuotedToken, Expression, isFalsy, isTruthy } from './render';
|
|
8
|
+
export { defaultOperators, Operators, evalToken, evalTokenValue, evalQuotedToken, Expression, isFalsy, isTruthy } from './render';
|
|
7
9
|
export { Context, Scope } from './context';
|
|
8
10
|
export { Value, Hash, Template, FilterImplOptions, Tag, Filter, Output, Variable, VariableLocation, VariableSegments, Variables, StaticAnalysis, StaticAnalysisOptions, analyze, analyzeSync, Arguments, PartialScope } from './template';
|
|
11
|
+
export type { TagRenderReturn } from './template';
|
|
9
12
|
export { Token, TopLevelToken, TagToken, ValueToken } from './tokens';
|
|
13
|
+
export type { RangeToken, LiteralToken, QuotedToken, PropertyAccessToken, NumberToken, FilteredValueToken } from './tokens';
|
|
10
14
|
export { TokenKind, Tokenizer, ParseStream, Parser } from './parser';
|
|
11
15
|
export { filters } from './filters';
|
|
12
16
|
export * from './tags';
|
|
13
|
-
export { defaultOptions
|
|
14
|
-
export {
|
|
17
|
+
export { defaultOptions } from './liquid-options';
|
|
18
|
+
export type { LiquidOptions, RenderOptions, RenderFileOptions } from './liquid-options';
|
|
19
|
+
export { FS, LookupType } from './fs';
|
|
15
20
|
export { Liquid } from './liquid';
|
|
@@ -30,7 +30,10 @@ export interface LiquidOptions {
|
|
|
30
30
|
strictVariables?: boolean;
|
|
31
31
|
/** Catch all errors instead of exit upon one. Please note that render errors won't be reached when parse fails. */
|
|
32
32
|
catchAllErrors?: boolean;
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Hide scope variables from prototypes, useful when you're passing a not sanitized object into LiquidJS or need to hide prototypes from templates.
|
|
35
|
+
* This only applies to property/index access on scope objects. Filter transforms and iteration operate on the resolved value with standard JavaScript semantics, so prototype-inherited array indices may still be surfaced by them.
|
|
36
|
+
*/
|
|
34
37
|
ownPropertyOnly?: boolean;
|
|
35
38
|
/** 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`. **/
|
|
36
39
|
lenientIf?: boolean;
|
|
@@ -64,7 +67,7 @@ export interface LiquidOptions {
|
|
|
64
67
|
fs?: FS;
|
|
65
68
|
/** keyValue separator */
|
|
66
69
|
keyValueSeparator?: string;
|
|
67
|
-
/** Render from in-memory `templates` mapping instead of file system.
|
|
70
|
+
/** Render from an in-memory `templates` mapping instead of the file system. When `templates` is set, Liquid uses the provided mapping for template lookup (including includes, layouts, and partials), and file-system options such as `fs`, `root`, `partials`, `layouts`, and `relativeReference` are effectively bypassed for those lookups. */
|
|
68
71
|
templates?: {
|
|
69
72
|
[key: string]: string;
|
|
70
73
|
};
|
|
@@ -78,6 +81,8 @@ export interface LiquidOptions {
|
|
|
78
81
|
operators?: Operators;
|
|
79
82
|
/** Respect parameter order when using filters like "for ... reversed limit", Defaults to `false`. */
|
|
80
83
|
orderedFilterParameters?: boolean;
|
|
84
|
+
/** Allow parenthesized expressions as operands in conditions and loops, e.g. `{% if (foo | upcase) == "BAR" %}`. This is a non-standard extension to Liquid. Defaults to `false`. */
|
|
85
|
+
groupedExpressions?: boolean;
|
|
81
86
|
/** For DoS handling, limit total length of templates parsed in one `parse()` call. A typical PC can handle 1e8 (100M) characters without issues. */
|
|
82
87
|
parseLimit?: number;
|
|
83
88
|
/** For DoS handling, limit total time (in ms) for each `render()` call. */
|
|
@@ -149,6 +154,7 @@ export interface NormalizedFullOptions extends NormalizedOptions {
|
|
|
149
154
|
globals: object;
|
|
150
155
|
keepOutputType: boolean;
|
|
151
156
|
operators: Operators;
|
|
157
|
+
groupedExpressions: boolean;
|
|
152
158
|
parseLimit: number;
|
|
153
159
|
renderLimit: number;
|
|
154
160
|
memoryLimit: number;
|