@forestadmin/datasource-customizer
Advanced tools
Comparing version 1.1.2-alpha.1 to 1.2.0
@@ -1,6 +0,6 @@ | ||
import { Operator } from '@forestadmin/datasource-toolkit'; | ||
import { CollectionSchema, Operator } from '@forestadmin/datasource-toolkit'; | ||
import { ActionDefinition } from './decorators/actions/types/actions'; | ||
import { ComputedDefinition } from './decorators/computed/types'; | ||
import { HookHandler, HookPosition, HookType, HooksContext } from './decorators/hook/types'; | ||
import { OneToManyEmbeddedDefinition } from './types'; | ||
import { OneToManyEmbeddedDefinition, Plugin } from './types'; | ||
import { OperatorDefinition } from './decorators/operators-emulate/types'; | ||
@@ -11,8 +11,21 @@ import { SearchDefinition } from './decorators/search/types'; | ||
import { WriteDefinition } from './decorators/write/types'; | ||
import DataSourceCustomizer from './datasource-customizer'; | ||
import DecoratorsStack from './decorators/decorators-stack'; | ||
export default class CollectionCustomizer<S extends TSchema = TSchema, N extends TCollectionName<S> = TCollectionName<S>> { | ||
private readonly name; | ||
private readonly dataSourceCustomizer; | ||
private readonly stack; | ||
constructor(stack: DecoratorsStack, name: string); | ||
readonly name: string; | ||
get schema(): CollectionSchema; | ||
constructor(dataSourceCustomizer: DataSourceCustomizer<S>, stack: DecoratorsStack, name: string); | ||
/** | ||
* Load a plugin on the collection. | ||
* @param plugin reference to the plugin function | ||
* @param options options to pass to the plugin | ||
* @example | ||
* import { createFileField } from '@forestadmin/plugin-s3'; | ||
* | ||
* collection.use(createFileField, { fieldname: 'avatar' }), | ||
*/ | ||
use<Options>(plugin: Plugin<Options>, options?: Options): this; | ||
/** | ||
* Disable count in list view pagination for improved performance. | ||
@@ -251,15 +264,5 @@ * | ||
addHook<P extends HookPosition, T extends HookType>(position: P, type: T, handler: HookHandler<HooksContext<S, N>[P][T]>): this; | ||
/** | ||
* Add a relation between two collections. | ||
* @param name name of the new relation | ||
* @param definition definition of the new relation | ||
* @example | ||
* .addRelation('author', { | ||
* type: 'ManyToOne', | ||
* foreignCollection: 'persons', | ||
* foreignKey: 'authorId' | ||
* }); | ||
*/ | ||
private addRelation; | ||
private pushRelation; | ||
private pushCustomization; | ||
} | ||
//# sourceMappingURL=collection-customizer.d.ts.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const datasource_toolkit_1 = require("@forestadmin/datasource-toolkit"); | ||
const add_external_relation_1 = __importDefault(require("./plugins/add-external-relation")); | ||
const import_field_1 = __importDefault(require("./plugins/import-field")); | ||
class CollectionCustomizer { | ||
constructor(stack, name) { | ||
constructor(dataSourceCustomizer, stack, name) { | ||
this.dataSourceCustomizer = dataSourceCustomizer; | ||
this.name = name; | ||
this.stack = stack; | ||
} | ||
get schema() { | ||
return this.stack.hook.getCollection(this.name).schema; | ||
} | ||
/** | ||
* Load a plugin on the collection. | ||
* @param plugin reference to the plugin function | ||
* @param options options to pass to the plugin | ||
* @example | ||
* import { createFileField } from '@forestadmin/plugin-s3'; | ||
* | ||
* collection.use(createFileField, { fieldname: 'avatar' }), | ||
*/ | ||
use(plugin, options) { | ||
return this.pushCustomization(async () => { | ||
await plugin(this.dataSourceCustomizer, this, options); | ||
}); | ||
} | ||
/** | ||
* Disable count in list view pagination for improved performance. | ||
@@ -16,4 +39,5 @@ * | ||
disableCount() { | ||
this.stack.schema.getCollection(this.name).overrideSchema({ countable: false }); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.schema.getCollection(this.name).overrideSchema({ countable: false }); | ||
}); | ||
} | ||
@@ -29,35 +53,3 @@ /** | ||
importField(name, options) { | ||
const collection = this.stack.lateComputed.getCollection(this.name); | ||
const schema = datasource_toolkit_1.CollectionUtils.getFieldSchema(collection, options.path); | ||
this.addField(name, { | ||
columnType: schema.columnType, | ||
defaultValue: schema.defaultValue, | ||
dependencies: [options.path], | ||
getValues: records => records.map(r => datasource_toolkit_1.RecordUtils.getFieldValue(r, options.path)), | ||
enumValues: schema.enumValues, | ||
}); | ||
if (!schema.isReadOnly && !options.readonly) { | ||
this.stack.write.getCollection(this.name).replaceFieldWriting(name, value => { | ||
const path = options.path.split(':'); | ||
const writingPath = {}; | ||
path.reduce((nestedPath, currentPath, index) => { | ||
nestedPath[currentPath] = index === path.length - 1 ? value : {}; | ||
return nestedPath[currentPath]; | ||
}, writingPath); | ||
return writingPath; | ||
}); | ||
} | ||
if (schema.isReadOnly && options.readonly === false) { | ||
throw new Error(`Readonly option should not be false because the field "${options.path}" is not writable`); | ||
} | ||
for (const operator of schema.filterOperators) { | ||
const handler = value => ({ field: options.path, operator, value }); | ||
this.replaceFieldOperator(name, operator, handler); | ||
} | ||
if (schema.isSortable) { | ||
this.replaceFieldSorting(name, [ | ||
{ field: options.path, ascending: true }, | ||
]); | ||
} | ||
return this; | ||
return this.use(import_field_1.default, { name, ...options }); | ||
} | ||
@@ -72,4 +64,5 @@ /** | ||
renameField(oldName, newName) { | ||
this.stack.renameField.getCollection(this.name).renameField(oldName, newName); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.renameField.getCollection(this.name).renameField(oldName, newName); | ||
}); | ||
} | ||
@@ -83,6 +76,7 @@ /** | ||
removeField(...names) { | ||
const collection = this.stack.publication.getCollection(this.name); | ||
for (const name of names) | ||
collection.changeFieldVisibility(name, false); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
const collection = this.stack.publication.getCollection(this.name); | ||
for (const name of names) | ||
collection.changeFieldVisibility(name, false); | ||
}); | ||
} | ||
@@ -102,7 +96,8 @@ /** | ||
addAction(name, definition) { | ||
this.stack.action | ||
.getCollection(this.name) | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
.addAction(name, definition); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.action | ||
.getCollection(this.name) | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
.addAction(name, definition); | ||
}); | ||
} | ||
@@ -121,17 +116,18 @@ /** | ||
addField(name, definition) { | ||
const collectionBeforeRelations = this.stack.earlyComputed.getCollection(this.name); | ||
const collectionAfterRelations = this.stack.lateComputed.getCollection(this.name); | ||
const canBeComputedBeforeRelations = definition.dependencies.every(field => { | ||
try { | ||
return !!datasource_toolkit_1.CollectionUtils.getFieldSchema(collectionBeforeRelations, field); | ||
} | ||
catch { | ||
return false; | ||
} | ||
return this.pushCustomization(async () => { | ||
const collectionBeforeRelations = this.stack.earlyComputed.getCollection(this.name); | ||
const collectionAfterRelations = this.stack.lateComputed.getCollection(this.name); | ||
const canBeComputedBeforeRelations = definition.dependencies.every(field => { | ||
try { | ||
return !!datasource_toolkit_1.CollectionUtils.getFieldSchema(collectionBeforeRelations, field); | ||
} | ||
catch { | ||
return false; | ||
} | ||
}); | ||
const collection = canBeComputedBeforeRelations | ||
? collectionBeforeRelations | ||
: collectionAfterRelations; | ||
collection.registerComputed(name, definition); | ||
}); | ||
const collection = canBeComputedBeforeRelations | ||
? collectionBeforeRelations | ||
: collectionAfterRelations; | ||
collection.registerComputed(name, definition); | ||
return this; | ||
} | ||
@@ -147,4 +143,5 @@ /** | ||
addFieldValidation(name, operator, value) { | ||
this.stack.validation.getCollection(this.name).addValidation(name, { operator, value }); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.validation.getCollection(this.name).addValidation(name, { operator, value }); | ||
}); | ||
} | ||
@@ -160,3 +157,3 @@ /** | ||
addManyToOneRelation(name, foreignCollection, options) { | ||
this.addRelation(name, { | ||
return this.pushRelation(name, { | ||
type: 'ManyToOne', | ||
@@ -167,3 +164,2 @@ foreignCollection, | ||
}); | ||
return this; | ||
} | ||
@@ -179,3 +175,3 @@ /** | ||
addOneToManyRelation(name, foreignCollection, options) { | ||
this.addRelation(name, { | ||
return this.pushRelation(name, { | ||
type: 'OneToMany', | ||
@@ -186,3 +182,2 @@ foreignCollection, | ||
}); | ||
return this; | ||
} | ||
@@ -198,3 +193,3 @@ /** | ||
addOneToOneRelation(name, foreignCollection, options) { | ||
this.addRelation(name, { | ||
return this.pushRelation(name, { | ||
type: 'OneToOne', | ||
@@ -205,3 +200,2 @@ foreignCollection, | ||
}); | ||
return this; | ||
} | ||
@@ -221,3 +215,3 @@ /** | ||
addManyToManyRelation(name, foreignCollection, throughCollection, options) { | ||
this.addRelation(name, { | ||
return this.pushRelation(name, { | ||
type: 'ManyToMany', | ||
@@ -231,3 +225,2 @@ foreignCollection, | ||
}); | ||
return this; | ||
} | ||
@@ -250,9 +243,3 @@ /** | ||
addExternalRelation(name, definition) { | ||
const { schema } = this.stack.action.getCollection(this.name); | ||
const primaryKeys = datasource_toolkit_1.SchemaUtils.getPrimaryKeys(schema); | ||
return this.addField(name, { | ||
dependencies: definition.dependencies ?? primaryKeys, | ||
columnType: [definition.schema], | ||
getValues: async (records, context) => Promise.all(records.map(async (record) => definition.listRecords(record, context))), | ||
}); | ||
return this.use(add_external_relation_1.default, { name, ...definition }); | ||
} | ||
@@ -271,4 +258,5 @@ /** | ||
addSegment(name, definition) { | ||
this.stack.segment.getCollection(this.name).addSegment(name, definition); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.segment.getCollection(this.name).addSegment(name, definition); | ||
}); | ||
} | ||
@@ -283,4 +271,5 @@ /** | ||
emulateFieldSorting(name) { | ||
this.stack.sortEmulate.getCollection(this.name).emulateFieldSorting(name); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.sortEmulate.getCollection(this.name).emulateFieldSorting(name); | ||
}); | ||
} | ||
@@ -302,6 +291,7 @@ /** | ||
replaceFieldSorting(name, equivalentSort) { | ||
this.stack.sortEmulate | ||
.getCollection(this.name) | ||
.replaceFieldSorting(name, equivalentSort); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.sortEmulate | ||
.getCollection(this.name) | ||
.replaceFieldSorting(name, equivalentSort); | ||
}); | ||
} | ||
@@ -316,13 +306,14 @@ /** | ||
emulateFieldFiltering(name) { | ||
const collection = this.stack.lateOpEmulate.getCollection(this.name); | ||
const field = collection.schema.fields[name]; | ||
if (typeof field.columnType === 'string') { | ||
const operators = datasource_toolkit_1.allowedOperatorsForColumnType[field.columnType]; | ||
for (const operator of operators) { | ||
if (!field.filterOperators?.has(operator)) { | ||
this.emulateFieldOperator(name, operator); | ||
return this.pushCustomization(async () => { | ||
const collection = this.stack.lateOpEmulate.getCollection(this.name); | ||
const field = collection.schema.fields[name]; | ||
if (typeof field.columnType === 'string') { | ||
const operators = datasource_toolkit_1.allowedOperatorsForColumnType[field.columnType]; | ||
for (const operator of operators) { | ||
if (!field.filterOperators?.has(operator)) { | ||
this.emulateFieldOperator(name, operator); | ||
} | ||
} | ||
} | ||
} | ||
return this; | ||
}); | ||
} | ||
@@ -338,7 +329,8 @@ /** | ||
emulateFieldOperator(name, operator) { | ||
const collection = this.stack.earlyOpEmulate.getCollection(this.name).schema.fields[name] | ||
? this.stack.earlyOpEmulate.getCollection(this.name) | ||
: this.stack.lateOpEmulate.getCollection(this.name); | ||
collection.emulateFieldOperator(name, operator); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
const collection = this.stack.earlyOpEmulate.getCollection(this.name).schema.fields[name] | ||
? this.stack.earlyOpEmulate.getCollection(this.name) | ||
: this.stack.lateOpEmulate.getCollection(this.name); | ||
collection.emulateFieldOperator(name, operator); | ||
}); | ||
} | ||
@@ -368,7 +360,8 @@ /** | ||
replaceFieldOperator(name, operator, replacer) { | ||
const collection = this.stack.earlyOpEmulate.getCollection(this.name).schema.fields[name] | ||
? this.stack.earlyOpEmulate.getCollection(this.name) | ||
: this.stack.lateOpEmulate.getCollection(this.name); | ||
collection.replaceFieldOperator(name, operator, replacer); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
const collection = this.stack.earlyOpEmulate.getCollection(this.name).schema.fields[name] | ||
? this.stack.earlyOpEmulate.getCollection(this.name) | ||
: this.stack.lateOpEmulate.getCollection(this.name); | ||
collection.replaceFieldOperator(name, operator, replacer); | ||
}); | ||
} | ||
@@ -386,4 +379,5 @@ /** | ||
replaceFieldWriting(name, definition) { | ||
this.stack.write.getCollection(this.name).replaceFieldWriting(name, definition); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.write.getCollection(this.name).replaceFieldWriting(name, definition); | ||
}); | ||
} | ||
@@ -399,27 +393,23 @@ /** | ||
replaceSearch(definition) { | ||
this.stack.search | ||
.getCollection(this.name) | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
.replaceSearch(definition); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.search | ||
.getCollection(this.name) | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
.replaceSearch(definition); | ||
}); | ||
} | ||
addHook(position, type, handler) { | ||
this.stack.hook | ||
.getCollection(this.name) | ||
.addHook(position, type, handler); | ||
return this; | ||
return this.pushCustomization(async () => { | ||
this.stack.hook | ||
.getCollection(this.name) | ||
.addHook(position, type, handler); | ||
}); | ||
} | ||
/** | ||
* Add a relation between two collections. | ||
* @param name name of the new relation | ||
* @param definition definition of the new relation | ||
* @example | ||
* .addRelation('author', { | ||
* type: 'ManyToOne', | ||
* foreignCollection: 'persons', | ||
* foreignKey: 'authorId' | ||
* }); | ||
*/ | ||
addRelation(name, definition) { | ||
this.stack.relation.getCollection(this.name).addRelation(name, definition); | ||
pushRelation(name, definition) { | ||
return this.pushCustomization(async () => { | ||
this.stack.relation.getCollection(this.name).addRelation(name, definition); | ||
}); | ||
} | ||
pushCustomization(customization) { | ||
this.stack.queueCustomization(customization); | ||
return this; | ||
@@ -429,2 +419,2 @@ } | ||
exports.default = CollectionCustomizer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi1jdXN0b21pemVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbGxlY3Rpb24tY3VzdG9taXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHdFQU95QztBQWN6QyxNQUFxQixvQkFBb0I7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UFhLENBQUMsVUFBd0MsQ0FBQyxDQUFDO1FBQzdELENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztJQUVELE9BQU8sQ0FDTCxRQUFXLEVBQ1gsSUFBTyxFQUNQLE9BQThDO1FBRTlDLE9BQU8sSUFBSSxDQUFDLGlCQUFpQixDQUFDLEtBQUssSUFBSSxFQUFFO1lBQ3ZDLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSTtpQkFDWixhQUFhLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQztpQkFDeEIsT0FBTyxDQUFDLFFBQVEsRUFBRSxJQUFJLEVBQUUsT0FBcUQsQ0FBQyxDQUFDO1FBQ3BGLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztJQUVPLFlBQVksQ0FBQyxJQUFZLEVBQUUsVUFBOEI7UUFDL0QsT0FBTyxJQUFJLENBQUMsaUJBQWlCLENBQUMsS0FBSyxJQUFJLEVBQUU7WUFDdkMsSUFBSSxDQUFDLEtBQUssQ0FBQyxRQUFRLENBQUMsYUFBYSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxXQUFXLENBQUMsSUFBSSxFQUFFLFVBQVUsQ0FBQyxDQUFDO1FBQzdFLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztJQUVPLGlCQUFpQixDQUFDLGFBQWtDO1FBQzFELElBQUksQ0FBQyxLQUFLLENBQUMsa0JBQWtCLENBQUMsYUFBYSxDQUFDLENBQUM7UUFFN0MsT0FBTyxJQUFJLENBQUM7SUFDZCxDQUFDO0NBQ0Y7QUF0Y0QsdUNBc2NDIn0= |
@@ -1,4 +0,4 @@ | ||
import { DataSource, DataSourceFactory, Logger } from '@forestadmin/datasource-toolkit'; | ||
import { DataSource, DataSourceFactory, DataSourceSchema, Logger } from '@forestadmin/datasource-toolkit'; | ||
import { ChartDefinition } from './decorators/chart/types'; | ||
import { DataSourceOptions } from './types'; | ||
import { DataSourceOptions, Plugin } from './types'; | ||
import { TCollectionName, TSchema } from './templates'; | ||
@@ -19,3 +19,10 @@ import CollectionCustomizer from './collection-customizer'; | ||
private readonly stack; | ||
private customizations; | ||
/** | ||
* Retrieve schema of the agent | ||
*/ | ||
get schema(): DataSourceSchema; | ||
/** | ||
* Get list of customizable collections | ||
*/ | ||
get collections(): CollectionCustomizer<S>[]; | ||
constructor(); | ||
@@ -50,2 +57,17 @@ /** | ||
customizeCollection<N extends TCollectionName<S>>(name: N, handle: (collection: CollectionCustomizer<S, N>) => unknown): this; | ||
/** | ||
* Get given collection by name | ||
* @param name name of the collection | ||
*/ | ||
getCollection<N extends TCollectionName<S>>(name: N): CollectionCustomizer<S, N>; | ||
/** | ||
* Load a plugin across all collections | ||
* @param plugin instance of the plugin | ||
* @param options options which need to be passed to the plugin | ||
* @example | ||
* import { advancedExport } from '@forestadmin/plugin-advanced-export'; | ||
* | ||
* dataSourceCustomizer.use(advancedExportPlugin, { format: 'xlsx' }); | ||
*/ | ||
use<Options>(plugin: Plugin<Options>, options?: Options): this; | ||
getDataSource(logger: Logger): Promise<DataSource>; | ||
@@ -52,0 +74,0 @@ getFactory(): DataSourceFactory; |
@@ -24,3 +24,2 @@ "use strict"; | ||
constructor() { | ||
this.customizations = []; | ||
this.compositeDataSource = new composite_datasource_1.default(); | ||
@@ -30,2 +29,14 @@ this.stack = new decorators_stack_1.default(this.compositeDataSource); | ||
/** | ||
* Retrieve schema of the agent | ||
*/ | ||
get schema() { | ||
return this.stack.hook.schema; | ||
} | ||
/** | ||
* Get list of customizable collections | ||
*/ | ||
get collections() { | ||
return this.stack.hook.collections.map(c => this.getCollection(c.name)); | ||
} | ||
/** | ||
* Add a datasource | ||
@@ -36,3 +47,3 @@ * @param factory the datasource to add | ||
addDataSource(factory, options) { | ||
this.customizations.push(async (logger) => { | ||
this.stack.queueCustomization(async (logger) => { | ||
let dataSource = await factory(logger); | ||
@@ -66,3 +77,3 @@ if (options?.include || options?.exclude) { | ||
addChart(name, definition) { | ||
this.customizations.push(async () => { | ||
this.stack.queueCustomization(async () => { | ||
this.stack.chart.addChart(name, definition); | ||
@@ -81,6 +92,24 @@ }); | ||
customizeCollection(name, handle) { | ||
this.customizations.push(async () => { | ||
if (this.stack.dataSource.getCollection(name)) { | ||
handle(new collection_customizer_1.default(this.stack, name)); | ||
} | ||
handle(this.getCollection(name)); | ||
return this; | ||
} | ||
/** | ||
* Get given collection by name | ||
* @param name name of the collection | ||
*/ | ||
getCollection(name) { | ||
return new collection_customizer_1.default(this, this.stack, name); | ||
} | ||
/** | ||
* Load a plugin across all collections | ||
* @param plugin instance of the plugin | ||
* @param options options which need to be passed to the plugin | ||
* @example | ||
* import { advancedExport } from '@forestadmin/plugin-advanced-export'; | ||
* | ||
* dataSourceCustomizer.use(advancedExportPlugin, { format: 'xlsx' }); | ||
*/ | ||
use(plugin, options) { | ||
this.stack.queueCustomization(async () => { | ||
await plugin(this, null, options); | ||
}); | ||
@@ -90,5 +119,3 @@ return this; | ||
async getDataSource(logger) { | ||
while (this.customizations.length) { | ||
await this.customizations.shift()(logger); // eslint-disable-line no-await-in-loop | ||
} | ||
await this.stack.applyQueuedCustomizations(logger); | ||
return this.stack.dataSource; | ||
@@ -104,2 +131,2 @@ } | ||
exports.default = DataSourceCustomizer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YXNvdXJjZS1jdXN0b21pemVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2RhdGFzb3VyY2UtY3VzdG9taXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUtBLG9GQUEyRDtBQUMzRCw2RkFBb0U7QUFDcEUscUZBQTREO0FBQzVELGdHQUFzRztBQUN0RywyRkFBNEY7QUFDNUYsMEVBQWlEO0FBRWpEOzs7Ozs7Ozs7R0FTRztBQUNILE1BQXFCLG9CQUFvQjtJQUt2QztRQUZRLG1CQUFjLEdBQTBDLE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M7SUFDL0IsQ0FBQztJQUVELFVBQVU7UUFDUixPQUFPLEtBQUssRUFBRSxNQUFjLEVBQUUsRUFBRSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDOUQsQ0FBQztJQUVELEtBQUssQ0FBQyx1QkFBdUIsQ0FBQyxXQUFtQixFQUFFLGVBQXVCO1FBQ3hFLE9BQU8sMEJBQWUsQ0FBQyx1QkFBdUIsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksRUFBRSxXQUFXLEVBQUUsZUFBZSxDQUFDLENBQUM7SUFDaEcsQ0FBQztDQUNGO0FBN0hELHVDQTZIQyJ9 |
@@ -1,2 +0,2 @@ | ||
import { DataSource } from '@forestadmin/datasource-toolkit'; | ||
import { DataSource, Logger } from '@forestadmin/datasource-toolkit'; | ||
import ActionCollectionDecorator from './actions/collection'; | ||
@@ -40,4 +40,14 @@ import ChartDataSourceDecorator from './chart/datasource'; | ||
dataSource: DataSource; | ||
private customizations; | ||
constructor(dataSource: DataSource); | ||
queueCustomization(customization: (logger: Logger) => Promise<void>): void; | ||
/** | ||
* Apply all customizations | ||
* Plugins may queue new customizations, or call other plugins which will queue customizations. | ||
* | ||
* This method will be called recursively and clears the queue at each recursion to ensure | ||
* that all customizations are applied in the right order. | ||
*/ | ||
applyQueuedCustomizations(logger: Logger): Promise<void>; | ||
} | ||
//# sourceMappingURL=decorators-stack.d.ts.map |
@@ -25,2 +25,3 @@ "use strict"; | ||
constructor(dataSource) { | ||
this.customizations = []; | ||
let last = dataSource; | ||
@@ -58,4 +59,22 @@ /* eslint-disable no-multi-assign */ | ||
} | ||
queueCustomization(customization) { | ||
this.customizations.push(customization); | ||
} | ||
/** | ||
* Apply all customizations | ||
* Plugins may queue new customizations, or call other plugins which will queue customizations. | ||
* | ||
* This method will be called recursively and clears the queue at each recursion to ensure | ||
* that all customizations are applied in the right order. | ||
*/ | ||
async applyQueuedCustomizations(logger) { | ||
const queuedCustomizations = this.customizations.slice(); | ||
this.customizations.length = 0; | ||
while (queuedCustomizations.length) { | ||
await queuedCustomizations.shift()(logger); // eslint-disable-line no-await-in-loop | ||
await this.applyQueuedCustomizations(logger); // eslint-disable-line no-await-in-loop | ||
} | ||
} | ||
} | ||
exports.default = DecoratorsStack; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVjb3JhdG9ycy1zdGFjay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZWNvcmF0b3JzL2RlY29yYXRvcnMtc3RhY2sudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFDQSxzRUFBNkQ7QUFDN0Qsb0VBQTBEO0FBQzFELHVFQUFnRTtBQUNoRSxrRkFBeUQ7QUFDekQsb0VBQTBEO0FBQzFELG1FQUF3RDtBQUN4RCxnRkFBaUY7QUFDakYsZ0ZBQWlGO0FBQ2pGLGdGQUFpRjtBQUNqRix1RUFBZ0U7QUFDaEUsMkVBQXVFO0FBQ3ZFLHNFQUE0RDtBQUM1RCxzRUFBNEQ7QUFDNUQsdUVBQThEO0FBQzlELDRFQUF1RTtBQUN2RSwwRUFBb0U7QUFDcEUscUVBQTBEO0FBRTFELE1BQXFCLGVBQWU7SUFzQmxDLFlBQVksVUFBc0I7UUFDaEMsSUFBSSxJQUFJLEdBQWUsVUFBVSxDQUFDO1FBRWxDLG9DQUFvQztRQUNwQyxtRkFBbUY7UUFDbkYsSUFBSSxHQUFHLElBQUksQ0FBQyxLQUFLLEdBQUcsSUFBSSw4QkFBbUIsQ0FBQyxJQUFJLEVBQUUsb0JBQXdCLENBQUMsQ0FBQztRQUU1RSw2RkFBNkY7UUFDN0Ysc0VBQXNFO1FBQ3RFLDJGQUEyRjtRQUMzRixJQUFJLEdBQUcsSUFBSSxDQUFDLGFBQWEsR0FBRyxJQUFJLDhCQUFtQixDQUFDLElBQUksRUFBRSxvQ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UUsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLHVDQUF1QztZQUNuRixNQUFNLElBQUksQ0FBQyx5QkFBeUIsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDLHVDQUF1QztTQUN0RjtJQUNILENBQUM7Q0FDRjtBQXBGRCxrQ0FvRkMifQ== |
import { PrimitiveTypes } from '@forestadmin/datasource-toolkit'; | ||
import { TCollectionName, TFieldName, TRow, TSchema } from './templates'; | ||
import CollectionCustomizationContext from './context/collection-context'; | ||
import CollectionCustomizer from './collection-customizer'; | ||
import DataSourceCustomizer from './datasource-customizer'; | ||
export declare type OneToManyEmbeddedDefinition<S extends TSchema = TSchema, N extends TCollectionName<S> = TCollectionName<S>> = { | ||
@@ -16,2 +18,3 @@ schema: Record<string, PrimitiveTypes>; | ||
}; | ||
export declare type Plugin<Options> = (dataSourceCustomizer: DataSourceCustomizer<any>, collectionCustomizer: CollectionCustomizer<any, any>, options?: Options) => Promise<void>; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@forestadmin/datasource-customizer", | ||
"version": "1.1.2-alpha.1", | ||
"version": "1.2.0", | ||
"main": "dist/index.js", | ||
@@ -32,3 +32,3 @@ "license": "GPL-3.0", | ||
"dependencies": { | ||
"@forestadmin/datasource-toolkit": "1.0.1-alpha.1", | ||
"@forestadmin/datasource-toolkit": "1.0.0", | ||
"luxon": "^2.3.0", | ||
@@ -35,0 +35,0 @@ "object-hash": "^3.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
412678
125
4758
1
+ Added@forestadmin/datasource-toolkit@1.0.0(transitive)
- Removed@forestadmin/datasource-toolkit@1.0.1-alpha.1(transitive)