@dbx-tools/projen 0.6.76 → 0.6.77
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/README.md +38 -0
- package/index.ts +8 -21
- package/package.json +4 -4
- package/src/project-js.ts +1237 -0
- package/src/project-predicate.ts +1 -1
- package/src/project-py.ts +329 -0
- package/src/project.ts +46 -1292
- package/src/vscode.ts +3 -3
package/README.md
CHANGED
|
@@ -47,6 +47,44 @@ The engine treats generated barrels, tests, declaration files, and folders
|
|
|
47
47
|
without exported source modules as implementation details. They do not create
|
|
48
48
|
new package membership.
|
|
49
49
|
|
|
50
|
+
## Add A Python uv Workspace
|
|
51
|
+
|
|
52
|
+
`DBXToolsPythonWorkspace` attaches Python packaging to an existing projen root
|
|
53
|
+
without turning Python packages into JavaScript workspace projects. It generates
|
|
54
|
+
the root and member `pyproject.toml` files, standard `py:*` tasks, the VS Code
|
|
55
|
+
interpreter setting, and an optional manual PyPI trusted-publishing workflow.
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import { project, projectPy } from "@dbx-tools/projen";
|
|
59
|
+
|
|
60
|
+
const root = new project.DBXToolsNodeProject({ name: "my-apps" });
|
|
61
|
+
const repository = {
|
|
62
|
+
url: "https://github.com/example/my-apps.git",
|
|
63
|
+
ref: "main",
|
|
64
|
+
root: "python/packages",
|
|
65
|
+
} as const;
|
|
66
|
+
|
|
67
|
+
new projectPy.DBXToolsPythonWorkspace(root, {
|
|
68
|
+
repository,
|
|
69
|
+
packages: [
|
|
70
|
+
{
|
|
71
|
+
directory: "core",
|
|
72
|
+
name: "my-apps-core",
|
|
73
|
+
module: "my_apps.core",
|
|
74
|
+
description: "Shared Python helpers",
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
interpreterPath: "${workspaceFolder}/python/.venv/bin/python",
|
|
78
|
+
release: true,
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Use `projectPy.pythonGitDependency(repository, name, directory)` for an internal
|
|
83
|
+
dependency that must also resolve when a package is installed directly through a
|
|
84
|
+
Git `#subdirectory=` URL. `root.vscode` is projen's existing VS Code component;
|
|
85
|
+
dbx-tools reuses it rather than constructing a second `.vscode/settings.json`
|
|
86
|
+
owner.
|
|
87
|
+
|
|
50
88
|
## Customize Packages With Mixins
|
|
51
89
|
|
|
52
90
|
```ts
|
package/index.ts
CHANGED
|
@@ -15,7 +15,9 @@ export * as openapi from "./src/openapi.ts";
|
|
|
15
15
|
export * as packages from "./src/packages.ts";
|
|
16
16
|
export * as pnpmWorkspace from "./src/pnpm-workspace.ts";
|
|
17
17
|
export * as project from "./src/project.ts";
|
|
18
|
+
export * as projectJs from "./src/project-js.ts";
|
|
18
19
|
export * as projectPredicate from "./src/project-predicate.ts";
|
|
20
|
+
export * as projectPy from "./src/project-py.ts";
|
|
19
21
|
export * as publish from "./src/publish.ts";
|
|
20
22
|
export * as release from "./src/release.ts";
|
|
21
23
|
export * as scaffold from "./src/scaffold.ts";
|
|
@@ -23,15 +25,7 @@ export * as tags from "./src/tags.ts";
|
|
|
23
25
|
export * as tsconfig from "./src/tsconfig.ts";
|
|
24
26
|
export * as vscode from "./src/vscode.ts";
|
|
25
27
|
export * as watch from "./src/watch.ts";
|
|
26
|
-
export {
|
|
27
|
-
BUN_DEV_OVERRIDE,
|
|
28
|
-
BUN_BUILD_OVERRIDE,
|
|
29
|
-
BUN_APP_OVERRIDES,
|
|
30
|
-
RootBunfigFile,
|
|
31
|
-
BunfigFile,
|
|
32
|
-
BunDevServerFile,
|
|
33
|
-
BunBuildFile,
|
|
34
|
-
} from "./src/bun-app.ts";
|
|
28
|
+
export { BUN_DEV_OVERRIDE, BUN_BUILD_OVERRIDE, BUN_APP_OVERRIDES, RootBunfigFile, BunfigFile, BunDevServerFile, BunBuildFile } from "./src/bun-app.ts";
|
|
35
29
|
export { DBXToolsConfig } from "./src/dbx-tools-config.ts";
|
|
36
30
|
export type { DBXToolsConfigOptions } from "./src/dbx-tools-config.ts";
|
|
37
31
|
export { resolvePkgRoot } from "./src/engine-root.ts";
|
|
@@ -42,18 +36,11 @@ export { repoRoot, DEFAULT_PACKAGE_ROOTS, DiscoveredPackage } from "./src/packag
|
|
|
42
36
|
export type { RecordedPackage } from "./src/packages.ts";
|
|
43
37
|
export { PnpmWorkspaceState } from "./src/pnpm-workspace.ts";
|
|
44
38
|
export type { Catalog, AllowBuilds, DBXToolsPNPMWorkspaceOptions } from "./src/pnpm-workspace.ts";
|
|
45
|
-
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} from "./src/project.ts";
|
|
51
|
-
export type {
|
|
52
|
-
DBXToolsProject,
|
|
53
|
-
DBXToolsProjectOptions,
|
|
54
|
-
DBXToolsTypeScriptProjectOptions,
|
|
55
|
-
ApplyToProjectsOptions,
|
|
56
|
-
} from "./src/project.ts";
|
|
39
|
+
export type { ApplyToProjectsOptions } from "./src/project.ts";
|
|
40
|
+
export { PackageIdentifier, PROJEN_VERSION, DBXToolsNodeProject, ROOT_INSTALL_ONLY_MIXIN, DBXToolsTypeScriptProject } from "./src/project-js.ts";
|
|
41
|
+
export type { DBXToolsProject, DBXToolsProjectOptions, DBXToolsTypeScriptProjectOptions } from "./src/project-js.ts";
|
|
42
|
+
export { DBXToolsPythonWorkspace } from "./src/project-py.ts";
|
|
43
|
+
export type { PythonRepositoryOptions, PythonPackageOptions, PythonReleaseOptions, DBXToolsPythonWorkspaceOptions } from "./src/project-py.ts";
|
|
57
44
|
export { COMPILED_DIR, COMPILED_COMPILER_OPTIONS } from "./src/publish.ts";
|
|
58
45
|
export { DBXToolsRelease } from "./src/release.ts";
|
|
59
46
|
export type { StandaloneRelease, DBXToolsReleaseOptions } from "./src/release.ts";
|
package/package.json
CHANGED
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@clack/prompts": "^1.7.0",
|
|
29
|
-
"@dbx-tools/core": "0.6.
|
|
30
|
-
"@dbx-tools/path": "0.6.
|
|
31
|
-
"@dbx-tools/shared-core": "0.6.
|
|
29
|
+
"@dbx-tools/core": "0.6.77",
|
|
30
|
+
"@dbx-tools/path": "0.6.77",
|
|
31
|
+
"@dbx-tools/shared-core": "0.6.77",
|
|
32
32
|
"commander": "^15.0.0",
|
|
33
33
|
"concurrently": "^10.0.3",
|
|
34
34
|
"constructs": "^10.6.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"main": "index.ts",
|
|
49
49
|
"license": "Apache-2.0",
|
|
50
|
-
"version": "0.6.
|
|
50
|
+
"version": "0.6.77",
|
|
51
51
|
"types": "index.ts",
|
|
52
52
|
"type": "module",
|
|
53
53
|
"exports": {
|