webiny 0.8.32 → 6.0.0-rc.0

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.
Files changed (177) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -15
  3. package/admin/aco.d.ts +2 -0
  4. package/admin/aco.js +4 -0
  5. package/admin/aco.js.map +1 -0
  6. package/admin/buildParams.d.ts +1 -0
  7. package/admin/buildParams.js +3 -0
  8. package/admin/buildParams.js.map +1 -0
  9. package/admin/cms/entry/editor.d.ts +11 -0
  10. package/admin/cms/entry/editor.js +13 -0
  11. package/admin/cms/entry/editor.js.map +1 -0
  12. package/admin/cms/entry/list.d.ts +2 -0
  13. package/admin/cms/entry/list.js +4 -0
  14. package/admin/cms/entry/list.js.map +1 -0
  15. package/admin/cms/fieldRenderers/dynamicZone.d.ts +7 -0
  16. package/admin/cms/fieldRenderers/dynamicZone.js +9 -0
  17. package/admin/cms/fieldRenderers/dynamicZone.js.map +1 -0
  18. package/admin/cms/fieldRenderers/object.d.ts +1 -0
  19. package/admin/cms/fieldRenderers/object.js +3 -0
  20. package/admin/cms/fieldRenderers/object.js.map +1 -0
  21. package/admin/cms/lexical.d.ts +16 -0
  22. package/admin/cms/lexical.js +17 -0
  23. package/admin/cms/lexical.js.map +1 -0
  24. package/admin/cms.d.ts +8 -0
  25. package/admin/cms.js +9 -0
  26. package/admin/cms.js.map +1 -0
  27. package/admin/configs.d.ts +1 -0
  28. package/admin/configs.js +3 -0
  29. package/admin/configs.js.map +1 -0
  30. package/admin/envConfig.d.ts +1 -0
  31. package/admin/envConfig.js +3 -0
  32. package/admin/envConfig.js.map +1 -0
  33. package/admin/form.d.ts +11 -0
  34. package/admin/form.js +12 -0
  35. package/admin/form.js.map +1 -0
  36. package/admin/graphqlClient.d.ts +1 -0
  37. package/admin/graphqlClient.js +3 -0
  38. package/admin/graphqlClient.js.map +1 -0
  39. package/admin/lexical.d.ts +15 -0
  40. package/admin/lexical.js +16 -0
  41. package/admin/lexical.js.map +1 -0
  42. package/admin/localStorage.d.ts +2 -0
  43. package/admin/localStorage.js +4 -0
  44. package/admin/localStorage.js.map +1 -0
  45. package/admin/router.d.ts +4 -0
  46. package/admin/router.js +6 -0
  47. package/admin/router.js.map +1 -0
  48. package/admin/security.d.ts +9 -0
  49. package/admin/security.js +11 -0
  50. package/admin/security.js.map +1 -0
  51. package/admin/tenancy.d.ts +2 -0
  52. package/admin/tenancy.js +4 -0
  53. package/admin/tenancy.js.map +1 -0
  54. package/admin/ui.d.ts +62 -0
  55. package/admin/ui.js +64 -0
  56. package/admin/ui.js.map +1 -0
  57. package/admin/website-builder/lexical.d.ts +17 -0
  58. package/admin/website-builder/lexical.js +18 -0
  59. package/admin/website-builder/lexical.js.map +1 -0
  60. package/admin/website-builder/page/editor.d.ts +2 -0
  61. package/admin/website-builder/page/editor.js +4 -0
  62. package/admin/website-builder/page/editor.js.map +1 -0
  63. package/admin/website-builder/page/list.d.ts +1 -0
  64. package/admin/website-builder/page/list.js +3 -0
  65. package/admin/website-builder/page/list.js.map +1 -0
  66. package/admin/website-builder/redirect/list.d.ts +1 -0
  67. package/admin/website-builder/redirect/list.js +3 -0
  68. package/admin/website-builder/redirect/list.js.map +1 -0
  69. package/admin/website-builder.d.ts +2 -0
  70. package/admin/website-builder.js +4 -0
  71. package/admin/website-builder.js.map +1 -0
  72. package/admin.d.ts +13 -0
  73. package/admin.js +15 -0
  74. package/admin.js.map +1 -0
  75. package/ambient/images.d.ts +22 -0
  76. package/api/buildParams.d.ts +1 -0
  77. package/api/buildParams.js +3 -0
  78. package/api/buildParams.js.map +1 -0
  79. package/api/cms/entry.d.ts +40 -0
  80. package/api/cms/entry.js +41 -0
  81. package/api/cms/entry.js.map +1 -0
  82. package/api/cms/group.d.ts +10 -0
  83. package/api/cms/group.js +11 -0
  84. package/api/cms/group.js.map +1 -0
  85. package/api/cms/model.d.ts +18 -0
  86. package/api/cms/model.js +17 -0
  87. package/api/cms/model.js.map +1 -0
  88. package/api/eventPublisher.d.ts +1 -0
  89. package/api/eventPublisher.js +3 -0
  90. package/api/eventPublisher.js.map +1 -0
  91. package/api/graphql.d.ts +3 -0
  92. package/api/graphql.js +5 -0
  93. package/api/graphql.js.map +1 -0
  94. package/api/keyValueStore.d.ts +1 -0
  95. package/api/keyValueStore.js +3 -0
  96. package/api/keyValueStore.js.map +1 -0
  97. package/api/logger.d.ts +1 -0
  98. package/api/logger.js +3 -0
  99. package/api/logger.js.map +1 -0
  100. package/api/security/apiKey.d.ts +7 -0
  101. package/api/security/apiKey.js +9 -0
  102. package/api/security/apiKey.js.map +1 -0
  103. package/api/security/authentication.d.ts +1 -0
  104. package/api/security/authentication.js +3 -0
  105. package/api/security/authentication.js.map +1 -0
  106. package/api/security/role.d.ts +5 -0
  107. package/api/security/role.js +7 -0
  108. package/api/security/role.js.map +1 -0
  109. package/api/security/user.d.ts +6 -0
  110. package/api/security/user.js +8 -0
  111. package/api/security/user.js.map +1 -0
  112. package/api/security.d.ts +6 -0
  113. package/api/security.js +8 -0
  114. package/api/security.js.map +1 -0
  115. package/api/system.d.ts +1 -0
  116. package/api/system.js +3 -0
  117. package/api/system.js.map +1 -0
  118. package/api/tasks.d.ts +2 -0
  119. package/api/tasks.js +4 -0
  120. package/api/tasks.js.map +1 -0
  121. package/api/tenancy.d.ts +6 -0
  122. package/api/tenancy.js +8 -0
  123. package/api/tenancy.js.map +1 -0
  124. package/api/tenant-manager.d.ts +2 -0
  125. package/api/tenant-manager.js +3 -0
  126. package/api/tenant-manager.js.map +1 -0
  127. package/api/website-builder/nextjs.d.ts +1 -0
  128. package/api/website-builder/nextjs.js +3 -0
  129. package/api/website-builder/nextjs.js.map +1 -0
  130. package/api/website-builder/page.d.ts +12 -0
  131. package/api/website-builder/page.js +14 -0
  132. package/api/website-builder/page.js.map +1 -0
  133. package/api/website-builder/redirect.d.ts +8 -0
  134. package/api/website-builder/redirect.js +10 -0
  135. package/api/website-builder/redirect.js.map +1 -0
  136. package/api.d.ts +1 -0
  137. package/api.js +3 -0
  138. package/api.js.map +1 -0
  139. package/cli/command.d.ts +1 -0
  140. package/cli/command.js +3 -0
  141. package/cli/command.js.map +1 -0
  142. package/cli/index.d.ts +2 -0
  143. package/cli/index.js +4 -0
  144. package/cli/index.js.map +1 -0
  145. package/configs/tsconfig.json +52 -0
  146. package/extensions.d.ts +8 -0
  147. package/extensions.js +10 -0
  148. package/extensions.js.map +1 -0
  149. package/global.d.ts +8 -0
  150. package/global.js +14 -0
  151. package/global.js.map +1 -0
  152. package/infra/admin.d.ts +7 -0
  153. package/infra/admin.js +9 -0
  154. package/infra/admin.js.map +1 -0
  155. package/infra/api.d.ts +7 -0
  156. package/infra/api.js +9 -0
  157. package/infra/api.js.map +1 -0
  158. package/infra/core.d.ts +6 -0
  159. package/infra/core.js +8 -0
  160. package/infra/core.js.map +1 -0
  161. package/infra/index.d.ts +8 -0
  162. package/infra/index.js +10 -0
  163. package/infra/index.js.map +1 -0
  164. package/package.json +108 -33
  165. package/.gitattributes +0 -39
  166. package/.npmignore +0 -162
  167. package/bin/webiny.js +0 -7
  168. package/index.js +0 -94
  169. package/lib/app.js +0 -27
  170. package/lib/boot/checkRequirements.js +0 -144
  171. package/lib/boot/checkUpdates.js +0 -55
  172. package/lib/boot/setup.js +0 -26
  173. package/lib/menu.js +0 -31
  174. package/lib/navigation.js +0 -134
  175. package/lib/plugin.js +0 -28
  176. package/lib/webiny.js +0 -287
  177. package/postinstall.js +0 -26
