speedly 2.0.6 → 2.0.7
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/cjs/config/init.d.ts +2 -1
- package/dist/cjs/index.d.ts +4 -3
- package/dist/cjs/index.js +37 -6
- package/dist/esm/config/init.d.ts +2 -1
- package/dist/esm/index.d.ts +4 -3
- package/dist/esm/index.js +37 -6
- package/package.json +1 -1
|
@@ -8,8 +8,9 @@ type InitConfig = {
|
|
|
8
8
|
staticFiles?: boolean;
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
};
|
|
11
|
+
export type InitFunction = (config?: InitConfig) => express.Express;
|
|
12
|
+
export type { InitConfig };
|
|
11
13
|
export default function speedly(config?: InitConfig): express.Express & {
|
|
12
14
|
speedlyConfig: InitConfig;
|
|
13
15
|
registerFallbacks: () => void;
|
|
14
16
|
};
|
|
15
|
-
export {};
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { InitFunction } from "./config/init";
|
|
2
|
+
import { Express } from "express";
|
|
3
|
+
declare let exportObject: Express & InitFunction;
|
|
4
|
+
export default exportObject;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,14 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Router = void 0;
|
|
7
39
|
const init_1 = __importDefault(require("./config/init"));
|
|
8
40
|
// Export express types and classes
|
|
9
|
-
|
|
10
|
-
|
|
41
|
+
const express = __importStar(require("express"));
|
|
42
|
+
let exportObject = express;
|
|
43
|
+
Object.assign(exportObject, init_1.default);
|
|
11
44
|
// Override the default express() with our speedly`s functions
|
|
12
|
-
exports.default =
|
|
13
|
-
module.exports = init_1.default;
|
|
14
|
-
module.exports.default = init_1.default;
|
|
45
|
+
exports.default = exportObject;
|
|
@@ -8,8 +8,9 @@ type InitConfig = {
|
|
|
8
8
|
staticFiles?: boolean;
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
};
|
|
11
|
+
export type InitFunction = (config?: InitConfig) => express.Express;
|
|
12
|
+
export type { InitConfig };
|
|
11
13
|
export default function speedly(config?: InitConfig): express.Express & {
|
|
12
14
|
speedlyConfig: InitConfig;
|
|
13
15
|
registerFallbacks: () => void;
|
|
14
16
|
};
|
|
15
|
-
export {};
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { InitFunction } from "./config/init";
|
|
2
|
+
import { Express } from "express";
|
|
3
|
+
declare let exportObject: Express & InitFunction;
|
|
4
|
+
export default exportObject;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,14 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Router = void 0;
|
|
7
39
|
const init_1 = __importDefault(require("./config/init"));
|
|
8
40
|
// Export express types and classes
|
|
9
|
-
|
|
10
|
-
|
|
41
|
+
const express = __importStar(require("express"));
|
|
42
|
+
let exportObject = express;
|
|
43
|
+
Object.assign(exportObject, init_1.default);
|
|
11
44
|
// Override the default express() with our speedly`s functions
|
|
12
|
-
exports.default =
|
|
13
|
-
module.exports = init_1.default;
|
|
14
|
-
module.exports.default = init_1.default;
|
|
45
|
+
exports.default = exportObject;
|