@dazl/internal-api-client 1.25.2 → 1.25.3
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.
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
* DO NOT IMPORT INTO THIS FILE.
|
|
4
4
|
*/
|
|
5
5
|
export type ToggleScope = "RemoteAndEditor" | "SiteAndEditor";
|
|
6
|
+
/**
|
|
7
|
+
* Feature toggle configuration used in Dazl.
|
|
8
|
+
*
|
|
9
|
+
* These toggles are available only in the dazl repo (excluding the React Router server).
|
|
10
|
+
* Use toggles to guard feature entry points (for example, buttons/links that expose a feature),
|
|
11
|
+
* not to wrap refactors.
|
|
12
|
+
*
|
|
13
|
+
* `canClose`:
|
|
14
|
+
* - `false` means the toggle must not be closed once it has been opened in an environment.
|
|
15
|
+
* - Set to `false` when users who already used the feature would experience degraded UX if it is closed.
|
|
16
|
+
* - Prefer making the feature data-driven as well to avoid this lock-in when possible (not always possible).
|
|
17
|
+
*
|
|
18
|
+
* `scope`:
|
|
19
|
+
* - Defines where the toggle is available.
|
|
20
|
+
* - Use `"SiteAndEditor"` for most cases: available in all dazl client code (editor and home page).
|
|
21
|
+
* - Use `"RemoteAndEditor"` only when you must gate behavior in dazl server environments
|
|
22
|
+
* (for example, processing); available in all engine envs (editor, processing, workspace, lsp).
|
|
23
|
+
*/
|
|
6
24
|
export interface FeatureToggleConfig {
|
|
7
25
|
scope: ToggleScope;
|
|
8
26
|
canClose: boolean;
|
|
@@ -15,4 +33,5 @@ export declare const featureTogglesConfig: {
|
|
|
15
33
|
owner: string;
|
|
16
34
|
};
|
|
17
35
|
};
|
|
36
|
+
export type FeatureTogglesConfig = typeof featureTogglesConfig;
|
|
18
37
|
//# sourceMappingURL=feature-toggles-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-toggles-config.d.ts","sourceRoot":"","sources":["../src/feature-toggles-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAE9D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,oBAAoB;;;;;;CAMc,CAAC"}
|
|
1
|
+
{"version":3,"file":"feature-toggles-config.d.ts","sourceRoot":"","sources":["../src/feature-toggles-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GAAG,eAAe,CAAC;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,oBAAoB;;;;;;CAMc,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-toggles-config.js","sourceRoot":"","sources":["../src/feature-toggles-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-toggles-config.js","sourceRoot":"","sources":["../src/feature-toggles-config.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,YAAY,EAAE;QACZ,KAAK,EAAE,eAAe;QACtB,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,QAAQ;KAChB;CAC4C,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,6 +4,24 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export type ToggleScope = "RemoteAndEditor" | "SiteAndEditor";
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Feature toggle configuration used in Dazl.
|
|
9
|
+
*
|
|
10
|
+
* These toggles are available only in the dazl repo (excluding the React Router server).
|
|
11
|
+
* Use toggles to guard feature entry points (for example, buttons/links that expose a feature),
|
|
12
|
+
* not to wrap refactors.
|
|
13
|
+
*
|
|
14
|
+
* `canClose`:
|
|
15
|
+
* - `false` means the toggle must not be closed once it has been opened in an environment.
|
|
16
|
+
* - Set to `false` when users who already used the feature would experience degraded UX if it is closed.
|
|
17
|
+
* - Prefer making the feature data-driven as well to avoid this lock-in when possible (not always possible).
|
|
18
|
+
*
|
|
19
|
+
* `scope`:
|
|
20
|
+
* - Defines where the toggle is available.
|
|
21
|
+
* - Use `"SiteAndEditor"` for most cases: available in all dazl client code (editor and home page).
|
|
22
|
+
* - Use `"RemoteAndEditor"` only when you must gate behavior in dazl server environments
|
|
23
|
+
* (for example, processing); available in all engine envs (editor, processing, workspace, lsp).
|
|
24
|
+
*/
|
|
7
25
|
export interface FeatureToggleConfig {
|
|
8
26
|
scope: ToggleScope;
|
|
9
27
|
canClose: boolean;
|
|
@@ -17,3 +35,5 @@ export const featureTogglesConfig = {
|
|
|
17
35
|
owner: "alissa",
|
|
18
36
|
},
|
|
19
37
|
} satisfies Record<string, FeatureToggleConfig>;
|
|
38
|
+
|
|
39
|
+
export type FeatureTogglesConfig = typeof featureTogglesConfig;
|