package/.gitattributes DELETED
@@ -1,39 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
-
3
- * text=auto
4
-
5
- *.html text diff=html
6
- *.css text
7
- *.js text
8
- *.sql text
9
- *.php text
10
- *.md text
11
- *.txt text
12
- *.tpl text diff=html
13
- *.json text
14
- *.pdf diff=astextplain
15
- *.h text
16
- *.sh text
17
- *.less text
18
- *.svg text
19
- *.yml text
20
- *.xml text
21
- Makefile text
22
- Procfile text
23
- *.c text
24
- *.cfg text
25
- *.coffee text
26
- *.ini text
27
-
28
- *.png binary
29
- *.jpg binary
30
- *.gif binary
31
- *.bmp binary
32
- *.bz2 binary
33
- *.jar binary
34
- *.jpe binary
35
- *.tar.gz binary
36
- *.zip binary
37
-
38
- *.gitattributes text
39
- *.gitignore text
package/.npmignore DELETED
@@ -1,162 +0,0 @@
1
- .idea/
2
- node_modules/*
3
- package-lock.json
4
- *.pydevproject
5
- .project
6
- .metadata
7
- tmp/
8
- test/
9
- *.tmp
10
- *.bak
11
- *.swp
12
- *~.nib
13
- local.properties
14
- .classpathbitbu
15
- .settings/
16
- .loadpath
17
-
18
- # External tool builders
19
- .externalToolBuilders/
20
-
21
- # Locally stored "Eclipse launch configurations"
22
- *.launch
23
-
24
- # CDT-specific
25
- .cproject
26
-
27
- # PDT-specific
28
- .buildpath
29
-
30
-
31
- #################
32
- ## Visual Studio
33
- #################
34
-
35
- ## Ignore Visual Studio temporary files, build results, and
36
- ## files generated by popular Visual Studio add-ons.
37
-
38
- # User-specific files
39
- *.suo
40
- *.user
41
- *.sln.docstates
42
-
43
- # Build results
44
- [Dd]ebug/
45
- [Rr]elease/
46
- *_i.c
47
- *_p.c
48
- *.ilk
49
- *.meta
50
- *.obj
51
- *.pch
52
- *.pdb
53
- *.pgc
54
- *.pgd
55
- *.rsp
56
- *.sbr
57
- *.tlb
58
- *.tli
59
- *.tlh
60
- *.tmp
61
- *.vspscc
62
- .builds
63
- *.dotCover
64
-
65
- ## TODO: If you have NuGet Package Restore enabled, uncomment this
66
- #packages/
67
-
68
- # Visual C++ cache files
69
- ipch/
70
- *.aps
71
- *.ncb
72
- *.opensdf
73
- *.sdf
74
-
75
- # Visual Studio profiler
76
- *.psess
77
- *.vsp
78
-
79
- # ReSharper is a .NET coding add-in
80
- _ReSharper*
81
-
82
- # Installshield output folder
83
- [Ee]xpress
84
-
85
- # DocProject is a documentation generator add-in
86
- DocProject/buildhelp/
87
- DocProject/Help/*.HxT
88
- DocProject/Help/*.HxC
89
- DocProject/Help/*.hhc
90
- DocProject/Help/*.hhk
91
- DocProject/Help/*.hhp
92
- DocProject/Help/Html2
93
- DocProject/Help/html
94
-
95
- # Click-Once directory
96
- publish
97
-
98
- # Others
99
- [Oo]bj
100
- sql
101
- TestResults
102
- *.Cache
103
- ClientBin
104
- stylecop.*
105
- ~$*
106
- *.dbmdl
107
- Generated_Code #added for RIA/Silverlight projects
108
-
109
- # Backup & report files from converting an old project file to a newer
110
- # Visual Studio version. Backup files are not needed, because we have git ;-)
111
- _UpgradeReport_Files/
112
- Backup*/
113
- UpgradeLog*.XML
114
-
115
-
116
-
117
- ############
118
- ## Windows
119
- ############
120
-
121
- # Windows image file caches
122
- Thumbs.db
123
-
124
- # Folder config file
125
- Desktop.ini
126
-
127
-
128
- #############
129
- ## Python
130
- #############
131
-
132
- *.py[co]
133
-
134
- # Packages
135
- *.egg
136
- *.egg-info
137
- dist
138
- eggs
139
- parts
140
- var
141
- sdist
142
- develop-eggs
143
- .installed.cfg
144
-
145
- # Installer logs
146
- pip-log.txt
147
-
148
- # Unit test / coverage reports
149
- .coverage
150
- .tox
151
-
152
- #Translations
153
- *.mo
154
-
155
- #Mr Developer
156
- .mr.developer.cfg
157
-
158
- # Mac crap
159
- .DS_Store
160
-
161
- # SVN
162
- .svn
package/bin/webiny.js DELETED
@@ -1,7 +0,0 @@
1
- #! /usr/bin/env node
2
- if (!process.env.PWD) {
3
- process.env.PWD = __dirname;
4
- }
5
-
6
- const Webiny = require('..');
7
- new Webiny().run();
package/index.js DELETED
@@ -1,94 +0,0 @@
1
- #! /usr/bin/env node
2
- const program = require('commander');
3
- const _ = require('lodash');
4
- const chalk = require('chalk');
5
- const checkUpdates = require('./lib/boot/checkUpdates');
6
- const setup = require('./lib/boot/setup');
7
- const Menu = require('./lib/navigation');
8
- const Webiny = require('./lib/webiny');
9
-
10
- class WebinyCli {
11
- constructor() {
12
- this.version = JSON.parse(Webiny.readFile(__dirname + '/package.json')).version;
13
-
14
- program
15
- .version(this.version)
16
- .arguments('<cmd>')
17
- .option('-t, --task [name]', 'Task to execute (renders menu if not specified).', 'menu')
18
- .option('-a, --app [name]', 'App to execute task on (specify multiple times for multiple apps).', this.collectApps, [])
19
- .option('--all', 'Select all apps.')
20
- .option('--show-timestamps [format]', 'Show timestamps next to each console message')
21
- .action(function (cmd = 'menu') {
22
- program.task = cmd;
23
- });
24
-
25
- const stdin = process.stdin;
26
- stdin.setRawMode(true);
27
- stdin.resume();
28
- process.stdin.write('Loading plugins...');
29
- Webiny.getPlugins();
30
- process.stdout.clearLine();
31
- process.stdout.cursorTo(0);
32
-
33
- program.parse(process.argv);
34
- }
35
-
36
- collectApps(val, collection) {
37
- collection.push(val);
38
- return collection;
39
- }
40
-
41
- run() {
42
- if (program.showTimestamps) {
43
- require('console-stamp')(console, _.isString(program.showTimestamps) ? program.showTimestamps : 'HH:MM:ss.l');
44
- }
45
-
46
- if (program.task === 'menu') {
47
- checkUpdates(this.version).then(() => {
48
- Webiny.log('---------------------------------------------');
49
- Webiny.info('Webiny CLI ' + chalk.cyan('v' + this.version));
50
- Webiny.log('---------------------------------------------');
51
- const checkRequirements = require('./lib/boot/checkRequirements');
52
- if (!checkRequirements.firstRun()) {
53
- const menu = new Menu();
54
- return menu.render();
55
- }
56
-
57
- try {
58
- // First run will check the system requirements and setup the platform
59
- Webiny.log('Checking requirements...');
60
- checkRequirements.requirements();
61
- Webiny.success("Great, all the requirements are in order!");
62
- Webiny.log("\nSetting up the platform...");
63
- setup().then(answers => {
64
- Webiny.log(`\n-------------------------------------`);
65
- Webiny.success('Platform setup is now completed!');
66
- Webiny.info(`You are now ready to run your first development build! Select "Develop!" from the menu and hit ENTER.\nAfter the development build is completed, navigate to ` + chalk.magenta(answers.domain + '/admin') + ` to see your brand new administration system!`);
67
- Webiny.log('-------------------------------------');
68
- const menu = new Menu();
69
- return menu.render();
70
- });
71
- } catch (err) {
72
- Webiny.exclamation('Setup failed with the following problem:', err);
73
- process.exit(1);
74
- }
75
- });
76
- } else {
77
- const apps = Webiny.getApps();
78
- program.apps = program.all ? apps : _.filter(apps, a => program.app.indexOf(a.getName()) > -1);
79
- this.runTask(program.task, program);
80
- }
81
- }
82
-
83
- runTask(task, config) {
84
- const plugin = Webiny.getPlugins()[task];
85
- if (plugin) {
86
- return plugin.runTask(config, () => process.exit(0), (task, config) => this.runTask(task, config));
87
- }
88
-
89
- Webiny.failure(`Plugin "${task}" was not found!`);
90
- process.exit(1);
91
- }
92
- }
93
-
94
- module.exports = WebinyCli;
package/lib/app.js DELETED
@@ -1,27 +0,0 @@
1
- const _ = require('lodash');
2
-
3
- class App {
4
- constructor(app, jsApp, sourceDir) {
5
- this.app = app;
6
- this.jsApp = jsApp;
7
- this.sourceDir = sourceDir;
8
- }
9
-
10
- getName() {
11
- return this.app + '.' + this.jsApp;
12
- }
13
-
14
- getAppName() {
15
- return this.app;
16
- }
17
-
18
- getPath() {
19
- return this.app + '_' + this.jsApp;
20
- }
21
-
22
- getSourceDir() {
23
- return this.sourceDir;
24
- }
25
- }
26
-
27
- module.exports = App;
@@ -1,144 +0,0 @@
1
- const fs = require('fs-extra');
2
- const chalk = require('chalk');
3
- const Webiny = require('./../webiny');
4
- const _ = require('lodash');
5
-
6
- function getOsRequirements() {
7
- const requirements = {
8
- satisfied: true,
9
- deps: {
10
- php: {
11
- name: 'PHP 7',
12
- satisfied: false,
13
- cmd: 'php -v',
14
- reqVersion: '7.'
15
- },
16
- mongo: {
17
- name: 'MongoDB',
18
- satisfied: false,
19
- cmd: 'mongo --version',
20
- reqVersion: '3.'
21
- },
22
- composer: {
23
- name: 'Composer',
24
- satisfied: false,
25
- cmd: 'composer --version',
26
- alternateCmd: 'php ' + fs.realpathSync(process.env.PWD) + '/composer.phar --version'
27
- },
28
- wkhtmltopdf: {
29
- name: 'wkhtmltopdf',
30
- satisfied: false,
31
- cmd: 'wkhtmltopdf --version'
32
- },
33
- yarn: {
34
- name: 'Yarn',
35
- satisfied: false,
36
- cmd: 'yarn -V',
37
- alternateCmd: () => {
38
- let output, data;
39
- // Check if Yarn exists as local module
40
- try {
41
- output = Webiny.shellExecute('npm ls yarn --json', {stdio: 'pipe'}).toString();
42
- data = JSON.parse(output);
43
- } catch (err) {
44
- if (err.stdout) {
45
- data = JSON.parse(err.stdout);
46
- }
47
-
48
- if (!_.has(data, 'dependencies.yarn')) {
49
- // Check if Yarn exists as a global module
50
- try {
51
- output = Webiny.shellExecute('npm ls yarn --json --global', {stdio: 'pipe'}).toString();
52
- data = JSON.parse(output);
53
- } catch (err) {
54
- if (err.stdout) {
55
- data = JSON.parse(err.stdout);
56
- }
57
- }
58
- }
59
- }
60
-
61
- return _.has(data, 'dependencies.yarn') ? _.get(data, 'dependencies.yarn.version') : null;
62
- }
63
- }
64
- }
65
- };
66
-
67
- function runCustomCommand(cmd, config) {
68
- config.version = cmd();
69
- if (!config.version) {
70
- requirements.satisfied = false;
71
- } else {
72
- config.satisfied = true;
73
- }
74
- }
75
-
76
- const grep = " | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}[\.|-][0-9a-z]{1,4}'";
77
-
78
- _.each(requirements.deps, function (config, key) {
79
- if (typeof config.cmd === 'function') {
80
- runCustomCommand(config.cmd, config);
81
- return;
82
- }
83
-
84
- try {
85
- config.version = Webiny.shellExecute(config.cmd + grep, {stdio: 'pipe'}).toString().split("\n")[0];
86
- config.satisfied = !config.reqVersion || config.version.startsWith(config.reqVersion);
87
- } catch (err) {
88
- if (key === 'mongo' && _.includes(err.message, 'Failed global initialization')) {
89
- Webiny.failure('\nFailed to check MongoDB version: ' + Webiny.chalk.cyan(err.message.split('\n')[1]) + '\n');
90
- }
91
- if (config.alternateCmd) {
92
- if (typeof config.alternateCmd === 'function') {
93
- runCustomCommand(config.alternateCmd, config);
94
- return;
95
- }
96
-
97
- try {
98
- config.version = Webiny.shellExecute(config.alternateCmd + grep, {stdio: 'pipe'}).toString().split("\n")[0];
99
- config.satisfied = !config.reqVersion || config.version.startsWith(config.reqVersion);
100
- return;
101
- } catch (err) {
102
- // Do nothing
103
- }
104
- }
105
-
106
- requirements.satisfied = false;
107
- }
108
- });
109
-
110
- return requirements;
111
- }
112
-
113
-
114
- module.exports = {
115
- firstRun: function () {
116
- return !Webiny.folderExists(Webiny.projectRoot('Apps')) || !Webiny.folderExists(Webiny.projectRoot('Configs'));
117
- },
118
- getRequirements: getOsRequirements,
119
- requirements: function () {
120
- const isWin = /^win/.test(process.platform);
121
-
122
- if (isWin) {
123
- throw new Error('Sorry, we do not support Windows at the moment!');
124
- }
125
-
126
- const req = getOsRequirements();
127
- Webiny.log('-------------------------------------------------');
128
- _.each(req.deps, function (config, key) {
129
- const msg = config.version ? config.name + ' (installed version: ' + chalk.cyan(config.version) + ')' : config.name;
130
- if (config.satisfied) {
131
- Webiny.success(msg);
132
- } else {
133
- Webiny.failure(msg);
134
- }
135
- });
136
- Webiny.log('-------------------------------------------------');
137
-
138
- if (!req.satisfied) {
139
- throw new Error('Please install the missing dependencies and run Webiny again!');
140
- }
141
-
142
- return true;
143
- }
144
- };
@@ -1,55 +0,0 @@
1
- const fetch = require('node-fetch');
2
- const chalk = require('chalk');
3
- const Webiny = require('./../webiny');
4
-
5
- let timeout = null;
6
-
7
- module.exports = function (currentVersion) {
8
- const stdin = process.stdin;
9
- return new Promise(function (resolve, reject) {
10
- stdin.setRawMode(true);
11
- stdin.resume();
12
- process.stdin.write('Checking for updates... (hit ' + chalk.magenta('ESC') + ' or ' + chalk.magenta('ENTER') + ' to skip)');
13
-
14
- function keyPress(buffer) {
15
- const key = buffer.toJSON().data[0];
16
- if (key === 13 || key === 27) {
17
- clearTimeout(timeout);
18
- timeout = null;
19
- stdin.removeListener('data', keyPress);
20
- process.stdout.clearLine();
21
- process.stdout.cursorTo(0);
22
- resolve();
23
- }
24
- }
25
-
26
- stdin.on('data', keyPress);
27
-
28
- timeout = setTimeout(function () {
29
- process.stdout.clearLine();
30
- process.stdout.cursorTo(0);
31
- stdin.removeListener('data', keyPress);
32
- process.stdout.write('Checking for updates...');
33
- fetch('http://registry.npmjs.org/-/package/webiny/dist-tags').then(function (res) {
34
- process.stdout.clearLine();
35
- process.stdout.cursorTo(0);
36
- res.json().then(function (json) {
37
- const latestVersion = json.latest;
38
- if (latestVersion !== currentVersion) {
39
- const blue = chalk.blue;
40
- const green = chalk.green;
41
- const grey = chalk.grey;
42
-
43
- const line = '---------------------------------------------';
44
-
45
- Webiny.log('\n' + green(line));
46
- Webiny.success('Update available: ' + green(latestVersion) + grey(' (current: ' + currentVersion + ')'));
47
- Webiny.info('Run ' + blue('yarn add webiny@' + latestVersion) + ' to update');
48
- Webiny.log(green(line) + '\n');
49
- }
50
- resolve();
51
- });
52
- }).catch(reject);
53
- }, 2000);
54
- });
55
- };
package/lib/boot/setup.js DELETED
@@ -1,26 +0,0 @@
1
- const Webiny = require('./../webiny');
2
-
3
- module.exports = function () {
4
- return new Promise(resolve => {
5
- // Create project structure
6
- const composer = {
7
- "require": {
8
- "webiny/webiny": "dev-master"
9
- },
10
- "minimum-stability": "dev",
11
- "prefer-stable": true
12
- };
13
-
14
- Webiny.writeFile(Webiny.projectRoot('composer.json'), JSON.stringify(composer, null, 4));
15
- Webiny.log('Running composer to install PHP dependencies...');
16
- Webiny.shellExecute('composer install');
17
- Webiny.success('Composer installation completed!');
18
-
19
- Webiny.log('Installing JS dependencies...');
20
- Webiny.shellExecute('cd ' + Webiny.projectRoot('Apps/Webiny') + ' && yarn install');
21
-
22
- Webiny.copy(Webiny.projectRoot('Apps/Webiny/Setup/.'), Webiny.projectRoot());
23
-
24
- return Webiny.getPlugins(true)['setup'].runWizard({}, resolve);
25
- });
26
- };
package/lib/menu.js DELETED
@@ -1,31 +0,0 @@
1
- class Menu {
2
- constructor(title) {
3
- this.title = title;
4
- this.lineBefore = false;
5
- this.lineAfter = false;
6
- }
7
-
8
- getTitle() {
9
- return this.title;
10
- }
11
-
12
- addLineBefore() {
13
- this.lineBefore = true;
14
- return this;
15
- }
16
-
17
- addLineAfter() {
18
- this.lineAfter = true;
19
- return this;
20
- }
21
-
22
- getLineBefore() {
23
- return this.lineBefore;
24
- }
25
-
26
- getLineAfter() {
27
- return this.lineAfter;
28
- }
29
- }
30
-
31
- module.exports = Menu;