@dbos-inc/create 0.0.4-placeholder → 1.2.8-preview
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/cli.js +12 -36
- package/dist/cli.js.map +1 -1
- package/package.json +1 -3
- package/templates/hello/dbos-config.yaml +15 -0
- package/templates/hello/jest.config.js +8 -0
- package/templates/hello/.vscode/extensions.json +0 -7
- package/templates/hello/.vscode/launch.json +0 -22
- package/templates/hello/.vscode/tasks.json +0 -17
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,6 @@ import { Command } from 'commander';
|
|
|
3
3
|
import { init } from './init.js';
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import path from "path";
|
|
6
|
-
import inquirer from "inquirer";
|
|
7
6
|
const program = new Command();
|
|
8
7
|
////////////////////////
|
|
9
8
|
/* LOCAL DEVELOPMENT */
|
|
@@ -15,39 +14,16 @@ const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "packa
|
|
|
15
14
|
program.version(packageJson.version);
|
|
16
15
|
program
|
|
17
16
|
.description('Init a DBOS application')
|
|
18
|
-
.option('-n, --appName <application-name>', 'Application name')
|
|
19
|
-
.option('-t, --template <template name>', 'Name of template application to copy')
|
|
20
|
-
.action(async (options
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const res = await inquirer.prompt([
|
|
31
|
-
{
|
|
32
|
-
type: 'input',
|
|
33
|
-
name: 'template',
|
|
34
|
-
message: 'What is the template to use for the application?',
|
|
35
|
-
// Providing a default value
|
|
36
|
-
default: 'hello',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
type: 'input',
|
|
40
|
-
name: 'appName',
|
|
41
|
-
message: 'What is the application/directory name to create?',
|
|
42
|
-
// Providing a default value
|
|
43
|
-
default: 'dbos-hello-app',
|
|
44
|
-
},
|
|
45
|
-
]);
|
|
46
|
-
appName = res.appName;
|
|
47
|
-
template = res.template;
|
|
48
|
-
}
|
|
49
|
-
await init(appName, template);
|
|
50
|
-
})
|
|
51
|
-
.allowUnknownOption(false);
|
|
52
|
-
program.parse(process.argv);
|
|
17
|
+
.option('-n, --appName <application-name>', 'Application name', 'dbos-hello-app')
|
|
18
|
+
.option('-t, --template <template name>', 'Name of template application to copy', 'hello')
|
|
19
|
+
.action(async (options) => {
|
|
20
|
+
await init(options.appName, options.template);
|
|
21
|
+
});
|
|
22
|
+
// If no arguments provided, display help by default
|
|
23
|
+
if (!process.argv.slice(2).length) {
|
|
24
|
+
program.outputHelp();
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
program.parse(process.argv);
|
|
28
|
+
}
|
|
53
29
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,wBAAwB;AACxB,wBAAwB;AACxB,wBAAwB;AAExB,8DAA8D;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAY,CAAC;AAClH,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAErC,OAAO;KACJ,WAAW,CAAC,yBAAyB,CAAC;KACtC,MAAM,CAAC,kCAAkC,EAAE,kBAAkB,EAAE,gBAAgB,CAAC;KAChF,MAAM,CAAC,gCAAgC,EAAE,sCAAsC,EAAE,OAAO,CAAC;KACzF,MAAM,CAAC,KAAK,EAAE,OAA8C,EAAE,EAAE;IAC/D,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;AAChD,CAAC,CAAC,CAAC;AAEL,oDAAoD;AACpD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC;KACI,CAAC;IACJ,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbos-inc/create",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.8-preview",
|
|
4
4
|
"description": "Tool for performing project initialization from template",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"create": "./dist/cli.js"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@types/inquirer": "^9.0.7",
|
|
23
22
|
"@types/node": "^20.6.3",
|
|
24
23
|
"@types/prompt-sync": "^4.2.3",
|
|
25
24
|
"@types/update-notifier": "^6.0.8",
|
|
@@ -33,7 +32,6 @@
|
|
|
33
32
|
"chalk": "4.1.2",
|
|
34
33
|
"commander": "^12.0.0",
|
|
35
34
|
"fast-glob": "^3.3.2",
|
|
36
|
-
"inquirer": "^9.2.16",
|
|
37
35
|
"open": "^10.1.0",
|
|
38
36
|
"prompt-sync": "^4.2.0",
|
|
39
37
|
"update-notifier": "^7.0.0",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# To enable auto-completion and validation for this file in VSCode, install the RedHat YAML extension
|
|
2
|
+
# https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
|
|
3
|
+
|
|
4
|
+
# yaml-language-server: $schema=https://raw.githubusercontent.com/dbos-inc/dbos-sdk/main/dbos-config.schema.json
|
|
5
|
+
|
|
6
|
+
database:
|
|
7
|
+
hostname: 'localhost'
|
|
8
|
+
port: 5432
|
|
9
|
+
username: 'postgres'
|
|
10
|
+
password: ${PGPASSWORD}
|
|
11
|
+
app_db_name: 'hello'
|
|
12
|
+
connectionTimeoutMillis: 3000
|
|
13
|
+
app_db_client: 'knex'
|
|
14
|
+
migrate: ['npx knex migrate:latest']
|
|
15
|
+
rollback: ['npx knex migrate:rollback']
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
"version": "0.2.0",
|
|
6
|
-
"configurations": [
|
|
7
|
-
{
|
|
8
|
-
"type": "node-terminal",
|
|
9
|
-
"request": "launch",
|
|
10
|
-
"name": "Local Debug",
|
|
11
|
-
"command": "npx dbos-sdk start",
|
|
12
|
-
"preLaunchTask": "npm: build",
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"type": "node-terminal",
|
|
16
|
-
"request": "launch",
|
|
17
|
-
"name": "Time Travel Debug",
|
|
18
|
-
"command": "npx dbos-sdk debug -x ${command:dbos-ttdbg.get-proxy-url} -u ${command:dbos-ttdbg.pick-workflow-id}",
|
|
19
|
-
"preLaunchTask": "npm: build"
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|