quidproquo-webserver 0.0.80 → 0.0.82

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.
@@ -1,2 +1,3 @@
1
1
  export * from './genericDataResource';
2
2
  export * from './openApiSpec';
3
+ export * from './webEntry';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./genericDataResource"), exports);
18
18
  __exportStar(require("./openApiSpec"), exports);
19
+ __exportStar(require("./webEntry"), exports);
@@ -0,0 +1,3 @@
1
+ export declare enum WebEntryActionType {
2
+ InvalidateCache = "@quidproquo-webserver/WebEntry/InvalidateCache"
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebEntryActionType = void 0;
4
+ var WebEntryActionType;
5
+ (function (WebEntryActionType) {
6
+ WebEntryActionType["InvalidateCache"] = "@quidproquo-webserver/WebEntry/InvalidateCache";
7
+ })(WebEntryActionType = exports.WebEntryActionType || (exports.WebEntryActionType = {}));
@@ -0,0 +1,2 @@
1
+ import { WebEntryInvalidateCacheActionRequester } from './WebEntryInvalidateCacheActionTypes';
2
+ export declare function askWebEntryInvalidateCache(webEntryName: string, ...paths: string[]): WebEntryInvalidateCacheActionRequester;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.askWebEntryInvalidateCache = void 0;
4
+ const WebEntryActionType_1 = require("./WebEntryActionType");
5
+ function* askWebEntryInvalidateCache(webEntryName, ...paths) {
6
+ return yield {
7
+ type: WebEntryActionType_1.WebEntryActionType.InvalidateCache,
8
+ payload: {
9
+ webEntryName,
10
+ paths,
11
+ },
12
+ };
13
+ }
14
+ exports.askWebEntryInvalidateCache = askWebEntryInvalidateCache;
@@ -0,0 +1,12 @@
1
+ import { Action, ActionProcessor, ActionRequester } from 'quidproquo-core';
2
+ import { WebEntryActionType } from './WebEntryActionType';
3
+ export interface WebEntryInvalidateCacheActionPayload {
4
+ webEntryName: string;
5
+ paths: string[];
6
+ }
7
+ export interface WebEntryInvalidateCacheAction extends Action<WebEntryInvalidateCacheActionPayload> {
8
+ type: WebEntryActionType.InvalidateCache;
9
+ payload: WebEntryInvalidateCacheActionPayload;
10
+ }
11
+ export type WebEntryInvalidateCacheActionProcessor = ActionProcessor<WebEntryInvalidateCacheAction, void>;
12
+ export type WebEntryInvalidateCacheActionRequester = ActionRequester<WebEntryInvalidateCacheAction, void>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export * from './WebEntryActionType';
2
+ export * from './WebEntryInvalidateCacheActionRequester';
3
+ export * from './WebEntryInvalidateCacheActionTypes';
@@ -0,0 +1,19 @@
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./WebEntryActionType"), exports);
18
+ __exportStar(require("./WebEntryInvalidateCacheActionRequester"), exports);
19
+ __exportStar(require("./WebEntryInvalidateCacheActionTypes"), exports);
@@ -13,4 +13,5 @@ export interface CacheSettings {
13
13
  minTTLInSeconds: number;
14
14
  maxTTLInSeconds: number;
15
15
  defaultTTLInSeconds: number;
16
+ mustRevalidate: boolean;
16
17
  }
@@ -15,6 +15,7 @@ const defineSeo = (path, src, runtime, options) => ({
15
15
  minTTLInSeconds: 900,
16
16
  maxTTLInSeconds: 172800,
17
17
  headers: [],
18
+ mustRevalidate: false,
18
19
  },
19
20
  });
20
21
  exports.defineSeo = defineSeo;
@@ -18,6 +18,7 @@ export interface QPQConfigAdvancedWebEntrySettings extends QPQConfigAdvancedSett
18
18
  domain?: WebDomainOptions;
19
19
  indexRoot?: string;
20
20
  ignoreCache?: string[];
21
+ compressFiles?: boolean;
21
22
  }
22
23
  export interface WebEntryQPQWebServerConfigSetting extends QPQConfigSetting {
23
24
  name: string;
@@ -28,5 +29,6 @@ export interface WebEntryQPQWebServerConfigSetting extends QPQConfigSetting {
28
29
  buildPath?: string;
29
30
  seoBuildPath?: string;
30
31
  ignoreCache: string[];
32
+ compressFiles: boolean;
31
33
  }
32
34
  export declare const defineWebEntry: (name: string, options?: QPQConfigAdvancedWebEntrySettings) => WebEntryQPQWebServerConfigSetting;
@@ -2,24 +2,29 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.defineWebEntry = void 0;
4
4
  const QPQConfig_1 = require("../QPQConfig");
5
- const defineWebEntry = (name, options) => ({
6
- configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.WebEntry,
7
- uniqueKey: name,
8
- name,
9
- indexRoot: (options === null || options === void 0 ? void 0 : options.indexRoot) || 'index.html',
10
- storageDrive: (options === null || options === void 0 ? void 0 : options.storageDrive) || {
11
- autoUpload: true,
12
- },
13
- domain: (options === null || options === void 0 ? void 0 : options.domain) || {
14
- onRootDomain: true,
15
- },
16
- cache: (options === null || options === void 0 ? void 0 : options.cache) || {
17
- defaultTTLInSeconds: 86400,
18
- minTTLInSeconds: 900,
19
- maxTTLInSeconds: 172800,
20
- },
21
- buildPath: options === null || options === void 0 ? void 0 : options.buildPath,
22
- seoBuildPath: options === null || options === void 0 ? void 0 : options.seoBuildPath,
23
- ignoreCache: (options === null || options === void 0 ? void 0 : options.ignoreCache) || [],
24
- });
5
+ const defineWebEntry = (name, options) => {
6
+ var _a, _b, _c;
7
+ return ({
8
+ configSettingType: QPQConfig_1.QPQWebServerConfigSettingType.WebEntry,
9
+ uniqueKey: name,
10
+ name,
11
+ indexRoot: (options === null || options === void 0 ? void 0 : options.indexRoot) || 'index.html',
12
+ storageDrive: (options === null || options === void 0 ? void 0 : options.storageDrive) || {
13
+ autoUpload: true,
14
+ },
15
+ domain: (options === null || options === void 0 ? void 0 : options.domain) || {
16
+ onRootDomain: true,
17
+ },
18
+ cache: (options === null || options === void 0 ? void 0 : options.cache) || {
19
+ defaultTTLInSeconds: 7 * 24 * 60 * 60,
20
+ minTTLInSeconds: 3 * 24 * 60 * 60,
21
+ maxTTLInSeconds: 2 * 7 * 24 * 60 * 60,
22
+ mustRevalidate: (_b = (_a = options === null || options === void 0 ? void 0 : options.cache) === null || _a === void 0 ? void 0 : _a.mustRevalidate) !== null && _b !== void 0 ? _b : false,
23
+ },
24
+ buildPath: options === null || options === void 0 ? void 0 : options.buildPath,
25
+ seoBuildPath: options === null || options === void 0 ? void 0 : options.seoBuildPath,
26
+ ignoreCache: (options === null || options === void 0 ? void 0 : options.ignoreCache) || [],
27
+ compressFiles: (_c = options === null || options === void 0 ? void 0 : options.compressFiles) !== null && _c !== void 0 ? _c : true,
28
+ });
29
+ };
25
30
  exports.defineWebEntry = defineWebEntry;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quidproquo-webserver",
3
- "version": "0.0.80",
3
+ "version": "0.0.82",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.js",