@crossdelta/platform-sdk 0.18.6 → 0.19.1

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.
Files changed (44) hide show
  1. package/README.md +27 -5
  2. package/bin/chunk-634PL24Z.mjs +20 -0
  3. package/bin/cli.mjs +604 -0
  4. package/bin/config-CKQHYOF4.mjs +2 -0
  5. package/bin/docs/generators/code-style.md +79 -0
  6. package/bin/docs/generators/natural-language.md +117 -0
  7. package/bin/docs/generators/service.md +129 -60
  8. package/bin/templates/hono-microservice/Dockerfile.hbs +1 -0
  9. package/bin/templates/hono-microservice/src/config/env.ts.hbs +3 -0
  10. package/bin/templates/nest-microservice/Dockerfile.hbs +2 -0
  11. package/bin/templates/nest-microservice/src/config/env.ts.hbs +17 -0
  12. package/bin/templates/nest-microservice/src/main.ts.hbs +2 -1
  13. package/bin/templates/workspace/.github/actions/prepare-build-context/action.yml +12 -6
  14. package/bin/templates/workspace/biome.json.hbs +4 -1
  15. package/bin/templates/workspace/infra/package.json.hbs +1 -1
  16. package/bin/templates/workspace/package.json.hbs +1 -0
  17. package/bin/templates/workspace/packages/contracts/README.md.hbs +5 -5
  18. package/bin/templates/workspace/packages/contracts/package.json.hbs +14 -5
  19. package/bin/templates/workspace/packages/contracts/src/index.ts +1 -1
  20. package/bin/templates/workspace/packages/contracts/tsconfig.json.hbs +6 -1
  21. package/bin/templates/workspace/turbo.json +8 -10
  22. package/bin/templates/workspace/turbo.json.hbs +6 -5
  23. package/dist/facade.d.mts +840 -0
  24. package/dist/facade.d.ts +840 -0
  25. package/dist/facade.js +2294 -0
  26. package/dist/facade.js.map +1 -0
  27. package/dist/facade.mjs +2221 -0
  28. package/dist/facade.mjs.map +1 -0
  29. package/dist/plugin-types-DQOv97Zh.d.mts +180 -0
  30. package/dist/plugin-types-DQOv97Zh.d.ts +180 -0
  31. package/dist/plugin-types.d.mts +1 -0
  32. package/dist/plugin-types.d.ts +1 -0
  33. package/dist/plugin-types.js +19 -0
  34. package/dist/plugin-types.js.map +1 -0
  35. package/dist/plugin-types.mjs +1 -0
  36. package/dist/plugin-types.mjs.map +1 -0
  37. package/dist/plugin.d.mts +31 -0
  38. package/dist/plugin.d.ts +31 -0
  39. package/dist/plugin.js +105 -0
  40. package/dist/plugin.js.map +1 -0
  41. package/dist/plugin.mjs +75 -0
  42. package/dist/plugin.mjs.map +1 -0
  43. package/package.json +118 -99
  44. package/bin/cli.js +0 -544
@@ -2,21 +2,30 @@
2
2
  "name": "{{scope}}/contracts",
3
3
  "private": true,
4
4
  "type": "module",
5
- "main": "./src/index.ts",
6
- "types": "./src/index.ts",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
7
8
  "exports": {
8
9
  ".": {
9
- "types": "./src/index.ts",
10
- "default": "./src/index.ts"
10
+ "bun": "./src/index.ts",
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
11
14
  }
12
15
  },
16
+ "scripts": {
17
+ "build": "tsup",
18
+ "dev": "tsup --watch",
19
+ "clean": "rm -rf dist"
20
+ },
13
21
  "dependencies": {
14
- "@crossdelta/cloudevents": "^0.6.2",
22
+ "@crossdelta/cloudevents": "^0.6.3",
15
23
  "@crossdelta/infrastructure": "^0.5.3",
16
24
  "zod": "^4.0.0"
17
25
  },
18
26
  "devDependencies": {
19
27
  "@biomejs/biome": "^1.9.4",
28
+ "tsup": "^8.5.0",
20
29
  "typescript": "^5.7.2"
21
30
  }
22
31
  }
@@ -1,7 +1,7 @@
1
1
  // Export your event contracts and schemas here
2
2
  // Use the CLI to generate contracts:
3
3
  //
4
- // pf event add orders.created --fields "orderId:string,total:number"
4
+ // pf cloudevents add orders.created --fields "orderId:string,total:number"
5
5
  //
6
6
  // This will create: src/events/orders/created.ts
7
7
  // Then uncomment the exports below:
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "outDir": "./dist",
4
- "rootDir": "./src"
4
+ "rootDir": "./src",
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "declaration": true,
8
+ "strict": true,
9
+ "skipLibCheck": true
5
10
  },
6
11
  "include": ["src/**/*"]
7
12
  }
@@ -3,7 +3,8 @@
3
3
  "tasks": {
4
4
  "start:dev": {
5
5
  "cache": false,
6
- "persistent": true
6
+ "persistent": true,
7
+ "dependsOn": ["^build"]
7
8
  },
8
9
  "sync-templates": {
9
10
  "cache": false
@@ -13,18 +14,17 @@
13
14
  },
14
15
  "pulumi": {},
15
16
  "build": {
16
- "cache": false,
17
- "dependsOn": ["^build"]
17
+ "dependsOn": ["^build"],
18
+ "outputs": ["dist/**", "bin/**", ".next/**", ".qwik/**"]
18
19
  },
19
20
  "test": {
21
+ "dependsOn": ["build", "^build"],
20
22
  "cache": false
21
23
  },
22
24
  "format": {
23
25
  "cache": false
24
26
  },
25
- "lint": {
26
- "cache": false
27
- },
27
+ "lint": {},
28
28
  "preview": {
29
29
  "cache": false,
30
30
  "persistent": true
@@ -32,7 +32,5 @@
32
32
  },
33
33
  "ui": "tui",
34
34
  "concurrency": "50",
35
- "globalPassThroughEnv": [
36
- "*"
37
- ]
38
- }
35
+ "globalPassThroughEnv": ["*"]
36
+ }
@@ -3,21 +3,22 @@
3
3
  "tasks": {
4
4
  "start:dev": {
5
5
  "cache": false,
6
- "persistent": true
6
+ "persistent": true,
7
+ "dependsOn": ["^build"]
7
8
  },
8
9
  "pulumi": {},
9
10
  "build": {
10
- "cache": false
11
+ "dependsOn": ["^build"],
12
+ "outputs": ["dist/**", "bin/**"]
11
13
  },
12
14
  "test": {
15
+ "dependsOn": ["build", "^build"],
13
16
  "cache": false
14
17
  },
15
18
  "format": {
16
19
  "cache": false
17
20
  },
18
- "lint": {
19
- "cache": false
20
- },
21
+ "lint": {},
21
22
  "preview": {
22
23
  "cache": false,
23
24
  "persistent": true