@decohere/scaffold 0.0.1-dev.97 → 0.0.1-dev.99
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/commonjs/src/models/launch-json.model.js +0 -2
- package/commonjs/src/webapi/features/auth.feature.js +0 -4
- package/commonjs/src/webapi/models/controller-source-file.model.js +1 -2
- package/es6/src/models/launch-json.model.js +0 -2
- package/es6/src/webapi/features/auth.feature.js +0 -4
- package/es6/src/webapi/models/controller-source-file.model.js +1 -2
- package/package.json +3 -3
|
@@ -28,7 +28,6 @@ class LaunchJson {
|
|
|
28
28
|
"build"
|
|
29
29
|
],
|
|
30
30
|
console: "integratedTerminal",
|
|
31
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: VS Code variable
|
|
32
31
|
cwd: "${workspaceFolder}"
|
|
33
32
|
}
|
|
34
33
|
];
|
|
@@ -66,7 +65,6 @@ function serveConfig(name, runtimeArgs) {
|
|
|
66
65
|
runtimeExecutable: "pnpm",
|
|
67
66
|
runtimeArgs,
|
|
68
67
|
console: "integratedTerminal",
|
|
69
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: VS Code variable
|
|
70
68
|
cwd: "${workspaceFolder}"
|
|
71
69
|
};
|
|
72
70
|
}
|
|
@@ -347,7 +347,6 @@ function scaffoldLocalUserProfile(workspace) {
|
|
|
347
347
|
controller.addImport("UserService", "../services/user.service.js").addImport("inject", "@decohere/crucible/decorators").addConstructorParam('@inject("UserService") private readonly users: UserService');
|
|
348
348
|
controller.getMethod("getOne").setAsync(true).setBody([
|
|
349
349
|
"const user = await this.users.ensureFromPrincipal(this.principalProvider.currentPrincipal);",
|
|
350
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: template literal in generated code
|
|
351
350
|
"return { id, message: `Hello ${user.displayName}!`, username: user.displayName };"
|
|
352
351
|
]);
|
|
353
352
|
}
|
|
@@ -369,7 +368,6 @@ function scaffold(workspace, options) {
|
|
|
369
368
|
'\t(typeof principal?.preferred_username === "string" && principal.preferred_username) ||',
|
|
370
369
|
"\tprincipal?.sub ||",
|
|
371
370
|
'\t"unknown";',
|
|
372
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: template literal in generated code
|
|
373
371
|
"return { id, message: `Hello ${username}!`, username };"
|
|
374
372
|
]);
|
|
375
373
|
}
|
|
@@ -390,9 +388,7 @@ function scaffold(workspace, options) {
|
|
|
390
388
|
project.getModel(_const.WELL_KNOWN_FILES.MAIN_TS)?.addBuilderCall(".withAuth()");
|
|
391
389
|
}
|
|
392
390
|
}
|
|
393
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: intentional YAML env-var placeholders
|
|
394
391
|
const issuerPlaceholder = "${AUTH0_ISSUER_BASE_URL}";
|
|
395
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: intentional YAML env-var placeholders
|
|
396
392
|
const audPlaceholder = "${AUTH0_AUDIENCE}";
|
|
397
393
|
const configSection = `auth:\n discoveryUrl: ${issuerPlaceholder}\n audience: ${audPlaceholder}\n`;
|
|
398
394
|
workspace.getModel(_const.WELL_KNOWN_FILES.CONFIG_YAML)?.addSection(configSection);
|
|
@@ -111,8 +111,7 @@ class ControllerSourceFile {
|
|
|
111
111
|
],
|
|
112
112
|
[
|
|
113
113
|
"getOne",
|
|
114
|
-
new ControllerMethod("getOne", '@Get("/:id")', '@Param("id") id: string', false,
|
|
115
|
-
[
|
|
114
|
+
new ControllerMethod("getOne", '@Get("/:id")', '@Param("id") id: string', false, [
|
|
116
115
|
"return { id, message: `Hello ${id}!` };"
|
|
117
116
|
])
|
|
118
117
|
],
|
|
@@ -18,7 +18,6 @@ export class LaunchJson {
|
|
|
18
18
|
"build"
|
|
19
19
|
],
|
|
20
20
|
console: "integratedTerminal",
|
|
21
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: VS Code variable
|
|
22
21
|
cwd: "${workspaceFolder}"
|
|
23
22
|
}
|
|
24
23
|
];
|
|
@@ -56,7 +55,6 @@ function serveConfig(name, runtimeArgs) {
|
|
|
56
55
|
runtimeExecutable: "pnpm",
|
|
57
56
|
runtimeArgs,
|
|
58
57
|
console: "integratedTerminal",
|
|
59
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: VS Code variable
|
|
60
58
|
cwd: "${workspaceFolder}"
|
|
61
59
|
};
|
|
62
60
|
}
|
|
@@ -296,7 +296,6 @@ function scaffoldLocalUserProfile(workspace) {
|
|
|
296
296
|
controller.addImport("UserService", "../services/user.service.js").addImport("inject", "@decohere/crucible/decorators").addConstructorParam('@inject("UserService") private readonly users: UserService');
|
|
297
297
|
controller.getMethod("getOne").setAsync(true).setBody([
|
|
298
298
|
"const user = await this.users.ensureFromPrincipal(this.principalProvider.currentPrincipal);",
|
|
299
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: template literal in generated code
|
|
300
299
|
"return { id, message: `Hello ${user.displayName}!`, username: user.displayName };"
|
|
301
300
|
]);
|
|
302
301
|
}
|
|
@@ -318,7 +317,6 @@ function scaffold(workspace, options) {
|
|
|
318
317
|
'\t(typeof principal?.preferred_username === "string" && principal.preferred_username) ||',
|
|
319
318
|
"\tprincipal?.sub ||",
|
|
320
319
|
'\t"unknown";',
|
|
321
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: template literal in generated code
|
|
322
320
|
"return { id, message: `Hello ${username}!`, username };"
|
|
323
321
|
]);
|
|
324
322
|
}
|
|
@@ -339,9 +337,7 @@ function scaffold(workspace, options) {
|
|
|
339
337
|
project.getModel(WELL_KNOWN_FILES.MAIN_TS)?.addBuilderCall(".withAuth()");
|
|
340
338
|
}
|
|
341
339
|
}
|
|
342
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: intentional YAML env-var placeholders
|
|
343
340
|
const issuerPlaceholder = "${AUTH0_ISSUER_BASE_URL}";
|
|
344
|
-
// biome-ignore lint/suspicious/noTemplateCurlyInString: intentional YAML env-var placeholders
|
|
345
341
|
const audPlaceholder = "${AUTH0_AUDIENCE}";
|
|
346
342
|
const configSection = `auth:\n discoveryUrl: ${issuerPlaceholder}\n audience: ${audPlaceholder}\n`;
|
|
347
343
|
workspace.getModel(WELL_KNOWN_FILES.CONFIG_YAML)?.addSection(configSection);
|
|
@@ -102,8 +102,7 @@ import { WELL_KNOWN_FILES } from "../../models/const.js";
|
|
|
102
102
|
],
|
|
103
103
|
[
|
|
104
104
|
"getOne",
|
|
105
|
-
new ControllerMethod("getOne", '@Get("/:id")', '@Param("id") id: string', false,
|
|
106
|
-
[
|
|
105
|
+
new ControllerMethod("getOne", '@Get("/:id")', '@Param("id") id: string', false, [
|
|
107
106
|
"return { id, message: `Hello ${id}!` };"
|
|
108
107
|
])
|
|
109
108
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decohere/scaffold",
|
|
3
|
-
"version": "0.0.1-dev.
|
|
3
|
+
"version": "0.0.1-dev.99",
|
|
4
4
|
"description": "Decohere project scaffolder (runs inside ghcr.io/typesmiths/decohere/create)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"decohere",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@decohere/crucible": "0.0.1-dev.
|
|
26
|
-
"@decohere/nexus": "0.0.1-dev.
|
|
25
|
+
"@decohere/crucible": "0.0.1-dev.99",
|
|
26
|
+
"@decohere/nexus": "0.0.1-dev.99",
|
|
27
27
|
"commander": "^13.1.0",
|
|
28
28
|
"openapi-to-postmanv2": "^5.0.0",
|
|
29
29
|
"yaml": "^2.9.1"
|