@decohere/scaffold 0.0.1-dev.100

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 (208) hide show
  1. package/commonjs/src/add-api.action.js +37 -0
  2. package/commonjs/src/add-api.command.js +39 -0
  3. package/commonjs/src/add.command.js +22 -0
  4. package/commonjs/src/add.module.js +24 -0
  5. package/commonjs/src/auth0-configure.action.js +28 -0
  6. package/commonjs/src/auth0-configure.command.js +24 -0
  7. package/commonjs/src/auth0-login.action.js +28 -0
  8. package/commonjs/src/auth0-login.command.js +23 -0
  9. package/commonjs/src/auth0.command.js +22 -0
  10. package/commonjs/src/auth0.module.js +28 -0
  11. package/commonjs/src/cli.js +7 -0
  12. package/commonjs/src/create.command.js +22 -0
  13. package/commonjs/src/create.module.js +24 -0
  14. package/commonjs/src/domain/prompt.js +62 -0
  15. package/commonjs/src/index.js +48 -0
  16. package/commonjs/src/models/compose.model.js +258 -0
  17. package/commonjs/src/models/config-yaml.model.js +86 -0
  18. package/commonjs/src/models/const.js +30 -0
  19. package/commonjs/src/models/dev-container.model.js +172 -0
  20. package/commonjs/src/models/docker-image.model.js +277 -0
  21. package/commonjs/src/models/env-file.model.js +48 -0
  22. package/commonjs/src/models/gitignore.model.js +48 -0
  23. package/commonjs/src/models/launch-json.model.js +70 -0
  24. package/commonjs/src/models/package-json.model.js +156 -0
  25. package/commonjs/src/models/project.model.js +132 -0
  26. package/commonjs/src/models/source-file.js +4 -0
  27. package/commonjs/src/models/tsconfig.model.js +32 -0
  28. package/commonjs/src/models/vitest-config.model.js +33 -0
  29. package/commonjs/src/models/vscode-settings.model.js +29 -0
  30. package/commonjs/src/program.js +64 -0
  31. package/commonjs/src/resolve-target-dir.js +17 -0
  32. package/commonjs/src/services/scaffold.service.js +60 -0
  33. package/commonjs/src/version.js +55 -0
  34. package/commonjs/src/webapi/api-name.js +93 -0
  35. package/commonjs/src/webapi/auth0-commands.js +250 -0
  36. package/commonjs/src/webapi/authorize-scopes.js +79 -0
  37. package/commonjs/src/webapi/cli-options.js +99 -0
  38. package/commonjs/src/webapi/const.js +54 -0
  39. package/commonjs/src/webapi/create-api.js +265 -0
  40. package/commonjs/src/webapi/devcontainer/codebase-rag-mcp.js +164 -0
  41. package/commonjs/src/webapi/devcontainer/codebase-rag-mcp.ts +182 -0
  42. package/commonjs/src/webapi/devcontainer/host-scripts.js +50 -0
  43. package/commonjs/src/webapi/devcontainer/templates/codebase-rag.env.example +3 -0
  44. package/commonjs/src/webapi/devcontainer/templates/initialize.sh +169 -0
  45. package/commonjs/src/webapi/devcontainer/templates/post-create.sh +35 -0
  46. package/commonjs/src/webapi/devcontainer/templates/post-start.sh +65 -0
  47. package/commonjs/src/webapi/devcontainer/templates/tty-prompt.sh +38 -0
  48. package/commonjs/src/webapi/features/auth.feature.js +408 -0
  49. package/commonjs/src/webapi/features/auth0-cli.js +472 -0
  50. package/commonjs/src/webapi/features/biome-format.js +47 -0
  51. package/commonjs/src/webapi/features/database.feature.js +432 -0
  52. package/commonjs/src/webapi/features/finalize.feature.js +93 -0
  53. package/commonjs/src/webapi/features/postman.feature.js +322 -0
  54. package/commonjs/src/webapi/models/api-package-json.model.js +58 -0
  55. package/commonjs/src/webapi/models/auth-config.model.js +24 -0
  56. package/commonjs/src/webapi/models/controller-source-file.model.js +190 -0
  57. package/commonjs/src/webapi/models/github-ci.model.js +193 -0
  58. package/commonjs/src/webapi/models/main-source-file.model.js +165 -0
  59. package/commonjs/src/webapi/models/production-dockerfile.model.js +75 -0
  60. package/commonjs/src/webapi/models/sample-files.model.js +58 -0
  61. package/commonjs/src/webapi/models/webapi-image.model.js +25 -0
  62. package/commonjs/src/webapi/postman/hello-openapi.js +173 -0
  63. package/commonjs/src/webapi/postman/local-view.js +182 -0
  64. package/commonjs/src/webapi/postman/openapi-to-postman.js +200 -0
  65. package/commonjs/src/webapi/workspace-readme.js +109 -0
  66. package/commonjs/src/webapi.action.js +28 -0
  67. package/commonjs/src/webapi.command.js +43 -0
  68. package/es6/src/add-api.action.js +27 -0
  69. package/es6/src/add-api.command.js +29 -0
  70. package/es6/src/add.command.js +12 -0
  71. package/es6/src/add.module.js +14 -0
  72. package/es6/src/auth0-configure.action.js +18 -0
  73. package/es6/src/auth0-configure.command.js +14 -0
  74. package/es6/src/auth0-login.action.js +18 -0
  75. package/es6/src/auth0-login.command.js +13 -0
  76. package/es6/src/auth0.command.js +12 -0
  77. package/es6/src/auth0.module.js +18 -0
  78. package/es6/src/cli.js +3 -0
  79. package/es6/src/create.command.js +12 -0
  80. package/es6/src/create.module.js +14 -0
  81. package/es6/src/domain/prompt.js +41 -0
  82. package/es6/src/index.js +9 -0
  83. package/es6/src/models/compose.model.js +254 -0
  84. package/es6/src/models/config-yaml.model.js +74 -0
  85. package/es6/src/models/const.js +20 -0
  86. package/es6/src/models/dev-container.model.js +162 -0
  87. package/es6/src/models/docker-image.model.js +235 -0
  88. package/es6/src/models/env-file.model.js +44 -0
  89. package/es6/src/models/gitignore.model.js +38 -0
  90. package/es6/src/models/launch-json.model.js +60 -0
  91. package/es6/src/models/package-json.model.js +141 -0
  92. package/es6/src/models/project.model.js +117 -0
  93. package/es6/src/models/source-file.js +1 -0
  94. package/es6/src/models/tsconfig.model.js +22 -0
  95. package/es6/src/models/vitest-config.model.js +23 -0
  96. package/es6/src/models/vscode-settings.model.js +19 -0
  97. package/es6/src/program.js +46 -0
  98. package/es6/src/resolve-target-dir.js +7 -0
  99. package/es6/src/services/scaffold.service.js +50 -0
  100. package/es6/src/version.js +34 -0
  101. package/es6/src/webapi/api-name.js +57 -0
  102. package/es6/src/webapi/auth0-commands.js +185 -0
  103. package/es6/src/webapi/authorize-scopes.js +55 -0
  104. package/es6/src/webapi/cli-options.js +34 -0
  105. package/es6/src/webapi/const.js +21 -0
  106. package/es6/src/webapi/create-api.js +245 -0
  107. package/es6/src/webapi/devcontainer/codebase-rag-mcp.js +154 -0
  108. package/es6/src/webapi/devcontainer/codebase-rag-mcp.ts +182 -0
  109. package/es6/src/webapi/devcontainer/host-scripts.js +29 -0
  110. package/es6/src/webapi/devcontainer/templates/codebase-rag.env.example +3 -0
  111. package/es6/src/webapi/devcontainer/templates/initialize.sh +169 -0
  112. package/es6/src/webapi/devcontainer/templates/post-create.sh +35 -0
  113. package/es6/src/webapi/devcontainer/templates/post-start.sh +65 -0
  114. package/es6/src/webapi/devcontainer/templates/tty-prompt.sh +38 -0
  115. package/es6/src/webapi/features/auth.feature.js +357 -0
  116. package/es6/src/webapi/features/auth0-cli.js +406 -0
  117. package/es6/src/webapi/features/biome-format.js +40 -0
  118. package/es6/src/webapi/features/database.feature.js +422 -0
  119. package/es6/src/webapi/features/finalize.feature.js +83 -0
  120. package/es6/src/webapi/features/postman.feature.js +256 -0
  121. package/es6/src/webapi/models/api-package-json.model.js +53 -0
  122. package/es6/src/webapi/models/auth-config.model.js +20 -0
  123. package/es6/src/webapi/models/controller-source-file.model.js +181 -0
  124. package/es6/src/webapi/models/github-ci.model.js +186 -0
  125. package/es6/src/webapi/models/main-source-file.model.js +161 -0
  126. package/es6/src/webapi/models/production-dockerfile.model.js +66 -0
  127. package/es6/src/webapi/models/sample-files.model.js +40 -0
  128. package/es6/src/webapi/models/webapi-image.model.js +18 -0
  129. package/es6/src/webapi/postman/hello-openapi.js +166 -0
  130. package/es6/src/webapi/postman/local-view.js +167 -0
  131. package/es6/src/webapi/postman/openapi-to-postman.js +177 -0
  132. package/es6/src/webapi/workspace-readme.js +88 -0
  133. package/es6/src/webapi.action.js +18 -0
  134. package/es6/src/webapi.command.js +33 -0
  135. package/package.json +36 -0
  136. package/src/webapi/devcontainer/codebase-rag-mcp.ts +182 -0
  137. package/src/webapi/devcontainer/templates/codebase-rag.env.example +3 -0
  138. package/src/webapi/devcontainer/templates/initialize.sh +169 -0
  139. package/src/webapi/devcontainer/templates/post-create.sh +35 -0
  140. package/src/webapi/devcontainer/templates/post-start.sh +65 -0
  141. package/src/webapi/devcontainer/templates/tty-prompt.sh +38 -0
  142. package/types/src/add-api.action.d.ts +13 -0
  143. package/types/src/add-api.command.d.ts +7 -0
  144. package/types/src/add.command.d.ts +6 -0
  145. package/types/src/add.module.d.ts +14 -0
  146. package/types/src/auth0-configure.action.d.ts +7 -0
  147. package/types/src/auth0-configure.command.d.ts +6 -0
  148. package/types/src/auth0-login.action.d.ts +4 -0
  149. package/types/src/auth0-login.command.d.ts +6 -0
  150. package/types/src/auth0.command.d.ts +6 -0
  151. package/types/src/auth0.module.d.ts +18 -0
  152. package/types/src/cli.d.ts +2 -0
  153. package/types/src/create.command.d.ts +6 -0
  154. package/types/src/create.module.d.ts +14 -0
  155. package/types/src/domain/prompt.d.ts +4 -0
  156. package/types/src/index.d.ts +13 -0
  157. package/types/src/models/compose.model.d.ts +73 -0
  158. package/types/src/models/config-yaml.model.d.ts +27 -0
  159. package/types/src/models/const.d.ts +20 -0
  160. package/types/src/models/dev-container.model.d.ts +49 -0
  161. package/types/src/models/docker-image.model.d.ts +90 -0
  162. package/types/src/models/env-file.model.d.ts +16 -0
  163. package/types/src/models/gitignore.model.d.ts +9 -0
  164. package/types/src/models/launch-json.model.d.ts +7 -0
  165. package/types/src/models/package-json.model.d.ts +36 -0
  166. package/types/src/models/project.model.d.ts +60 -0
  167. package/types/src/models/source-file.d.ts +11 -0
  168. package/types/src/models/tsconfig.model.d.ts +5 -0
  169. package/types/src/models/vitest-config.model.d.ts +5 -0
  170. package/types/src/models/vscode-settings.model.d.ts +7 -0
  171. package/types/src/program.d.ts +3 -0
  172. package/types/src/resolve-target-dir.d.ts +5 -0
  173. package/types/src/services/scaffold.service.d.ts +22 -0
  174. package/types/src/version.d.ts +6 -0
  175. package/types/src/webapi/api-name.d.ts +14 -0
  176. package/types/src/webapi/auth0-commands.d.ts +11 -0
  177. package/types/src/webapi/authorize-scopes.d.ts +7 -0
  178. package/types/src/webapi/cli-options.d.ts +6 -0
  179. package/types/src/webapi/const.d.ts +19 -0
  180. package/types/src/webapi/create-api.d.ts +15 -0
  181. package/types/src/webapi/devcontainer/codebase-rag-mcp.d.ts +32 -0
  182. package/types/src/webapi/devcontainer/codebase-rag-mcp.ts +182 -0
  183. package/types/src/webapi/devcontainer/host-scripts.d.ts +7 -0
  184. package/types/src/webapi/devcontainer/templates/codebase-rag.env.example +3 -0
  185. package/types/src/webapi/devcontainer/templates/initialize.sh +169 -0
  186. package/types/src/webapi/devcontainer/templates/post-create.sh +35 -0
  187. package/types/src/webapi/devcontainer/templates/post-start.sh +65 -0
  188. package/types/src/webapi/devcontainer/templates/tty-prompt.sh +38 -0
  189. package/types/src/webapi/features/auth.feature.d.ts +10 -0
  190. package/types/src/webapi/features/auth0-cli.d.ts +84 -0
  191. package/types/src/webapi/features/biome-format.d.ts +5 -0
  192. package/types/src/webapi/features/database.feature.d.ts +7 -0
  193. package/types/src/webapi/features/finalize.feature.d.ts +2 -0
  194. package/types/src/webapi/features/postman.feature.d.ts +16 -0
  195. package/types/src/webapi/models/api-package-json.model.d.ts +18 -0
  196. package/types/src/webapi/models/auth-config.model.d.ts +26 -0
  197. package/types/src/webapi/models/controller-source-file.model.d.ts +46 -0
  198. package/types/src/webapi/models/github-ci.model.d.ts +9 -0
  199. package/types/src/webapi/models/main-source-file.model.d.ts +54 -0
  200. package/types/src/webapi/models/production-dockerfile.model.d.ts +18 -0
  201. package/types/src/webapi/models/sample-files.model.d.ts +7 -0
  202. package/types/src/webapi/models/webapi-image.model.d.ts +12 -0
  203. package/types/src/webapi/postman/hello-openapi.d.ts +19 -0
  204. package/types/src/webapi/postman/local-view.d.ts +17 -0
  205. package/types/src/webapi/postman/openapi-to-postman.d.ts +62 -0
  206. package/types/src/webapi/workspace-readme.d.ts +18 -0
  207. package/types/src/webapi.action.d.ts +14 -0
  208. package/types/src/webapi.command.d.ts +11 -0
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AddApiAction", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AddApiAction;
9
+ }
10
+ });
11
+ const _decorators = require("@decohere/crucible/decorators");
12
+ const _cli = require("@decohere/nexus/cli");
13
+ const _clioptions = require("./webapi/cli-options.js");
14
+ function _ts_decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ class AddApiAction {
21
+ async run(options) {
22
+ const name = options.apiName;
23
+ if (name == null || name === "") {
24
+ return _cli.ActionResponse.Error("api", "API name is required");
25
+ }
26
+ await (0, _clioptions.runScaffoldApi)((0, _clioptions.toApiOptions)(undefined, options, {
27
+ names: [
28
+ name
29
+ ],
30
+ add: true
31
+ }));
32
+ return _cli.ActionResponse.Success("api");
33
+ }
34
+ }
35
+ AddApiAction = _ts_decorate([
36
+ (0, _decorators.injectable)()
37
+ ], AddApiAction);
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AddApiCommand", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AddApiCommand;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ const _addapiaction = require("./add-api.action.js");
13
+ const _clioptions = require("./webapi/cli-options.js");
14
+ class AddApiCommand extends _cli.DecohereCommand {
15
+ get actions() {
16
+ return [
17
+ _addapiaction.AddApiAction
18
+ ];
19
+ }
20
+ constructor(name){
21
+ super(name);
22
+ this.description("Add an API to an existing Decohere workspace");
23
+ this.argument("<name>", "API name under projects/");
24
+ this.option("-d <directory>", "Workspace directory (default: current directory)", ".");
25
+ (0, _clioptions.addWebapiFeatureOptions)(this);
26
+ }
27
+ action(fn) {
28
+ return super.action((...args)=>{
29
+ const cmd = args.at(-1);
30
+ const first = args[0];
31
+ const hasPositional = typeof first === "string" || first === undefined;
32
+ const opts = hasPositional ? args[1] : args[0];
33
+ if (typeof first === "string" && first !== "") {
34
+ cmd.setOptionValue("apiName", first);
35
+ }
36
+ return fn(opts, cmd);
37
+ });
38
+ }
39
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AddCommand", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AddCommand;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ class AddCommand extends _cli.DecohereCommand {
13
+ constructor(commands, handler){
14
+ super(AddCommand);
15
+ this.description("Add to an existing Decohere workspace");
16
+ this.exitOverride();
17
+ this.registerSubcommand(commands, handler);
18
+ }
19
+ run(_actions, _options) {
20
+ return this.help();
21
+ }
22
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "AddModule", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return AddModule;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ const _addcommand = require("./add.command.js");
13
+ const _addapiaction = require("./add-api.action.js");
14
+ const _addapicommand = require("./add-api.command.js");
15
+ class AddModule extends _cli.ModuleManifest {
16
+ id = "add";
17
+ command = _addcommand.AddCommand;
18
+ commands = {
19
+ api: _addapicommand.AddApiCommand
20
+ };
21
+ actions = {
22
+ api: _addapiaction.AddApiAction
23
+ };
24
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Auth0ConfigureAction", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Auth0ConfigureAction;
9
+ }
10
+ });
11
+ const _decorators = require("@decohere/crucible/decorators");
12
+ const _cli = require("@decohere/nexus/cli");
13
+ const _auth0commands = require("./webapi/auth0-commands.js");
14
+ function _ts_decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ class Auth0ConfigureAction {
21
+ async run(options) {
22
+ (0, _auth0commands.runAuth0Configure)(typeof options.d === "string" ? options.d : ".");
23
+ return _cli.ActionResponse.Success("configure");
24
+ }
25
+ }
26
+ Auth0ConfigureAction = _ts_decorate([
27
+ (0, _decorators.injectable)()
28
+ ], Auth0ConfigureAction);
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Auth0ConfigureCommand", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Auth0ConfigureCommand;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ const _auth0configureaction = require("./auth0-configure.action.js");
13
+ class Auth0ConfigureCommand extends _cli.DecohereCommand {
14
+ get actions() {
15
+ return [
16
+ _auth0configureaction.Auth0ConfigureAction
17
+ ];
18
+ }
19
+ constructor(name){
20
+ super(name);
21
+ this.description("Update Auth0 API permissions and Postman SPA from @Authorize in this workspace");
22
+ this.option("-d <directory>", "Workspace directory (default: current directory)", ".");
23
+ }
24
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Auth0LoginAction", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Auth0LoginAction;
9
+ }
10
+ });
11
+ const _decorators = require("@decohere/crucible/decorators");
12
+ const _cli = require("@decohere/nexus/cli");
13
+ const _auth0commands = require("./webapi/auth0-commands.js");
14
+ function _ts_decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ class Auth0LoginAction {
21
+ async run() {
22
+ (0, _auth0commands.runAuth0Login)();
23
+ return _cli.ActionResponse.Success("login");
24
+ }
25
+ }
26
+ Auth0LoginAction = _ts_decorate([
27
+ (0, _decorators.injectable)()
28
+ ], Auth0LoginAction);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Auth0LoginCommand", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Auth0LoginCommand;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ const _auth0loginaction = require("./auth0-login.action.js");
13
+ class Auth0LoginCommand extends _cli.DecohereCommand {
14
+ get actions() {
15
+ return [
16
+ _auth0loginaction.Auth0LoginAction
17
+ ];
18
+ }
19
+ constructor(name){
20
+ super(name);
21
+ this.description("Authenticate the Auth0 CLI (device URL; tokens persist on the host)");
22
+ }
23
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Auth0Command", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Auth0Command;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ class Auth0Command extends _cli.DecohereCommand {
13
+ constructor(commands, handler){
14
+ super(Auth0Command);
15
+ this.description("Log in to Auth0 and update a scaffolded client");
16
+ this.exitOverride();
17
+ this.registerSubcommand(commands, handler);
18
+ }
19
+ run(_actions, _options) {
20
+ return this.help();
21
+ }
22
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Auth0Module", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Auth0Module;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ const _auth0command = require("./auth0.command.js");
13
+ const _auth0configureaction = require("./auth0-configure.action.js");
14
+ const _auth0configurecommand = require("./auth0-configure.command.js");
15
+ const _auth0loginaction = require("./auth0-login.action.js");
16
+ const _auth0logincommand = require("./auth0-login.command.js");
17
+ class Auth0Module extends _cli.ModuleManifest {
18
+ id = "auth0";
19
+ command = _auth0command.Auth0Command;
20
+ commands = {
21
+ login: _auth0logincommand.Auth0LoginCommand,
22
+ configure: _auth0configurecommand.Auth0ConfigureCommand
23
+ };
24
+ actions = {
25
+ login: _auth0loginaction.Auth0LoginAction,
26
+ configure: _auth0configureaction.Auth0ConfigureAction
27
+ };
28
+ }
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ const _program = require("./program.js");
7
+ void (0, _program.runCli)();
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "CreateCommand", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return CreateCommand;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ class CreateCommand extends _cli.DecohereCommand {
13
+ constructor(commands, handler){
14
+ super(CreateCommand);
15
+ this.description("Create a new Decohere workspace");
16
+ this.exitOverride();
17
+ this.registerSubcommand(commands, handler);
18
+ }
19
+ run(_actions, _options) {
20
+ return this.help();
21
+ }
22
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "CreateModule", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return CreateModule;
9
+ }
10
+ });
11
+ const _cli = require("@decohere/nexus/cli");
12
+ const _createcommand = require("./create.command.js");
13
+ const _webapiaction = require("./webapi.action.js");
14
+ const _webapicommand = require("./webapi.command.js");
15
+ class CreateModule extends _cli.ModuleManifest {
16
+ id = "create";
17
+ command = _createcommand.CreateCommand;
18
+ commands = {
19
+ webapi: _webapicommand.WebapiCommand
20
+ };
21
+ actions = {
22
+ webapi: _webapiaction.WebapiAction
23
+ };
24
+ }
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get ask () {
13
+ return ask;
14
+ },
15
+ get closePrompt () {
16
+ return closePrompt;
17
+ },
18
+ get pick () {
19
+ return pick;
20
+ }
21
+ });
22
+ const _nodereadline = require("node:readline");
23
+ // readline/promises rl.question() has a race condition with piped (non-TTY) stdin
24
+ // in Node ≥ 22: after the first line is read, stdin emits 'end', readline closes,
25
+ // and all subsequent question() calls resolve to "".
26
+ // Fix: use the async-iterator API, which buffers all lines before the close event fires.
27
+ let _rl = null;
28
+ let _lines = null;
29
+ function getLines() {
30
+ if (_lines == null) {
31
+ _rl = (0, _nodereadline.createInterface)({
32
+ input: process.stdin,
33
+ terminal: false
34
+ });
35
+ _lines = _rl[Symbol.asyncIterator]();
36
+ }
37
+ return _lines;
38
+ }
39
+ function closePrompt() {
40
+ _rl?.close();
41
+ _rl = null;
42
+ _lines = null;
43
+ }
44
+ async function readLine(prompt) {
45
+ process.stdout.write(prompt);
46
+ const { value, done } = await getLines().next();
47
+ return done ? "" : value.trim();
48
+ }
49
+ async function ask(question, fallback = "") {
50
+ const answer = await readLine(question);
51
+ return answer || fallback;
52
+ }
53
+ async function pick(label, items, display) {
54
+ console.log(label.trimEnd());
55
+ for (const [i, item] of items.entries()){
56
+ console.log(` ${i + 1}. ${display(item)}`);
57
+ }
58
+ const answer = await readLine(" > ");
59
+ const idx = Number.parseInt(answer, 10);
60
+ if (Number.isNaN(idx) || idx < 1 || idx > items.length) return null;
61
+ return items[idx - 1];
62
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: Object.getOwnPropertyDescriptor(all, name).get
9
+ });
10
+ }
11
+ _export(exports, {
12
+ get AddApiAction () {
13
+ return _addapiaction.AddApiAction;
14
+ },
15
+ get AddModule () {
16
+ return _addmodule.AddModule;
17
+ },
18
+ get Auth0ConfigureAction () {
19
+ return _auth0configureaction.Auth0ConfigureAction;
20
+ },
21
+ get Auth0LoginAction () {
22
+ return _auth0loginaction.Auth0LoginAction;
23
+ },
24
+ get Auth0Module () {
25
+ return _auth0module.Auth0Module;
26
+ },
27
+ get CreateModule () {
28
+ return _createmodule.CreateModule;
29
+ },
30
+ get WebapiAction () {
31
+ return _webapiaction.WebapiAction;
32
+ },
33
+ get runCli () {
34
+ return _program.runCli;
35
+ },
36
+ get scaffoldApi () {
37
+ return _createapi.scaffoldApi;
38
+ }
39
+ });
40
+ const _addmodule = require("./add.module.js");
41
+ const _addapiaction = require("./add-api.action.js");
42
+ const _auth0module = require("./auth0.module.js");
43
+ const _auth0configureaction = require("./auth0-configure.action.js");
44
+ const _auth0loginaction = require("./auth0-login.action.js");
45
+ const _createmodule = require("./create.module.js");
46
+ const _program = require("./program.js");
47
+ const _createapi = require("./webapi/create-api.js");
48
+ const _webapiaction = require("./webapi.action.js");