@decohere/scaffold 0.0.1-dev.20261105.46 → 0.0.1-dev.20261105.64
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/package-json.model.js +1 -0
- package/commonjs/src/webapi/create-api.js +10 -0
- package/commonjs/src/webapi/models/webapi-image.model.js +9 -0
- package/es6/src/models/package-json.model.js +1 -0
- package/es6/src/webapi/create-api.js +10 -0
- package/es6/src/webapi/models/webapi-image.model.js +10 -1
- package/package.json +3 -3
- package/types/src/webapi/models/webapi-image.model.d.ts +5 -0
|
@@ -124,6 +124,16 @@ function createWorkspace(targetDir, projectName, apiNames) {
|
|
|
124
124
|
monoRepo.addModel(new _gitignoremodel.Gitignore());
|
|
125
125
|
monoRepo.addModel(new _envfilemodel.EnvFile());
|
|
126
126
|
monoRepo.addFile(new _hostscripts.DevContainerHostScripts());
|
|
127
|
+
// Current pnpm fails the install on any dependency's install script nobody has decided about.
|
|
128
|
+
// The app works without these two, so decide "don't run" rather than run third-party scripts.
|
|
129
|
+
monoRepo.addFile({
|
|
130
|
+
files: ()=>[
|
|
131
|
+
{
|
|
132
|
+
filePath: "pnpm-workspace.yaml",
|
|
133
|
+
content: 'allowBuilds:\n "@swc/core": false\n esbuild: false\n'
|
|
134
|
+
}
|
|
135
|
+
]
|
|
136
|
+
});
|
|
127
137
|
// Biome formatter/linter config
|
|
128
138
|
monoRepo.addFile({
|
|
129
139
|
files: ()=>[
|
|
@@ -14,6 +14,15 @@ class WebapiDevContainer extends _dockerimagemodel.DockerfileModel {
|
|
|
14
14
|
constructor(baseImage = `${_version.DEVCONTAINER_IMAGE_REPOSITORY}:${_version.CREATE_VERSION}`){
|
|
15
15
|
super(baseImage);
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* The base image ends as the node user, and its build arguments don't carry over. So this image
|
|
19
|
+
* declares its own, runs its layers as root, and hands back to that user at the end.
|
|
20
|
+
*/ registerBaseLayers() {
|
|
21
|
+
super.registerBaseLayers();
|
|
22
|
+
this.addLayer((0, _dockerimagemodel.withNodeUser)({
|
|
23
|
+
order: 1
|
|
24
|
+
})).addStep(_dockerimagemodel.DockerStep.raw("become-root", "USER root", 2));
|
|
25
|
+
}
|
|
17
26
|
files() {
|
|
18
27
|
return [
|
|
19
28
|
{
|
|
@@ -104,6 +104,16 @@ function createWorkspace(targetDir, projectName, apiNames) {
|
|
|
104
104
|
monoRepo.addModel(new Gitignore());
|
|
105
105
|
monoRepo.addModel(new EnvFile());
|
|
106
106
|
monoRepo.addFile(new DevContainerHostScripts());
|
|
107
|
+
// Current pnpm fails the install on any dependency's install script nobody has decided about.
|
|
108
|
+
// The app works without these two, so decide "don't run" rather than run third-party scripts.
|
|
109
|
+
monoRepo.addFile({
|
|
110
|
+
files: ()=>[
|
|
111
|
+
{
|
|
112
|
+
filePath: "pnpm-workspace.yaml",
|
|
113
|
+
content: 'allowBuilds:\n "@swc/core": false\n esbuild: false\n'
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
});
|
|
107
117
|
// Biome formatter/linter config
|
|
108
118
|
monoRepo.addFile({
|
|
109
119
|
files: ()=>[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DockerfileModel } from "../../models/docker-image.model.js";
|
|
1
|
+
import { DockerfileModel, DockerStep, withNodeUser } from "../../models/docker-image.model.js";
|
|
2
2
|
import { CREATE_VERSION, DEVCONTAINER_IMAGE_REPOSITORY } from "../../version.js";
|
|
3
3
|
/**
|
|
4
4
|
* Scaffolded app `.devcontainer/Dockerfile` — thin `FROM` the published base image.
|
|
@@ -7,6 +7,15 @@ import { CREATE_VERSION, DEVCONTAINER_IMAGE_REPOSITORY } from "../../version.js"
|
|
|
7
7
|
constructor(baseImage = `${DEVCONTAINER_IMAGE_REPOSITORY}:${CREATE_VERSION}`){
|
|
8
8
|
super(baseImage);
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* The base image ends as the node user, and its build arguments don't carry over. So this image
|
|
12
|
+
* declares its own, runs its layers as root, and hands back to that user at the end.
|
|
13
|
+
*/ registerBaseLayers() {
|
|
14
|
+
super.registerBaseLayers();
|
|
15
|
+
this.addLayer(withNodeUser({
|
|
16
|
+
order: 1
|
|
17
|
+
})).addStep(DockerStep.raw("become-root", "USER root", 2));
|
|
18
|
+
}
|
|
10
19
|
files() {
|
|
11
20
|
return [
|
|
12
21
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decohere/scaffold",
|
|
3
|
-
"version": "0.0.1-dev.20261105.
|
|
3
|
+
"version": "0.0.1-dev.20261105.64",
|
|
4
4
|
"description": "Decohere project scaffolder (runs inside ghcr.io/typesmiths/decohere/create)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"decohere",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@decohere/crucible": "0.0.1-dev.20261105.
|
|
35
|
-
"@decohere/devkit": "0.0.1-dev.20261105.
|
|
34
|
+
"@decohere/crucible": "0.0.1-dev.20261105.64",
|
|
35
|
+
"@decohere/devkit": "0.0.1-dev.20261105.64",
|
|
36
36
|
"commander": "^13.1.0",
|
|
37
37
|
"openapi-to-postmanv2": "^5.0.0",
|
|
38
38
|
"yaml": "^2.9.1"
|
|
@@ -5,6 +5,11 @@ import { DockerfileModel } from "../../models/docker-image.model.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class WebapiDevContainer extends DockerfileModel {
|
|
7
7
|
constructor(baseImage?: string);
|
|
8
|
+
/**
|
|
9
|
+
* The base image ends as the node user, and its build arguments don't carry over. So this image
|
|
10
|
+
* declares its own, runs its layers as root, and hands back to that user at the end.
|
|
11
|
+
*/
|
|
12
|
+
protected registerBaseLayers(): void;
|
|
8
13
|
files(): {
|
|
9
14
|
filePath: string;
|
|
10
15
|
content: string;
|