@phpsandbox/sdk 0.0.58 → 0.0.59

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/dist/git.d.ts CHANGED
@@ -52,10 +52,14 @@ export interface GitCredentials {
52
52
  export type GitProvider = 'github' | (string & {});
53
53
  export type GitRepositoryVisibility = 'private' | 'public';
54
54
  export type GitSyncDirection = 'pull' | 'push' | 'both';
55
+ export interface GitSyncAuthor {
56
+ name: string;
57
+ email: string;
58
+ }
55
59
  export interface GitSyncTargetInput {
56
60
  provider: GitProvider;
57
61
  repository: string;
58
- author: string;
62
+ author: GitSyncAuthor;
59
63
  branch?: string;
60
64
  credential: SecretRef;
61
65
  direction?: GitSyncDirection;
@@ -58,9 +58,14 @@ async function publishFirstLaravelCloudDeployment() {
58
58
  throw new Error('Missing PHPSANDBOX_GITHUB_TOKEN');
59
59
  }
60
60
 
61
- const gitAuthor = process.env.PHPSANDBOX_GIT_AUTHOR;
62
- if (!gitAuthor) {
63
- throw new Error('Missing PHPSANDBOX_GIT_AUTHOR');
61
+ const gitAuthorName = process.env.PHPSANDBOX_GIT_AUTHOR_NAME;
62
+ if (!gitAuthorName) {
63
+ throw new Error('Missing PHPSANDBOX_GIT_AUTHOR_NAME');
64
+ }
65
+
66
+ const gitAuthorEmail = process.env.PHPSANDBOX_GIT_AUTHOR_EMAIL;
67
+ if (!gitAuthorEmail) {
68
+ throw new Error('Missing PHPSANDBOX_GIT_AUTHOR_EMAIL');
64
69
  }
65
70
 
66
71
  const apiKey = process.env.PHPSANDBOX_LARAVEL_CLOUD_API_KEY;
@@ -76,7 +81,7 @@ async function publishFirstLaravelCloudDeployment() {
76
81
  const source = await notebook.git.sync({
77
82
  provider: 'github',
78
83
  repository,
79
- author: gitAuthor,
84
+ author: { name: gitAuthorName, email: gitAuthorEmail },
80
85
  branch: 'main',
81
86
  credential: {
82
87
  secret: githubTokenSecret,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phpsandbox/sdk",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "description": "A comprehensive TypeScript SDK for interacting with cloud-based PHP development environments",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",