@plasmicapp/loader-edge 1.0.49 → 1.0.51
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/index.d.ts +38 -1
- package/package.json +4 -4
- package/dist/variation.d.ts +0 -32
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Split } from '@plasmicapp/loader-fetcher';
|
|
2
|
+
|
|
3
|
+
export declare const generateAllPaths: (path: string, seedRange?: number) => string[];
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generates all possible paths with the given traits. Should be used to enable fallback false
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateAllPathsWithTraits(path: string, traitValues?: Record<string, string[]>, seedRange?: number): string[];
|
|
9
|
+
|
|
10
|
+
export declare const getActiveVariation: (opts: {
|
|
11
|
+
splits: Split[];
|
|
12
|
+
traits: Record<string, string | number | boolean>;
|
|
13
|
+
path: string;
|
|
14
|
+
}) => Record<string, string>;
|
|
15
|
+
|
|
16
|
+
export declare const getMiddlewareResponse: (opts: {
|
|
17
|
+
path: string;
|
|
18
|
+
traits: Traits;
|
|
19
|
+
cookies: Record<string, string>;
|
|
20
|
+
seedRange?: number;
|
|
21
|
+
}) => {
|
|
22
|
+
pathname: string;
|
|
23
|
+
cookies: {
|
|
24
|
+
key: string;
|
|
25
|
+
value: string;
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export declare const rewriteWithoutTraits: (url: string) => {
|
|
30
|
+
path: string;
|
|
31
|
+
traits: {};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export declare const rewriteWithTraits: (path: string, traits: Traits) => string;
|
|
35
|
+
|
|
36
|
+
declare type Traits = Record<string, string | number | boolean>;
|
|
37
|
+
|
|
38
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.51",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"types": "./dist/index.d.ts",
|
|
5
5
|
"main": "./dist/index.js",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@plasmicapp/loader-splits": "1.0.
|
|
41
|
+
"@plasmicapp/loader-splits": "1.0.48"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@plasmicapp/loader-fetcher": "1.0.
|
|
44
|
+
"@plasmicapp/loader-fetcher": "1.0.42"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "48a2877c3dc093d101508fcdde2fd213055fdab9"
|
|
50
50
|
}
|
package/dist/variation.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { Split } from "@plasmicapp/loader-fetcher";
|
|
2
|
-
export declare const DELIMITER = "__pm__";
|
|
3
|
-
export declare const PLASMIC_SEED = "plasmic_seed";
|
|
4
|
-
type Traits = Record<string, string | number | boolean>;
|
|
5
|
-
export declare const rewriteWithoutTraits: (url: string) => {
|
|
6
|
-
path: string;
|
|
7
|
-
traits: {};
|
|
8
|
-
};
|
|
9
|
-
export declare const rewriteWithTraits: (path: string, traits: Traits) => string;
|
|
10
|
-
export declare const generateAllPaths: (path: string, seedRange?: number) => string[];
|
|
11
|
-
/**
|
|
12
|
-
* Generates all possible paths with the given traits. Should be used to enable fallback false
|
|
13
|
-
*/
|
|
14
|
-
export declare function generateAllPathsWithTraits(path: string, traitValues?: Record<string, string[]>, seedRange?: number): string[];
|
|
15
|
-
export declare const getMiddlewareResponse: (opts: {
|
|
16
|
-
path: string;
|
|
17
|
-
traits: Traits;
|
|
18
|
-
cookies: Record<string, string>;
|
|
19
|
-
seedRange?: number;
|
|
20
|
-
}) => {
|
|
21
|
-
pathname: string;
|
|
22
|
-
cookies: {
|
|
23
|
-
key: string;
|
|
24
|
-
value: string;
|
|
25
|
-
}[];
|
|
26
|
-
};
|
|
27
|
-
export declare const getActiveVariation: (opts: {
|
|
28
|
-
splits: Split[];
|
|
29
|
-
traits: Record<string, string | number | boolean>;
|
|
30
|
-
path: string;
|
|
31
|
-
}) => Record<string, string>;
|
|
32
|
-
export {};
|