lowdefy 4.0.0-rc.11 → 4.0.0-rc.13
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.
- package/dist/commands/init/init.js +4 -4
- package/dist/commands/init-docker/initDocker.js +4 -4
- package/dist/commands/init-vercel/initVercel.js +4 -4
- package/dist/program.js +6 -6
- package/dist/utils/errorHandler.js +1 -1
- package/dist/utils/findOpenPort.js +1 -1
- package/dist/utils/getLowdefyYaml.js +1 -1
- package/dist/utils/getServer.js +1 -1
- package/dist/utils/runNextBuild.js +1 -1
- package/package.json +4 -4
|
@@ -22,15 +22,15 @@ async function init({ context }) {
|
|
|
22
22
|
if (fileExists) {
|
|
23
23
|
throw new Error('Cannot initialize a Lowdefy project, a "lowdefy.yaml" file already exists');
|
|
24
24
|
}
|
|
25
|
-
context.print.log(
|
|
25
|
+
context.print.log('Initializing Lowdefy project.');
|
|
26
26
|
await writeFile(lowdefyFilePath, lowdefyFile({
|
|
27
27
|
version: context.cliVersion
|
|
28
28
|
}));
|
|
29
|
-
context.print.log(
|
|
29
|
+
context.print.log("Created 'lowdefy.yaml'.");
|
|
30
30
|
await writeFile(path.resolve('./.gitignore'), `.lowdefy/**
|
|
31
31
|
.env`);
|
|
32
|
-
context.print.log(
|
|
32
|
+
context.print.log("Created '.gitignore'.");
|
|
33
33
|
await context.sendTelemetry();
|
|
34
|
-
context.print.succeed(
|
|
34
|
+
context.print.succeed('Project initialized.');
|
|
35
35
|
}
|
|
36
36
|
export default init;
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
import url from 'url';
|
|
17
17
|
import { readFile, writeFile } from '@lowdefy/node-utils';
|
|
18
18
|
async function initDocker({ context }) {
|
|
19
|
-
context.print.log(
|
|
19
|
+
context.print.log('Initializing Docker deployment.');
|
|
20
20
|
const dockerfile = await readFile(url.fileURLToPath(new URL('./Dockerfile', import.meta.url)));
|
|
21
21
|
await writeFile(path.join(context.directories.config, 'Dockerfile'), dockerfile);
|
|
22
|
-
context.print.log(
|
|
22
|
+
context.print.log("Created 'Dockerfile'.");
|
|
23
23
|
const dockerignore = await readFile(url.fileURLToPath(new URL('./.dockerignore', import.meta.url)));
|
|
24
24
|
await writeFile(path.join(context.directories.config, '.dockerignore'), dockerignore);
|
|
25
|
-
context.print.log(
|
|
25
|
+
context.print.log("Created '.dockerignore'.");
|
|
26
26
|
await context.sendTelemetry();
|
|
27
|
-
context.print.succeed(
|
|
27
|
+
context.print.succeed('Docker deployment initialized.');
|
|
28
28
|
}
|
|
29
29
|
export default initDocker;
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
import url from 'url';
|
|
17
17
|
import { readFile, writeFile } from '@lowdefy/node-utils';
|
|
18
18
|
async function initVercel({ context }) {
|
|
19
|
-
context.print.log(
|
|
19
|
+
context.print.log('Initializing Vercel deployment.');
|
|
20
20
|
const installScript = await readFile(url.fileURLToPath(new URL('./vercel.install.sh', import.meta.url)));
|
|
21
21
|
await writeFile(path.join(context.directories.config, 'deploy', 'vercel.install.sh'), installScript);
|
|
22
|
-
context.print.log(
|
|
22
|
+
context.print.log("Created 'vercel.install.sh'.");
|
|
23
23
|
const readMe = await readFile(url.fileURLToPath(new URL('./README.md', import.meta.url)));
|
|
24
24
|
await writeFile(path.join(context.directories.config, 'deploy', 'README.md'), readMe);
|
|
25
|
-
context.print.log(
|
|
25
|
+
context.print.log("Created 'README.md'.");
|
|
26
26
|
await context.sendTelemetry();
|
|
27
|
-
context.print.succeed(
|
|
27
|
+
context.print.succeed('Vercel deployment initialized.');
|
|
28
28
|
}
|
|
29
29
|
export default initVercel;
|
package/dist/program.js
CHANGED
|
@@ -42,27 +42,27 @@ const options = {
|
|
|
42
42
|
watch: new Option('--watch <paths...>', 'A list of paths to files or directories that should be watched for changes. Globs are supported. Specify each path to watch separated by spaces.'),
|
|
43
43
|
watchIgnore: new Option('--watch-ignore <paths...>', 'A list of paths to files or directories that should be ignored by the file watcher. Globs are supported. Specify each path to watch separated by spaces.')
|
|
44
44
|
};
|
|
45
|
-
program.command('build').description('Build a Lowdefy production app.').usage(
|
|
45
|
+
program.command('build').description('Build a Lowdefy production app.').usage('[options]').addOption(options.configDirectory).addOption(options.disableTelemetry).addOption(options.logLevel).option('--no-next-build', 'Do not build the Next.js server.').addOption(options.refResolver).addOption(options.serverDirectory).action(runCommand({
|
|
46
46
|
cliVersion,
|
|
47
47
|
handler: build
|
|
48
48
|
}));
|
|
49
|
-
program.command('dev').description('Start a Lowdefy development server.').usage(
|
|
49
|
+
program.command('dev').description('Start a Lowdefy development server.').usage('[options]').addOption(options.configDirectory).addOption(options.devDirectory).addOption(options.disableTelemetry).addOption(options.logLevel).option('--no-open', 'Do not open a new tab in the default browser.').addOption(options.port).addOption(options.refResolver).addOption(options.watch).addOption(options.watchIgnore).action(runCommand({
|
|
50
50
|
cliVersion,
|
|
51
51
|
handler: dev
|
|
52
52
|
}));
|
|
53
|
-
program.command('init').description('Initialize a Lowdefy project.').usage(
|
|
53
|
+
program.command('init').description('Initialize a Lowdefy project.').usage('[options]').addOption(options.disableTelemetry).addOption(options.logLevel).action(runCommand({
|
|
54
54
|
cliVersion,
|
|
55
55
|
handler: init
|
|
56
56
|
}));
|
|
57
|
-
program.command('init-docker').description('Initialize Dockerfile.').usage(
|
|
57
|
+
program.command('init-docker').description('Initialize Dockerfile.').usage('[options]').addOption(options.configDirectory).addOption(options.disableTelemetry).addOption(options.logLevel).action(runCommand({
|
|
58
58
|
cliVersion,
|
|
59
59
|
handler: initDocker
|
|
60
60
|
}));
|
|
61
|
-
program.command('init-vercel').description('Initialize Vercel deployment installation scripts.').usage(
|
|
61
|
+
program.command('init-vercel').description('Initialize Vercel deployment installation scripts.').usage('[options]').addOption(options.configDirectory).addOption(options.disableTelemetry).addOption(options.logLevel).action(runCommand({
|
|
62
62
|
cliVersion,
|
|
63
63
|
handler: initVercel
|
|
64
64
|
}));
|
|
65
|
-
program.command('start').description('Start a Lowdefy production app.').usage(
|
|
65
|
+
program.command('start').description('Start a Lowdefy production app.').usage('[options]').addOption(options.configDirectory).addOption(options.disableTelemetry).addOption(options.logLevel).addOption(options.port).addOption(options.serverDirectory).action(runCommand({
|
|
66
66
|
cliVersion,
|
|
67
67
|
handler: start
|
|
68
68
|
}));
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
45
45
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
46
46
|
*/ import net from 'net';
|
|
47
|
-
|
|
47
|
+
function findPort() {
|
|
48
48
|
return new Promise((resolve, reject)=>{
|
|
49
49
|
const server = net.createServer();
|
|
50
50
|
server.on('error', reject);
|
|
@@ -36,7 +36,7 @@ async function getLowdefyYaml({ configDirectory, requiresLowdefyYaml }) {
|
|
|
36
36
|
throw new Error(`Could not parse "lowdefy.yaml" file. Received error ${error.message}.`);
|
|
37
37
|
}
|
|
38
38
|
if (!lowdefy.lowdefy) {
|
|
39
|
-
throw new Error(
|
|
39
|
+
throw new Error('No version specified in "lowdefy.yaml" file. Specify a version in the "lowdefy" field.');
|
|
40
40
|
}
|
|
41
41
|
if (!type.isString(lowdefy.lowdefy)) {
|
|
42
42
|
throw new Error(`Version number specified in "lowdefy.yaml" file should be a string. Received ${JSON.stringify(lowdefy.lowdefy)}.`);
|
package/dist/utils/getServer.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
function createStdOutLineHandler({ context }) {
|
|
17
17
|
function stdOutLineHandler(line) {
|
|
18
18
|
// Matches next build output of form: ┌ λ / 261 B 403 kB
|
|
19
|
-
const match = line.match(/┌ λ \/\s*\d* [a-zA-Z]*\s*(\d* [a-zA-Z]*)/);
|
|
19
|
+
const match = line.match(/┌ λ \/\s*\d* [a-zA-Z]*\s*(\d* [a-zA-Z]*)/u);
|
|
20
20
|
if (match) {
|
|
21
21
|
context.print.info(`Home page first load JS size: ${match[1]}.`);
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lowdefy",
|
|
3
|
-
"version": "4.0.0-rc.
|
|
3
|
+
"version": "4.0.0-rc.13",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy CLI",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"test": "FORCE_COLOR=3 node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@lowdefy/helpers": "4.0.0-rc.
|
|
43
|
-
"@lowdefy/node-utils": "4.0.0-rc.
|
|
42
|
+
"@lowdefy/helpers": "4.0.0-rc.13",
|
|
43
|
+
"@lowdefy/node-utils": "4.0.0-rc.13",
|
|
44
44
|
"axios": "1.5.1",
|
|
45
45
|
"commander": "11.0.0",
|
|
46
46
|
"decompress": "4.2.1",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "e0e9a9b4e4e15c899de64d6736fa6e83cf56f8e4"
|
|
68
68
|
}
|