@smart-cloud/publisher-core 1.1.5 → 1.1.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/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/store.d.ts +1 -0
- package/dist/types.d.ts +57 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var P=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var z=Object.prototype.hasOwnProperty;var M=(e,t)=>{for(var n in t)P(e,n,{get:t[n],enumerable:!0})},F=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of N(t))!z.call(e,o)&&o!==n&&P(e,o,{get:()=>t[o],enumerable:!(r=U(t,o))||r.enumerable});return e};var G=e=>F(P({},"__esModule",{value:!0}),e);var oe={};M(oe,{PLUGIN_KEY:()=>E,bootstrapPublisherWpSuite:()=>j,createStore:()=>p,getDefaultPublisherCrawlMode:()=>v,getPublisherPlugin:()=>I,getStore:()=>A,getStoreSelect:()=>k,hasPublisherContentSyncAccess:()=>R,hasPublisherSubscription:()=>u,loadPublisherConfig:()=>f,reloadConfig:()=>D,resolvePublisherCrawlMode:()=>x,resolvePublisherDeploymentProfile:()=>T,resolvePublisherDeploymentProfileId:()=>m,sanitizePublisherConfig:()=>h,waitForPublisherReady:()=>W});module.exports=G(oe);var a=require("@smart-cloud/wpsuite-core"),s=require("@wordpress/data");function L(e){let t=e.trim();return t==="."?".":t.replace(/\/$/,"")}function _(e){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).map(([t,n])=>[t.trim(),String(n??"")]).filter(([t])=>t.length>0))}function b(e){return Array.isArray(e)?e.map(t=>String(t??"").trim()).filter(t=>t.length>0):[]}function K(e){return[...new Set(b(e).map(t=>t.toLowerCase().replace(/[^a-z0-9_-]/g,"")).filter(Boolean))]}function B(e){if(!e||typeof e!="object")return;let t=e,n={};return typeof t.bucket=="string"&&(n.bucket=t.bucket.trim()),typeof t.prefix=="string"&&(n.prefix=t.prefix.trim()),typeof t.region=="string"&&(n.region=t.region.trim()),typeof t.htmlCacheControl=="string"&&(n.htmlCacheControl=t.htmlCacheControl.trim()),typeof t.assetCacheControl=="string"&&(n.assetCacheControl=t.assetCacheControl.trim()),Object.keys(n).length>0?n:void 0}function Y(e){if(!e||typeof e!="object")return;let t=e,n={};typeof t.distributionId=="string"&&(n.distributionId=t.distributionId.trim());let r=b(t.invalidationPaths);return r.length>0&&(n.invalidationPaths=r),Object.keys(n).length>0?n:void 0}function $(e){if(!e||typeof e!="object")return null;let t=e,n={};if(typeof t.targetOrigin=="string"){let l=L(t.targetOrigin);l&&(n.targetOrigin=l)}let r=_(t.extraReplacements);Object.keys(r).length>0&&(n.extraReplacements=r);let o=B(t.s3);o&&(n.s3=o);let i=Y(t.cloudFront);return i&&(n.cloudFront=i),n}function H(e){if(!e||typeof e!="object")return{};let t={};for(let[n,r]of Object.entries(e)){let o=n.trim();if(!o)continue;let i=$(r);i&&(t[o]=i)}return t}function w(e,t){if(typeof e!="string")return;let n=e.trim();if(!(!n||!t[n]))return n}function J(e,t){if(!e||typeof e!="object")return null;let n=e,r=String(n.command??"").trim();if(r!=="publish"&&r!=="crawl"&&r!=="deploy"&&r!=="invalidate"&&r!=="retry-timeouts"&&r!=="url"&&r!=="content-sync")return null;let o=Number.parseInt(String(n.intervalMinutes??"0"),10);if(!Number.isFinite(o)||o<1)return null;let i=String(n.id??`${r}-${t+1}`).trim();if(!i)return null;let l=String(n.url??"").trim();if(r==="url"&&!l)return null;let d=String(n.crawlMode??"").trim(),y=String(n.deploymentProfile??"").trim(),g=K(n.postTypes),C=b(n.listingPaths);return r==="content-sync"&&g.length===0?null:{id:i,enabled:n.enabled!==!1,command:r,intervalMinutes:o,...d==="full"||d==="incremental"?{crawlMode:d}:{},...y?{deploymentProfile:y}:{},...l?{url:l}:{},...g.length>0?{postTypes:g}:{},...C.length>0?{listingPaths:C}:{},...Object.fromEntries(["includePostTypeArchives","includeTaxonomyArchives","includeAuthorArchives","includeDateArchives","includePostsPage","includeSitemapChain"].filter(c=>typeof n[c]=="boolean").map(c=>[c,n[c]]))}}function q(e){let t=e&&typeof e=="object"?e:{},r=(Array.isArray(t.rules)?t.rules:[]).map((o,i)=>J(o,i)).filter(o=>!!o);return{enabled:t.enabled===!0,timezone:String(t.timezone??"UTC").trim()||"UTC",rules:r}}var h=e=>{let t=e&&typeof e=="object"?e:{},n=H(t.deploymentProfiles),r=w(t.defaultDeploymentProfile,n),o=w(t.deploymentTargetOverride,n),i={...t};return i.scheduler=q(t.scheduler),i.deploymentProfiles=n,r?i.defaultDeploymentProfile=r:delete i.defaultDeploymentProfile,o?i.deploymentTargetOverride=o:delete i.deploymentTargetOverride,t.subscriptionType==="PROFESSIONAL"||t.subscriptionType==="AGENCY"?i.subscriptionType=t.subscriptionType:delete i.subscriptionType,i},f=async()=>h(await(0,a.getConfig)("publisher")),u=e=>e?.subscriptionType==="PROFESSIONAL"||e?.subscriptionType==="AGENCY",R=u,v=e=>u(e)?"incremental":"full",x=(e,t)=>e==="incremental"&&u(t)?"incremental":"full",m=(e,t)=>{if(!u(e))return"";let n=e?.deploymentProfiles??{};for(let r of[t,e?.deploymentTargetOverride,e?.defaultDeploymentProfile]){let o=typeof r=="string"?r.trim():"";if(o&&n[o])return o}return""},T=(e,t)=>{let n=m(e,t);return n?e?.deploymentProfiles?.[n]??null:null},Q=async()=>({config:await f()}),V={setConfig:e=>({type:"SET_CONFIG",config:e})},X={getConfig(e){return e.config},getState(e){return e}},Z={},k=e=>(0,s.select)(e),D=async e=>{let t=(0,a.getWpSuite)();t?.siteSettings&&(t.siteSettings.lastUpdate=Date.now());let n=await f();(0,s.dispatch)(e).setConfig?.(n)},p=async()=>{let e=await Q(),t=(0,s.createReduxStore)("smartcloud/publisher",{reducer(n=e,r){return r.type==="SET_CONFIG"?{...n,config:r.config??null}:n},actions:V,selectors:X,resolvers:Z});return(0,s.register)(t),t};var O=require("@smart-cloud/wpsuite-core");var I=()=>typeof WpSuite>"u"?null:WpSuite.plugins?.staticPublisher??null,ee=["accountId","siteId","reCaptchaPublicKey"],te=["subscriber","useRecaptchaNet","useRecaptchaEnterprise","renderRecaptchaProvider"];function ne(e,t){let n=e&&typeof e=="object"?e:{},r={...t??{}};delete r.siteKey;for(let o of ee){if(!Object.hasOwn(n,o))continue;let i=String(n[o]??"").trim();i?r[o]=i:delete r[o]}if(Object.hasOwn(n,"lastUpdate")){let o=Number(n.lastUpdate);Number.isFinite(o)&&o>0?r.lastUpdate=o:delete r.lastUpdate}for(let o of te)Object.hasOwn(n,o)&&(typeof n[o]=="boolean"?r[o]=n[o]:delete r[o]);return r}function re(e){if(!e||typeof window<"u")return;let t=e.trim();if(t)try{let n=new URL(t.includes("://")?t:`https://${t}`),r=globalThis;if(r.location?.hostname)return;Object.defineProperty(r,"location",{value:n,configurable:!0,writable:!0})}catch{}}var j=(e={})=>{let t=(0,O.getWpSuite)(),r={siteSettings:ne(e.siteSettings,t?.siteSettings),nonce:typeof e.nonce=="string"?e.nonce:t?.nonce??"",restUrl:typeof e.restUrl=="string"?e.restUrl:t?.restUrl??"",uploadUrl:typeof e.uploadUrl=="string"?e.uploadUrl:t?.uploadUrl??"",view:e.view??t?.view??"settings",plugins:t?.plugins??{},...t?.events?{events:t.events}:{}};return globalThis.WpSuite=r,re(e.locationHref??e.siteOrigin),r},S=null,A=()=>(S||(S=p()),S),W=()=>Promise.resolve();var E="publisher";0&&(module.exports={PLUGIN_KEY,bootstrapPublisherWpSuite,createStore,getDefaultPublisherCrawlMode,getPublisherPlugin,getStore,getStoreSelect,hasPublisherContentSyncAccess,hasPublisherSubscription,loadPublisherConfig,reloadConfig,resolvePublisherCrawlMode,resolvePublisherDeploymentProfile,resolvePublisherDeploymentProfileId,sanitizePublisherConfig,waitForPublisherReady});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createStore, getDefaultPublisherCrawlMode, hasPublisherSubscription, getStoreSelect, loadPublisherConfig, reloadConfig, resolvePublisherCrawlMode, resolvePublisherDeploymentProfile, resolvePublisherDeploymentProfileId, sanitizePublisherConfig, type State, type Store, } from "./store";
|
|
1
|
+
export { createStore, getDefaultPublisherCrawlMode, hasPublisherContentSyncAccess, hasPublisherSubscription, getStoreSelect, loadPublisherConfig, reloadConfig, resolvePublisherCrawlMode, resolvePublisherDeploymentProfile, resolvePublisherDeploymentProfileId, sanitizePublisherConfig, type State, type Store, } from "./store";
|
|
2
2
|
export { bootstrapPublisherWpSuite, getPublisherPlugin, getStore, waitForPublisherReady, type PublisherPlugin, } from "./runtime";
|
|
3
|
-
export type { PublisherCloudFrontConfig, PublisherCrawlMode, PublisherDeploymentProfile, PublisherDeploymentProfiles, PublisherExtraDeploymentTargets, PublisherJobCommand, PublisherRuntimeWpSuiteConfig, PublisherSchedulerConfig, PublisherSchedulerRule, PublisherRemoteConfig, PublisherS3Config, PublisherWpSuiteBootstrapInput, PublisherWpSuiteSiteSettings, } from "./types";
|
|
3
|
+
export type { PublisherCloudFrontConfig, PublisherContentChangeEvent, PublisherContentArchiveKind, PublisherContentArchiveProjection, PublisherContentProjection, PublisherContentProjectionTerm, PublisherContentSyncScope, PublisherCrawlMode, PublisherDeploymentProfile, PublisherDeploymentProfiles, PublisherExtraDeploymentTargets, PublisherJobCommand, PublisherRuntimeWpSuiteConfig, PublisherSchedulerConfig, PublisherSchedulerRule, PublisherRemoteConfig, PublisherS3Config, PublisherWpSuiteBootstrapInput, PublisherWpSuiteSiteSettings, } from "./types";
|
|
4
4
|
export { PLUGIN_KEY } from "./constants";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getConfig as
|
|
1
|
+
import{getConfig as y,getWpSuite as C}from"@smart-cloud/wpsuite-core";import{createReduxStore as w,dispatch as R,register as v,select as x}from"@wordpress/data";function T(e){let t=e.trim();return t==="."?".":t.replace(/\/$/,"")}function k(e){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).map(([t,n])=>[t.trim(),String(n??"")]).filter(([t])=>t.length>0))}function f(e){return Array.isArray(e)?e.map(t=>String(t??"").trim()).filter(t=>t.length>0):[]}function D(e){return[...new Set(f(e).map(t=>t.toLowerCase().replace(/[^a-z0-9_-]/g,"")).filter(Boolean))]}function O(e){if(!e||typeof e!="object")return;let t=e,n={};return typeof t.bucket=="string"&&(n.bucket=t.bucket.trim()),typeof t.prefix=="string"&&(n.prefix=t.prefix.trim()),typeof t.region=="string"&&(n.region=t.region.trim()),typeof t.htmlCacheControl=="string"&&(n.htmlCacheControl=t.htmlCacheControl.trim()),typeof t.assetCacheControl=="string"&&(n.assetCacheControl=t.assetCacheControl.trim()),Object.keys(n).length>0?n:void 0}function I(e){if(!e||typeof e!="object")return;let t=e,n={};typeof t.distributionId=="string"&&(n.distributionId=t.distributionId.trim());let r=f(t.invalidationPaths);return r.length>0&&(n.invalidationPaths=r),Object.keys(n).length>0?n:void 0}function j(e){if(!e||typeof e!="object")return null;let t=e,n={};if(typeof t.targetOrigin=="string"){let s=T(t.targetOrigin);s&&(n.targetOrigin=s)}let r=k(t.extraReplacements);Object.keys(r).length>0&&(n.extraReplacements=r);let o=O(t.s3);o&&(n.s3=o);let i=I(t.cloudFront);return i&&(n.cloudFront=i),n}function A(e){if(!e||typeof e!="object")return{};let t={};for(let[n,r]of Object.entries(e)){let o=n.trim();if(!o)continue;let i=j(r);i&&(t[o]=i)}return t}function h(e,t){if(typeof e!="string")return;let n=e.trim();if(!(!n||!t[n]))return n}function W(e,t){if(!e||typeof e!="object")return null;let n=e,r=String(n.command??"").trim();if(r!=="publish"&&r!=="crawl"&&r!=="deploy"&&r!=="invalidate"&&r!=="retry-timeouts"&&r!=="url"&&r!=="content-sync")return null;let o=Number.parseInt(String(n.intervalMinutes??"0"),10);if(!Number.isFinite(o)||o<1)return null;let i=String(n.id??`${r}-${t+1}`).trim();if(!i)return null;let s=String(n.url??"").trim();if(r==="url"&&!s)return null;let c=String(n.crawlMode??"").trim(),P=String(n.deploymentProfile??"").trim(),a=D(n.postTypes),b=f(n.listingPaths);return r==="content-sync"&&a.length===0?null:{id:i,enabled:n.enabled!==!1,command:r,intervalMinutes:o,...c==="full"||c==="incremental"?{crawlMode:c}:{},...P?{deploymentProfile:P}:{},...s?{url:s}:{},...a.length>0?{postTypes:a}:{},...b.length>0?{listingPaths:b}:{},...Object.fromEntries(["includePostTypeArchives","includeTaxonomyArchives","includeAuthorArchives","includeDateArchives","includePostsPage","includeSitemapChain"].filter(u=>typeof n[u]=="boolean").map(u=>[u,n[u]]))}}function E(e){let t=e&&typeof e=="object"?e:{},r=(Array.isArray(t.rules)?t.rules:[]).map((o,i)=>W(o,i)).filter(o=>!!o);return{enabled:t.enabled===!0,timezone:String(t.timezone??"UTC").trim()||"UTC",rules:r}}var m=e=>{let t=e&&typeof e=="object"?e:{},n=A(t.deploymentProfiles),r=h(t.defaultDeploymentProfile,n),o=h(t.deploymentTargetOverride,n),i={...t};return i.scheduler=E(t.scheduler),i.deploymentProfiles=n,r?i.defaultDeploymentProfile=r:delete i.defaultDeploymentProfile,o?i.deploymentTargetOverride=o:delete i.deploymentTargetOverride,t.subscriptionType==="PROFESSIONAL"||t.subscriptionType==="AGENCY"?i.subscriptionType=t.subscriptionType:delete i.subscriptionType,i},p=async()=>m(await y("publisher")),l=e=>e?.subscriptionType==="PROFESSIONAL"||e?.subscriptionType==="AGENCY",U=l,N=e=>l(e)?"incremental":"full",z=(e,t)=>e==="incremental"&&l(t)?"incremental":"full",S=(e,t)=>{if(!l(e))return"";let n=e?.deploymentProfiles??{};for(let r of[t,e?.deploymentTargetOverride,e?.defaultDeploymentProfile]){let o=typeof r=="string"?r.trim():"";if(o&&n[o])return o}return""},M=(e,t)=>{let n=S(e,t);return n?e?.deploymentProfiles?.[n]??null:null},F=async()=>({config:await p()}),G={setConfig:e=>({type:"SET_CONFIG",config:e})},L={getConfig(e){return e.config},getState(e){return e}},_={},K=e=>x(e),B=async e=>{let t=C();t?.siteSettings&&(t.siteSettings.lastUpdate=Date.now());let n=await p();R(e).setConfig?.(n)},d=async()=>{let e=await F(),t=w("smartcloud/publisher",{reducer(n=e,r){return r.type==="SET_CONFIG"?{...n,config:r.config??null}:n},actions:G,selectors:L,resolvers:_});return v(t),t};import{getWpSuite as Y}from"@smart-cloud/wpsuite-core";var $=()=>typeof WpSuite>"u"?null:WpSuite.plugins?.staticPublisher??null,H=["accountId","siteId","reCaptchaPublicKey"],J=["subscriber","useRecaptchaNet","useRecaptchaEnterprise","renderRecaptchaProvider"];function q(e,t){let n=e&&typeof e=="object"?e:{},r={...t??{}};delete r.siteKey;for(let o of H){if(!Object.hasOwn(n,o))continue;let i=String(n[o]??"").trim();i?r[o]=i:delete r[o]}if(Object.hasOwn(n,"lastUpdate")){let o=Number(n.lastUpdate);Number.isFinite(o)&&o>0?r.lastUpdate=o:delete r.lastUpdate}for(let o of J)Object.hasOwn(n,o)&&(typeof n[o]=="boolean"?r[o]=n[o]:delete r[o]);return r}function Q(e){if(!e||typeof window<"u")return;let t=e.trim();if(t)try{let n=new URL(t.includes("://")?t:`https://${t}`),r=globalThis;if(r.location?.hostname)return;Object.defineProperty(r,"location",{value:n,configurable:!0,writable:!0})}catch{}}var V=(e={})=>{let t=Y(),r={siteSettings:q(e.siteSettings,t?.siteSettings),nonce:typeof e.nonce=="string"?e.nonce:t?.nonce??"",restUrl:typeof e.restUrl=="string"?e.restUrl:t?.restUrl??"",uploadUrl:typeof e.uploadUrl=="string"?e.uploadUrl:t?.uploadUrl??"",view:e.view??t?.view??"settings",plugins:t?.plugins??{},...t?.events?{events:t.events}:{}};return globalThis.WpSuite=r,Q(e.locationHref??e.siteOrigin),r},g=null,X=()=>(g||(g=d()),g),Z=()=>Promise.resolve();var ee="publisher";export{ee as PLUGIN_KEY,V as bootstrapPublisherWpSuite,d as createStore,N as getDefaultPublisherCrawlMode,$ as getPublisherPlugin,X as getStore,K as getStoreSelect,U as hasPublisherContentSyncAccess,l as hasPublisherSubscription,p as loadPublisherConfig,B as reloadConfig,z as resolvePublisherCrawlMode,M as resolvePublisherDeploymentProfile,S as resolvePublisherDeploymentProfileId,m as sanitizePublisherConfig,Z as waitForPublisherReady};
|
package/dist/store.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { PublisherCrawlMode, PublisherDeploymentProfile, PublisherRemoteCon
|
|
|
3
3
|
export declare const sanitizePublisherConfig: (input: unknown) => PublisherRemoteConfig;
|
|
4
4
|
export declare const loadPublisherConfig: () => Promise<PublisherRemoteConfig>;
|
|
5
5
|
export declare const hasPublisherSubscription: (config: PublisherRemoteConfig | null | undefined) => boolean;
|
|
6
|
+
export declare const hasPublisherContentSyncAccess: (config: PublisherRemoteConfig | null | undefined) => boolean;
|
|
6
7
|
export declare const getDefaultPublisherCrawlMode: (config: PublisherRemoteConfig | null | undefined) => PublisherCrawlMode;
|
|
7
8
|
export declare const resolvePublisherCrawlMode: (requestedMode: PublisherCrawlMode | null | undefined, config: PublisherRemoteConfig | null | undefined) => PublisherCrawlMode;
|
|
8
9
|
export declare const resolvePublisherDeploymentProfileId: (config: PublisherRemoteConfig | null | undefined, requestedProfile: string | null | undefined) => string;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
import type { SiteSettings, SubscriptionType, WpSuiteView } from "@smart-cloud/wpsuite-core";
|
|
2
|
-
export type PublisherJobCommand = "publish" | "crawl" | "deploy" | "invalidate" | "retry-timeouts" | "url";
|
|
2
|
+
export type PublisherJobCommand = "publish" | "crawl" | "deploy" | "invalidate" | "retry-timeouts" | "url" | "content-sync";
|
|
3
3
|
export type PublisherCrawlMode = "full" | "incremental";
|
|
4
|
+
export interface PublisherContentSyncScope {
|
|
5
|
+
postTypes: string[];
|
|
6
|
+
listingPaths: string[];
|
|
7
|
+
includePostTypeArchives: boolean;
|
|
8
|
+
includeTaxonomyArchives: boolean;
|
|
9
|
+
includeAuthorArchives: boolean;
|
|
10
|
+
includeDateArchives: boolean;
|
|
11
|
+
includePostsPage: boolean;
|
|
12
|
+
includeSitemapChain: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface PublisherContentProjectionTerm {
|
|
15
|
+
taxonomy: string;
|
|
16
|
+
termId: number;
|
|
17
|
+
url: string | null;
|
|
18
|
+
}
|
|
19
|
+
export type PublisherContentArchiveKind = "post-type" | "taxonomy" | "author" | "date" | "posts-page" | "listing";
|
|
20
|
+
export interface PublisherContentArchiveProjection {
|
|
21
|
+
kind: PublisherContentArchiveKind;
|
|
22
|
+
url: string;
|
|
23
|
+
postType?: string;
|
|
24
|
+
taxonomy?: string;
|
|
25
|
+
termId?: number;
|
|
26
|
+
authorId?: number;
|
|
27
|
+
year?: number;
|
|
28
|
+
month?: number;
|
|
29
|
+
day?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface PublisherContentProjection {
|
|
32
|
+
status: string;
|
|
33
|
+
url: string | null;
|
|
34
|
+
authorId: number;
|
|
35
|
+
publishedGmt: string | null;
|
|
36
|
+
modifiedGmt: string | null;
|
|
37
|
+
terms: PublisherContentProjectionTerm[];
|
|
38
|
+
sticky: boolean;
|
|
39
|
+
archives: string[];
|
|
40
|
+
archiveFamilies: PublisherContentArchiveProjection[];
|
|
41
|
+
}
|
|
42
|
+
export interface PublisherContentChangeEvent {
|
|
43
|
+
sequence: number;
|
|
44
|
+
recordedGmt: string;
|
|
45
|
+
postId: number;
|
|
46
|
+
postType: string;
|
|
47
|
+
operation: "publish" | "update" | "unpublish" | "delete" | "permalink" | "taxonomy" | "sticky";
|
|
48
|
+
before: PublisherContentProjection | null;
|
|
49
|
+
after: PublisherContentProjection | null;
|
|
50
|
+
correlationId: string | null;
|
|
51
|
+
}
|
|
4
52
|
export interface PublisherSchedulerRule {
|
|
5
53
|
id: string;
|
|
6
54
|
enabled: boolean;
|
|
@@ -9,6 +57,14 @@ export interface PublisherSchedulerRule {
|
|
|
9
57
|
crawlMode?: PublisherCrawlMode;
|
|
10
58
|
deploymentProfile?: string;
|
|
11
59
|
url?: string;
|
|
60
|
+
postTypes?: string[];
|
|
61
|
+
listingPaths?: string[];
|
|
62
|
+
includePostTypeArchives?: boolean;
|
|
63
|
+
includeTaxonomyArchives?: boolean;
|
|
64
|
+
includeAuthorArchives?: boolean;
|
|
65
|
+
includeDateArchives?: boolean;
|
|
66
|
+
includePostsPage?: boolean;
|
|
67
|
+
includeSitemapChain?: boolean;
|
|
12
68
|
}
|
|
13
69
|
export interface PublisherSchedulerConfig {
|
|
14
70
|
enabled: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smart-cloud/publisher-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Publisher Core Package",
|
|
5
5
|
"author": "Smart Cloud Solutions Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"build:types": "tsc -p tsconfig.types.json",
|
|
30
30
|
"lint": "eslint 'src/**/*.ts' --report-unused-disable-directives --max-warnings 0",
|
|
31
31
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
32
|
-
"release:npm": "
|
|
32
|
+
"release:npm": "yarn build && npm publish --access=public --registry=https://registry.npmjs.org/"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"registry": "https://registry.npmjs.org/",
|