4.40.3 • Published 6 months ago

@parameter1/base-cms-section-query-generator v4.40.3

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

BaseCMS section query generator

This utility can be used to regenerate the BaseCMS content sectionQuery field.

Usage

To use, import the package and await the exported function, supplying the relevant tenant key and an active (connected) MongoDB client.

Note: You must use the @parameter1/base-cms-db MongoDB client/factory.

const buildFn = require('@parameter1/base-cms-section-query-generator');
const { createMongoClient } = require('@parameter1/base-cms-db');

const { NODE_ENV, MONGO_DSN } = process.env;
const appname = `myapp v1.0 (env: ${NODE_ENV})`;

const client = createMongoClient(MONGO_DSN, { appname });
await client.connect();

await buildFn({ tenant: 'my_tenant_key', client });

await client.close();

Arguments

OptionDescriptionDefault value
tenant(Required) A BaseCMS tenant key
client(Required) A connected MongoDB client
context(Optional) Additional context for the BaseDB instance{}
logger(Optional) A function to log debug information toconsole.log
maxDate(Option) A Date indicating how far in the future to check for schedules2038-01-01
createIndexes(Optional) A Boolean indicating if indexes should be builtfalse
4.40.3

6 months ago

4.4.0

1 year ago

4.5.12

1 year ago

4.0.0

1 year ago

4.0.2

1 year ago

4.0.0-beta.0

1 year ago

4.0.0-alpha.0

1 year ago

3.0.0

2 years ago

2.90.4

2 years ago

2.75.1

2 years ago

2.75.0

2 years ago

2.74.0

2 years ago