@gasket/plugin-metadata
Advanced tools
Comparing version 6.46.8 to 7.0.0--canary-1.0
@@ -1,27 +0,29 @@ | ||
import type { MaybeAsync } from '@gasket/engine'; | ||
import type { MaybeAsync } from '@gasket/core'; | ||
import type { PackageJson } from 'create-gasket-app'; | ||
export interface ModuleData<Module = any> { | ||
/** Name of preset */ | ||
name: string, | ||
name: string; | ||
/** Actual module content */ | ||
module: Module, | ||
module: Module; | ||
/** Package.json contents */ | ||
package?: object, | ||
package?: PackageJson; | ||
/** Resolved version */ | ||
version?: string, | ||
version?: string; | ||
/** Path to the root of package */ | ||
path?: string, | ||
path?: string; | ||
/** Name of module which requires this module */ | ||
from?: string, | ||
from?: string; | ||
/** Range by which this module was required */ | ||
range?: string, | ||
range?: string; | ||
/** Path to a doc file or URL */ | ||
link?: string | ||
link?: string; | ||
description?: string; | ||
} | ||
@@ -32,3 +34,3 @@ | ||
/** Description of modules supporting this plugin */ | ||
modules?: Array<DetailData> | ||
modules?: Array<DetailData>; | ||
} | ||
@@ -39,18 +41,18 @@ | ||
/** Commands enabled by this plugin */ | ||
commands?: Array<DetailData>, | ||
commands?: Array<DetailData>; | ||
/** App files and directories used by plugin */ | ||
structures?: Array<DetailData>, | ||
structures?: Array<DetailData>; | ||
/** Configuration options for gasket.config.js */ | ||
configurations?: Array<ConfigurationsData> | ||
configurations?: Array<ConfigurationsData>; | ||
/** Description of lifecycles invoked by plugin */ | ||
lifecycles?: Array<LifecycleData>, | ||
lifecycles?: Array<LifecycleData>; | ||
/** Description of modules supporting this plugin */ | ||
modules?: Array<string | DetailData>, | ||
modules?: Array<string | DetailData>; | ||
/** Description of guides for this plugin */ | ||
guides?: Array<DetailData> | ||
guides?: Array<DetailData>; | ||
} | ||
@@ -61,6 +63,6 @@ | ||
/** Presets that this preset extends */ | ||
presets?: Array<PresetData>, | ||
presets?: Array<PresetData>; | ||
/** Plugins this preset uses */ | ||
plugins: Array<PluginData>, | ||
plugins: Array<PluginData>; | ||
} | ||
@@ -71,9 +73,9 @@ | ||
/** Name of the the module or element */ | ||
name: string, | ||
name: string; | ||
/** Description of the module or element */ | ||
description?: string, | ||
description?: string; | ||
/** Path to a doc file or URL */ | ||
link?: string | ||
link?: string; | ||
} | ||
@@ -84,9 +86,12 @@ | ||
/** Executing method from the engine */ | ||
method: string, | ||
method?: string; | ||
/** Lifecycle from which this one is invoked */ | ||
parent?: string, | ||
parent?: string; | ||
/** Command from which this lifecycle is invoked */ | ||
command?: string | ||
command?: string; | ||
after?: string; | ||
from?: string; | ||
deprecated?: boolean; | ||
} | ||
@@ -97,3 +102,4 @@ | ||
/** Configuration property type */ | ||
type: string | ||
type: string; | ||
default?: string | string[] | boolean | number; | ||
} | ||
@@ -104,22 +110,28 @@ | ||
/** App and main package data */ | ||
app: AppData, | ||
app: AppData; | ||
/** Preset data with dependency hierarchy */ | ||
presets: Array<PresetData>, | ||
presets: Array<PresetData>; | ||
/** Flat list of registered plugin data */ | ||
plugins: Array<PluginData>, | ||
plugins: Array<PluginData>; | ||
/** Supporting module data */ | ||
modules: Array<ModuleData> | ||
modules: Array<ModuleData>; | ||
} | ||
declare module '@gasket/engine' { | ||
declare module '@gasket/core' { | ||
export interface HookExecTypes { | ||
metadata(origData: PluginData): MaybeAsync<PluginData> | ||
metadata(origData: PluginData): MaybeAsync<PluginData>; | ||
} | ||
export interface Gasket { | ||
metadata: Metadata | ||
// TODO: do not attach to Gasket - switch to actions | ||
metadata?: Metadata; | ||
} | ||
} | ||
export default { | ||
name: '@gasket/plugin-metadata', | ||
hooks: {} | ||
}; |
@@ -15,2 +15,3 @@ const cloneDeep = require('lodash.clonedeep'); | ||
hooks: { | ||
// TODO: convert to a getMetadata action | ||
async init(gasket) { | ||
@@ -67,3 +68,3 @@ const { loader, config } = gasket; | ||
modules: [ | ||
'@gasket/cli' | ||
'@gasket/core' | ||
] | ||
@@ -70,0 +71,0 @@ }; |
const isFunction = require('lodash.isfunction'); | ||
const isObject = require('lodash.isobject'); | ||
const { pluginIdentifier, presetIdentifier } = require('@gasket/resolve'); | ||
// Shortcuts | ||
const isPlugin = name => pluginIdentifier.isValidFullName(name); | ||
const isPreset = name => presetIdentifier.isValidFullName(name); | ||
const rePluginPresets = /@gasket.+(plugin|preset)/; | ||
@@ -63,3 +60,3 @@ /** | ||
Object.keys(app.package.dependencies) | ||
.filter(name => !isPlugin(name) && !isPreset(name)) | ||
.filter(name => !rePluginPresets.test(name)) | ||
.forEach(name => { | ||
@@ -66,0 +63,0 @@ const range = app.package.dependencies[name]; |
{ | ||
"name": "@gasket/plugin-metadata", | ||
"version": "6.46.8", | ||
"version": "7.0.0--canary-1.0", | ||
"description": "Adds metadata to gasket lifecycles", | ||
"main": "lib", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
@@ -18,3 +18,3 @@ "files": [ | ||
"posttest": "npm run lint", | ||
"prepack": "npm run docs", | ||
"prepack:skip": "npm run docs", | ||
"docs": "jsdoc2md --plugin @godaddy/dmd --files lib/*.js > docs/api.md" | ||
@@ -44,3 +44,3 @@ }, | ||
"dependencies": { | ||
"@gasket/resolve": "^6.46.8", | ||
"@gasket/resolve": "^7.0.0-next.21", | ||
"lodash.clonedeep": "^4.5.0", | ||
@@ -51,3 +51,3 @@ "lodash.isfunction": "^3.0.9", | ||
"devDependencies": { | ||
"@gasket/engine": "^6.46.8", | ||
"@gasket/core": "^7.0.0--canary-1.0", | ||
"@godaddy/dmd": "^1.0.4", | ||
@@ -75,3 +75,3 @@ "cross-env": "^7.0.3", | ||
}, | ||
"gitHead": "a4b0d22e57ca4c3e5b944d7153ac25c30ca094f3" | ||
"gitHead": "58bd9162c377330143dd26c6ee72cf3d9e1775e0" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
24476
395
1
+ Added@gasket/resolve@7.0.0-next.21(transitive)
- Removed@gasket/resolve@6.47.5(transitive)