@actions/expressions 0.3.34 → 0.3.35
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/dist/features.d.ts +57 -0
- package/dist/features.d.ts.map +1 -0
- package/dist/features.js +36 -0
- package/dist/features.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Experimental feature flags.
|
|
3
|
+
*
|
|
4
|
+
* Individual feature flags take precedence over `all`.
|
|
5
|
+
* Example: { all: true, missingInputsQuickfix: false } enables all
|
|
6
|
+
* experimental features EXCEPT missingInputsQuickfix.
|
|
7
|
+
*
|
|
8
|
+
* When a feature graduates to stable, its flag becomes a no-op
|
|
9
|
+
* (the feature will be enabled regardless of the configuration value).
|
|
10
|
+
*/
|
|
11
|
+
export interface ExperimentalFeatures {
|
|
12
|
+
/**
|
|
13
|
+
* Enable all experimental features.
|
|
14
|
+
* Individual feature flags take precedence over this setting.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
all?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Enable quickfix code action for missing required action inputs.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
missingInputsQuickfix?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Warn when block scalars (| or >) use implicit clip chomping,
|
|
25
|
+
* which adds a trailing newline that may be unintentional.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
blockScalarChompingWarning?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Enable action scaffolding snippets in action.yml files.
|
|
31
|
+
* Offers Node.js, Composite, and Docker action scaffolds.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
actionScaffoldingSnippets?: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Keys of ExperimentalFeatures that represent actual features (excludes 'all')
|
|
38
|
+
*/
|
|
39
|
+
export type ExperimentalFeatureKey = Exclude<keyof ExperimentalFeatures, "all">;
|
|
40
|
+
export declare class FeatureFlags {
|
|
41
|
+
private readonly features;
|
|
42
|
+
constructor(features?: ExperimentalFeatures);
|
|
43
|
+
/**
|
|
44
|
+
* Check if an experimental feature is enabled.
|
|
45
|
+
*
|
|
46
|
+
* Resolution order:
|
|
47
|
+
* 1. Explicit feature flag (if set)
|
|
48
|
+
* 2. `all` flag (if set)
|
|
49
|
+
* 3. false (default)
|
|
50
|
+
*/
|
|
51
|
+
isEnabled(feature: ExperimentalFeatureKey): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Returns list of all enabled experimental features.
|
|
54
|
+
*/
|
|
55
|
+
getEnabledFeatures(): ExperimentalFeatureKey[];
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=features.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../src/features.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IAEd;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;OAIG;IACH,0BAA0B,CAAC,EAAE,OAAO,CAAC;IAErC;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,MAAM,oBAAoB,EAAE,KAAK,CAAC,CAAC;AAYhF,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuB;gBAEpC,QAAQ,CAAC,EAAE,oBAAoB;IAI3C;;;;;;;OAOG;IACH,SAAS,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO;IAQnD;;OAEG;IACH,kBAAkB,IAAI,sBAAsB,EAAE;CAG/C"}
|
package/dist/features.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* All known experimental feature keys.
|
|
3
|
+
* This list must be kept in sync with the ExperimentalFeatures interface.
|
|
4
|
+
*/
|
|
5
|
+
const allFeatureKeys = [
|
|
6
|
+
"missingInputsQuickfix",
|
|
7
|
+
"blockScalarChompingWarning",
|
|
8
|
+
"actionScaffoldingSnippets"
|
|
9
|
+
];
|
|
10
|
+
export class FeatureFlags {
|
|
11
|
+
constructor(features) {
|
|
12
|
+
this.features = features ?? {};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Check if an experimental feature is enabled.
|
|
16
|
+
*
|
|
17
|
+
* Resolution order:
|
|
18
|
+
* 1. Explicit feature flag (if set)
|
|
19
|
+
* 2. `all` flag (if set)
|
|
20
|
+
* 3. false (default)
|
|
21
|
+
*/
|
|
22
|
+
isEnabled(feature) {
|
|
23
|
+
const explicit = this.features[feature];
|
|
24
|
+
if (explicit !== undefined) {
|
|
25
|
+
return explicit;
|
|
26
|
+
}
|
|
27
|
+
return this.features.all ?? false;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns list of all enabled experimental features.
|
|
31
|
+
*/
|
|
32
|
+
getEnabledFeatures() {
|
|
33
|
+
return allFeatureKeys.filter(key => this.isEnabled(key));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=features.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.js","sourceRoot":"","sources":["../src/features.ts"],"names":[],"mappings":"AA4CA;;;GAGG;AACH,MAAM,cAAc,GAA6B;IAC/C,uBAAuB;IACvB,4BAA4B;IAC5B,2BAA2B;CAC5B,CAAC;AAEF,MAAM,OAAO,YAAY;IAGvB,YAAY,QAA+B;QACzC,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,EAAE,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,OAA+B;QACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,IAAI,KAAK,CAAC;IACpC,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,OAAO,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { DescriptionDictionary, DescriptionPair, isDescriptionDictionary } from
|
|
|
4
4
|
export * as data from "./data/index.js";
|
|
5
5
|
export { ExpressionError, ExpressionEvaluationError } from "./errors.js";
|
|
6
6
|
export { Evaluator } from "./evaluator.js";
|
|
7
|
+
export { ExperimentalFeatureKey, ExperimentalFeatures, FeatureFlags } from "./features.js";
|
|
7
8
|
export { wellKnownFunctions } from "./funcs.js";
|
|
8
9
|
export { Lexer, Result } from "./lexer.js";
|
|
9
10
|
export { Parser } from "./parser.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,qBAAqB,EAAE,eAAe,EAAE,uBAAuB,EAAC,MAAM,uCAAuC,CAAC;AACtH,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,eAAe,EAAE,yBAAyB,EAAC,MAAM,aAAa,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAC,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,qBAAqB,EAAE,eAAe,EAAE,uBAAuB,EAAC,MAAM,uCAAuC,CAAC;AACtH,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,eAAe,EAAE,yBAAyB,EAAC,MAAM,aAAa,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,sBAAsB,EAAE,oBAAoB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AACzF,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,KAAK,EAAE,MAAM,EAAC,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { DescriptionDictionary, isDescriptionDictionary } from "./completion/des
|
|
|
4
4
|
export * as data from "./data/index.js";
|
|
5
5
|
export { ExpressionError, ExpressionEvaluationError } from "./errors.js";
|
|
6
6
|
export { Evaluator } from "./evaluator.js";
|
|
7
|
+
export { FeatureFlags } from "./features.js";
|
|
7
8
|
export { wellKnownFunctions } from "./funcs.js";
|
|
8
9
|
export { Lexer } from "./lexer.js";
|
|
9
10
|
export { Parser } from "./parser.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAC,QAAQ,EAAiB,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,qBAAqB,EAAmB,uBAAuB,EAAC,MAAM,uCAAuC,CAAC;AACtH,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,eAAe,EAAE,yBAAyB,EAAC,MAAM,aAAa,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,KAAK,EAAS,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAC,QAAQ,EAAiB,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAC,qBAAqB,EAAmB,uBAAuB,EAAC,MAAM,uCAAuC,CAAC;AACtH,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAC,eAAe,EAAE,yBAAyB,EAAC,MAAM,aAAa,CAAC;AACvE,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAA+C,YAAY,EAAC,MAAM,eAAe,CAAC;AACzF,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,KAAK,EAAS,MAAM,YAAY,CAAC;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/ast.ts","../src/completion.ts","../src/errors.ts","../src/evaluator.ts","../src/filtered_array.ts","../src/funcs.ts","../src/idxHelper.ts","../src/index.ts","../src/lexer.ts","../src/parser.ts","../src/result.ts","../src/completion/descriptionDictionary.ts","../src/data/array.ts","../src/data/boolean.ts","../src/data/dictionary.ts","../src/data/expressiondata.ts","../src/data/index.ts","../src/data/null.ts","../src/data/number.ts","../src/data/replacer.ts","../src/data/reviver.ts","../src/data/string.ts","../src/funcs/contains.ts","../src/funcs/endswith.ts","../src/funcs/format.ts","../src/funcs/fromjson.ts","../src/funcs/info.ts","../src/funcs/join.ts","../src/funcs/startswith.ts","../src/funcs/tojson.ts"],"version":"5.8.3"}
|
|
1
|
+
{"root":["../src/ast.ts","../src/completion.ts","../src/errors.ts","../src/evaluator.ts","../src/features.ts","../src/filtered_array.ts","../src/funcs.ts","../src/idxHelper.ts","../src/index.ts","../src/lexer.ts","../src/parser.ts","../src/result.ts","../src/completion/descriptionDictionary.ts","../src/data/array.ts","../src/data/boolean.ts","../src/data/dictionary.ts","../src/data/expressiondata.ts","../src/data/index.ts","../src/data/null.ts","../src/data/number.ts","../src/data/replacer.ts","../src/data/reviver.ts","../src/data/string.ts","../src/funcs/contains.ts","../src/funcs/endswith.ts","../src/funcs/format.ts","../src/funcs/fromjson.ts","../src/funcs/info.ts","../src/funcs/join.ts","../src/funcs/startswith.ts","../src/funcs/tojson.ts"],"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actions/expressions",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.35",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"ts-jest": "^29.0.3",
|
|
63
63
|
"typescript": "^5.8.3"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "1baa74a67edfb7d408f60973333cca930e8a5044"
|
|
66
66
|
}
|