@decohere/create 0.0.1-dev.16 → 0.0.1-dev.18
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/cli.js +26 -5
- package/commonjs/src/models/compose.model.js +82 -0
- package/commonjs/src/models/config-yaml.model.js +34 -0
- package/commonjs/src/models/const.js +29 -0
- package/commonjs/src/models/container-image.model.js +88 -0
- package/commonjs/src/models/dev-container.model.js +73 -0
- package/commonjs/src/models/env-file.model.js +33 -0
- package/commonjs/src/models/gitignore.model.js +32 -0
- package/commonjs/src/models/launch-json.model.js +52 -0
- package/commonjs/src/models/package-json.model.js +64 -0
- package/commonjs/src/models/project.model.js +126 -0
- package/commonjs/src/models/source-file.js +6 -0
- package/commonjs/src/models/tsconfig.model.js +34 -0
- package/commonjs/src/models/vscode-settings.model.js +31 -0
- package/commonjs/src/services/scaffold.service.js +62 -0
- package/commonjs/src/webapi/create-api.js +169 -0
- package/commonjs/src/webapi/features/auth.feature.js +166 -0
- package/commonjs/src/webapi/features/auth0-cli.js +151 -0
- package/commonjs/src/webapi/features/database.feature.js +151 -0
- package/commonjs/src/webapi/features/finalize.feature.js +46 -0
- package/commonjs/src/webapi/features/postman.feature.js +309 -0
- package/commonjs/src/webapi/models/api-package-json.model.js +57 -0
- package/commonjs/src/webapi/models/auth-config.model.js +23 -0
- package/commonjs/src/webapi/models/controller-source-file.model.js +180 -0
- package/commonjs/src/webapi/models/main-source-file.model.js +132 -0
- package/commonjs/src/webapi/models/sample-files.model.js +60 -0
- package/commonjs/v1/cli.js +15 -0
- package/commonjs/v1/domain/class-model.js +106 -0
- package/commonjs/v1/domain/compose.model.js +74 -0
- package/commonjs/v1/domain/context.js +53 -0
- package/commonjs/v1/domain/devcontainer.model.js +116 -0
- package/commonjs/v1/domain/dockerfile.model.js +62 -0
- package/commonjs/v1/domain/feature.js +19 -0
- package/commonjs/v1/domain/import-map.js +74 -0
- package/commonjs/v1/domain/index.js +68 -0
- package/commonjs/v1/domain/prompt.js +45 -0
- package/commonjs/v1/domain/workflow.js +37 -0
- package/commonjs/v1/features/api-core/feature.js +103 -0
- package/commonjs/v1/features/api-core/hello-controller.model.js +100 -0
- package/commonjs/v1/features/api-core/main-ts.model.js +85 -0
- package/commonjs/v1/features/api-core/scaffold-files.template.js +158 -0
- package/commonjs/v1/features/auth0/auth0-cli.js +151 -0
- package/commonjs/v1/features/auth0/feature.js +187 -0
- package/commonjs/v1/features/auth0/models.js +14 -0
- package/commonjs/v1/features/auth0/prod-config.template.js +19 -0
- package/commonjs/v1/features/cli-core/feature.js +37 -0
- package/commonjs/v1/features/cli-core/scaffold-files.template.js +103 -0
- package/commonjs/v1/features/devcontainer/feature.js +38 -0
- package/commonjs/v1/features/finalize/feature.js +48 -0
- package/commonjs/v1/features/postgresql/feature.js +81 -0
- package/commonjs/v1/features/postgresql/models.js +14 -0
- package/commonjs/v1/features/postman/collection.template.js +80 -0
- package/commonjs/v1/features/postman/environment.template.js +24 -0
- package/commonjs/v1/features/postman/feature.js +192 -0
- package/commonjs/v1/features/typeorm/feature.js +66 -0
- package/commonjs/v1/features/typeorm/scaffold-files.template.js +80 -0
- package/commonjs/v1/scaffold.js +50 -0
- package/commonjs/v1/version.js +32 -0
- package/commonjs/v1/workflows/api.js +29 -0
- package/commonjs/v1/workflows/cli.js +19 -0
- package/es6/src/cli.js +26 -5
- package/es6/src/models/compose.model.js +77 -0
- package/es6/src/models/config-yaml.model.js +30 -0
- package/es6/src/models/const.js +19 -0
- package/es6/src/models/container-image.model.js +84 -0
- package/es6/src/models/dev-container.model.js +68 -0
- package/es6/src/models/env-file.model.js +29 -0
- package/es6/src/models/gitignore.model.js +22 -0
- package/es6/src/models/launch-json.model.js +42 -0
- package/es6/src/models/package-json.model.js +60 -0
- package/es6/src/models/project.model.js +111 -0
- package/es6/src/models/source-file.js +3 -0
- package/es6/src/models/tsconfig.model.js +24 -0
- package/es6/src/models/vscode-settings.model.js +21 -0
- package/es6/src/services/scaffold.service.js +52 -0
- package/es6/src/webapi/create-api.js +151 -0
- package/es6/src/webapi/features/auth.feature.js +115 -0
- package/es6/src/webapi/features/auth0-cli.js +116 -0
- package/es6/src/webapi/features/database.feature.js +141 -0
- package/es6/src/webapi/features/finalize.feature.js +36 -0
- package/es6/src/webapi/features/postman.feature.js +258 -0
- package/es6/src/webapi/models/api-package-json.model.js +52 -0
- package/es6/src/webapi/models/auth-config.model.js +19 -0
- package/es6/src/webapi/models/controller-source-file.model.js +171 -0
- package/es6/src/webapi/models/main-source-file.model.js +128 -0
- package/es6/src/webapi/models/sample-files.model.js +42 -0
- package/es6/v1/cli.js +11 -0
- package/es6/v1/domain/class-model.js +104 -0
- package/es6/v1/domain/compose.model.js +61 -0
- package/es6/v1/domain/context.js +37 -0
- package/es6/v1/domain/devcontainer.model.js +104 -0
- package/es6/v1/domain/dockerfile.model.js +52 -0
- package/es6/v1/domain/feature.js +9 -0
- package/es6/v1/domain/import-map.js +64 -0
- package/es6/v1/domain/index.js +11 -0
- package/es6/v1/domain/prompt.js +27 -0
- package/es6/v1/domain/workflow.js +24 -0
- package/es6/v1/features/api-core/feature.js +93 -0
- package/es6/v1/features/api-core/hello-controller.model.js +96 -0
- package/es6/v1/features/api-core/main-ts.model.js +74 -0
- package/es6/v1/features/api-core/scaffold-files.template.js +116 -0
- package/es6/v1/features/auth0/auth0-cli.js +116 -0
- package/es6/v1/features/auth0/feature.js +136 -0
- package/es6/v1/features/auth0/models.js +4 -0
- package/es6/v1/features/auth0/prod-config.template.js +9 -0
- package/es6/v1/features/cli-core/feature.js +27 -0
- package/es6/v1/features/cli-core/scaffold-files.template.js +73 -0
- package/es6/v1/features/devcontainer/feature.js +28 -0
- package/es6/v1/features/finalize/feature.js +38 -0
- package/es6/v1/features/postgresql/feature.js +71 -0
- package/es6/v1/features/postgresql/models.js +4 -0
- package/es6/v1/features/postman/collection.template.js +70 -0
- package/es6/v1/features/postman/environment.template.js +14 -0
- package/es6/v1/features/postman/feature.js +141 -0
- package/es6/v1/features/typeorm/feature.js +56 -0
- package/es6/v1/features/typeorm/scaffold-files.template.js +56 -0
- package/es6/v1/scaffold.js +40 -0
- package/es6/v1/version.js +22 -0
- package/es6/v1/workflows/api.js +25 -0
- package/es6/v1/workflows/cli.js +9 -0
- package/package.json +2 -2
- package/types/src/models/compose.model.d.ts +32 -0
- package/types/src/models/config-yaml.model.d.ts +16 -0
- package/types/src/models/const.d.ts +17 -0
- package/types/src/models/container-image.model.d.ts +15 -0
- package/types/src/models/dev-container.model.d.ts +21 -0
- package/types/src/models/env-file.model.d.ts +14 -0
- package/types/src/models/gitignore.model.d.ts +6 -0
- package/types/src/models/launch-json.model.d.ts +5 -0
- package/types/src/models/package-json.model.d.ts +18 -0
- package/types/src/models/project.model.d.ts +55 -0
- package/types/src/models/source-file.d.ts +11 -0
- package/types/src/models/tsconfig.model.d.ts +5 -0
- package/types/src/models/vscode-settings.model.d.ts +7 -0
- package/types/src/services/scaffold.service.d.ts +22 -0
- package/types/src/webapi/create-api.d.ts +7 -0
- package/types/src/webapi/features/auth.feature.d.ts +7 -0
- package/types/src/webapi/features/auth0-cli.d.ts +22 -0
- package/types/src/webapi/features/database.feature.d.ts +5 -0
- package/types/src/webapi/features/finalize.feature.d.ts +2 -0
- package/types/src/webapi/features/postman.feature.d.ts +7 -0
- package/types/src/webapi/models/api-package-json.model.d.ts +17 -0
- package/types/src/webapi/models/auth-config.model.d.ts +18 -0
- package/types/src/webapi/models/controller-source-file.model.d.ts +42 -0
- package/types/src/webapi/models/main-source-file.model.d.ts +36 -0
- package/types/src/webapi/models/sample-files.model.d.ts +7 -0
- package/types/v1/cli.d.ts +2 -0
- package/types/v1/domain/class-model.d.ts +70 -0
- package/types/v1/domain/compose.model.d.ts +25 -0
- package/types/v1/domain/context.d.ts +36 -0
- package/types/v1/domain/devcontainer.model.d.ts +35 -0
- package/types/v1/domain/dockerfile.model.d.ts +11 -0
- package/types/v1/domain/feature.d.ts +29 -0
- package/types/v1/domain/import-map.d.ts +24 -0
- package/types/v1/domain/index.d.ts +12 -0
- package/types/v1/domain/prompt.d.ts +2 -0
- package/types/v1/domain/workflow.d.ts +14 -0
- package/types/v1/features/api-core/feature.d.ts +2 -0
- package/types/v1/features/api-core/hello-controller.model.d.ts +9 -0
- package/types/v1/features/api-core/main-ts.model.d.ts +31 -0
- package/types/v1/features/api-core/scaffold-files.template.d.ts +10 -0
- package/types/v1/features/auth0/auth0-cli.d.ts +22 -0
- package/types/v1/features/auth0/feature.d.ts +2 -0
- package/types/v1/features/auth0/models.d.ts +5 -0
- package/types/v1/features/auth0/prod-config.template.d.ts +1 -0
- package/types/v1/features/cli-core/feature.d.ts +2 -0
- package/types/v1/features/cli-core/scaffold-files.template.d.ts +6 -0
- package/types/v1/features/devcontainer/feature.d.ts +2 -0
- package/types/v1/features/finalize/feature.d.ts +2 -0
- package/types/v1/features/postgresql/feature.d.ts +2 -0
- package/types/v1/features/postgresql/models.d.ts +6 -0
- package/types/v1/features/postman/collection.template.d.ts +1 -0
- package/types/v1/features/postman/environment.template.d.ts +6 -0
- package/types/v1/features/postman/feature.d.ts +2 -0
- package/types/v1/features/typeorm/feature.d.ts +2 -0
- package/types/v1/features/typeorm/scaffold-files.template.d.ts +9 -0
- package/types/v1/scaffold.d.ts +3 -0
- package/types/v1/version.d.ts +2 -0
- package/types/v1/workflows/api.d.ts +8 -0
- package/types/v1/workflows/cli.d.ts +1 -0
- package/commonjs/src/scaffold.js +0 -89
- package/commonjs/src/templates.js +0 -305
- package/es6/src/scaffold.js +0 -79
- package/es6/src/templates.js +0 -245
- package/types/src/scaffold.d.ts +0 -6
- package/types/src/templates.d.ts +0 -20
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DockerfileModel } from "./dockerfile.model.js";
|
|
2
|
+
export declare const DEVCONTAINER_KEY: import("./context.js").FeatureModelKey<DevcontainerModel>;
|
|
3
|
+
/**
|
|
4
|
+
* Live builder for `.devcontainer/devcontainer.json`.
|
|
5
|
+
*
|
|
6
|
+
* The api-core feature creates an instance in its `configure` phase.
|
|
7
|
+
* Other features (typeorm, auth0, …) call `addExtension` / `addFeature` / etc.
|
|
8
|
+
* in their own `configure` phases. The devcontainer `render` phase calls `render()`.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DevcontainerModel {
|
|
11
|
+
private readonly _name;
|
|
12
|
+
private _image;
|
|
13
|
+
private _composeFile;
|
|
14
|
+
private _composeService;
|
|
15
|
+
private _dockerfile;
|
|
16
|
+
private readonly _extensions;
|
|
17
|
+
private readonly _ports;
|
|
18
|
+
private readonly _postCreateCommands;
|
|
19
|
+
private readonly _postStartCommands;
|
|
20
|
+
private readonly _devcontainerFeatures;
|
|
21
|
+
constructor(name: string, image?: string);
|
|
22
|
+
get image(): string;
|
|
23
|
+
setImage(image: string): this;
|
|
24
|
+
/** Switch to Docker Compose mode. Call from a feature that adds a compose service. */
|
|
25
|
+
useCompose(file?: string, service?: string): this;
|
|
26
|
+
/** The Dockerfile model, available only when in compose mode. */
|
|
27
|
+
get dockerfile(): DockerfileModel | null;
|
|
28
|
+
addExtension(...ids: string[]): this;
|
|
29
|
+
forwardPort(...ports: number[]): this;
|
|
30
|
+
addPostCreateCommand(cmd: string): this;
|
|
31
|
+
addPostStartCommand(cmd: string): this;
|
|
32
|
+
/** Add a devcontainer Feature, e.g. `ghcr.io/devcontainers/features/node:1`. */
|
|
33
|
+
addFeature(id: string, options?: Record<string, unknown>): this;
|
|
34
|
+
render(): string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class DockerfileModel {
|
|
2
|
+
private readonly _baseImage;
|
|
3
|
+
private readonly _runs;
|
|
4
|
+
constructor(baseImage?: string);
|
|
5
|
+
/**
|
|
6
|
+
* Append a RUN instruction executed as root, inserted after the base
|
|
7
|
+
* toolchain setup and before the USER switch.
|
|
8
|
+
*/
|
|
9
|
+
addRun(cmd: string): this;
|
|
10
|
+
render(): string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ScaffoldContext } from "./context.js";
|
|
2
|
+
export type ScaffoldStep = (ctx: ScaffoldContext) => Promise<ScaffoldContext>;
|
|
3
|
+
/**
|
|
4
|
+
* A Feature is a self-contained unit of scaffolding behavior. Each feature
|
|
5
|
+
* may contribute to one or more phases. Phases run in order across all
|
|
6
|
+
* features, so any cross-feature dependency on shared models is naturally
|
|
7
|
+
* satisfied (e.g. `typeorm.configure` runs before `apiCore.render`).
|
|
8
|
+
*
|
|
9
|
+
* Phases (in execution order):
|
|
10
|
+
* 1. resolve — interactive prompts; may update ctx.opts or seed models
|
|
11
|
+
* 2. configure — pure model contributions to the FeatureModelStore
|
|
12
|
+
* 3. render — read models, write files to disk
|
|
13
|
+
* 4. integrate — external system calls (CLI binaries, REST APIs)
|
|
14
|
+
* 5. finalize — install deps, print next steps, etc.
|
|
15
|
+
*
|
|
16
|
+
* `enabled(ctx)` is re-evaluated before each phase so features can opt in
|
|
17
|
+
* based on options set by earlier `resolve` phases.
|
|
18
|
+
*/
|
|
19
|
+
export interface Feature {
|
|
20
|
+
name: string;
|
|
21
|
+
enabled?: (ctx: ScaffoldContext) => boolean;
|
|
22
|
+
resolve?: ScaffoldStep;
|
|
23
|
+
configure?: ScaffoldStep;
|
|
24
|
+
render?: ScaffoldStep;
|
|
25
|
+
integrate?: ScaffoldStep;
|
|
26
|
+
finalize?: ScaffoldStep;
|
|
27
|
+
}
|
|
28
|
+
export type Phase = "resolve" | "configure" | "render" | "integrate" | "finalize";
|
|
29
|
+
export declare const PHASES: readonly Phase[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Groups imports from the same package, rendering mixed value+type imports
|
|
3
|
+
* as `import { A, type B } from "pkg"` rather than two separate statements.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ImportMap {
|
|
6
|
+
private readonly _packages;
|
|
7
|
+
private _entry;
|
|
8
|
+
/**
|
|
9
|
+
* Add named value imports.
|
|
10
|
+
* Called with no names, registers a side-effect `import "pkg"`.
|
|
11
|
+
*/
|
|
12
|
+
add(pkg: string, ...names: string[]): this;
|
|
13
|
+
/** Add type-only named imports. */
|
|
14
|
+
addType(pkg: string, ...names: string[]): this;
|
|
15
|
+
/**
|
|
16
|
+
* Render to an array of import statement strings (insertion order preserved).
|
|
17
|
+
*
|
|
18
|
+
* - All-type package → `import type { A, B } from "pkg";`
|
|
19
|
+
* - All-value package → `import { A, B } from "pkg";`
|
|
20
|
+
* - Mixed package → `import { A, type B } from "pkg";`
|
|
21
|
+
* - Side-effect only → `import "pkg";`
|
|
22
|
+
*/
|
|
23
|
+
render(): string[];
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { type BodyClassDef, type BodyClassField, ClassModel, type ConstructorParam, type MethodDef, type MethodParam, } from "./class-model.js";
|
|
2
|
+
export { COMPOSE_KEY, ComposeModel, type ComposeService } from "./compose.model.js";
|
|
3
|
+
export type { FeatureModelKey, ScaffoldContext, ScaffoldOptions, } from "./context.js";
|
|
4
|
+
export { createContext, FeatureModelStore, modelKey } from "./context.js";
|
|
5
|
+
export { DEVCONTAINER_KEY, DevcontainerModel } from "./devcontainer.model.js";
|
|
6
|
+
export { DockerfileModel } from "./dockerfile.model.js";
|
|
7
|
+
export type { Feature, Phase, ScaffoldStep } from "./feature.js";
|
|
8
|
+
export { PHASES } from "./feature.js";
|
|
9
|
+
export { ImportMap } from "./import-map.js";
|
|
10
|
+
export { ask, pick } from "./prompt.js";
|
|
11
|
+
export type { Workflow } from "./workflow.js";
|
|
12
|
+
export { defineWorkflow, runWorkflow } from "./workflow.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ScaffoldContext } from "./context.js";
|
|
2
|
+
import { type Feature } from "./feature.js";
|
|
3
|
+
export interface Workflow {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly features: readonly Feature[];
|
|
6
|
+
}
|
|
7
|
+
export declare function defineWorkflow(name: string, features: Feature[]): Workflow;
|
|
8
|
+
/**
|
|
9
|
+
* Runs a workflow by iterating phases × features. Within each phase, every
|
|
10
|
+
* enabled feature's step for that phase is executed in feature order. The
|
|
11
|
+
* `enabled` predicate is re-evaluated before each phase so a feature can
|
|
12
|
+
* become active based on options set by earlier `resolve` phases.
|
|
13
|
+
*/
|
|
14
|
+
export declare function runWorkflow(workflow: Workflow, ctx: ScaffoldContext): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ClassModel } from "../../domain/class-model.js";
|
|
2
|
+
/**
|
|
3
|
+
* Create the seed controller scaffolded into every new api project.
|
|
4
|
+
*
|
|
5
|
+
* Defines only the base CRUD structure. Auth decorators, IPrincipalProvider
|
|
6
|
+
* injection, and other cross-cutting concerns are added by the relevant
|
|
7
|
+
* feature during its configure phase.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createHelloController(): ClassModel;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ClassModel } from "../../domain/class-model.js";
|
|
2
|
+
/** Key for retrieving the MainTsModel from the FeatureModelStore. */
|
|
3
|
+
export declare const MAIN_TS_KEY: import("../../domain/context.js").FeatureModelKey<MainTsModel>;
|
|
4
|
+
/**
|
|
5
|
+
* Live builder for `projects/api/src/main.ts`.
|
|
6
|
+
*
|
|
7
|
+
* The api-core feature creates an instance in its `configure` phase.
|
|
8
|
+
* Other features (typeorm, auth0, …) call `addImport` / `appendBuilderChain`
|
|
9
|
+
* in their own `configure` phases. The api-core `render` phase calls
|
|
10
|
+
* `addController(model)` for each controller, then `render()`.
|
|
11
|
+
*/
|
|
12
|
+
export declare class MainTsModel {
|
|
13
|
+
private readonly _applicationName;
|
|
14
|
+
private readonly _imports;
|
|
15
|
+
private readonly _builderChain;
|
|
16
|
+
private readonly _controllers;
|
|
17
|
+
constructor(applicationName: string);
|
|
18
|
+
/** Add named value imports (or side-effect when called with no names). */
|
|
19
|
+
addImport(pkg: string, ...names: string[]): this;
|
|
20
|
+
/** Add named type-only imports. */
|
|
21
|
+
addTypeImport(pkg: string, ...names: string[]): this;
|
|
22
|
+
/**
|
|
23
|
+
* Append a builder chain call inserted between `.withServices(…)` and
|
|
24
|
+
* `.withControllers(…)`. Pass the call with its leading dot,
|
|
25
|
+
* e.g. `.withTypeOrm({ … })`.
|
|
26
|
+
*/
|
|
27
|
+
appendBuilderChain(call: string): this;
|
|
28
|
+
/** Register a controller; adds its import and queues it for withControllers(). */
|
|
29
|
+
addController(model: ClassModel): this;
|
|
30
|
+
render(): string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function rootPackageJson(name: string): string;
|
|
2
|
+
export declare function apiPackageJson(name: string): string;
|
|
3
|
+
export declare const TSCONFIG: string;
|
|
4
|
+
export declare const VSCODE_LAUNCH_JSON: string;
|
|
5
|
+
export declare function vscodeSettingsJson(name: string): string;
|
|
6
|
+
export declare const GITIGNORE = "node_modules/\ndist/\n.env.local\n.pnpm-store\n";
|
|
7
|
+
export declare function configYaml(): string;
|
|
8
|
+
export declare const CONFIG_DEV_YAML = "sample:\n greeting: Hello from dev configuration!\n";
|
|
9
|
+
export declare const SAMPLE_CONFIG_TS = "export class SampleConfig {\n\tpublic greeting: string = \"\";\n}\n";
|
|
10
|
+
export declare const SAMPLE_SERVICE_TS = "import { inject, injectable } from \"@decohere/crucible/decorators\";\nimport { ConfigurationServiceToken } from \"@decohere/nexus/configuration\";\nimport type { IConfigurationService } from \"@decohere/nexus/configuration\";\nimport { SampleConfig } from \"./sample.config.js\";\n\n@injectable()\nexport class SampleService {\n\tpublic constructor(\n\t\t@inject(ConfigurationServiceToken) private readonly config: IConfigurationService,\n\t) {}\n\n\tpublic async getGreeting(): Promise<string> {\n\t\tconst config = await this.config.get(SampleConfig);\n\t\treturn config.greeting;\n\t}\n}\n";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const REQUIRED_SCOPES = "create:clients";
|
|
2
|
+
export declare class Auth0AuthError extends Error {
|
|
3
|
+
constructor(message: string);
|
|
4
|
+
}
|
|
5
|
+
export interface Auth0Tenant {
|
|
6
|
+
name: string;
|
|
7
|
+
active?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function isInstalled(): boolean;
|
|
10
|
+
export declare function listTenants(): Auth0Tenant[];
|
|
11
|
+
export declare function login(): boolean;
|
|
12
|
+
export declare function listApis(): Array<{
|
|
13
|
+
identifier: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function createApi(name: string, identifier: string): {
|
|
17
|
+
identifier: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function createSpaApp(name: string, callbackUrl: string): {
|
|
20
|
+
client_id: string;
|
|
21
|
+
};
|
|
22
|
+
export { REQUIRED_SCOPES };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function auth0ConfigYaml(issuerBaseUrl?: string, audience?: string): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const TSCONFIG: string;
|
|
2
|
+
export declare const VSCODE_LAUNCH_JSON: string;
|
|
3
|
+
export declare function rootPackageJson(name: string): string;
|
|
4
|
+
export declare function appPackageJson(name: string): string;
|
|
5
|
+
export declare function vscodeSettingsJson(name: string): string;
|
|
6
|
+
export declare const MAIN_TS = "console.log(\"Hello from Decohere!\");\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildPostmanCollection(projectName: string, withAuth0: boolean): unknown;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const SAMPLE_ENTITY_TS = "import { Column, Entity, PrimaryGeneratedColumn } from \"typeorm\";\nimport type { Entity as IEntity } from \"@decohere/codex\";\n\n@Entity()\nexport class SampleEntity implements IEntity {\n\t@PrimaryGeneratedColumn()\n\tpublic id!: number;\n\n\t@Column()\n\tpublic name!: string;\n}\n";
|
|
2
|
+
export declare const SAMPLE_REPOSITORY_TS = "import { injectable } from \"@decohere/crucible/decorators\";\nimport { injectUnitOfWork } from \"@decohere/codex\";\nimport { TypeOrmRepository, TypeOrmUnitOfWork } from \"@decohere/codex-typeorm\";\nimport { SampleEntity } from \"../entities/sample.entity.js\";\n\n@injectable()\nexport class SampleEntityRepository extends TypeOrmRepository<SampleEntity> {\n\tpublic constructor(@injectUnitOfWork() unitOfWork: TypeOrmUnitOfWork) {\n\t\tsuper(unitOfWork, SampleEntity);\n\t}\n}\n";
|
|
3
|
+
export interface DbDevCreds {
|
|
4
|
+
db?: string;
|
|
5
|
+
user?: string;
|
|
6
|
+
password?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function databaseDevConfigYaml(name: string, creds?: DbDevCreds): string;
|
|
9
|
+
export declare const DATABASE_BASE_CONFIG_YAML = "database:\n dataSources:\n - name: default\n provider: postgres\n host: ${DB_HOST}\n port: ${DB_PORT}\n database: ${DB_NAME}\n username: ${DB_USER}\n password: ${DB_PASSWORD}\n synchronize: false\n seed: false\n adminUser: ${DB_ADMIN_USER}\n adminPassword: ${DB_ADMIN_PASSWORD}\n";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order matters within each phase:
|
|
3
|
+
* - apiCore must render before typeorm (typeorm reads the config.yaml that
|
|
4
|
+
* apiCore writes).
|
|
5
|
+
* - typeorm must render before auth0 (both append to config.prod.yaml; the
|
|
6
|
+
* existing behaviour writes the database section first, then auth).
|
|
7
|
+
*/
|
|
8
|
+
export declare const apiWorkflow: import("../domain/workflow.js").Workflow;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cliWorkflow: import("../domain/workflow.js").Workflow;
|
package/commonjs/src/scaffold.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "scaffold", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return scaffold;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _nodefs = require("node:fs");
|
|
12
|
-
const _promises = require("node:fs/promises");
|
|
13
|
-
const _nodepath = require("node:path");
|
|
14
|
-
const _promises1 = require("node:readline/promises");
|
|
15
|
-
const _interop = require("@decohere/nexus/interop");
|
|
16
|
-
const _templates = require("./templates.js");
|
|
17
|
-
async function scaffold(targetDir, opts) {
|
|
18
|
-
const name = (0, _nodepath.basename)(targetDir);
|
|
19
|
-
if ((0, _nodefs.existsSync)(targetDir) && (0, _nodefs.readdirSync)(targetDir).length > 0 && !opts.yes) {
|
|
20
|
-
const rl = (0, _promises1.createInterface)({
|
|
21
|
-
input: process.stdin,
|
|
22
|
-
output: process.stdout
|
|
23
|
-
});
|
|
24
|
-
const answer = await rl.question(`Directory "${name}" is not empty. Continue? [y/N] `);
|
|
25
|
-
rl.close();
|
|
26
|
-
if (!answer.trim().toLowerCase().startsWith("y")) {
|
|
27
|
-
console.log("Aborted.");
|
|
28
|
-
process.exit(0);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
if (opts.template === "webapi") {
|
|
32
|
-
const dbOpts = opts.database ? {
|
|
33
|
-
database: opts.database
|
|
34
|
-
} : undefined;
|
|
35
|
-
await (0, _promises.mkdir)((0, _nodepath.join)(targetDir, "projects", "api", "src", "controllers"), {
|
|
36
|
-
recursive: true
|
|
37
|
-
});
|
|
38
|
-
await (0, _promises.mkdir)((0, _nodepath.join)(targetDir, "config"), {
|
|
39
|
-
recursive: true
|
|
40
|
-
});
|
|
41
|
-
const writes = [
|
|
42
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "package.json"), (0, _templates.WEB_API_ROOT_PACKAGE_JSON)(name, dbOpts)),
|
|
43
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "tsconfig.json"), _templates.WEB_API_TSCONFIG),
|
|
44
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "api", "package.json"), (0, _templates.WEB_API_APP_PACKAGE_JSON)(name)),
|
|
45
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "api", "src", "main.ts"), (0, _templates.WEB_API_MAIN_TS)(name, dbOpts)),
|
|
46
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "api", "src", "controllers", "hello.controller.ts"), _templates.HELLO_CONTROLLER_TS),
|
|
47
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "api", "src", "sample.config.ts"), _templates.SAMPLE_CONFIG_TS),
|
|
48
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "api", "src", "sample.service.ts"), _templates.SAMPLE_SERVICE_TS),
|
|
49
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "config", "config.yaml"), (0, _templates.CONFIG_YAML)(name, dbOpts)),
|
|
50
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "config", "config.dev.yaml"), _templates.CONFIG_DEV_YAML)
|
|
51
|
-
];
|
|
52
|
-
if (opts.database === "typeorm") {
|
|
53
|
-
await (0, _promises.mkdir)((0, _nodepath.join)(targetDir, "projects", "api", "src", "entities"), {
|
|
54
|
-
recursive: true
|
|
55
|
-
});
|
|
56
|
-
await (0, _promises.mkdir)((0, _nodepath.join)(targetDir, "projects", "api", "src", "repositories"), {
|
|
57
|
-
recursive: true
|
|
58
|
-
});
|
|
59
|
-
writes.push((0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "api", "src", "entities", "sample.entity.ts"), _templates.SAMPLE_ENTITY_TS), (0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "api", "src", "repositories", "sample.repository.ts"), _templates.SAMPLE_REPOSITORY_TS), (0, _promises.writeFile)((0, _nodepath.join)(targetDir, "config", "config.prod.yaml"), _templates.CONFIG_PROD_YAML));
|
|
60
|
-
}
|
|
61
|
-
await Promise.all(writes);
|
|
62
|
-
} else {
|
|
63
|
-
await (0, _promises.mkdir)((0, _nodepath.join)(targetDir, "projects", "app", "src"), {
|
|
64
|
-
recursive: true
|
|
65
|
-
});
|
|
66
|
-
await Promise.all([
|
|
67
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "package.json"), (0, _templates.ROOT_PACKAGE_JSON)(name)),
|
|
68
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "tsconfig.json"), _templates.TSCONFIG),
|
|
69
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "app", "package.json"), (0, _templates.APP_PACKAGE_JSON)(name)),
|
|
70
|
-
(0, _promises.writeFile)((0, _nodepath.join)(targetDir, "projects", "app", "src", "main.ts"), _templates.MAIN_TS)
|
|
71
|
-
]);
|
|
72
|
-
}
|
|
73
|
-
console.log(`\nScaffolded ${name}. Installing dependencies...\n`);
|
|
74
|
-
let pm = (0, _interop.detectPackageManager)(targetDir);
|
|
75
|
-
if (pm == null) {
|
|
76
|
-
pm = await (0, _interop.promptForPackageManager)();
|
|
77
|
-
}
|
|
78
|
-
await pm.install({
|
|
79
|
-
cwd: targetDir
|
|
80
|
-
});
|
|
81
|
-
console.log(`\nDone! Next steps:\n`);
|
|
82
|
-
if ((0, _nodepath.basename)(targetDir) !== targetDir) {
|
|
83
|
-
console.log(` cd ${name}`);
|
|
84
|
-
}
|
|
85
|
-
console.log(" pnpm build # forge build");
|
|
86
|
-
console.log(" pnpm dev # flux serve\n");
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9ob21lL3J1bm5lci93b3JrL2RlY29oZXJlL2RlY29oZXJlL3Byb2plY3RzL2NyZWF0ZS9zcmMvc2NhZmZvbGQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZXhpc3RzU3luYywgcmVhZGRpclN5bmMgfSBmcm9tIFwibm9kZTpmc1wiO1xuaW1wb3J0IHsgbWtkaXIsIHdyaXRlRmlsZSB9IGZyb20gXCJub2RlOmZzL3Byb21pc2VzXCI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