@takeshape/routing 10.4.9 → 10.6.1
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/paths.d.ts +4 -4
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +0 -1
- package/dist/urls.d.ts +2 -2
- package/dist/urls.d.ts.map +1 -1
- package/es/paths.js +0 -1
- package/package.json +2 -2
package/dist/paths.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
|
-
export
|
|
2
|
+
export type PathResult = {
|
|
3
3
|
warnings: string[];
|
|
4
4
|
path: string;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
export type PathContext = Record<string, any> | string | number;
|
|
7
7
|
export declare function formatPath(pathStr: string, data: PathContext): PathResult;
|
|
8
|
-
export
|
|
8
|
+
export type TSGRoutesConfig = {
|
|
9
9
|
routes: Record<string, string>;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
export declare const route: import("lodash").CurriedFunction3<TSGRoutesConfig, string, PathContext, string>;
|
|
12
12
|
//# sourceMappingURL=paths.d.ts.map
|
package/dist/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/paths.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/paths.ts"],"names":[],"mappings":";AAQA,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEhE,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,CA0BzE;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,KAAK,iFAGhB,CAAC"}
|
package/dist/paths.js
CHANGED
|
@@ -11,7 +11,6 @@ var _toPath = _interopRequireDefault(require("lodash/toPath"));
|
|
|
11
11
|
var _curry = _interopRequireDefault(require("lodash/curry"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
const nameGroup = '([a-zA-Z][a-zA-Z0-9.]*)';
|
|
14
|
-
// eslint-disable-next-line security-node/non-literal-reg-expr
|
|
15
14
|
const variableRegex = new RegExp(':' + nameGroup + '|{' + nameGroup + '}', 'g');
|
|
16
15
|
function formatPath(pathStr, data) {
|
|
17
16
|
const result = {
|
package/dist/urls.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export type AssetPath = string | {
|
|
|
5
5
|
} | {
|
|
6
6
|
s3Key: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type UrlOptions = {
|
|
9
9
|
baseUrl?: string;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
export type ImgixParamValue = string | boolean | number;
|
|
12
12
|
export type ImgixParams = Record<string, ImgixParamValue>;
|
|
13
13
|
export declare function getPath(key: AssetPath): string;
|
package/dist/urls.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../../src/urls.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,gCAAgC,CAAC;AAC1D,eAAO,MAAM,YAAY,gCAAgC,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAG;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC;AAElE,MAAM,
|
|
1
|
+
{"version":3,"file":"urls.d.ts","sourceRoot":"","sources":["../../src/urls.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,gCAAgC,CAAC;AAC1D,eAAO,MAAM,YAAY,gCAAgC,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAG;IAAC,KAAK,EAAE,MAAM,CAAA;CAAC,CAAC;AAElE,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAE1D,wBAAgB,OAAO,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAE9C;AAiBD,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,GAAE,UAAe,GAAG,MAAM,CAI9E;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,WAAW,EAAE,OAAO,GAAE,UAAe,GAAG,MAAM,CAIjG"}
|
package/es/paths.js
CHANGED
|
@@ -3,7 +3,6 @@ import get from 'lodash/get';
|
|
|
3
3
|
import toPath from 'lodash/toPath';
|
|
4
4
|
import curry from 'lodash/curry';
|
|
5
5
|
const nameGroup = '([a-zA-Z][a-zA-Z0-9.]*)';
|
|
6
|
-
// eslint-disable-next-line security-node/non-literal-reg-expr
|
|
7
6
|
const variableRegex = new RegExp(':' + nameGroup + '|{' + nameGroup + '}', 'g');
|
|
8
7
|
export function formatPath(pathStr, data) {
|
|
9
8
|
const result = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takeshape/routing",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.6.1",
|
|
4
4
|
"homepage": "https://www.takeshape.io",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/lodash": "^4.14.165",
|
|
26
|
-
"@takeshape/typescript-jest-junit-reporter": "10.
|
|
26
|
+
"@takeshape/typescript-jest-junit-reporter": "10.6.1"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=18"
|