@crossdelta/platform-sdk 0.13.1 → 0.13.3
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/package.json +3 -1
- package/scripts/postinstall.js +53 -0
- package/bin/cli.js +0 -312
- package/bin/docs/generators/README.md +0 -56
- package/bin/docs/generators/code-style.md +0 -96
- package/bin/docs/generators/hono-bun.md +0 -181
- package/bin/docs/generators/hono-node.md +0 -194
- package/bin/docs/generators/nest.md +0 -358
- package/bin/docs/generators/service.md +0 -564
- package/bin/docs/generators/testing.md +0 -97
- package/bin/integration.collection.json +0 -18
- package/bin/templates/hono-microservice/Dockerfile.hbs +0 -16
- package/bin/templates/hono-microservice/biome.json.hbs +0 -3
- package/bin/templates/hono-microservice/src/index.ts.hbs +0 -18
- package/bin/templates/hono-microservice/tsconfig.json.hbs +0 -14
- package/bin/templates/nest-microservice/Dockerfile.hbs +0 -37
- package/bin/templates/nest-microservice/biome.json.hbs +0 -3
- package/bin/templates/nest-microservice/src/app.context.ts.hbs +0 -17
- package/bin/templates/nest-microservice/src/events/events.module.ts.hbs +0 -8
- package/bin/templates/nest-microservice/src/events/events.service.ts.hbs +0 -22
- package/bin/templates/nest-microservice/src/main.ts.hbs +0 -34
- package/bin/templates/workspace/.github/README.md +0 -70
- package/bin/templates/workspace/.github/actions/check-image-tag-exists/action.yml +0 -27
- package/bin/templates/workspace/.github/actions/check-image-tag-exists/index.js +0 -179
- package/bin/templates/workspace/.github/actions/check-path-changes/action.yml +0 -21
- package/bin/templates/workspace/.github/actions/check-path-changes/index.js +0 -192
- package/bin/templates/workspace/.github/actions/detect-skipped-services/action.yml +0 -38
- package/bin/templates/workspace/.github/actions/generate-scope-matrix/action.yml +0 -17
- package/bin/templates/workspace/.github/actions/generate-scope-matrix/index.js +0 -355
- package/bin/templates/workspace/.github/actions/prepare-build-context/action.yml +0 -49
- package/bin/templates/workspace/.github/actions/resolve-scope-tags/action.yml +0 -31
- package/bin/templates/workspace/.github/actions/resolve-scope-tags/index.js +0 -398
- package/bin/templates/workspace/.github/actions/setup-bun-install/action.yml.hbs +0 -57
- package/bin/templates/workspace/.github/copilot-chat-configuration.json +0 -49
- package/bin/templates/workspace/.github/copilot-instructions.md.hbs +0 -72
- package/bin/templates/workspace/.github/dependabot.yml +0 -18
- package/bin/templates/workspace/.github/workflows/build-and-deploy.yml.hbs +0 -228
- package/bin/templates/workspace/.github/workflows/lint-and-tests.yml.hbs +0 -32
- package/bin/templates/workspace/.github/workflows/publish-packages.yml +0 -154
- package/bin/templates/workspace/apps/.gitkeep +0 -0
- package/bin/templates/workspace/biome.json.hbs +0 -62
- package/bin/templates/workspace/bunfig.toml.hbs +0 -5
- package/bin/templates/workspace/docs/.gitkeep +0 -0
- package/bin/templates/workspace/editorconfig.hbs +0 -9
- package/bin/templates/workspace/gitignore.hbs +0 -15
- package/bin/templates/workspace/infra/Pulumi.dev.yaml.hbs +0 -5
- package/bin/templates/workspace/infra/Pulumi.yaml.hbs +0 -6
- package/bin/templates/workspace/infra/index.ts.hbs +0 -56
- package/bin/templates/workspace/infra/package.json.hbs +0 -21
- package/bin/templates/workspace/infra/services/.gitkeep +0 -0
- package/bin/templates/workspace/infra/tsconfig.json.hbs +0 -15
- package/bin/templates/workspace/npmrc.hbs +0 -2
- package/bin/templates/workspace/package.json.hbs +0 -51
- package/bin/templates/workspace/packages/.gitkeep +0 -0
- package/bin/templates/workspace/packages/contracts/README.md.hbs +0 -166
- package/bin/templates/workspace/packages/contracts/package.json.hbs +0 -22
- package/bin/templates/workspace/packages/contracts/src/events/index.ts +0 -16
- package/bin/templates/workspace/packages/contracts/src/index.ts +0 -10
- package/bin/templates/workspace/packages/contracts/src/stream-policies.ts.hbs +0 -40
- package/bin/templates/workspace/packages/contracts/tsconfig.json.hbs +0 -7
- package/bin/templates/workspace/pnpm-workspace.yaml.hbs +0 -5
- package/bin/templates/workspace/turbo.json +0 -37
- package/bin/templates/workspace/turbo.json.hbs +0 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crossdelta/platform-sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "Platform toolkit for event-driven microservices — keeping code and infrastructure in lockstep.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"bin/**/*.json",
|
|
33
33
|
"!bin/**/*.map",
|
|
34
34
|
"dist/",
|
|
35
|
+
"scripts/postinstall.js",
|
|
35
36
|
"README.md",
|
|
36
37
|
"logo.png",
|
|
37
38
|
"schemas",
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
}
|
|
81
82
|
},
|
|
82
83
|
"scripts": {
|
|
84
|
+
"postinstall": "node scripts/postinstall.js",
|
|
83
85
|
"start:dev": "node esbuild.config.mjs --watch",
|
|
84
86
|
"build:cli": "node esbuild.config.mjs",
|
|
85
87
|
"build:cli:copy": "cp cli/integration.collection.json bin/integration.collection.json && rm -rf bin/templates && mkdir -p bin/templates && cp -r cli/src/commands/create/workspace/templates bin/templates/workspace && cp -r cli/src/commands/create/hono-microservice/templates bin/templates/hono-microservice && cp -r cli/src/commands/create/nest-microservice/templates bin/templates/nest-microservice && mkdir -p bin/docs/generators && cp -r docs/generators/* bin/docs/generators/",
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Post-install message for global installations.
|
|
4
|
+
* Reminds users to add Bun/npm/pnpm/yarn bin directory to PATH.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const os = require('node:os')
|
|
8
|
+
const path = require('node:path')
|
|
9
|
+
const fs = require('node:fs')
|
|
10
|
+
|
|
11
|
+
// Check if this is a global installation
|
|
12
|
+
// For npm/pnpm/yarn: npm_config_global or npm_config_prefix
|
|
13
|
+
// For Bun: Check if we're in ~/.bun/install/global/
|
|
14
|
+
const isGlobal = process.env.npm_config_global === 'true' ||
|
|
15
|
+
process.env.npm_config_prefix !== undefined ||
|
|
16
|
+
__dirname.includes('.bun/install/global')
|
|
17
|
+
|
|
18
|
+
if (!isGlobal) {
|
|
19
|
+
// Local installation - no message needed
|
|
20
|
+
process.exit(0)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const homeDir = os.homedir()
|
|
24
|
+
let binPath = ''
|
|
25
|
+
let shellConfig = ''
|
|
26
|
+
|
|
27
|
+
// Detect package manager and shell
|
|
28
|
+
if (process.env.BUN_INSTALL) {
|
|
29
|
+
binPath = path.join(process.env.BUN_INSTALL, 'bin')
|
|
30
|
+
shellConfig = process.env.SHELL?.includes('zsh') ? '~/.zshrc' : '~/.bashrc'
|
|
31
|
+
} else if (process.env.npm_config_prefix) {
|
|
32
|
+
binPath = path.join(process.env.npm_config_prefix, 'bin')
|
|
33
|
+
shellConfig = process.env.SHELL?.includes('zsh') ? '~/.zshrc' : '~/.bashrc'
|
|
34
|
+
} else {
|
|
35
|
+
binPath = path.join(homeDir, '.bun', 'bin')
|
|
36
|
+
shellConfig = process.env.SHELL?.includes('zsh') ? '~/.zshrc' : '~/.bashrc'
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Check if binPath is in PATH
|
|
40
|
+
const pathDirs = (process.env.PATH || '').split(':')
|
|
41
|
+
if (pathDirs.includes(binPath)) {
|
|
42
|
+
// Already in PATH - success message only
|
|
43
|
+
console.log('\n✅ @crossdelta/platform-sdk installed successfully!')
|
|
44
|
+
console.log('\nRun: \x1b[36mpf --help\x1b[0m')
|
|
45
|
+
process.exit(0)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Not in PATH - show instructions
|
|
49
|
+
console.log('\n\x1b[33m⚠️ One more step!\x1b[0m')
|
|
50
|
+
console.log('\nTo use the \x1b[36mpf\x1b[0m command, add this to your \x1b[36m' + shellConfig + '\x1b[0m:\n')
|
|
51
|
+
console.log(' \x1b[32mexport PATH="' + binPath + ':$PATH"\x1b[0m\n')
|
|
52
|
+
console.log('Then reload your shell:')
|
|
53
|
+
console.log(' \x1b[32msource ' + shellConfig + '\x1b[0m\n')
|