@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 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, command) => {
21
- if (command.args.length > 0) {
22
- throw new Error(`Unexpected arguments: ${command.args.join(',')}`);
23
- }
24
- let { appName, template } = options;
25
- if (appName || template) {
26
- appName = appName || 'dbos-hello-app';
27
- template = template || 'hello';
28
- }
29
- else {
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
@@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AAC,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": "0.0.4-placeholder",
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']
@@ -0,0 +1,8 @@
1
+ /** @type {import('ts-jest').JestConfigWithTsJest} */
2
+ module.exports = {
3
+ preset: 'ts-jest',
4
+ testEnvironment: 'node',
5
+ testRegex: '((\\.|/)(test|spec))\\.ts?$',
6
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
7
+ modulePaths: ["./"],
8
+ };
@@ -1,7 +0,0 @@
1
- {
2
- // See http://go.microsoft.com/fwlink/?LinkId=827846
3
- // for the documentation about the extensions.json format
4
- "recommendations": [
5
- "dbos-inc.dbos-ttdbg"
6
- ]
7
- }
@@ -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
- }
@@ -1,17 +0,0 @@
1
- {
2
- "version": "2.0.0",
3
- "tasks": [
4
- {
5
- "label": "npm: build",
6
- "type": "npm",
7
- "script": "build",
8
- "group": {
9
- "kind": "build",
10
- "isDefault": true
11
- },
12
- "problemMatcher": [
13
- "$tsc"
14
- ]
15
- }
16
- ]
17
- }